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 @@ -96,7 +96,13 @@ export class ApproveLoanComponent extends LoanAccountActionsBaseComponent implem
note: ['']
});
if (this.isWorkingCapital) {
this.approveLoanForm.addControl('discountAmount', new UntypedFormControl());
this.approveLoanForm.addControl(
'discountAmount',
new UntypedFormControl({
value: this.loanData.discountAmount,
disabled: this.loanData.overrideDiscountDisabled
})
);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,13 @@ export class DisburseComponent extends LoanAccountActionsBaseComponent implement
note: ''
});
if (this.isWorkingCapital) {
this.disbursementLoanForm.addControl('discountAmount', new UntypedFormControl());
this.disbursementLoanForm.addControl(
'discountAmount',
new UntypedFormControl({
value: this.dataObject.discountAmount,
disabled: this.dataObject.overrideDiscountDisabled
})
);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ export class TransactionsTabComponent extends LoanProductBaseComponent implement
transaction.type.chargeoff ||
this.isReAgoeOrReAmortize(transaction.type) ||
transaction.type.interestRefund ||
this.isDiscountFee(transaction.type) ||
transaction.type.contractTermination
);
}
Expand Down Expand Up @@ -469,6 +470,10 @@ export class TransactionsTabComponent extends LoanProductBaseComponent implement
return this.isReAmortize(transactionType) || this.isReAge(transactionType);
}

private isDiscountFee(transactionType: LoanTransactionType): boolean {
return transactionType.discountFee || transactionType.code === 'loanTransactionType.discountFee';
}

isBuyDownFee(transactionType: LoanTransactionType): boolean {
return transactionType.buyDownFee || transactionType.code === 'loanTransactionType.buyDownFee';
}
Expand Down
1 change: 1 addition & 0 deletions src/app/loans/models/loan-transaction-type.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export interface LoanTransactionType {
buyDownFee: boolean;
buyDownFeeAdjustment: boolean;
buyDownFeeAmortizationAdjustment: boolean;
discountFee: boolean;
}

export interface LoanTransactionTemplate {
Expand Down
Loading