WEB-246: add deferred income liability account handling for buy-down fee in loan product accounting form
This commit is contained in:
+4
-1
@@ -264,7 +264,10 @@
|
|||||||
</mifosx-gl-account-selector>
|
</mifosx-gl-account-selector>
|
||||||
|
|
||||||
<mifosx-gl-account-selector
|
<mifosx-gl-account-selector
|
||||||
*ngIf="deferredIncomeRecognition?.capitalizedIncome?.enableIncomeCapitalization"
|
*ngIf="
|
||||||
|
deferredIncomeRecognition?.capitalizedIncome?.enableIncomeCapitalization ||
|
||||||
|
deferredIncomeRecognition?.buyDownFee?.enableBuyDownFee
|
||||||
|
"
|
||||||
class="flex-48"
|
class="flex-48"
|
||||||
[inputFormControl]="loanProductAccountingForm.controls.deferredIncomeLiabilityAccountId"
|
[inputFormControl]="loanProductAccountingForm.controls.deferredIncomeLiabilityAccountId"
|
||||||
[glAccountList]="liabilityAccountData"
|
[glAccountList]="liabilityAccountData"
|
||||||
|
|||||||
+9
-2
@@ -157,6 +157,7 @@ export class LoanProductAccountingStepComponent implements OnInit, OnChanges {
|
|||||||
}
|
}
|
||||||
if (this.deferredIncomeRecognition.buyDownFee.enableBuyDownFee) {
|
if (this.deferredIncomeRecognition.buyDownFee.enableBuyDownFee) {
|
||||||
this.loanProductAccountingForm.patchValue({
|
this.loanProductAccountingForm.patchValue({
|
||||||
|
deferredIncomeLiabilityAccountId: accountingMappings.deferredIncomeLiabilityAccount.id,
|
||||||
buyDownExpenseAccountId: accountingMappings.buyDownExpenseAccount.id,
|
buyDownExpenseAccountId: accountingMappings.buyDownExpenseAccount.id,
|
||||||
incomeFromBuyDownAccountId: accountingMappings.incomeFromBuyDownAccount.id
|
incomeFromBuyDownAccountId: accountingMappings.incomeFromBuyDownAccount.id
|
||||||
});
|
});
|
||||||
@@ -600,17 +601,23 @@ export class LoanProductAccountingStepComponent implements OnInit, OnChanges {
|
|||||||
setDeferredIncomeRecognitionControls() {
|
setDeferredIncomeRecognitionControls() {
|
||||||
if (this.isAccountingAccrualBased) {
|
if (this.isAccountingAccrualBased) {
|
||||||
if (this.deferredIncomeRecognition) {
|
if (this.deferredIncomeRecognition) {
|
||||||
if (this.deferredIncomeRecognition.capitalizedIncome.enableIncomeCapitalization) {
|
if (
|
||||||
|
this.deferredIncomeRecognition.capitalizedIncome.enableIncomeCapitalization ||
|
||||||
|
this.deferredIncomeRecognition.buyDownFee.enableBuyDownFee
|
||||||
|
) {
|
||||||
this.loanProductAccountingForm.addControl(
|
this.loanProductAccountingForm.addControl(
|
||||||
'deferredIncomeLiabilityAccountId',
|
'deferredIncomeLiabilityAccountId',
|
||||||
new UntypedFormControl('', Validators.required)
|
new UntypedFormControl('', Validators.required)
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
this.loanProductAccountingForm.removeControl('deferredIncomeLiabilityAccountId');
|
||||||
|
}
|
||||||
|
if (this.deferredIncomeRecognition.capitalizedIncome.enableIncomeCapitalization) {
|
||||||
this.loanProductAccountingForm.addControl(
|
this.loanProductAccountingForm.addControl(
|
||||||
'incomeFromCapitalizationAccountId',
|
'incomeFromCapitalizationAccountId',
|
||||||
new UntypedFormControl('', Validators.required)
|
new UntypedFormControl('', Validators.required)
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
this.loanProductAccountingForm.removeControl('deferredIncomeLiabilityAccountId');
|
|
||||||
this.loanProductAccountingForm.removeControl('incomeFromCapitalizationAccountId');
|
this.loanProductAccountingForm.removeControl('incomeFromCapitalizationAccountId');
|
||||||
}
|
}
|
||||||
if (this.deferredIncomeRecognition.buyDownFee.enableBuyDownFee) {
|
if (this.deferredIncomeRecognition.buyDownFee.enableBuyDownFee) {
|
||||||
|
|||||||
Reference in New Issue
Block a user