diff --git a/src/app/loans/custom-dialog/loans-account-view-guarantor-details-dialog/loans-account-view-guarantor-details-dialog.component.html b/src/app/loans/custom-dialog/loans-account-view-guarantor-details-dialog/loans-account-view-guarantor-details-dialog.component.html
index 5ff5e74f1..35e863778 100644
--- a/src/app/loans/custom-dialog/loans-account-view-guarantor-details-dialog/loans-account-view-guarantor-details-dialog.component.html
+++ b/src/app/loans/custom-dialog/loans-account-view-guarantor-details-dialog/loans-account-view-guarantor-details-dialog.component.html
@@ -33,6 +33,12 @@
+
+ {{ 'labels.inputs.Available Disbursement Amount (with Over Applied)' | translate }}:
+ {{
+ data.loanData.delinquent.availableDisbursementAmountWithOverApplied | formatNumber
+ }}
+
diff --git a/src/app/loans/loans-view/account-details/account-details.component.html b/src/app/loans/loans-view/account-details/account-details.component.html
index bf547c782..e52d8f8ad 100644
--- a/src/app/loans/loans-view/account-details/account-details.component.html
+++ b/src/app/loans/loans-view/account-details/account-details.component.html
@@ -278,5 +278,19 @@
}} {{ 'labels.text.Days' | translate }}
+
+
+ {{ 'labels.inputs.Available Disbursement Amount (with Over Applied)' | translate }}
+ {{
+ loanDetails.delinquent.availableDisbursementAmountWithOverApplied | formatNumber
+ }}
+
diff --git a/src/app/loans/loans-view/loan-account-actions/approve-loan/approve-loan.component.html b/src/app/loans/loans-view/loan-account-actions/approve-loan/approve-loan.component.html
index ae753cd6a..93983fcf5 100644
--- a/src/app/loans/loans-view/loan-account-actions/approve-loan/approve-loan.component.html
+++ b/src/app/loans/loans-view/loan-account-actions/approve-loan/approve-loan.component.html
@@ -40,6 +40,12 @@
>
+
+
+ {{ 'labels.inputs.Available Disbursement Amount (with Over Applied)' | translate }}
+
+
+
{{ 'labels.inputs.Transaction Amount' | translate }}
diff --git a/src/app/loans/loans-view/loan-account-actions/approve-loan/approve-loan.component.ts b/src/app/loans/loans-view/loan-account-actions/approve-loan/approve-loan.component.ts
index 4596d06ac..9c6515511 100644
--- a/src/app/loans/loans-view/loan-account-actions/approve-loan/approve-loan.component.ts
+++ b/src/app/loans/loans-view/loan-account-actions/approve-loan/approve-loan.component.ts
@@ -10,7 +10,9 @@ import { SettingsService } from 'app/settings/settings.service';
import { Currency } from 'app/shared/models/general.model';
import { InputAmountComponent } from '../../../../shared/input-amount/input-amount.component';
import { CdkTextareaAutosize } from '@angular/cdk/text-field';
+import { FormatNumberPipe } from '../../../../pipes/format-number.pipe';
import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
+import { MatIcon } from '@angular/material/icon';
/**
* Approve Loan component.
@@ -22,7 +24,9 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
imports: [
...STANDALONE_SHARED_IMPORTS,
InputAmountComponent,
- CdkTextareaAutosize
+ CdkTextareaAutosize,
+ FormatNumberPipe,
+ MatIcon
]
})
export class ApproveLoanComponent implements OnInit {
@@ -70,6 +74,19 @@ export class ApproveLoanComponent implements OnInit {
expectedDisbursementDate: new Date(response.timeline.expectedDisbursementDate)
});
});
+
+ // Get delinquency data for available disbursement amount with over applied
+ this.loanService.getLoanDelinquencyDataForTemplate(this.loanId).subscribe((delinquencyData: any) => {
+ // Check if the field is at root level
+ if (delinquencyData.availableDisbursementAmountWithOverApplied !== undefined) {
+ this.loanData.availableDisbursementAmountWithOverApplied =
+ delinquencyData.availableDisbursementAmountWithOverApplied;
+ }
+ // Also check if it's in delinquent object
+ if (delinquencyData.delinquent) {
+ this.loanData.delinquent = delinquencyData.delinquent;
+ }
+ });
}
/**
diff --git a/src/app/loans/loans-view/loan-account-actions/disburse-to-savings-account/disburse-to-savings-account.component.html b/src/app/loans/loans-view/loan-account-actions/disburse-to-savings-account/disburse-to-savings-account.component.html
index 41c4b575d..871883280 100644
--- a/src/app/loans/loans-view/loan-account-actions/disburse-to-savings-account/disburse-to-savings-account.component.html
+++ b/src/app/loans/loans-view/loan-account-actions/disburse-to-savings-account/disburse-to-savings-account.component.html
@@ -29,6 +29,12 @@
>
+
+
+ {{ 'labels.inputs.Available Disbursement Amount (with Over Applied)' | translate }}
+
+
+
{{ 'labels.inputs.Fixed EMI amount' | translate }}
diff --git a/src/app/loans/loans-view/loan-account-actions/disburse-to-savings-account/disburse-to-savings-account.component.ts b/src/app/loans/loans-view/loan-account-actions/disburse-to-savings-account/disburse-to-savings-account.component.ts
index a69d66d27..6c9e609dc 100644
--- a/src/app/loans/loans-view/loan-account-actions/disburse-to-savings-account/disburse-to-savings-account.component.ts
+++ b/src/app/loans/loans-view/loan-account-actions/disburse-to-savings-account/disburse-to-savings-account.component.ts
@@ -13,7 +13,9 @@ import { SettingsService } from 'app/settings/settings.service';
import { Currency } from 'app/shared/models/general.model';
import { InputAmountComponent } from '../../../../shared/input-amount/input-amount.component';
import { CdkTextareaAutosize } from '@angular/cdk/text-field';
+import { FormatNumberPipe } from '../../../../pipes/format-number.pipe';
import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
+import { MatIcon } from '@angular/material/icon';
@Component({
selector: 'mifosx-disburse-to-savings-account',
@@ -22,7 +24,9 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
imports: [
...STANDALONE_SHARED_IMPORTS,
InputAmountComponent,
- CdkTextareaAutosize
+ CdkTextareaAutosize,
+ FormatNumberPipe,
+ MatIcon
]
})
export class DisburseToSavingsAccountComponent implements OnInit {
@@ -59,6 +63,20 @@ export class DisburseToSavingsAccountComponent implements OnInit {
if (this.dataObject.currency) {
this.currency = this.dataObject.currency;
}
+
+ // Get delinquency data for available disbursement amount with over applied
+ const loanId = this.route.snapshot.params['loanId'];
+ this.loanService.getLoanDelinquencyDataForTemplate(loanId).subscribe((delinquencyData: any) => {
+ // Check if the field is at root level
+ if (delinquencyData.availableDisbursementAmountWithOverApplied !== undefined) {
+ this.dataObject.availableDisbursementAmountWithOverApplied =
+ delinquencyData.availableDisbursementAmountWithOverApplied;
+ }
+ // Also check if it's in delinquent object
+ if (delinquencyData.delinquent) {
+ this.dataObject.delinquent = delinquencyData.delinquent;
+ }
+ });
}
/**
diff --git a/src/app/loans/loans-view/loan-account-actions/disburse/disburse.component.html b/src/app/loans/loans-view/loan-account-actions/disburse/disburse.component.html
index 3d809e645..7d0e4793b 100644
--- a/src/app/loans/loans-view/loan-account-actions/disburse/disburse.component.html
+++ b/src/app/loans/loans-view/loan-account-actions/disburse/disburse.component.html
@@ -29,6 +29,12 @@
>
+
+
+ {{ 'labels.inputs.Available Disbursement Amount (with Over Applied)' | translate }}
+
+
+
{{ 'labels.inputs.External Id' | translate }}
diff --git a/src/app/loans/loans-view/loan-account-actions/disburse/disburse.component.ts b/src/app/loans/loans-view/loan-account-actions/disburse/disburse.component.ts
index ead62e9af..ec0ddb3bd 100644
--- a/src/app/loans/loans-view/loan-account-actions/disburse/disburse.component.ts
+++ b/src/app/loans/loans-view/loan-account-actions/disburse/disburse.component.ts
@@ -17,7 +17,9 @@ import { Currency } from 'app/shared/models/general.model';
import { InputAmountComponent } from '../../../../shared/input-amount/input-amount.component';
import { MatSlideToggle } from '@angular/material/slide-toggle';
import { CdkTextareaAutosize } from '@angular/cdk/text-field';
+import { FormatNumberPipe } from '../../../../pipes/format-number.pipe';
import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
+import { MatIcon } from '@angular/material/icon';
/**
* Disburse Loan Option
@@ -30,7 +32,9 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
...STANDALONE_SHARED_IMPORTS,
InputAmountComponent,
MatSlideToggle,
- CdkTextareaAutosize
+ CdkTextareaAutosize,
+ FormatNumberPipe,
+ MatIcon
]
})
export class DisburseComponent implements OnInit {
@@ -78,6 +82,19 @@ export class DisburseComponent implements OnInit {
if (this.dataObject.currency) {
this.currency = this.dataObject.currency;
}
+
+ // Get delinquency data for available disbursement amount with over applied
+ this.loanService.getLoanDelinquencyDataForTemplate(this.loanId).subscribe((delinquencyData: any) => {
+ // Check if the field is at root level
+ if (delinquencyData.availableDisbursementAmountWithOverApplied !== undefined) {
+ this.dataObject.availableDisbursementAmountWithOverApplied =
+ delinquencyData.availableDisbursementAmountWithOverApplied;
+ }
+ // Also check if it's in delinquent object
+ if (delinquencyData.delinquent) {
+ this.dataObject.delinquent = delinquencyData.delinquent;
+ }
+ });
}
/**
diff --git a/src/app/loans/loans-view/loan-account-actions/view-guarantors/view-guarantors.component.ts b/src/app/loans/loans-view/loan-account-actions/view-guarantors/view-guarantors.component.ts
index aae42d56d..7491640cd 100644
--- a/src/app/loans/loans-view/loan-account-actions/view-guarantors/view-guarantors.component.ts
+++ b/src/app/loans/loans-view/loan-account-actions/view-guarantors/view-guarantors.component.ts
@@ -86,6 +86,19 @@ export class ViewGuarantorsComponent implements OnInit {
ngOnInit() {
this.guarantorDetails = this.dataObject.guarantors;
+
+ // Get delinquency data for available disbursement amount with over applied
+ this.loansService.getLoanDelinquencyDataForTemplate(this.loanId).subscribe((delinquencyData: any) => {
+ // Check if the field is at root level
+ if (delinquencyData.availableDisbursementAmountWithOverApplied !== undefined) {
+ this.dataObject.availableDisbursementAmountWithOverApplied =
+ delinquencyData.availableDisbursementAmountWithOverApplied;
+ }
+ // Also check if it's in delinquent object
+ if (delinquencyData.delinquent) {
+ this.dataObject.delinquent = delinquencyData.delinquent;
+ }
+ });
}
toggleGuarantorsDetailsOverview() {
diff --git a/src/app/loans/loans.service.ts b/src/app/loans/loans.service.ts
index 7cdf6ab4a..2259bb0c7 100644
--- a/src/app/loans/loans.service.ts
+++ b/src/app/loans/loans.service.ts
@@ -29,7 +29,12 @@ export class LoansService {
}
getLoanActionTemplate(loanId: string, command: string): Observable {
- const httpParams = new HttpParams().set('command', command);
+ let httpParams = new HttpParams().set('command', command);
+ // Add associations for specific commands that need delinquency data
+ if (command === 'disburse' || command === 'disbursetosavings') {
+ httpParams = httpParams.set('associations', 'delinquency');
+ }
+
return this.http.get(`/loans/${loanId}/transactions/template`, { params: httpParams });
}
@@ -92,6 +97,16 @@ export class LoansService {
return this.http.get(`/loans/${loanId}`, { params: httpParams });
}
+ /**
+ * Get Loan Delinquency Data for template usage
+ * @param {string} loanId Loan Id
+ * @returns {Observable}
+ */
+ getLoanDelinquencyDataForTemplate(loanId: string): Observable {
+ const httpParams = new HttpParams().set('associations', 'delinquency');
+ return this.http.get(`/loans/${loanId}`, { params: httpParams });
+ }
+
getDelinquencyActions(loanId: string) {
return this.http.get(`/loans/${loanId}/delinquency-actions`);
}
@@ -469,7 +484,7 @@ export class LoansService {
* @returns {Observable}
*/
getLoanApprovalTemplate(loanId: string): Observable {
- const httpParams = new HttpParams().set('templateType', 'approval');
+ const httpParams = new HttpParams().set('templateType', 'approval').set('associations', 'delinquency');
return this.http.get(`/loans/${loanId}/template`, { params: httpParams });
}
diff --git a/src/app/loans/models/loan-account.model.ts b/src/app/loans/models/loan-account.model.ts
index 226d5e9b1..76aaa8475 100644
--- a/src/app/loans/models/loan-account.model.ts
+++ b/src/app/loans/models/loan-account.model.ts
@@ -8,6 +8,7 @@ export interface DelinquencyRange {
export interface DelinquentData {
availableDisbursementAmount: number;
+ availableDisbursementAmountWithOverApplied: number;
pastDueDays: number;
nextPaymentDueDate: number[];
delinquentDays: number;
diff --git a/src/assets/translations/cs-CS.json b/src/assets/translations/cs-CS.json
index 2e12c02b1..113f23d49 100644
--- a/src/assets/translations/cs-CS.json
+++ b/src/assets/translations/cs-CS.json
@@ -2500,7 +2500,8 @@
"Buy down fees": "Poplatky za odkup",
"Income from Buy down fees": "Příjmy z poplatků za odkup",
"Buy down fee Expense": "Náklady na poplatek za odkup",
- "Skip Interest Refund Transaction Posting": "Přeskočit zaúčtování vrácení úroků"
+ "Skip Interest Refund Transaction Posting": "Přeskočit zaúčtování vrácení úroků",
+ "Available Disbursement Amount (with Over Applied)": "Dostupná částka k výplatě (s přeplatkem)"
},
"links": {
"Community": "Společenství",
diff --git a/src/assets/translations/de-DE.json b/src/assets/translations/de-DE.json
index 52d415db4..18e026104 100644
--- a/src/assets/translations/de-DE.json
+++ b/src/assets/translations/de-DE.json
@@ -2500,7 +2500,8 @@
"Buy down fees": "Buy-Down-Gebühren",
"Income from Buy down fees": "Einnahmen aus Buy-Down-Gebühren",
"Buy down fee Expense": "Aufwendungen aus Buy-Down-Gebühren",
- "Skip Interest Refund Transaction Posting": "Buchung der Zinsrückerstattung überspringen"
+ "Skip Interest Refund Transaction Posting": "Buchung der Zinsrückerstattung überspringen",
+ "Available Disbursement Amount (with Over Applied)": "Verfügbarer Auszahlungsbetrag (mit Überzahlung)"
},
"links": {
"Community": "Gemeinschaft",
diff --git a/src/assets/translations/en-US.json b/src/assets/translations/en-US.json
index 4a3475a7f..1220bae01 100644
--- a/src/assets/translations/en-US.json
+++ b/src/assets/translations/en-US.json
@@ -2507,7 +2507,8 @@
"Buy down fees": "Buy down fees",
"Income from Buy down fees": "Income from Buy down fees",
"Buy down fee Expense": "Buy down fee Expense",
- "Skip Interest Refund Transaction Posting": "Skip Interest Refund Transaction Posting"
+ "Skip Interest Refund Transaction Posting": "Skip Interest Refund Transaction Posting",
+ "Available Disbursement Amount (with Over Applied)": "Available Disbursement Amount (with Over Applied)"
},
"links": {
"Community": "Community",
diff --git a/src/assets/translations/es-CL.json b/src/assets/translations/es-CL.json
index ed00f08ee..2d5e91104 100644
--- a/src/assets/translations/es-CL.json
+++ b/src/assets/translations/es-CL.json
@@ -2500,7 +2500,8 @@
"Buy down fees": "Tarifas de compra anticipada",
"Income from Buy down fees": "Ingresos por comisiones de compra inicial",
"Buy down fee Expense": "Gastos por comisiones de compra inicial",
- "Skip Interest Refund Transaction Posting": "Omitir el registro de la devolución de intereses"
+ "Skip Interest Refund Transaction Posting": "Omitir el registro de la devolución de intereses",
+ "Available Disbursement Amount (with Over Applied)": "Monto disponible para desembolso (con sobreaplicación)"
},
"links": {
"Community": "Comunidad",
diff --git a/src/assets/translations/es-MX.json b/src/assets/translations/es-MX.json
index a8dddecb9..4c865cea9 100644
--- a/src/assets/translations/es-MX.json
+++ b/src/assets/translations/es-MX.json
@@ -2501,7 +2501,8 @@
"Income from Buy down fees": "Ingresos por comisiones de compra inicial",
"Buy down fee Expense": "Gastos por comisiones de compra inicial",
"Skip Interest Refund Transaction Posting": "Omitir el registro de la devolución de intereses",
- "Incorporation Date": "Fecha de Constitución"
+ "Incorporation Date": "Fecha de Constitución",
+ "Available Disbursement Amount (with Over Applied)": "Monto disponible para desembolso (con sobreaplicación)"
},
"links": {
"Community": "Comunidad",
diff --git a/src/assets/translations/fr-FR.json b/src/assets/translations/fr-FR.json
index 85ead7d35..56aa19606 100644
--- a/src/assets/translations/fr-FR.json
+++ b/src/assets/translations/fr-FR.json
@@ -2500,7 +2500,8 @@
"Buy down fees": "Frais d'achat",
"Income from Buy down fees": "Revenus des commissions de rachat",
"Buy down fee Expense": "Charges des commissions de rachat",
- "Skip Interest Refund Transaction Posting": "Ignorer la comptabilisation du remboursement des intérêts"
+ "Skip Interest Refund Transaction Posting": "Ignorer la comptabilisation du remboursement des intérêts",
+ "Available Disbursement Amount (with Over Applied)": "Montant de décaissement disponible (avec sur-application)"
},
"links": {
"Community": "Communauté",
diff --git a/src/assets/translations/it-IT.json b/src/assets/translations/it-IT.json
index 2d94e2dc4..170af90ed 100644
--- a/src/assets/translations/it-IT.json
+++ b/src/assets/translations/it-IT.json
@@ -2500,7 +2500,8 @@
"Buy down fees": "Commissioni di acquisto",
"Income from Buy down fees": "Proventi da commissioni di buy down",
"Buy down fee Expense": "Spese da commissioni di buy down",
- "Skip Interest Refund Transaction Posting": "Salta la registrazione del rimborso degli interessi"
+ "Skip Interest Refund Transaction Posting": "Salta la registrazione del rimborso degli interessi",
+ "Available Disbursement Amount (with Over Applied)": "Importo di disbrigo disponibile (con sovraapplicazione)"
},
"links": {
"Community": "Comunità",
diff --git a/src/assets/translations/ko-KO.json b/src/assets/translations/ko-KO.json
index 3763c0bdc..0cdfcd7ef 100644
--- a/src/assets/translations/ko-KO.json
+++ b/src/assets/translations/ko-KO.json
@@ -2501,7 +2501,8 @@
"Buy down fees": "매수 수수료",
"Income from Buy down fees": "매입 수수료 수입",
"Buy down fee Expense": "매입 수수료 비용",
- "Skip Interest Refund Transaction Posting": "이자 환불 거래 게시 건너뛰기"
+ "Skip Interest Refund Transaction Posting": "이자 환불 거래 게시 건너뛰기",
+ "Available Disbursement Amount (with Over Applied)": "초과 적용 금액을 포함한 사용 가능한 지급 금액"
},
"links": {
"Community": "지역 사회",
diff --git a/src/assets/translations/lt-LT.json b/src/assets/translations/lt-LT.json
index 3187073ea..5c51c5583 100644
--- a/src/assets/translations/lt-LT.json
+++ b/src/assets/translations/lt-LT.json
@@ -2500,7 +2500,8 @@
"Buy down fees": "Išpirkimo mokesčiai",
"Income from Buy down fees": "Pajamos iš supirkimo mokesčių",
"Buy down fee Expense": "Supirkimo mokesčio išlaidos",
- "Skip Interest Refund Transaction Posting": "Praleisti palūkanų grąžinimo įrašą"
+ "Skip Interest Refund Transaction Posting": "Praleisti palūkanų grąžinimo įrašą",
+ "Available Disbursement Amount (with Over Applied)": "Galimas išmokėjimo kiekis (su pertekliumi)"
},
"links": {
"Community": "bendruomenė",
diff --git a/src/assets/translations/lv-LV.json b/src/assets/translations/lv-LV.json
index 7d579bf81..3ea818aea 100644
--- a/src/assets/translations/lv-LV.json
+++ b/src/assets/translations/lv-LV.json
@@ -2500,7 +2500,8 @@
"Buy down fees": "Iepirkuma maksas",
"Income from Buy down fees": "Ienākumi no akciju izpirkšanas komisijas maksām",
"Buy down fee Expense": "Akciju izpirkšanas komisijas izdevumi",
- "Skip Interest Refund Transaction Posting": "Izlaist procentu atmaksas ierakstu"
+ "Skip Interest Refund Transaction Posting": "Izlaist procentu atmaksas ierakstu",
+ "Available Disbursement Amount (with Over Applied)": "Pieejamā izmaksas summa (ar pārsniegumu)"
},
"links": {
"Community": "kopiena",
diff --git a/src/assets/translations/ne-NE.json b/src/assets/translations/ne-NE.json
index e32b5f0d9..43021e13f 100644
--- a/src/assets/translations/ne-NE.json
+++ b/src/assets/translations/ne-NE.json
@@ -2500,7 +2500,8 @@
"Buy down fees": "खरिद शुल्क",
"Income from Buy down fees": "खरिद शुल्कबाट हुने आम्दानी",
"Buy down fee Expense": "खरीद शुल्क खर्च",
- "Skip Interest Refund Transaction Posting": "ब्याज फिर्ता पोस्टिङ्ग छोड्नुहोस्"
+ "Skip Interest Refund Transaction Posting": "ब्याज फिर्ता पोस्टिङ्ग छोड्नुहोस्",
+ "Available Disbursement Amount (with Over Applied)": "उपलब्ध भुक्तानी रकम (अधिक लागू रकम सहित)"
},
"links": {
"Community": "समुदाय",
diff --git a/src/assets/translations/pt-PT.json b/src/assets/translations/pt-PT.json
index 38744137b..b0346964b 100644
--- a/src/assets/translations/pt-PT.json
+++ b/src/assets/translations/pt-PT.json
@@ -2500,7 +2500,8 @@
"Buy down fees": "Taxas de compra antecipada",
"Income from Buy down fees": "Receita com taxas de recompra",
"Buy down fee Expense": "Despesa com taxas de recompra",
- "Skip Interest Refund Transaction Posting": "Ignorar o lançamento do reembolso de juros"
+ "Skip Interest Refund Transaction Posting": "Ignorar o lançamento do reembolso de juros",
+ "Available Disbursement Amount (with Over Applied)": "Valor de desembolso disponível (com sobreaplicação)"
},
"links": {
"Community": "Comunidade",
diff --git a/src/assets/translations/sw-SW.json b/src/assets/translations/sw-SW.json
index 8bbc5ebd7..39bd0f602 100644
--- a/src/assets/translations/sw-SW.json
+++ b/src/assets/translations/sw-SW.json
@@ -2500,7 +2500,8 @@
"Buy down fees": "Nunua ada za chini",
"Income from Buy down fees": "Mapato kutoka kwa ada ya Kununua",
"Buy down fee Expense": "Kununua ada ya chini Gharama",
- "Skip Interest Refund Transaction Posting": "Ruka uchapishaji wa muamala wa kurejesha riba"
+ "Skip Interest Refund Transaction Posting": "Ruka uchapishaji wa muamala wa kurejesha riba",
+ "Available Disbursement Amount (with Over Applied)": "Tillgängligt utbetalningsbelopp (med överbetalning)"
},
"links": {
"Community": "Jumuiya",