Skip to content

Commit dc1f82e

Browse files
authored
Merge pull request #2528 from alberto-art3ch/enhancement/loan_buy_down_fee_transaction
WEB-218: Add Buy down fee transaction to Loan
2 parents 6ee9897 + e1f08ff commit dc1f82e

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
@@ -115,6 +115,7 @@ export class LoanAccountActionsComponent {
115115
'Add Interest Pause': boolean;
116116
'Capitalized Income': boolean;
117117
'Contract Termination': boolean;
118+
'Buy Down Fee': boolean;
118119
} = {
119120
Close: false,
120121
'Undo Approval': false,
@@ -152,7 +153,8 @@ export class LoanAccountActionsComponent {
152153
'Interest Payment Waiver': false,
153154
'Add Interest Pause': false,
154155
'Capitalized Income': false,
155-
'Contract Termination': false
156+
'Contract Termination': false,
157+
'Buy Down Fee': false
156158
};
157159

158160
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
@@ -145,7 +145,7 @@ export class MakeRepaymentComponent implements OnInit {
145145
}
146146

147147
showDetails(): boolean {
148-
return !this.isCapitalizedIncome();
148+
return !this.isCapitalizedIncome() && !this.isBuyDownFee();
149149
}
150150

151151
isCapitalizedIncome(): boolean {
@@ -155,6 +155,12 @@ export class MakeRepaymentComponent implements OnInit {
155155
].includes(this.command);
156156
}
157157

158+
isBuyDownFee(): boolean {
159+
return [
160+
'buyDownFee'
161+
].includes(this.command);
162+
}
163+
158164
/** Submits the repayment form */
159165
submit() {
160166
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
@@ -183,6 +183,11 @@ export class LoansViewComponent implements OnInit {
183183
taskPermissionName: 'DISBURSE_LOAN'
184184
});
185185
} else if (this.status === 'Active') {
186+
this.buttonConfig.addButton({
187+
name: 'Buy Down Fee',
188+
icon: 'plus',
189+
taskPermissionName: 'BUY_DOWN_FEE_LOAN'
190+
});
186191
if (this.loanDetailsData.enableIncomeCapitalization) {
187192
this.buttonConfig.addButton({
188193
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)