Conversation
ー 補助単位で短期・長期の貸付金残高と期中受取利息を1行に合算する ー 期末残高と期中利息がともに0の行は表示しない ー 補助なしで親科目に計上した残高は、貸付先未特定の行として残高のみ表示する ー 関係欄は役員・株主・関係会社を必ず出し、従業員は続柄を「代表者との関係:」付きで併記する ー 新旧様式テンプレに loan_details を接続し、貸付ブロックは最低7行表示にする ー 帳票プルダウン名を「、」区切りに変更する ー テスト用仕訳データとロジックテストを追加する
Contributor
There was a problem hiding this comment.
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.
補助行の利息取得の二重SQLを解消し、1700/2700の親科目残高を1行に合算する。テストに長期親科目の仕訳を追加し、親行の件数・合算金額と最低7行表示の検証を更新する。
部門向け3科目をマスタから整理し、内訳書ロジックを従業員・取引先のみの個別行に変更する。1702等の残高はother_loan行に合算して表示漏れを防ぐ。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ー 補助単位で短期・長期の貸付金残高と期中受取利息を1行に合算する
ー 期末残高と期中利息がともに0の行は表示しない
ー 補助なしで親科目に計上した残高は、貸付先未特定の行として残高のみ表示する
ー 関係欄は役員・株主・関係会社を必ず出し、従業員は続柄を「代表者との関係:」付きで併記する
ー 新旧様式テンプレに loan_details を接続し、貸付ブロックは最低7行表示にする
ー 帳票プルダウン名を「、」区切りに変更する
ー テスト用仕訳データとロジックテストを追加する