Repository navigation
FINERACT-2455: Transaction Summary reports for Working Capital loans - #6613
oleksii-novikov-onix wants to merge 2 commits into
Conversation
9169d27 to
61835e5
Compare
galovics
left a comment
There was a problem hiding this comment.
Review
Hi @oleksii-novikov-onix, thanks for the PR. The SQL looks right to me: the WC joins, the reversal handling (original rows on submitted_on_date, opposite-sign rows on reversed_on_date), the r_enum_value ids 44-47 and the MySQL/PostgreSQL split all line up with the existing reports. CI is green and 0256 fills the gap before 0257. A couple of things need fixing though.
fineract-e2e-tests-runner/src/test/resources/features/WorkingCapitalTransactionSummaryReport.feature (lines 6, 254, 602, 816):
None of the 4 scenarios has a
@TestRailId. Every otherWorkingCapital*.featureandReporting.featuretags each scenario. Pls add real IDs.
parts/0256_transaction_summary_reports_for_working_capital_loans.xml (the CTEs, e.g. lines 88, 141, 726, 779):
The type filter is a blacklist (
NOT IN (10, 26)). Any other type then lands in a row with a NULLTransaction_Amount, because it's in neither sign list ((2,6,8,9,22,23,26,27,46,47)/(1,10,20,44,45)). The regular report deliberately excludes(10, 26, 29, 30, 32, 34, ...).ACCRUAL_ADJUSTMENT(34) is already listed inWorkingCapitalLoanTransactionFinderandWorkingCapitalLoanTransactionTypeExternalEvents. I can't find code that creates it for WC today so it's not a live bug, but I'd rather whitelist the types this report supports than find out when the next WC type is added. Thoughts?
0256...xml:185-186:
The "with Asset Owner" report always returns NULL
Asset_owner_id/From_asset_owner_id. If that's only to keep the column shape of the regular report for downstream consumers, a one-line SQL comment would help. Otherwise the report name is misleading.
Smaller ones:
ReportingStepDef:verifyReportDataHeaders,verifyColumnNullability(for-loop toIntStream.forEach) andsumColumnForGlAccountwere rewritten, but only the new WC steps andverifyReportDataWithEmptyValuesare needed. Harmless, but it widens the diff of shared step code.WorkingCapitalLoanTransactionSummaryReportTest(842 lines, 8 tests) overlaps heavily with the new 996-line e2e feature (types, reversals, waiver, charge-off reason, regular-vs-WC). Do we need both?- The WC reports filter on the client's current office (
cl.office_id) sincem_wc_loan_transactionhas no office column, so a client transfer would move historical rows. Probably fine for now, just worth knowing. - Heads up: #6610 also changes
ReportsTest.listReports(85 to 86, this one 85 to 87), so whichever lands second must set it to 88. Both touchReportingStepDefand thechangelog-tenant.xmltail too. - PR description is the empty template.
Recommendation: REQUEST_CHANGES
2ed0d28 to
95a9747
Compare
Thanks for the review, @galovics.
|
…mary reports for Working Capital loans
95a9747 to
ad344b1
Compare
galovics
left a comment
There was a problem hiding this comment.
Review
Thanks @oleksii-novikov-onix, all addressed. The whitelist is in all three reports and matches the sign lists, the asset owner comment is there, the ReportingStepDef changes are back to only what's needed, and the TestRail IDs are added. Fair point on keeping both the IT and the e2e, since the IT is the only MySQL coverage.
One heads up: #6610 now uses 0260-0263 as well, so whichever lands second has to renumber its parts and set the report count to 88, like you said. Other than that, nice work.
Recommendation: APPROVE
Description
WC loans keep their transactions in separate tables, so the regular Transaction Summary reports never show them. This PR adds the WC versions of these reports:
Same parameters, columns, grouping, sign and reversal rules as the regular reports, plus r_enum_value labels for types 44-47. Only the WC transaction types in scope are reported. The office comes from the loan’s client, since WC transactions have no office_id. WC loans cannot be transferred, so the owner columns are always NULL.
Tests: WorkingCapitalLoanTransactionSummaryReportTest (MySQL, MariaDB, PostgreSQL) and WorkingCapitalTransactionSummaryReport.feature (PostgreSQL).
Checklist
Please make sure these boxes are checked before submitting your pull request - thanks!
Your assigned reviewer(s) will follow our guidelines for code reviews.