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:
Ralph Hopman
2025-01-29 10:36:13 +01:00
committed by Adam Saghy
parent c2777170be
commit 06693a65f0
23 changed files with 155 additions and 138 deletions
+7 -1
View File
@@ -634,7 +634,7 @@ export class LoansService {
}
if (loansAccountData.interestCalculationPeriodType === 0) {
loansAccountData.allowPartialPeriodInterestCalcualtion = false;
loansAccountData.allowPartialPeriodInterestCalculation = false;
}
if (!(loansAccountData.isFloatingInterestRate === false)) {
delete loansAccountData.isFloatingInterestRate;
@@ -646,6 +646,12 @@ export class LoansService {
loansAccountData.principal = loansAccountData.principalAmount;
delete loansAccountData.principalAmount;
delete loansAccountData.multiDisburseLoan; // this was just added so that disbursement data can be send in the backend
// 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;
return loansAccountData;
}
}