fix: allowPartialPeriodInterestCalculation
Due to a typo, the allowPartialPeriodInterestCalculation field was not processed correctly. Since the typo also occurs in some places in the Fineract API, the typo is re-introduced where needed.
This commit is contained in:
@@ -150,7 +150,7 @@ export class EditLoansAccountComponent {
|
||||
}
|
||||
|
||||
if (loansAccountData.interestCalculationPeriodType === 0) {
|
||||
loansAccountData.allowPartialPeriodInterestCalcualtion = false;
|
||||
loansAccountData.allowPartialPeriodInterestCalculation = false;
|
||||
}
|
||||
if (
|
||||
!loansAccountData.isLoanProductLinkedToFloatingRate ||
|
||||
@@ -161,6 +161,12 @@ export class EditLoansAccountComponent {
|
||||
loansAccountData.principal = loansAccountData.principalAmount;
|
||||
delete loansAccountData.principalAmount;
|
||||
delete loansAccountData.multiDisburseLoan;
|
||||
|
||||
// In Fineract, the POST and PUT endpoints for /v1/loans have a typo in the field
|
||||
// allowPartialPeriodInterestCalculation. Until that is fixed, we need to replace the field name in the payload.
|
||||
loansAccountData.allowPartialPeriodInterestCalcualtion = loansAccountData.allowPartialPeriodInterestCalculation;
|
||||
delete loansAccountData.allowPartialPeriodInterestCalculation;
|
||||
|
||||
this.loansService.updateLoansAccount(this.loanId, loansAccountData).subscribe((response: any) => {
|
||||
this.router.navigate(['../'], { relativeTo: this.route });
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user