diff --git a/src/app/loans/loans-view/general-tab/general-tab.component.html b/src/app/loans/loans-view/general-tab/general-tab.component.html
index c39d9ce46..ff12c2e6b 100644
--- a/src/app/loans/loans-view/general-tab/general-tab.component.html
+++ b/src/app/loans/loans-view/general-tab/general-tab.component.html
@@ -36,37 +36,37 @@
| Original |
- {{ ele.original | currency }} |
+ {{ ele.original | currency:currencyCode:'symbol-narrow':'1.2-2' }} |
Paid |
- {{ ele.paid | currency }} |
+ {{ ele.paid | currency:currencyCode:'symbol-narrow':'1.2-2' }} |
Credit Adjustments |
- {{ ele.adjustment | currency }} |
+ {{ ele.adjustment | currency:currencyCode:'symbol-narrow':'1.2-2' }} |
Waived |
- {{ ele.waived | currency }} |
+ {{ ele.waived | currency:currencyCode:'symbol-narrow':'1.2-2' }} |
Written Off |
- {{ ele.writtenOff | currency }} |
+ {{ ele.writtenOff | currency:currencyCode:'symbol-narrow':'1.2-2' }} |
Outstanding |
- {{ ele.outstanding | currency }} |
+ {{ ele.outstanding | currency:currencyCode:'symbol-narrow':'1.2-2' }} |
Over Due |
- {{ ele.overdue | currency }} |
+ {{ ele.overdue | currency:currencyCode:'symbol-narrow':'1.2-2' }} |
@@ -193,17 +193,17 @@
Proposed Amount:
- {{ loanDetails.proposedPrincipal | currency}}
+ {{ loanDetails.proposedPrincipal | currency:currencyCode:'symbol-narrow':'1.2-2'}}
Approved Amount:
- {{ loanDetails.approvedPrincipal | currency }}
+ {{ loanDetails.approvedPrincipal | currency:currencyCode:'symbol-narrow':'1.2-2' }}
Disburse Amount:
- {{ loanDetails.principal | currency }}
+ {{ loanDetails.principal | currency:currencyCode:'symbol-narrow':'1.2-2' }}
diff --git a/src/app/loans/loans-view/general-tab/general-tab.component.ts b/src/app/loans/loans-view/general-tab/general-tab.component.ts
index 9c7a48d3f..b4b844619 100644
--- a/src/app/loans/loans-view/general-tab/general-tab.component.ts
+++ b/src/app/loans/loans-view/general-tab/general-tab.component.ts
@@ -9,6 +9,8 @@ import { MatTableDataSource } from '@angular/material/table';
})
export class GeneralTabComponent implements OnInit {
+ /** Currency Code */
+ currencyCode: string;
loanDetails: any;
status: any;
loanSummaryColumns: string[] = ['Empty', 'Original', 'Paid', 'Waived', 'Written Off', 'Outstanding', 'Over Due'];
@@ -35,6 +37,7 @@ export class GeneralTabComponent implements OnInit {
constructor(private route: ActivatedRoute) {
this.route.parent.data.subscribe((data: { loanDetailsData: any, }) => {
this.loanDetails = data.loanDetailsData;
+ this.currencyCode = this.loanDetails.currency.code;
if (this.loanDetails.transactions) {
this.loanDetails.transactions.some((transaction: any) => {
if (transaction.type.code === 'loanTransactionType.chargeback') {
@@ -67,7 +70,6 @@ export class GeneralTabComponent implements OnInit {
'writtenOff': this.loanDetails.summary.principalWrittenOff,
'outstanding': this.loanDetails.summary.principalOutstanding,
'overdue': this.loanDetails.summary.principalOverdue,
-
},
{
'property': 'Interest',
diff --git a/src/app/loans/loans-view/loans-view.component.html b/src/app/loans/loans-view/loans-view.component.html
index 83e6d6b9e..fbc9a0760 100644
--- a/src/app/loans/loans-view/loans-view.component.html
+++ b/src/app/loans/loans-view/loans-view.component.html
@@ -32,11 +32,11 @@
0">
- Past Due Days : {{loanDetailsData?.delinquent.pastDueDays | formatNumber}}
+ Past Due Days : {{loanDetailsData?.delinquent.pastDueDays | formatNumber }}
0
&& loanDetailsData.delinquent.pastDueDays != loanDetailsData.delinquent.delinquentDays">
- Delinquent Days : {{loanDetailsData?.delinquent.delinquentDays | formatNumber}}
+ Delinquent Days : {{loanDetailsData?.delinquent.delinquentDays | formatNumber }}
@@ -46,14 +46,14 @@
Current Balance: {{loanDetailsData.currency.displaySymbol}}
{{loanDetailsData.summary.totalOutstanding | formatNumber}}
- Arrears By: {{loanDetailsData.summary.totalOverdue | formatNumber}}
+ Arrears By: {{loanDetailsData.summary.totalOverdue | currency:currencyCode:'symbol-narrow':'1.2-2' }}
=0)">Not Provided
Arrears Since: {{loanDetailsData.summary.overdueSinceDate |
dateFormat}}
0">
- Overpaid By: {{loanDetailsData.currency.displaySymbol}} {{loanDetailsData.totalOverpaid | formatNumber}}
+ Overpaid By: {{loanDetailsData.currency.displaySymbol}} {{loanDetailsData.totalOverpaid | formatNumber }}
diff --git a/src/app/loans/loans-view/repayment-schedule-tab/repayment-schedule-tab.component.html b/src/app/loans/loans-view/repayment-schedule-tab/repayment-schedule-tab.component.html
index 5d2dae441..77a5395f3 100644
--- a/src/app/loans/loans-view/repayment-schedule-tab/repayment-schedule-tab.component.html
+++ b/src/app/loans/loans-view/repayment-schedule-tab/repayment-schedule-tab.component.html
@@ -43,56 +43,56 @@
Principal Due |
{{ ele.principalDue | formatNumber }} |
- {{ repaymentScheduleDetails.totalPrincipalExpected | currency }} |
+ {{ repaymentScheduleDetails.totalPrincipalExpected | currency:currencyCode:'symbol-narrow':'1.2-2' }} |
Interest |
{{ ele.interestOriginalDue | formatNumber}} |
- {{ repaymentScheduleDetails.totalInterestCharged | currency }} |
+ {{ repaymentScheduleDetails.totalInterestCharged | currency:currencyCode:'symbol-narrow':'1.2-2' }} |
Fees |
{{ ele.feeChargesDue | formatNumber}} |
- {{ repaymentScheduleDetails.totalFeeChargesCharged | currency }} |
+ {{ repaymentScheduleDetails.totalFeeChargesCharged | currency:currencyCode:'symbol-narrow':'1.2-2' }} |
Penalties |
{{ ele.penaltyChargesDue | formatNumber}} |
- {{ repaymentScheduleDetails.totalPenaltyChargesCharged | currency }} |
+ {{ repaymentScheduleDetails.totalPenaltyChargesCharged | currency:currencyCode:'symbol-narrow':'1.2-2' }} |
Due |
{{ ele.totalDueForPeriod | formatNumber}} |
- {{ repaymentScheduleDetails.totalRepaymentExpected | currency }} |
+ {{ repaymentScheduleDetails.totalRepaymentExpected | currency:currencyCode:'symbol-narrow':'1.2-2' }} |
Paid |
{{ ele.totalPaidForPeriod | formatNumber}} |
- {{ repaymentScheduleDetails.totalRepayment | currency }} |
+ {{ repaymentScheduleDetails.totalRepayment | currency:currencyCode:'symbol-narrow':'1.2-2' }} |
In advance |
{{ ele.totalPaidInAdvanceForPeriod | formatNumber}} |
- {{ repaymentScheduleDetails.totalPaidInAdvance | currency }} |
+ {{ repaymentScheduleDetails.totalPaidInAdvance | currency:currencyCode:'symbol-narrow':'1.2-2' }} |
Late |
{{ ele.totalPaidLateForPeriod | formatNumber}} |
- {{ repaymentScheduleDetails.totalPaidLate | currency }} |
+ {{ repaymentScheduleDetails.totalPaidLate | currency:currencyCode:'symbol-narrow':'1.2-2' }} |
Waived |
{{ ele.totalWaivedForPeriod | formatNumber}} |
- {{ repaymentScheduleDetails.totalWaived | currency }} |
+ {{ repaymentScheduleDetails.totalWaived | currency:currencyCode:'symbol-narrow':'1.2-2' }} |
@@ -107,7 +107,7 @@
Outstanding |
{{ ele.totalOutstandingForPeriod | formatNumber}} |
- {{ repaymentScheduleDetails.totalOutstanding | currency }} |
+ {{ repaymentScheduleDetails.totalOutstanding | currency:currencyCode:'symbol-narrow':'1.2-2' }} |
@@ -159,19 +159,19 @@
Principal Due |
{{ ele.principalDue | formatNumber }} |
- {{ repaymentScheduleDetails.totalPrincipalExpected | currency }} |
+ {{ repaymentScheduleDetails.totalPrincipalExpected | currency:currencyCode:'symbol-narrow':'1.2-2' }} |
Interest |
{{ ele.interestOriginalDue | formatNumber}} |
- {{ repaymentScheduleDetails.totalInterestCharged | currency }} |
+ {{ repaymentScheduleDetails.totalInterestCharged | currency:currencyCode:'symbol-narrow':'1.2-2' }} |
Fees |
{{ ele.feeChargesDue | formatNumber}} |
- {{ repaymentScheduleDetails.totalFeeChargesCharged | currency }} |
+ {{ repaymentScheduleDetails.totalFeeChargesCharged | currency:currencyCode:'symbol-narrow':'1.2-2' }} |
@@ -184,7 +184,7 @@
{{ ele.totalDueForPeriod | formatNumber}}
- {{ repaymentScheduleDetails.totalRepaymentExpected | currency }} |
+ {{ repaymentScheduleDetails.totalRepaymentExpected | currency:currencyCode:'symbol-narrow':'1.2-2' }} |
diff --git a/src/app/loans/loans-view/repayment-schedule-tab/repayment-schedule-tab.component.ts b/src/app/loans/loans-view/repayment-schedule-tab/repayment-schedule-tab.component.ts
index 1e9ab8a52..98b7adc73 100644
--- a/src/app/loans/loans-view/repayment-schedule-tab/repayment-schedule-tab.component.ts
+++ b/src/app/loans/loans-view/repayment-schedule-tab/repayment-schedule-tab.component.ts
@@ -8,6 +8,8 @@ import { ActivatedRoute } from '@angular/router';
})
export class RepaymentScheduleTabComponent implements OnInit {
+ /** Currency Code */
+ @Input() currencyCode: string;
/** Loan Repayment Schedule to be Edited */
@Input() forEditing = false;
/** Loan Repayment Schedule Details Data */
@@ -30,6 +32,9 @@ export class RepaymentScheduleTabComponent implements OnInit {
*/
constructor(private route: ActivatedRoute) {
this.route.parent.data.subscribe((data: { loanDetailsData: any }) => {
+ if (data.loanDetailsData) {
+ this.currencyCode = data.loanDetailsData.currency.code;
+ }
this.loanDetailsDataRepaymentSchedule = data.loanDetailsData ? data.loanDetailsData.repaymentSchedule : [];
});
}
diff --git a/src/app/products/charges/edit-charge/edit-charge.component.ts b/src/app/products/charges/edit-charge/edit-charge.component.ts
index 300927a6f..8cf5340d1 100644
--- a/src/app/products/charges/edit-charge/edit-charge.component.ts
+++ b/src/app/products/charges/edit-charge/edit-charge.component.ts
@@ -123,9 +123,9 @@ export class EditChargeComponent implements OnInit {
}
}
if (this.chargeData.taxGroup) {
- this.chargeForm.addControl('taxGroupId', this.formBuilder.control({ value: this.chargeData.taxGroup.id, disabled: true }, Validators.required));
+ this.chargeForm.addControl('taxGroupId', this.formBuilder.control({ value: this.chargeData.taxGroup.id }, Validators.required));
} else {
- this.chargeForm.addControl('taxGroupId', this.formBuilder.control({ value: '', disabled: true }));
+ this.chargeForm.addControl('taxGroupId', this.formBuilder.control({ value: '' }));
}
}
diff --git a/src/app/savings/savings-account-view/charges-tab/charges-tab.component.html b/src/app/savings/savings-account-view/charges-tab/charges-tab.component.html
index a0a7f0c6f..41dde3af3 100644
--- a/src/app/savings/savings-account-view/charges-tab/charges-tab.component.html
+++ b/src/app/savings/savings-account-view/charges-tab/charges-tab.component.html
@@ -46,22 +46,22 @@
Due |
- {{charge.currency.displaySymbol}} {{charge.amount}} |
+ {{charge.amount | currency:charge.currency.code:'symbol-narrow':'1.2-2'}} |
Paid |
- {{charge.currency.displaySymbol}} {{charge.amountPaid}} |
+ {{charge.amountPaid | currency:charge.currency.code:'symbol-narrow':'1.2-2'}} |
Waived |
- {{charge.currency.displaySymbol}} {{charge.amountWaived}} |
+ {{charge.amountWaived | currency:charge.currency.code:'symbol-narrow':'1.2-2'}} |
Outstanding |
- {{charge.currency.displaySymbol}} {{charge.amountOutstanding}} |
+ {{charge.amountOutstanding | currency:charge.currency.code:'symbol-narrow':'1.2-2'}} |
diff --git a/src/app/savings/savings-account-view/savings-account-view.component.html b/src/app/savings/savings-account-view/savings-account-view.component.html
index 1ae3d21d9..9a65ae47a 100644
--- a/src/app/savings/savings-account-view/savings-account-view.component.html
+++ b/src/app/savings/savings-account-view/savings-account-view.component.html
@@ -81,46 +81,38 @@
| Total Withdrawls |
- {{savingsAccountData.currency.displaySymbol}} {{savingsAccountData.summary.totalWithdrawals |
- number}} |
+ {{savingsAccountData.summary.totalWithdrawals | currency:currencyCode:'symbol-narrow':'1.2-2'}} |
| Withdrawals Fees |
- {{savingsAccountData.currency.displaySymbol}} {{savingsAccountData.summary.totalWithdrawalFees |
- number}} |
+ {{savingsAccountData.summary.totalWithdrawalFees | currency:currencyCode:'symbol-narrow':'1.2-2'}} |
| Annual Fees |
- {{savingsAccountData.currency.displaySymbol}} {{savingsAccountData.summary.totalAnnualFees |
- number}} |
+ {{savingsAccountData.summary.totalAnnualFees | currency:currencyCode:'symbol-narrow':'1.2-2'}} |
= 0">
| Interest Earned |
- {{savingsAccountData.currency.displaySymbol}} {{savingsAccountData.summary.totalInterestEarned |
- number}} |
+ {{savingsAccountData.summary.totalInterestEarned | currency:currencyCode:'symbol-narrow':'1.2-2'}} |
| Interest Posted |
- {{savingsAccountData.currency.displaySymbol}} {{savingsAccountData.summary.totalInterestPosted |
- number}} |
+ {{savingsAccountData.summary.totalInterestPosted | currency:currencyCode:'symbol-narrow':'1.2-2'}} |
= 0">
| Interest Earned Not Posted |
- {{savingsAccountData.currency.displaySymbol}} {{savingsAccountData.summary.interestNotPosted |
- number}} |
+ {{savingsAccountData.summary.interestNotPosted | currency:currencyCode:'symbol-narrow':'1.2-2'}} |
| Interest On Overdraft |
- {{savingsAccountData.currency.displaySymbol}} {{savingsAccountData.summary.totalOverdraftInterestDerived
- | formatNumber}} |
+ {{savingsAccountData.summary.totalOverdraftInterestDerived | currency:currencyCode:'symbol-narrow':'1.2-2'}}
| Overdraft Interest Not Posted |
- {{savingsAccountData.currency.displaySymbol}} {{savingsAccountData.summary.interestNotPosted |
- number}} |
+ {{savingsAccountData.summary.interestNotPosted | currency:currencyCode:'symbol-narrow':'1.2-2'}} |
-
+
| Nominal Interest Rate |
{{savingsAccountData.nominalAnnualInterestRate | formatNumber}} % |
@@ -142,8 +134,7 @@
| Withdrawal Fee |
- {{savingsAccountData.currency.displaySymbol}} {{savingsAccountData.withdrawalFee.amount |
- number}} |
+ {{savingsAccountData.withdrawalFee.amount | currency:currencyCode:'symbol-narrow':'1.2-2'}} |
| Last Active Transaction Date |
@@ -167,16 +158,16 @@
| Annual Fee |
- {{savingsAccountData.currency.displaySymbol}} {{savingsAccountData.annualFee.amount | formatNumber}}
+ | {{savingsAccountData.annualFee.amount | currency:currencyCode:'symbol-narrow':'1.2-2'}}
|
| Over Draft Limit |
- {{savingsAccountData.overdraftLimit | formatNumber}} |
+ {{savingsAccountData.overdraftLimit | currency:currencyCode:'symbol-narrow':'1.2-2'}} |
| Min Overdraft Required for Interest Calculation |
- {{savingsAccountData.minOverdraftForInterestCalculation | formatNumber}} |
+ {{savingsAccountData.minOverdraftForInterestCalculation | currency:currencyCode:'symbol-narrow':'1.2-2'}} |
| Min Balance Required for Interest Calculation |
@@ -196,7 +187,7 @@
| On Hold Funds |
- {{savingsAccountData.onHoldFunds | formatNumber}} |
+ {{savingsAccountData.onHoldFunds | currency:currencyCode:'symbol-narrow':'1.2-2'}} |
| Withhold Tax Group |
diff --git a/src/app/savings/savings-account-view/savings-account-view.component.ts b/src/app/savings/savings-account-view/savings-account-view.component.ts
index 9701e702c..af3c4b769 100644
--- a/src/app/savings/savings-account-view/savings-account-view.component.ts
+++ b/src/app/savings/savings-account-view/savings-account-view.component.ts
@@ -34,6 +34,7 @@ export class SavingsAccountViewComponent implements OnInit {
entityType: string;
isActive = false;
+ currencyCode: string;
/**
* Fetches savings account data from `resolve`
@@ -47,6 +48,7 @@ export class SavingsAccountViewComponent implements OnInit {
public dialog: MatDialog) {
this.route.data.subscribe((data: { savingsAccountData: any, savingsDatatables: any }) => {
this.savingsAccountData = data.savingsAccountData;
+ this.currencyCode = this.savingsAccountData.currency.code;
this.savingsDatatables = data.savingsDatatables;
});
if (this.router.url.includes('clients')) {