Loan product accounting mappings to Income from Goodwill Credit (#1709)

Co-authored-by: Jose Alberto Hernandez <alberto@MacBook-Pro.local>
This commit is contained in:
José Alberto Hernández
2023-03-14 16:30:19 -06:00
committed by GitHub
co-authored by Jose Alberto Hernandez
parent c27c50a6fb
commit 7b9e036f01
5 changed files with 59 additions and 3 deletions
@@ -1,3 +1,7 @@
.container {
padding-bottom: 30px;
}
fa-icon {
position: relative;
left: 5%;
@@ -0,0 +1,3 @@
.container {
padding-bottom: 30px;
}
@@ -180,6 +180,42 @@
</mat-error>
</mat-form-field>
<mat-form-field fxFlex="48%">
<mat-label>Income from Goodwill Credit Interest</mat-label>
<mat-select formControlName="incomeFromGoodwillCreditInterestAccountId" required>
<mat-option *ngFor="let incomeAccount of incomeAccountData" [value]="incomeAccount.id">
({{ incomeAccount.glCode }}) {{ incomeAccount.name }}
</mat-option>
</mat-select>
<mat-error>
Income from Goodwill Credit Interest is <strong>required</strong>
</mat-error>
</mat-form-field>
<mat-form-field fxFlex="48%">
<mat-label>Income from Goodwill Credit Fees</mat-label>
<mat-select formControlName="incomeFromGoodwillCreditFeesAccountId" required>
<mat-option *ngFor="let incomeAccount of incomeAccountData" [value]="incomeAccount.id">
({{ incomeAccount.glCode }}) {{ incomeAccount.name }}
</mat-option>
</mat-select>
<mat-error>
Income from Goodwill Credit Fees is <strong>required</strong>
</mat-error>
</mat-form-field>
<mat-form-field fxFlex="48%">
<mat-label>Income from Goodwill Credit Penalty</mat-label>
<mat-select formControlName="incomeFromGoodwillCreditPenaltyAccountId" required>
<mat-option *ngFor="let incomeAccount of incomeAccountData" [value]="incomeAccount.id">
({{ incomeAccount.glCode }}) {{ incomeAccount.name }}
</mat-option>
</mat-select>
<mat-error>
Income from Goodwill Credit Penalty is <strong>required</strong>
</mat-error>
</mat-form-field>
<mat-divider fxFlex="98%"></mat-divider>
<h4 fxFlex="98%" class="mat-h4">Expenses</h4>
@@ -250,9 +286,7 @@
<mat-divider fxFlex="98%"></mat-divider>
<h3 fxFlex="23%" class="mat-h3">Advanced Accounting Rules</h3>
<mat-checkbox fxFlex="73%" formControlName="advancedAccountingRules"></mat-checkbox>
<mat-checkbox fxFlex="73%" formControlName="advancedAccountingRules">Advanced Accounting Rules</mat-checkbox>
<div *ngIf="loanProductAccountingForm.value.advancedAccountingRules" fxFlexFill fxLayout="row wrap" fxLayoutGap="2%" fxLayout.lt-md="column">
@@ -82,6 +82,9 @@ export class LoanProductAccountingStepComponent implements OnInit {
'incomeFromChargeOffPenaltyAccountId': accountingMappings.incomeFromChargeOffPenaltyAccount ? accountingMappings.incomeFromChargeOffPenaltyAccount.id : '',
'incomeFromChargeOffFeesAccountId': accountingMappings.incomeFromChargeOffFeesAccount ? accountingMappings.incomeFromChargeOffFeesAccount.id : '',
'incomeFromChargeOffInterestAccountId': accountingMappings.incomeFromChargeOffInterestAccount ? accountingMappings.incomeFromChargeOffInterestAccount.id : '',
'incomeFromGoodwillCreditInterestAccountId': accountingMappings.incomeFromGoodwillCreditInterestAccount ? accountingMappings.incomeFromGoodwillCreditInterestAccount.id : '',
'incomeFromGoodwillCreditFeesAccountId': accountingMappings.incomeFromGoodwillCreditFeesAccount ? accountingMappings.incomeFromGoodwillCreditFeesAccount.id : '',
'incomeFromGoodwillCreditPenaltyAccountId': accountingMappings.incomeFromGoodwillCreditPenaltyAccount ? accountingMappings.incomeFromGoodwillCreditPenaltyAccount.id : '',
'advancedAccountingRules': (this.loanProductsTemplate.paymentChannelToFundSourceMappings || this.loanProductsTemplate.feeToIncomeAccountMappings || this.loanProductsTemplate.penaltyToIncomeAccountMappings) ? true : false
});
@@ -123,6 +126,9 @@ export class LoanProductAccountingStepComponent implements OnInit {
this.loanProductAccountingForm.addControl('incomeFromChargeOffPenaltyAccountId', new FormControl('', Validators.required));
this.loanProductAccountingForm.addControl('incomeFromChargeOffFeesAccountId', new FormControl('', Validators.required));
this.loanProductAccountingForm.addControl('incomeFromChargeOffInterestAccountId', new FormControl('', Validators.required));
this.loanProductAccountingForm.addControl('incomeFromGoodwillCreditInterestAccountId', new FormControl('', Validators.required));
this.loanProductAccountingForm.addControl('incomeFromGoodwillCreditFeesAccountId', new FormControl('', Validators.required));
this.loanProductAccountingForm.addControl('incomeFromGoodwillCreditPenaltyAccountId', new FormControl('', Validators.required));
this.loanProductAccountingForm.get('advancedAccountingRules').valueChanges
.subscribe((advancedAccountingRules: boolean) => {
@@ -153,6 +159,9 @@ export class LoanProductAccountingStepComponent implements OnInit {
this.loanProductAccountingForm.removeControl('incomeFromChargeOffPenaltyAccountId');
this.loanProductAccountingForm.removeControl('incomeFromChargeOffFeesAccountId');
this.loanProductAccountingForm.removeControl('incomeFromChargeOffInterestAccountId');
this.loanProductAccountingForm.removeControl('incomeFromGoodwillCreditInterestAccountId');
this.loanProductAccountingForm.removeControl('incomeFromGoodwillCreditFeesAccountId');
this.loanProductAccountingForm.removeControl('incomeFromGoodwillCreditPenaltyAccountId');
}
if (accountingRule === 3 || accountingRule === 4) {
@@ -635,6 +635,12 @@
<span fxFlex="60%">{{ loanProduct.incomeFromChargeOffFeesAccountId | find:loanProductsTemplate.accountingMappingOptions.incomeAccountOptions:'id':'name' }}</span>
<span fxFlex="40%">Income from ChargeOff Penalty:</span>
<span fxFlex="60%">{{ loanProduct.incomeFromChargeOffPenaltyAccountId | find:loanProductsTemplate.accountingMappingOptions.incomeAccountOptions:'id':'name' }}</span>
<span fxFlex="40%">Income from Goodwill Credit Interest:</span>
<span fxFlex="60%">{{ loanProduct.incomeFromGoodwillCreditInterestAccountId | find:loanProductsTemplate.accountingMappingOptions.incomeAccountOptions:'id':'name' }}</span>
<span fxFlex="40%">Income from Goodwill Credit Fees:</span>
<span fxFlex="60%">{{ loanProduct.incomeFromGoodwillCreditFeesAccountId | find:loanProductsTemplate.accountingMappingOptions.incomeAccountOptions:'id':'name' }}</span>
<span fxFlex="40%">Income from Goodwill Credit Penalty:</span>
<span fxFlex="60%">{{ loanProduct.incomeFromGoodwillCreditPenaltyAccountId | find:loanProductsTemplate.accountingMappingOptions.incomeAccountOptions:'id':'name' }}</span>
</div>
<h4 fxFlexFill class="mat-h4">Expenses</h4>