Skip to content

Commit e1f08ff

Browse files
author
Jose Alberto Hernandez
committed
Add Buy down fee transaction to Loan
1 parent 11d0d42 commit e1f08ff

File tree

18 files changed

+31
-2
lines changed

18 files changed

+31
-2
lines changed

src/app/loans/common-resolvers/loan-action-button.resolver.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ export class LoanActionButtonResolver {
7777
return this.loansService.getLoanActionTemplate(loanId, 'capitalizedIncome');
7878
} else if (loanActionButton === 'Contract Termination') {
7979
return this.loansService.getLoanActionTemplate(loanId, 'contractTermination');
80+
} else if (loanActionButton === 'Buy Down Fee') {
81+
return this.loansService.getLoanActionTemplate(loanId, 'buyDownFee');
8082
} else {
8183
return undefined;
8284
}

src/app/loans/loans-view/loan-account-actions/loan-account-actions.component.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<mifosx-make-repayment [dataObject]="actionButtonData" *ngIf="actions['Make Repayment']"></mifosx-make-repayment>
1313
<mifosx-make-repayment [dataObject]="actionButtonData" *ngIf="actions['Capitalized Income']"></mifosx-make-repayment>
1414
<mifosx-make-repayment [dataObject]="actionButtonData" *ngIf="actions['Goodwill Credit']"></mifosx-make-repayment>
15+
<mifosx-make-repayment [dataObject]="actionButtonData" *ngIf="actions['Buy Down Fee']"></mifosx-make-repayment>
1516
<mifosx-make-repayment
1617
[dataObject]="actionButtonData"
1718
*ngIf="actions['Interest Payment Waiver']"

src/app/loans/loans-view/loan-account-actions/loan-account-actions.component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ export class LoanAccountActionsComponent {
5353
'Add Interest Pause': boolean;
5454
'Capitalized Income': boolean;
5555
'Contract Termination': boolean;
56+
'Buy Down Fee': boolean;
5657
} = {
5758
Close: false,
5859
'Undo Approval': false,
@@ -90,7 +91,8 @@ export class LoanAccountActionsComponent {
9091
'Interest Payment Waiver': false,
9192
'Add Interest Pause': false,
9293
'Capitalized Income': false,
93-
'Contract Termination': false
94+
'Contract Termination': false,
95+
'Buy Down Fee': false
9496
};
9597

9698
actionButtonData: any;

src/app/loans/loans-view/loan-account-actions/make-repayment/make-repayment.component.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ export class MakeRepaymentComponent implements OnInit {
127127
}
128128

129129
showDetails(): boolean {
130-
return !this.isCapitalizedIncome();
130+
return !this.isCapitalizedIncome() && !this.isBuyDownFee();
131131
}
132132

133133
isCapitalizedIncome(): boolean {
@@ -137,6 +137,12 @@ export class MakeRepaymentComponent implements OnInit {
137137
].includes(this.command);
138138
}
139139

140+
isBuyDownFee(): boolean {
141+
return [
142+
'buyDownFee'
143+
].includes(this.command);
144+
}
145+
140146
/** Submits the repayment form */
141147
submit() {
142148
const repaymentLoanFormData = this.repaymentLoanForm.value;

src/app/loans/loans-view/loans-view.component.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,11 @@ export class LoansViewComponent implements OnInit {
142142
taskPermissionName: 'DISBURSE_LOAN'
143143
});
144144
} else if (this.status === 'Active') {
145+
this.buttonConfig.addButton({
146+
name: 'Buy Down Fee',
147+
icon: 'plus',
148+
taskPermissionName: 'BUY_DOWN_FEE_LOAN'
149+
});
145150
if (this.loanDetailsData.enableIncomeCapitalization) {
146151
this.buttonConfig.addButton({
147152
name: 'Capitalized Income',

src/assets/translations/cs-CS.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2507,6 +2507,7 @@
25072507
"Block Deposit": "Blokový vklad",
25082508
"Block Withdrawal": "Blokovat výběr",
25092509
"Breadcrumbs": "Strouhanka",
2510+
"Buy Down Fee": "Poplatek za odkup",
25102511
"Calculate Interest": "Vypočítejte úrok",
25112512
"Capitalized Income": "Kapitalizovaný příjem",
25122513
"Capitalized Income Adjustment": "Úprava kapitalizovaného příjmu",

src/assets/translations/de-DE.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2507,6 +2507,7 @@
25072507
"Block Deposit": "Blockeinzahlung",
25082508
"Block Withdrawal": "Auszahlung blockieren",
25092509
"Breadcrumbs": "Semmelbrösel",
2510+
"Buy Down Fee": "Anzahlungsgebühr",
25102511
"Calculate Interest": "Zinsen berechnen",
25112512
"Capitalized Income": "Kapitalisiertes Einkommen",
25122513
"Capitalized Income Adjustment": "Anpassung des kapitalisierten Einkommens",

src/assets/translations/en-US.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2514,6 +2514,7 @@
25142514
"Block Deposit": "Block Deposit",
25152515
"Block Withdrawal": "Block Withdrawal",
25162516
"Breadcrumbs": "Breadcrumbs",
2517+
"Buy Down Fee": "Buy Down Fee",
25172518
"Calculate Interest": "Calculate Interest",
25182519
"Capitalized Income": "Capitalized Income",
25192520
"Capitalized Income Adjustment": "Capitalized Income Adjustment",

src/assets/translations/es-CL.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2507,6 +2507,7 @@
25072507
"Block Deposit": "Bloquear depósitos",
25082508
"Block Withdrawal": "Bloquear retiros",
25092509
"Breadcrumbs": "Migas de pan",
2510+
"Buy Down Fee": "Comisión de compra inicial",
25102511
"Calculate Interest": "Calcular interés",
25112512
"Capitalized Income": "Ingreso capitalizado",
25122513
"Capitalized Income Adjustment": "Ajuste de ingresos capitalizados",

src/assets/translations/es-MX.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2507,6 +2507,7 @@
25072507
"Block Deposit": "Bloquear depósitos",
25082508
"Block Withdrawal": "Bloquear retiros",
25092509
"Breadcrumbs": "Migas de pan",
2510+
"Buy Down Fee": "Comisión de compra inicial",
25102511
"Calculate Interest": "Calcular interés",
25112512
"Capitalized Income": "Ingreso capitalizado",
25122513
"Capitalized Income Adjustment": "Ajuste de ingresos capitalizados",

0 commit comments

Comments
 (0)