FINERACT-1234: Fix disbursement validation to respect over-applied loan product configuration#5693
FINERACT-1234: Fix disbursement validation to respect over-applied loan product configuration#5693P-ragati wants to merge 2 commits intoapache:developfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Updates loan disbursement validation to account for loan product “over-applied” configuration (percentage/absolute) and to validate using total disbursed + capitalized income.
Changes:
- Reworked
compareDisbursedToApprovedOrProposedPrincipal()to compute a “max allowed” disbursement threshold using loan product over-applied settings. - Updated
validateOverMaximumAmount()to apply the same threshold logic and include capitalized income in comparisons. - Adjusted exception messaging/arguments to report total (disbursed + capitalized income) vs the computed maximum.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
.../java/org/apache/fineract/portfolio/loanaccount/serialization/LoanDisbursementValidator.java
Outdated
Show resolved
Hide resolved
.../java/org/apache/fineract/portfolio/loanaccount/serialization/LoanDisbursementValidator.java
Outdated
Show resolved
Hide resolved
.../java/org/apache/fineract/portfolio/loanaccount/serialization/LoanDisbursementValidator.java
Outdated
Show resolved
Hide resolved
|
Please follow the rules for pull request title format: "FINERACT-1234: Your title here"... also: could you please squash the 3 commits into 1... I doubt that you want to keep all three for just a couple of changes in one file. Thanks |
…an product configuration - Centralized max disbursement calculation - Respected over-applied configuration - Removed duplicated logic - Improved null-safety and precision
6ab05fb to
bb8480b
Compare
|
@P-ragati Aleks was just giving you an example, he was not asking you to use Please make sure your changes are paired with a relevant JIRA story in https://issues.apache.org/jira/projects/FINERACT/issues/ |
Description
Fix disbursement validation to correctly respect over-applied loan product configuration.
Previously, validation restricted disbursement strictly to the approved principal,
ignoring over-applied configuration.
This change:
Checklist