Merge pull request #2548 from Cocoa-Puffs/fix/deferred-income-liability-account-mapping-not-showing-on-buy-down-fee
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
|
||||
*ngIf="deferredIncomeRecognition?.capitalizedIncome?.enableIncomeCapitalization"
|
||||
*ngIf="
|
||||
deferredIncomeRecognition?.capitalizedIncome?.enableIncomeCapitalization ||
|
||||
deferredIncomeRecognition?.buyDownFee?.enableBuyDownFee
|
||||
"
|
||||
class="flex-48"
|
||||
[inputFormControl]="loanProductAccountingForm.controls.deferredIncomeLiabilityAccountId"
|
||||
[glAccountList]="liabilityAccountData"
|
||||
|
||||
+9
-2
@@ -157,6 +157,7 @@ export class LoanProductAccountingStepComponent implements OnInit, OnChanges {
|
||||
}
|
||||
if (this.deferredIncomeRecognition.buyDownFee.enableBuyDownFee) {
|
||||
this.loanProductAccountingForm.patchValue({
|
||||
deferredIncomeLiabilityAccountId: accountingMappings.deferredIncomeLiabilityAccount.id,
|
||||
buyDownExpenseAccountId: accountingMappings.buyDownExpenseAccount.id,
|
||||
incomeFromBuyDownAccountId: accountingMappings.incomeFromBuyDownAccount.id
|
||||
});
|
||||
@@ -600,17 +601,23 @@ export class LoanProductAccountingStepComponent implements OnInit, OnChanges {
|
||||
setDeferredIncomeRecognitionControls() {
|
||||
if (this.isAccountingAccrualBased) {
|
||||
if (this.deferredIncomeRecognition) {
|
||||
if (this.deferredIncomeRecognition.capitalizedIncome.enableIncomeCapitalization) {
|
||||
if (
|
||||
this.deferredIncomeRecognition.capitalizedIncome.enableIncomeCapitalization ||
|
||||
this.deferredIncomeRecognition.buyDownFee.enableBuyDownFee
|
||||
) {
|
||||
this.loanProductAccountingForm.addControl(
|
||||
'deferredIncomeLiabilityAccountId',
|
||||
new UntypedFormControl('', Validators.required)
|
||||
);
|
||||
} else {
|
||||
this.loanProductAccountingForm.removeControl('deferredIncomeLiabilityAccountId');
|
||||
}
|
||||
if (this.deferredIncomeRecognition.capitalizedIncome.enableIncomeCapitalization) {
|
||||
this.loanProductAccountingForm.addControl(
|
||||
'incomeFromCapitalizationAccountId',
|
||||
new UntypedFormControl('', Validators.required)
|
||||
);
|
||||
} else {
|
||||
this.loanProductAccountingForm.removeControl('deferredIncomeLiabilityAccountId');
|
||||
this.loanProductAccountingForm.removeControl('incomeFromCapitalizationAccountId');
|
||||
}
|
||||
if (this.deferredIncomeRecognition.buyDownFee.enableBuyDownFee) {
|
||||
|
||||
Reference in New Issue
Block a user