[
https://issues.apache.org/jira/browse/FINERACT-415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18117981#comment-18117981
]
Sonigra Bhavya Hemendrabhai commented on FINERACT-415:
------------------------------------------------------
hey [~santoshmath]
Working on this via PR #6435. Wanted to confirm the intended interpretation of
the validation rule before finalizing.
The description states: _"a should be equal to b+c. If a=b then c can be blank.
If a=c then b can be blank."_ I've read this as requiring an *exact match* —
{{mandatoryGuarantee == minSelf + minExternal}} — enforced at loan product
creation time.
This conflicts with the existing {{GuarantorTest}} integration test, which
assumes mandatory can legitimately _exceed_ the sum (e.g. mandatory=50%,
minSelf=20%, minExternal=20%), with guarantors incrementally closing the
remaining gap across multiple approval attempts. Under exact-sum enforcement,
that kind of product config can no longer be created, so the test's scenario
needs restructuring.
Before I rework the test, wanted to confirm: is exact-sum the correct read, or
should this instead be treated as a floor ({{{}mandatory >= minSelf +
minExternal{}}}), allowing headroom above the sum? The ticket text reads like
exact-sum to me, but wanted to check since it affects existing test coverage.
> Loan product should not allow to be created and should throw proper error
> when mandatory guarantee is not equal to any one of the guarantee(own or
> guarantor) or sum of both
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: FINERACT-415
> URL: https://issues.apache.org/jira/browse/FINERACT-415
> Project: Apache Fineract
> Issue Type: Bug
> Components: Loan
> Reporter: Santosh Math
> Priority: Major
> Labels: 2019-mifos-gsoc, Volunteer, gsoc, p2
>
> While creating loan product, Enable 'Place guarantee funds on Hold'.
> There you will see three fileds:
> a) Mandatory Guarantee
> b) Minimum Guarantee from Own Funds
> c) Minimum Guarantee from Guarantor funds.
> a should be equal to b+c.
> If a=b then 'c' can be blank.
> If a=c then 'b' can be blank.
> If not, the loan product should not allow to be created and should throw
> proper error: "Mandatory Guarantee should be equal to sum of own fund and
> guarantor fund OR any one of them".
--
This message was sent by Atlassian Jira
(v8.20.10#820010)