From 1d4987995b6dd9405687e22c0974437f6cddfc12 Mon Sep 17 00:00:00 2001 From: "Chris.Muiru" Date: Fri, 13 Feb 2026 15:15:28 +0300 Subject: [PATCH] fix: no-op assignment before deleting allowPartialPeriodInterestCalculation --- .../edit-loans-account/edit-loans-account.component.ts | 5 ----- src/app/loans/loans.service.ts | 6 +----- src/app/products/loan-products/loan-products.ts | 5 ----- 3 files changed, 1 insertion(+), 15 deletions(-) diff --git a/src/app/loans/edit-loans-account/edit-loans-account.component.ts b/src/app/loans/edit-loans-account/edit-loans-account.component.ts index 21550def52..11fcd1f891 100644 --- a/src/app/loans/edit-loans-account/edit-loans-account.component.ts +++ b/src/app/loans/edit-loans-account/edit-loans-account.component.ts @@ -203,11 +203,6 @@ export class EditLoansAccountComponent { 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.allowPartialPeriodInterestCalculation = loansAccountData.allowPartialPeriodInterestCalculation; - delete loansAccountData.allowPartialPeriodInterestCalculation; - this.loansService.updateLoansAccount(this.loanId, loansAccountData).subscribe((response: any) => { this.router.navigate(['../'], { relativeTo: this.route }); }); diff --git a/src/app/loans/loans.service.ts b/src/app/loans/loans.service.ts index 2135bfd459..e44f1b0bc0 100644 --- a/src/app/loans/loans.service.ts +++ b/src/app/loans/loans.service.ts @@ -7,7 +7,7 @@ */ /** Angular Imports */ -import { Injectable, inject } from '@angular/core'; +import { inject, Injectable } from '@angular/core'; import { HttpClient, HttpParams } from '@angular/common/http'; /** rxjs Imports */ @@ -767,10 +767,6 @@ export class LoansService { 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.allowPartialPeriodInterestCalculation = loansAccountData.allowPartialPeriodInterestCalculation; - delete loansAccountData.allowPartialPeriodInterestCalculation; return loansAccountData; } diff --git a/src/app/products/loan-products/loan-products.ts b/src/app/products/loan-products/loan-products.ts index 6e2e78cc22..1c7f6e6a13 100644 --- a/src/app/products/loan-products/loan-products.ts +++ b/src/app/products/loan-products/loan-products.ts @@ -81,11 +81,6 @@ export class LoanProducts { delete loanProduct.allowAttributeConfiguration; delete loanProduct.advancedAccountingRules; - // In Fineract, the POST and PUT endpoints for /v1/loanproducts have a typo in the field - // allowPartialPeriodInterestCalculation. Until that is fixed, we need to replace the field name in the payload. - loanProduct.allowPartialPeriodInterestCalculation = loanProduct.allowPartialPeriodInterestCalculation; - delete loanProduct.allowPartialPeriodInterestCalculation; - // Set Default values If they were not set itemsByDefault.forEach((config: GlobalConfiguration) => { const propertyName = this.resolvePropertyName(config.name);