Skip to content

refs #321 貸付金及び受取利息の内訳書の集計・表示を実装する#358

Open
aomrikti wants to merge 3 commits into
masterfrom
i321
Open

refs #321 貸付金及び受取利息の内訳書の集計・表示を実装する#358
aomrikti wants to merge 3 commits into
masterfrom
i321

Conversation

@aomrikti

Copy link
Copy Markdown
Collaborator

ー 補助単位で短期・長期の貸付金残高と期中受取利息を1行に合算する
ー 期末残高と期中利息がともに0の行は表示しない
ー 補助なしで親科目に計上した残高は、貸付先未特定の行として残高のみ表示する
ー 関係欄は役員・株主・関係会社を必ず出し、従業員は続柄を「代表者との関係:」付きで併記する
ー 新旧様式テンプレに loan_details を接続し、貸付ブロックは最低7行表示にする
ー 帳票プルダウン名を「、」区切りに変更する
ー テスト用仕訳データとロジックテストを追加する

ー 補助単位で短期・長期の貸付金残高と期中受取利息を1行に合算する
ー 期末残高と期中利息がともに0の行は表示しない
ー 補助なしで親科目に計上した残高は、貸付先未特定の行として残高のみ表示する
ー 関係欄は役員・株主・関係会社を必ず出し、従業員は続柄を「代表者との関係:」付きで併記する
ー 新旧様式テンプレに loan_details を接続し、貸付ブロックは最低7行表示にする
ー 帳票プルダウン名を「、」区切りに変更する
ー テスト用仕訳データとロジックテストを追加する
Copilot AI review requested due to automatic review settings June 11, 2026 08:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

本PRは、帳票「④仮払金(前渡金)の内訳書、貸付金及び受取利息の内訳書」(refs #321)に対して、貸付金・受取利息の集計ロジックとテンプレート表示、およびテストデータ/ロジックテストを追加し、要件にある「補助単位での短期・長期合算」「0行非表示」「貸付ブロック最低7行表示」「帳票名の区切り変更」を反映するものです。

Changes:

  • 貸付金(短期・長期)残高と期中受取利息を補助単位で集計し、帳票モデル loan_details と合計値を追加
  • 新旧テンプレートで loan_details を描画し、合計行に合計金額を表示
  • テスト用仕訳データ・顧客fixture拡張・ロジックテスト追加、帳票プルダウン表示名の区切り文字を更新

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
app/models/reports/temporary_payment_and_loan_logic.rb 貸付金/受取利息の明細生成、合計算出、7行フィルを追加
app/views/financial_return_statements/temporary_payment_and_loan/20240301.html.erb 新様式テンプレで loan_details を表示し合計行も反映
app/views/financial_return_statements/temporary_payment_and_loan/00000000.html.erb 旧様式テンプレで loan_details を表示し合計行も反映
app/utils/hyacc_const.rb 帳票プルダウン名の区切りを「/」→「、」に変更
test/models/reports/temporary_payment_and_loan_logic_test.rb 貸付金内訳表示/相殺ロジックのテストを追加
test/fixtures/customers.yml 貸付テスト用の取引先データ(formal_name/法人番号/住所等)を拡充
test/data/journals.csv 貸付金・受取利息テスト用の仕訳(journals)を追加
test/data/journal_details.csv 貸付金・受取利息テスト用の仕訳明細(journal_details)を追加

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread app/models/reports/temporary_payment_and_loan_logic.rb
Comment thread test/models/reports/temporary_payment_and_loan_logic_test.rb Outdated
Comment thread app/models/reports/temporary_payment_and_loan_logic.rb Outdated
補助行の利息取得の二重SQLを解消し、1700/2700の親科目残高を1行に合算する。テストに長期親科目の仕訳を追加し、親行の件数・合算金額と最低7行表示の検証を更新する。
部門向け3科目をマスタから整理し、内訳書ロジックを従業員・取引先のみの個別行に変更する。1702等の残高はother_loan行に合算して表示漏れを防ぐ。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants