0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

rex0220 データ生成プラグイン 契約-請求レコード生成

Last updated at Posted at 2026-01-16

rex0220 データ生成プラグインで、契約管理アプリから請求管理アプリレコード生成してみます。

概要

契約管理アプリから契約区分(月額・年額)に応じて、請求管理アプリのレコードを生成してみます。

  • 月額:12レコード生成
  • 年額:1レコード生成

2026-01-16_08h55_51.png

アプリ設定

契約管理アプリにデータ生成プラグインを設定して、請求管理アプリにレコード生成する構成です。

  • 契約管理アプリ
    • 関連レコード一覧で生成された請求管理アプリレコードを表示
    • 算式自動採番プラグインで、契約番号を採番

2026-01-16_08h59_24.png

  • 請求管理アプリ
    • データ生成プラグインの制御用に、「識別ID」を追加

2026-01-16_08h58_53.png

データ生成プラグイン設定

契約管理アプリにデータ生成プラグインを設定します。

2026-01-16_09h03_12.png

ループ: 契約区分により生成するレコード数を制御

IF(契約区分="年額",1,12)

対象アプリ条件: 契約番号で対象レコードと紐づけ

2026-01-16_09h05_29.png

設定項目

生成するレコードの項目を計算式で指定します。

2026-01-16_09h09_47.png

  • 請求予定日

契約開始日付からループカウンター($lno)を使って、請求予定日を算出します。

請求予定日
DATE_ADD(契約開始日付,1*$lno,"month")
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?