FINERACT-2104: Enable Accrual Activity Posting on Loan Products - UI changes
This commit is contained in:
+5
@@ -728,6 +728,11 @@
|
||||
<span fxFlex="53%">{{ 'labels.accounting.' + getAccountingRuleName(accountingRuleData[accountingRule() - 1]) | translate }}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill *ngIf="isAccountingAccrualBased">
|
||||
<span fxFlex="47%">{{ 'labels.inputs.Enable Accrual Activity Posting on Installment Due Date' | translate }}:</span>
|
||||
<span fxFlex="53%">{{ loanProduct.enableAccrualActivityPosting | yesNo }}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill *ngIf="isAccountingEnabled()" fxLayout="row wrap"
|
||||
fxLayout.lt-md="column">
|
||||
|
||||
|
||||
+4
@@ -313,6 +313,10 @@ export class LoanProductSummaryComponent implements OnInit, OnChanges {
|
||||
this.loanProduct.accountingRule.id : this.loanProduct.accountingRule;
|
||||
}
|
||||
|
||||
get isAccountingAccrualBased(): boolean {
|
||||
return this.accountingRule() === 3 || this.accountingRule() === 4;
|
||||
}
|
||||
|
||||
isAccountingEnabled(): boolean {
|
||||
return (this.accountingRule() >= 2);
|
||||
}
|
||||
|
||||
+1
@@ -11,6 +11,7 @@
|
||||
<mat-divider fxFlex="98%"></mat-divider>
|
||||
|
||||
<div *ngIf="loanProductAccountingForm.value.accountingRule >= 2 && loanProductAccountingForm.value.accountingRule <= 4" fxFlexFill fxLayout="row wrap" fxLayoutGap="2%" fxLayout.lt-md="column">
|
||||
<mat-checkbox *ngIf="isAccountingAccrualBased" fxFlex="73%" formControlName="enableAccrualActivityPosting">{{'labels.inputs.Enable Accrual Activity Posting on Installment Due Date' | translate}}</mat-checkbox>
|
||||
|
||||
<h4 fxFlex="98%" class="mat-h4">{{'labels.heading.Assets' | translate}} / {{'labels.heading.Liabilities' | translate}}</h4>
|
||||
|
||||
|
||||
+10
@@ -66,6 +66,9 @@ export class LoanProductAccountingStepComponent implements OnInit {
|
||||
'receivableFeeAccountId': accountingMappings.receivableFeeAccount.id,
|
||||
'receivablePenaltyAccountId': accountingMappings.receivablePenaltyAccount.id,
|
||||
});
|
||||
this.loanProductAccountingForm.patchValue({
|
||||
'enableAccrualActivityPosting': this.loanProductsTemplate.enableAccrualActivityPosting
|
||||
});
|
||||
/* falls through */
|
||||
case 2:
|
||||
this.loanProductAccountingForm.patchValue({
|
||||
@@ -170,10 +173,12 @@ export class LoanProductAccountingStepComponent implements OnInit {
|
||||
this.loanProductAccountingForm.addControl('receivableInterestAccountId', new UntypedFormControl('', Validators.required));
|
||||
this.loanProductAccountingForm.addControl('receivableFeeAccountId', new UntypedFormControl('', Validators.required));
|
||||
this.loanProductAccountingForm.addControl('receivablePenaltyAccountId', new UntypedFormControl('', Validators.required));
|
||||
this.loanProductAccountingForm.addControl('enableAccrualActivityPosting', new UntypedFormControl(false));
|
||||
} else {
|
||||
this.loanProductAccountingForm.removeControl('receivableInterestAccountId');
|
||||
this.loanProductAccountingForm.removeControl('receivableFeeAccountId');
|
||||
this.loanProductAccountingForm.removeControl('receivablePenaltyAccountId');
|
||||
this.loanProductAccountingForm.removeControl('enableAccrualActivityPosting');
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -304,6 +309,11 @@ export class LoanProductAccountingStepComponent implements OnInit {
|
||||
return formfields;
|
||||
}
|
||||
|
||||
get isAccountingAccrualBased() {
|
||||
const accountingRule = this.loanProductAccountingForm.value.accountingRule;
|
||||
return accountingRule === 3 || accountingRule === 4;
|
||||
}
|
||||
|
||||
get loanProductAccounting() {
|
||||
return this.loanProductAccountingForm.value;
|
||||
}
|
||||
|
||||
@@ -124,6 +124,7 @@ export interface LoanProduct {
|
||||
paymentChannelToFundSourceMappings?: PaymentChannelToFundSourceMapping[];
|
||||
feeToIncomeAccountMappings?: ChargeToIncomeAccountMapping[];
|
||||
penaltyToIncomeAccountMappings?: ChargeToIncomeAccountMapping[];
|
||||
enableAccrualActivityPosting?: boolean;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user