Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
});
Expand Down
6 changes: 1 addition & 5 deletions src/app/loans/loans.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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;
}

Expand Down
5 changes: 0 additions & 5 deletions src/app/products/loan-products/loan-products.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down