FINERACT-415: Enforce exact math validation for loan product mandatory guarantee - #6435
Open
Bhavya-Sonigra wants to merge 1 commit into
Open
Bhavya-Sonigra wants to merge 1 commit into
Bhavya-Sonigra wants to merge 1 commit into
Conversation
Bhavya-Sonigra
force-pushed
the
FINERACT-415-guarantee-validation
branch
from
September 14, 2026 06:27
1f8a0b7 to
d48dfb3
Compare
…y guarantee Assisted-By: Gemini
Bhavya-Sonigra
force-pushed
the
FINERACT-415-guarantee-validation
branch
from
September 16, 2026 15:48
d48dfb3 to
25bd6ec
Compare
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.
Closes FINERACT-415
Description
Updated
validateGuaranteeParamsinLoanProductDataValidator.javato enforce strict equality (!= 0) instead of a loose less-than check (< 0).Previously, the Fineract API allowed loan product creation if the mandatory guarantee was strictly greater than the sum of the own funds and guarantor funds, leaving the remaining balance completely unaccounted for in the database. This patch ensures the API strictly validates that the
mandatoryGuaranteeis exactly equal to the sum ofminimumGuaranteeFromOwnFundsandminimumGuaranteeFromGuarantor(or exactly equals one of them if the other is null/zero) before allowing creation or updates. Payload rejections now return themust.be.equal.to.sum.of.own.and.guarantor.fundserror code.Checklist
Please make sure these boxes are checked before submitting your pull request - thanks!