Use of filter in the GL Account dropdown menus

This commit is contained in:
Jose Alberto Hernandez
2024-01-10 15:02:06 +01:00
committed by Adam Saghy
parent 6edb262028
commit 53d8436875
47 changed files with 807 additions and 626 deletions
@@ -723,93 +723,78 @@
<h4 fxFlexFill class="mat-h4">Assets / Liabilities</h4>
<div fxFlexFill fxLayout="row wrap" fxLayout.lt-md="column">
<span fxFlex="47%">Fund source:</span>
<span fxFlex="53%">({{accountingMappings.fundSourceAccount.glCode}}) {{
accountingMappings.fundSourceAccount.name }}</span>
<mifosx-gl-account-display fxFlex="100%"
[accountTitle]="'Fund source'" [glAccount]="accountingMappings.fundSourceAccount" [withTitle]="'47%'">
</mifosx-gl-account-display>
</div>
<h4 fxFlexFill class="mat-h4">Assets</h4>
<h4 fxFlexFill class="mat-h4">{{'labels.heading.Assets' | translate}}</h4>
<div fxFlexFill fxLayout="row wrap" fxLayout.lt-md="column">
<span fxFlex="47%">Loan portfolio:</span>
<span fxFlex="53%">({{accountingMappings.loanPortfolioAccount.glCode}}) {{
accountingMappings.loanPortfolioAccount.name }}</span>
<mifosx-gl-account-display fxFlex="100%"
[accountTitle]="'Loan portfolio'" [glAccount]="accountingMappings.loanPortfolioAccount" [withTitle]="'47%'">
</mifosx-gl-account-display>
<div fxFlexFill *ngIf="loanProduct.accountingRule.id === 3 || loanProduct.accountingRule.id === 4"
fxLayout="row wrap" fxLayout.lt-md="column">
<span fxFlex="47%">Interest Receivable:</span>
<span fxFlex="53%">({{accountingMappings.receivableInterestAccount.glCode}}) {{
accountingMappings.receivableInterestAccount.name }}</span>
<span fxFlex="47%">Fees Receivable:</span>
<span fxFlex="53%">({{accountingMappings.receivableFeeAccount.glCode}}) {{
accountingMappings.receivableInterestAccount.name }}</span>
<span fxFlex="47%">Penalties Receivable:</span>
<span fxFlex="53%">({{accountingMappings.receivablePenaltyAccount.glCode}}) {{
accountingMappings.receivablePenaltyAccount.name }}</span>
<mifosx-gl-account-display fxFlex="100%"
[accountTitle]="'Interest Receivable'" [glAccount]="accountingMappings.receivableInterestAccount" [withTitle]="'47%'">
</mifosx-gl-account-display>
<mifosx-gl-account-display fxFlex="100%"
[accountTitle]="'Fees Receivable'" [glAccount]="accountingMappings.receivableFeeAccount" [withTitle]="'47%'">
</mifosx-gl-account-display>
<mifosx-gl-account-display fxFlex="100%"
[accountTitle]="'Penalties Receivable'" [glAccount]="accountingMappings.receivablePenaltyAccount" [withTitle]="'47%'">
</mifosx-gl-account-display>
</div>
<span fxFlex="47%">Transfer in suspense:</span>
<span fxFlex="53%">({{accountingMappings.transfersInSuspenseAccount.glCode}}) {{
accountingMappings.transfersInSuspenseAccount.name }}</span>
<mifosx-gl-account-display fxFlex="100%"
[accountTitle]="'Transfer in suspense'" [glAccount]="accountingMappings.transfersInSuspenseAccount" [withTitle]="'47%'">
</mifosx-gl-account-display>
</div>
<h4 fxFlexFill class="mat-h4">Income</h4>
<h4 fxFlexFill class="mat-h4">{{'labels.heading.Income' | translate}}</h4>
<mifosx-gl-account-display fxFlex="100%"
[accountTitle]="'Income from Interest'" [glAccount]="accountingMappings.interestOnLoanAccount" [withTitle]="'47%'">
</mifosx-gl-account-display>
<mifosx-gl-account-display fxFlex="100%"
[accountTitle]="'Income from fees'" [glAccount]="accountingMappings.incomeFromFeeAccount" [withTitle]="'47%'">
</mifosx-gl-account-display>
<mifosx-gl-account-display fxFlex="100%"
[accountTitle]="'Income from penalties'" [glAccount]="accountingMappings.incomeFromPenaltyAccount" [withTitle]="'47%'">
</mifosx-gl-account-display>
<mifosx-gl-account-display fxFlex="100%"
[accountTitle]="'Income from Recovery Repayments'" [glAccount]="accountingMappings.incomeFromRecoveryAccount" [withTitle]="'47%'">
</mifosx-gl-account-display>
<mifosx-gl-account-display fxFlex="100%" *ngIf="accountingMappings.incomeFromChargeOffInterestAccount"
[accountTitle]="'Income from ChargeOff Interest'" [glAccount]="accountingMappings.incomeFromChargeOffInterestAccount" [withTitle]="'47%'">
</mifosx-gl-account-display>
<mifosx-gl-account-display fxFlex="100%" *ngIf="accountingMappings.incomeFromChargeOffFeesAccount"
[accountTitle]="'Income from ChargeOff Fees'" [glAccount]="accountingMappings.incomeFromChargeOffFeesAccount" [withTitle]="'47%'">
</mifosx-gl-account-display>
<mifosx-gl-account-display fxFlex="100%" *ngIf="accountingMappings.incomeFromChargeOffPenaltyAccount"
[accountTitle]="'Income from ChargeOff Penalty'" [glAccount]="accountingMappings.incomeFromChargeOffPenaltyAccount" [withTitle]="'47%'">
</mifosx-gl-account-display>
<h4 fxFlexFill class="mat-h4">{{'labels.heading.Expenses' | translate}}</h4>
<div fxFlexFill fxLayout="row wrap" fxLayout.lt-md="column">
<span fxFlex="47%">Income from Interest:</span>
<span fxFlex="53%">({{accountingMappings.interestOnLoanAccount.glCode}}) {{
accountingMappings.interestOnLoanAccount.name }}</span>
<span fxFlex="47%">Income from fees:</span>
<span fxFlex="53%">({{accountingMappings.incomeFromFeeAccount.glCode}}) {{
accountingMappings.incomeFromFeeAccount.name }}</span>
<span fxFlex="47%">Income from penalties:</span>
<span fxFlex="53%">({{accountingMappings.incomeFromPenaltyAccount.glCode}}) {{
accountingMappings.incomeFromPenaltyAccount.name }}</span>
<span fxFlex="47%">Income from Recovery Repayments:</span>
<span fxFlex="53%">({{accountingMappings.incomeFromRecoveryAccount.glCode}}) {{
accountingMappings.incomeFromRecoveryAccount.name }}</span>
<span *ngIf="accountingMappings.incomeFromChargeOffInterestAccount" fxFlex="47%">Income from ChargeOff
Interest:</span>
<span *ngIf="accountingMappings.incomeFromChargeOffInterestAccount" fxFlex="53%">
({{accountingMappings.incomeFromChargeOffInterestAccount.glCode}}) {{
accountingMappings.incomeFromChargeOffInterestAccount.name }}</span>
<span fxFlex="47%" *ngIf="accountingMappings.incomeFromChargeOffFeesAccount">Income from ChargeOff
Fees:</span>
<span fxFlex="53%" *ngIf="accountingMappings.incomeFromChargeOffFeesAccount">
({{accountingMappings.incomeFromChargeOffFeesAccount.glCode}}) {{
accountingMappings.incomeFromChargeOffFeesAccount.name }}</span>
<span fxFlex="47%" *ngIf="accountingMappings.incomeFromChargeOffPenaltyAccount">Income from ChargeOff
Penalty:</span>
<span fxFlex="53%" *ngIf="accountingMappings.incomeFromChargeOffPenaltyAccount">
({{accountingMappings.incomeFromChargeOffPenaltyAccount.glCode}}) {{
accountingMappings.incomeFromChargeOffPenaltyAccount.name }}</span>
</div>
<mifosx-gl-account-display fxFlex="100%"
[accountTitle]="'Losses written off'" [glAccount]="accountingMappings.writeOffAccount" [withTitle]="'47%'">
</mifosx-gl-account-display>
<mifosx-gl-account-display fxFlex="100%"
[accountTitle]="'Expenses from Goodwill Credit'" [glAccount]="accountingMappings.goodwillCreditAccount" [withTitle]="'47%'">
</mifosx-gl-account-display>
<mifosx-gl-account-display fxFlex="100%" *ngIf="accountingMappings.chargeOffExpenseAccount"
[accountTitle]="'ChargeOff Expense'" [glAccount]="accountingMappings.chargeOffExpenseAccount" [withTitle]="'47%'">
</mifosx-gl-account-display>
<mifosx-gl-account-display fxFlex="100%" *ngIf="accountingMappings.chargeOffFraudExpenseAccount"
[accountTitle]="'ChargeOff Fraud Expense'" [glAccount]="accountingMappings.chargeOffFraudExpenseAccount" [withTitle]="'47%'">
</mifosx-gl-account-display>
<h4 fxFlexFill class="mat-h4">Expenses</h4>
<div fxFlexFill fxLayout="row wrap" fxLayout.lt-md="column">
<span fxFlex="47%">Losses written off:</span>
<span fxFlex="53%">({{accountingMappings.writeOffAccount.glCode}}) {{
accountingMappings.writeOffAccount.name }}</span>
<span fxFlex="47%">Expenses from Goodwill Credit:</span>
<span fxFlex="53%">({{accountingMappings.goodwillCreditAccount.glCode}}) {{
accountingMappings.goodwillCreditAccount.name }}</span>
<span *ngIf="accountingMappings.chargeOffExpenseAccount" fxFlex="47%">ChargeOff Expense:</span>
<span *ngIf="accountingMappings.chargeOffExpenseAccount" fxFlex="53%">
({{accountingMappings.chargeOffExpenseAccount.glCode}}) {{
accountingMappings.chargeOffExpenseAccount.name }}</span>
<span *ngIf="accountingMappings.chargeOffFraudExpenseAccount" fxFlex="47%">ChargeOff Fraud
Expense:</span>
<span *ngIf="accountingMappings.chargeOffFraudExpenseAccount" fxFlex="53%">
({{accountingMappings.chargeOffFraudExpenseAccount.glCode}}) {{
accountingMappings.chargeOffFraudExpenseAccount.name }}</span>
</div>
<h4 fxFlexFill class="mat-h4">Liabilities</h4>
<div fxFlexFill fxLayout="row wrap" fxLayout.lt-md="column">
<span fxFlex="47%">Over payment liability:</span>
<span fxFlex="53%">({{accountingMappings.overpaymentLiabilityAccount.glCode}}) {{
accountingMappings.overpaymentLiabilityAccount.name }}</span>
</div>
<h4 fxFlexFill class="mat-h4">{{'labels.heading.Liabilities' | translate}}</h4>
<mifosx-gl-account-display fxFlex="100%"
[accountTitle]="'Over payment liability'" [glAccount]="accountingMappings.overpaymentLiabilityAccount" [withTitle]="'47%'">
</mifosx-gl-account-display>
<div
*ngIf="isAdvancedAccountingEnabled()"
@@ -12,277 +12,193 @@
<div *ngIf="loanProductAccountingForm.value.accountingRule >= 2 && loanProductAccountingForm.value.accountingRule <= 4" fxFlexFill fxLayout="row wrap" fxLayoutGap="2%" fxLayout.lt-md="column">
<h4 fxFlex="98%" class="mat-h4">Assets / Liability</h4>
<h4 fxFlex="98%" class="mat-h4">{{'labels.heading.Assets' | translate}} / {{'labels.heading.Liability' | translate}}</h4>
<mat-form-field fxFlex="48%">
<mat-label>Fund source</mat-label>
<mat-select formControlName="fundSourceAccountId" required>
<mat-option *ngFor="let assetAndLiabilityAccount of assetAndLiabilityAccountData" [value]="assetAndLiabilityAccount.id">
({{ assetAndLiabilityAccount.glCode }}) {{ assetAndLiabilityAccount.name }}
</mat-option>
</mat-select>
<mat-error>
Fund source is <strong>required</strong>
</mat-error>
</mat-form-field>
<mifosx-gl-account-selector fxFlex="48%"
[inputFormControl]="loanProductAccountingForm.controls.fundSourceAccountId"
[glAccountList]="assetAndLiabilityAccountData"
[required]="true"
[inputLabel]="'Fund source'"
>
</mifosx-gl-account-selector>
<h4 fxFlex="98%" class="mat-h4">Assets</h4>
<h4 fxFlex="98%" class="mat-h4">{{'labels.heading.Assets' | translate}}</h4>
<mat-form-field fxFlex="48%">
<mat-label>Loan portfolio</mat-label>
<mat-select formControlName="loanPortfolioAccountId" required>
<mat-option *ngFor="let assetAccount of assetAccountData" [value]="assetAccount.id">
({{ assetAccount.glCode }}) {{ assetAccount.name }}
</mat-option>
</mat-select>
<mat-error>
Loan portfolio is <strong>required</strong>
</mat-error>
</mat-form-field>
<mifosx-gl-account-selector fxFlex="48%"
[inputFormControl]="loanProductAccountingForm.controls.loanPortfolioAccountId"
[glAccountList]="assetAccountData"
[required]="true"
[inputLabel]="'Loan portfolio'"
>
</mifosx-gl-account-selector>
<mifosx-gl-account-selector fxFlex="48%"
[inputFormControl]="loanProductAccountingForm.controls.transfersInSuspenseAccountId"
[glAccountList]="assetAccountData"
[required]="true"
[inputLabel]="'Transfer in suspense'"
>
</mifosx-gl-account-selector>
<div *ngIf="loanProductAccountingForm.value.accountingRule === 3 || loanProductAccountingForm.value.accountingRule === 4" fxFlexFill fxLayout="row wrap" fxLayoutGap="2%" fxLayout.lt-md="column">
<mat-form-field fxFlex="48%">
<mat-label>Interest Receivable</mat-label>
<mat-select formControlName="receivableInterestAccountId" required>
<mat-option *ngFor="let assetAccount of assetAccountData" [value]="assetAccount.id">
({{ assetAccount.glCode }}) {{ assetAccount.name }}
</mat-option>
</mat-select>
<mat-error>
Interest Receivable is <strong>required</strong>
</mat-error>
</mat-form-field>
<mifosx-gl-account-selector fxFlex="48%"
[inputFormControl]="loanProductAccountingForm.controls.receivableInterestAccountId"
[glAccountList]="assetAccountData"
[required]="true"
[inputLabel]="'Interest Receivable'"
>
</mifosx-gl-account-selector>
<mat-form-field fxFlex="48%">
<mat-label>Fees Receivable</mat-label>
<mat-select formControlName="receivableFeeAccountId" required>
<mat-option *ngFor="let assetAccount of assetAccountData" [value]="assetAccount.id">
({{ assetAccount.glCode }}) {{ assetAccount.name }}
</mat-option>
</mat-select>
<mat-error>
Fees Receivable is <strong>required</strong>
</mat-error>
</mat-form-field>
<mifosx-gl-account-selector fxFlex="48%"
[inputFormControl]="loanProductAccountingForm.controls.receivableFeeAccountId"
[glAccountList]="assetAccountData"
[required]="true"
[inputLabel]="'Fees Receivable'"
>
</mifosx-gl-account-selector>
<mat-form-field fxFlex="48%">
<mat-label>Penalties Receivable</mat-label>
<mat-select formControlName="receivablePenaltyAccountId" required>
<mat-option *ngFor="let assetAccount of assetAccountData" [value]="assetAccount.id">
({{ assetAccount.glCode }}) {{ assetAccount.name }}
</mat-option>
</mat-select>
<mat-error>
Penalties Receivable is <strong>required</strong>
</mat-error>
</mat-form-field>
<mifosx-gl-account-selector fxFlex="48%"
[inputFormControl]="loanProductAccountingForm.controls.receivablePenaltyAccountId"
[glAccountList]="assetAccountData"
[required]="true"
[inputLabel]="'Penalties Receivable'"
>
</mifosx-gl-account-selector>
</div>
<mat-form-field fxFlex="48%">
<mat-label>Transfer in suspense</mat-label>
<mat-select formControlName="transfersInSuspenseAccountId" required>
<mat-option *ngFor="let assetAccount of assetAccountData" [value]="assetAccount.id">
({{ assetAccount.glCode }}) {{ assetAccount.name }}
</mat-option>
</mat-select>
<mat-error>
Transfer in suspense is <strong>required</strong>
</mat-error>
</mat-form-field>
<mat-divider fxFlex="98%"></mat-divider>
<h4 fxFlex="98%" class="mat-h4">{{'labels.heading.Income' | translate}}</h4>
<mifosx-gl-account-selector fxFlex="48%"
[inputFormControl]="loanProductAccountingForm.controls.interestOnLoanAccountId"
[glAccountList]="incomeAccountData"
[required]="true"
[inputLabel]="'Income from Interest'"
>
</mifosx-gl-account-selector>
<mifosx-gl-account-selector fxFlex="48%"
[inputFormControl]="loanProductAccountingForm.controls.incomeFromFeeAccountId"
[glAccountList]="incomeAccountData"
[required]="true"
[inputLabel]="'Income from fees'"
>
</mifosx-gl-account-selector>
<mifosx-gl-account-selector fxFlex="48%"
[inputFormControl]="loanProductAccountingForm.controls.incomeFromPenaltyAccountId"
[glAccountList]="incomeAccountData"
[required]="true"
[inputLabel]="'Income from penalties'"
>
</mifosx-gl-account-selector>
<mifosx-gl-account-selector fxFlex="48%"
[inputFormControl]="loanProductAccountingForm.controls.incomeFromRecoveryAccountId"
[glAccountList]="incomeAccountData"
[required]="true"
[inputLabel]="'Income from Recovery Repayments'"
>
</mifosx-gl-account-selector>
<mifosx-gl-account-selector fxFlex="48%"
[inputFormControl]="loanProductAccountingForm.controls.incomeFromChargeOffInterestAccountId"
[glAccountList]="incomeAccountData"
[required]="true"
[inputLabel]="'Income from ChargeOff Interest'"
>
</mifosx-gl-account-selector>
<mifosx-gl-account-selector fxFlex="48%"
[inputFormControl]="loanProductAccountingForm.controls.incomeFromChargeOffFeesAccountId"
[glAccountList]="incomeAccountData"
[required]="true"
[inputLabel]="'Income from ChargeOff Fees'"
>
</mifosx-gl-account-selector>
<mifosx-gl-account-selector fxFlex="48%"
[inputFormControl]="loanProductAccountingForm.controls.incomeFromChargeOffPenaltyAccountId"
[glAccountList]="incomeAccountData"
[required]="true"
[inputLabel]="'Income from ChargeOff Penalty'"
>
</mifosx-gl-account-selector>
<mifosx-gl-account-selector fxFlex="48%"
[inputFormControl]="loanProductAccountingForm.controls.incomeFromGoodwillCreditInterestAccountId"
[glAccountList]="incomeAccountData"
[required]="true"
[inputLabel]="'Income from Goodwill Credit Interest'"
>
</mifosx-gl-account-selector>
<mifosx-gl-account-selector fxFlex="48%"
[inputFormControl]="loanProductAccountingForm.controls.incomeFromGoodwillCreditFeesAccountId"
[glAccountList]="incomeAccountData"
[required]="true"
[inputLabel]="'Income from Goodwill Credit Fees'"
>
</mifosx-gl-account-selector>
<mifosx-gl-account-selector fxFlex="48%"
[inputFormControl]="loanProductAccountingForm.controls.incomeFromGoodwillCreditPenaltyAccountId"
[glAccountList]="incomeAccountData"
[required]="true"
[inputLabel]="'Income from Goodwill Credit Penalty'"
>
</mifosx-gl-account-selector>
<mat-divider fxFlex="98%"></mat-divider>
<h4 fxFlex="98%" class="mat-h4">Income</h4>
<h4 fxFlex="98%" class="mat-h4">{{'labels.heading.Expenses' | translate}}</h4>
<mat-form-field fxFlex="48%">
<mat-label>Income from Interest</mat-label>
<mat-select formControlName="interestOnLoanAccountId" required>
<mat-option *ngFor="let incomeAccount of incomeAccountData" [value]="incomeAccount.id">
({{ incomeAccount.glCode }}) {{ incomeAccount.name }}
</mat-option>
</mat-select>
<mat-error>
Income from Interest is <strong>required</strong>
</mat-error>
</mat-form-field>
<mifosx-gl-account-selector fxFlex="48%"
[inputFormControl]="loanProductAccountingForm.controls.writeOffAccountId"
[glAccountList]="expenseAccountData"
[required]="true"
[inputLabel]="'Losses written off'"
>
</mifosx-gl-account-selector>
<mat-form-field fxFlex="48%">
<mat-label>Income from fees</mat-label>
<mat-select formControlName="incomeFromFeeAccountId" required>
<mat-option *ngFor="let incomeAccount of incomeAccountData" [value]="incomeAccount.id">
({{ incomeAccount.glCode }}) {{ incomeAccount.name }}
</mat-option>
</mat-select>
<mat-error>
Income from fees is <strong>required</strong>
</mat-error>
</mat-form-field>
<mifosx-gl-account-selector fxFlex="48%"
[inputFormControl]="loanProductAccountingForm.controls.goodwillCreditAccountId"
[glAccountList]="expenseAccountData"
[required]="true"
[inputLabel]="'Expenses from Goodwill Credit'"
>
</mifosx-gl-account-selector>
<mat-form-field fxFlex="48%">
<mat-label>Income from penalties</mat-label>
<mat-select formControlName="incomeFromPenaltyAccountId" required>
<mat-option *ngFor="let incomeAccount of incomeAccountData" [value]="incomeAccount.id">
({{ incomeAccount.glCode }}) {{ incomeAccount.name }}
</mat-option>
</mat-select>
<mat-error>
Income from penalties is <strong>required</strong>
</mat-error>
</mat-form-field>
<mifosx-gl-account-selector fxFlex="48%"
[inputFormControl]="loanProductAccountingForm.controls.chargeOffExpenseAccountId"
[glAccountList]="expenseAccountData"
[required]="true"
[inputLabel]="'ChargeOff Expense'"
>
</mifosx-gl-account-selector>
<mat-form-field fxFlex="48%">
<mat-label>Income from Recovery Repayments</mat-label>
<mat-select formControlName="incomeFromRecoveryAccountId" required>
<mat-option *ngFor="let incomeAccount of incomeAccountData" [value]="incomeAccount.id">
({{ incomeAccount.glCode }}) {{ incomeAccount.name }}
</mat-option>
</mat-select>
<mat-error>
Income from Recovery Repayments is <strong>required</strong>
</mat-error>
</mat-form-field>
<mat-form-field fxFlex="48%">
<mat-label>Income from ChargeOff Interest</mat-label>
<mat-select formControlName="incomeFromChargeOffInterestAccountId" required>
<mat-option *ngFor="let incomeAccount of incomeAccountData" [value]="incomeAccount.id">
({{ incomeAccount.glCode }}) {{ incomeAccount.name }}
</mat-option>
</mat-select>
<mat-error>
Income from ChargeOff Interest is <strong>required</strong>
</mat-error>
</mat-form-field>
<mat-form-field fxFlex="48%">
<mat-label>Income from ChargeOff Fees</mat-label>
<mat-select formControlName="incomeFromChargeOffFeesAccountId" required>
<mat-option *ngFor="let incomeAccount of incomeAccountData" [value]="incomeAccount.id">
({{ incomeAccount.glCode }}) {{ incomeAccount.name }}
</mat-option>
</mat-select>
<mat-error>
Income from ChargeOff Fees is <strong>required</strong>
</mat-error>
</mat-form-field>
<mat-form-field fxFlex="48%">
<mat-label>Income from ChargeOff Penalty</mat-label>
<mat-select formControlName="incomeFromChargeOffPenaltyAccountId" required>
<mat-option *ngFor="let incomeAccount of incomeAccountData" [value]="incomeAccount.id">
({{ incomeAccount.glCode }}) {{ incomeAccount.name }}
</mat-option>
</mat-select>
<mat-error>
Income from ChargeOff Penalty is <strong>required</strong>
</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>
<mifosx-gl-account-selector fxFlex="48%"
[inputFormControl]="loanProductAccountingForm.controls.chargeOffFraudExpenseAccountId"
[glAccountList]="expenseAccountData"
[required]="true"
[inputLabel]="'ChargeOff Fraud Expense'"
>
</mifosx-gl-account-selector>
<mat-divider fxFlex="98%"></mat-divider>
<h4 fxFlex="98%" class="mat-h4">Expenses</h4>
<h4 fxFlex="98%" class="mat-h4">{{'labels.heading.Liabilities' | translate}}</h4>
<mat-form-field fxFlex="48%">
<mat-label>Losses written off</mat-label>
<mat-select formControlName="writeOffAccountId" required>
<mat-option *ngFor="let expenseAccount of expenseAccountData" [value]="expenseAccount.id">
({{ expenseAccount.glCode }}) {{ expenseAccount.name }}
</mat-option>
</mat-select>
<mat-error>
Losses written off is <strong>required</strong>
</mat-error>
</mat-form-field>
<mat-form-field fxFlex="48%">
<mat-label>Expenses from Goodwill Credit</mat-label>
<mat-select formControlName="goodwillCreditAccountId" required>
<mat-option *ngFor="let expenseAccount of expenseAccountData" [value]="expenseAccount.id">
({{ expenseAccount.glCode }}) {{ expenseAccount.name }}
</mat-option>
</mat-select>
<mat-error>
Goodwill credit is <strong>required</strong>
</mat-error>
</mat-form-field>
<mat-form-field fxFlex="48%">
<mat-label>ChargeOff Expense</mat-label>
<mat-select formControlName="chargeOffExpenseAccountId" required>
<mat-option *ngFor="let expenseAccount of expenseAccountData" [value]="expenseAccount.id">
({{ expenseAccount.glCode }}) {{ expenseAccount.name }}
</mat-option>
</mat-select>
<mat-error>
ChargeOff Expense is <strong>required</strong>
</mat-error>
</mat-form-field>
<mat-form-field fxFlex="48%">
<mat-label>ChargeOff Fraud Expense</mat-label>
<mat-select formControlName="chargeOffFraudExpenseAccountId" required>
<mat-option *ngFor="let expenseAccount of expenseAccountData" [value]="expenseAccount.id">
({{ expenseAccount.glCode }}) {{ expenseAccount.name }}
</mat-option>
</mat-select>
<mat-error>
ChargeOff Fraud Expense is <strong>required</strong>
</mat-error>
</mat-form-field>
<mat-divider fxFlex="98%"></mat-divider>
<h4 fxFlex="98%" class="mat-h4">Liabilities</h4>
<mat-form-field fxFlex="48%">
<mat-label>Over payment liability</mat-label>
<mat-select formControlName="overpaymentLiabilityAccountId" required>
<mat-option *ngFor="let liabilityAccount of liabilityAccountData" [value]="liabilityAccount.id">
({{ liabilityAccount.glCode }}) {{ liabilityAccount.name }}
</mat-option>
</mat-select>
<mat-error>
Over payment liability is <strong>required</strong>
</mat-error>
</mat-form-field>
<mifosx-gl-account-selector fxFlex="48%"
[inputFormControl]="loanProductAccountingForm.controls.overpaymentLiabilityAccountId"
[glAccountList]="liabilityAccountData"
[required]="true"
[inputLabel]="'Over payment liability'"
>
</mifosx-gl-account-selector>
<mat-divider fxFlex="98%"></mat-divider>
@@ -12,139 +12,99 @@
<div *ngIf="savingProductAccountingForm.value.accountingRule === 2" fxFlexFill fxLayout="row wrap" fxLayoutGap="2%" fxLayout.lt-md="column">
<h4 fxFlex="98%" class="mat-h4">Assets</h4>
<h4 fxFlex="98%" class="mat-h4">{{'labels.heading.Assets' | translate}}</h4>
<mat-form-field fxFlex="48%">
<mat-label>Saving reference</mat-label>
<mat-select formControlName="savingsReferenceAccountId" required>
<mat-option *ngFor="let assetAccount of assetAccountData" [value]="assetAccount.id">
({{ assetAccount.glCode }}) {{ assetAccount.name }}
</mat-option>
</mat-select>
<mat-error>
Saving reference is <strong>required</strong>
</mat-error>
</mat-form-field>
<mifosx-gl-account-selector fxFlex="48%"
[inputFormControl]="savingProductAccountingForm.controls.savingsReferenceAccountId"
[glAccountList]="assetAccountData"
[required]="true"
[inputLabel]="'Saving reference'"
>
</mifosx-gl-account-selector>
<mat-form-field fxFlex="48%">
<mat-label>Overdraft portfolio</mat-label>
<mat-select formControlName="overdraftPortfolioControlId" required>
<mat-option *ngFor="let assetAccount of assetAccountData" [value]="assetAccount.id">
({{ assetAccount.glCode }}) {{ assetAccount.name }}
</mat-option>
</mat-select>
<mat-error>
Overdraft portfolio is <strong>required</strong>
</mat-error>
</mat-form-field>
<mifosx-gl-account-selector fxFlex="48%"
[inputFormControl]="savingProductAccountingForm.controls.overdraftPortfolioControlId"
[glAccountList]="assetAccountData"
[required]="true"
[inputLabel]="'Overdraft portfolio'"
>
</mifosx-gl-account-selector>
<mat-divider fxFlex="98%"></mat-divider>
<h4 fxFlex="98%" class="mat-h4">Liabilities</h4>
<h4 fxFlex="98%" class="mat-h4">{{'labels.heading.Liabilities' | translate}}</h4>
<mat-form-field fxFlex="48%">
<mat-label>Saving control</mat-label>
<mat-select formControlName="savingsControlAccountId" required>
<mat-option *ngFor="let liabilityAccount of liabilityAccountData" [value]="liabilityAccount.id">
({{ liabilityAccount.glCode }}) {{ liabilityAccount.name }}
</mat-option>
</mat-select>
<mat-error>
Saving control is <strong>required</strong>
</mat-error>
</mat-form-field>
<mifosx-gl-account-selector fxFlex="48%"
[inputFormControl]="savingProductAccountingForm.controls.savingsControlAccountId"
[glAccountList]="liabilityAccountData"
[required]="true"
[inputLabel]="'Saving control'"
>
</mifosx-gl-account-selector>
<mat-form-field fxFlex="48%">
<mat-label>Savings transfers in suspense</mat-label>
<mat-select formControlName="transfersInSuspenseAccountId" required>
<mat-option *ngFor="let liabilityAccount of liabilityAccountData" [value]="liabilityAccount.id">
({{ liabilityAccount.glCode }}) {{ liabilityAccount.name }}
</mat-option>
</mat-select>
<mat-error>
Savings transfers in suspense is <strong>required</strong>
</mat-error>
</mat-form-field>
<mifosx-gl-account-selector fxFlex="48%"
[inputFormControl]="savingProductAccountingForm.controls.transfersInSuspenseAccountId"
[glAccountList]="liabilityAccountData"
[required]="true"
[inputLabel]="'Savings transfers in suspense'"
>
</mifosx-gl-account-selector>
<mat-form-field fxFlex="48%" *ngIf="isDormancyTrackingActive.value">
<mat-label>Escheat liability</mat-label>
<mat-select formControlName="escheatLiabilityId" required>
<mat-option *ngFor="let liabilityAccount of liabilityAccountData" [value]="liabilityAccount.id">
({{ liabilityAccount.glCode }}) {{ liabilityAccount.name }}
</mat-option>
</mat-select>
<mat-error>
Escheat liability is <strong>required</strong>
</mat-error>
</mat-form-field>
<mifosx-gl-account-selector fxFlex="48%" *ngIf="isDormancyTrackingActive.value"
[inputFormControl]="savingProductAccountingForm.controls.escheatLiabilityId"
[glAccountList]="liabilityAccountData"
[required]="true"
[inputLabel]="'Escheat liability'"
>
</mifosx-gl-account-selector>
<mat-divider fxFlex="98%"></mat-divider>
<h4 fxFlex="98%" class="mat-h4">Expenses</h4>
<h4 fxFlex="98%" class="mat-h4">{{'labels.heading.Expenses' | translate}}</h4>
<mat-form-field fxFlex="48%">
<mat-label>Interest on savings</mat-label>
<mat-select formControlName="interestOnSavingsAccountId" required>
<mat-option *ngFor="let expenseAccount of expenseAccountData" [value]="expenseAccount.id">
({{ expenseAccount.glCode }}) {{ expenseAccount.name }}
</mat-option>
</mat-select>
<mat-error>
Interest on savings is <strong>required</strong>
</mat-error>
</mat-form-field>
<mifosx-gl-account-selector fxFlex="48%"
[inputFormControl]="savingProductAccountingForm.controls.interestOnSavingsAccountId"
[glAccountList]="expenseAccountData"
[required]="true"
[inputLabel]="'Interest on savings'"
>
</mifosx-gl-account-selector>
<mat-form-field fxFlex="48%">
<mat-label>Write-off</mat-label>
<mat-select formControlName="writeOffAccountId" required>
<mat-option *ngFor="let expenseAccount of expenseAccountData" [value]="expenseAccount.id">
({{ expenseAccount.glCode }}) {{ expenseAccount.name }}
</mat-option>
</mat-select>
<mat-error>
Write-off is <strong>required</strong>
</mat-error>
</mat-form-field>
<mifosx-gl-account-selector fxFlex="48%"
[inputFormControl]="savingProductAccountingForm.controls.writeOffAccountId"
[glAccountList]="expenseAccountData"
[required]="true"
[inputLabel]="'Write-off'"
>
</mifosx-gl-account-selector>
<mat-divider fxFlex="98%"></mat-divider>
<h4 fxFlex="98%" class="mat-h4">Income</h4>
<h4 fxFlex="98%" class="mat-h4">{{'labels.heading.Income' | translate}}</h4>
<mat-form-field fxFlex="48%">
<mat-label>Income from fees</mat-label>
<mat-select formControlName="incomeFromFeeAccountId" required>
<mat-option *ngFor="let incomeAccount of incomeAccountData" [value]="incomeAccount.id">
({{ incomeAccount.glCode }}) {{ incomeAccount.name }}
</mat-option>
</mat-select>
<mat-error>
Income from fees Repayments is <strong>required</strong>
</mat-error>
</mat-form-field>
<mifosx-gl-account-selector fxFlex="48%"
[inputFormControl]="savingProductAccountingForm.controls.incomeFromFeeAccountId"
[glAccountList]="incomeAccountData"
[required]="true"
[inputLabel]="'Income from fees'"
>
</mifosx-gl-account-selector>
<mat-form-field fxFlex="48%">
<mat-label>Income from penalties</mat-label>
<mat-select formControlName="incomeFromPenaltyAccountId" required>
<mat-option *ngFor="let incomeAccount of incomeAccountData" [value]="incomeAccount.id">
({{ incomeAccount.glCode }}) {{ incomeAccount.name }}
</mat-option>
</mat-select>
<mat-error>
Income from penalties is <strong>required</strong>
</mat-error>
</mat-form-field>
<mifosx-gl-account-selector fxFlex="48%"
[inputFormControl]="savingProductAccountingForm.controls.incomeFromPenaltyAccountId"
[glAccountList]="incomeAccountData"
[required]="true"
[inputLabel]="'Income from penalties'"
>
</mifosx-gl-account-selector>
<mat-form-field fxFlex="48%">
<mat-label>Overdraft Interest Income</mat-label>
<mat-select formControlName="incomeFromInterestId" required>
<mat-option *ngFor="let incomeAccount of incomeAccountData" [value]="incomeAccount.id">
({{ incomeAccount.glCode }}) {{ incomeAccount.name }}
</mat-option>
</mat-select>
<mat-error>
Overdraft Interest Income is <strong>required</strong>
</mat-error>
</mat-form-field>
<mifosx-gl-account-selector fxFlex="48%"
[inputFormControl]="savingProductAccountingForm.controls.incomeFromInterestId"
[glAccountList]="incomeAccountData"
[required]="true"
[inputLabel]="'Overdraft Interest Income'"
>
</mifosx-gl-account-selector>
<mat-divider fxFlex="98%"></mat-divider>
@@ -208,57 +208,44 @@
<div fxFlexFill *ngIf="savingProduct.accountingRule.id === 2" fxLayout="row wrap" fxLayout.lt-md="column">
<h4 fxFlexFill class="mat-h4">Assets</h4>
<h4 fxFlexFill class="mat-h4">{{'labels.heading.Assets' | translate}}</h4>
<mifosx-gl-account-display fxFlex="100%" [accountTitle]="'Saving reference'"
[glAccount]="savingProduct.accountingMappings.savingsReferenceAccount" [withTitle]="'40%'">
</mifosx-gl-account-display>
<mifosx-gl-account-display fxFlex="100%" [accountTitle]="'Overdraft portfolio'"
[glAccount]="savingProduct.accountingMappings.overdraftPortfolioControl" [withTitle]="'40%'">
</mifosx-gl-account-display>
<div fxFlexFill fxLayout="row wrap" fxLayout.lt-md="column">
<span fxFlex="40%">Saving reference:</span>
<span fxFlex="60%">({{ savingProduct.accountingMappings.savingsReferenceAccount.glCode }}) {{
savingProduct.accountingMappings.savingsReferenceAccount.name }}</span>
<span fxFlex="40%">Overdraft portfolio:</span>
<span fxFlex="60%">({{ savingProduct.accountingMappings.overdraftPortfolioControl.glCode }}) {{
savingProduct.accountingMappings.overdraftPortfolioControl.name }}</span>
</div>
<h4 fxFlexFill class="mat-h4">{{'labels.heading.Income' | translate}}</h4>
<mifosx-gl-account-display fxFlex="100%" [accountTitle]="'Income from fees'"
[glAccount]="savingProduct.accountingMappings.incomeFromFeeAccount" [withTitle]="'40%'">
</mifosx-gl-account-display>
<mifosx-gl-account-display fxFlex="100%" [accountTitle]="'Income from penalties'"
[glAccount]="savingProduct.accountingMappings.incomeFromPenaltyAccount" [withTitle]="'40%'">
</mifosx-gl-account-display>
<mifosx-gl-account-display fxFlex="100%" [accountTitle]="'Income from penalties'"
[glAccount]="savingProduct.accountingMappings.incomeFromInterest" [withTitle]="'40%'">
</mifosx-gl-account-display>
<h4 fxFlexFill class="mat-h4">Liabilities</h4>
<h4 fxFlexFill class="mat-h4">{{'labels.heading.Expenses' | translate}}</h4>
<mifosx-gl-account-display fxFlex="100%" [accountTitle]="'Interest on savings'"
[glAccount]="savingProduct.accountingMappings.interestOnSavingsAccount" [withTitle]="'40%'">
</mifosx-gl-account-display>
<mifosx-gl-account-display fxFlex="100%" [accountTitle]="'Write-off'"
[glAccount]="savingProduct.accountingMappings.writeOffAccount" [withTitle]="'40%'">
</mifosx-gl-account-display>
<div fxFlexFill fxLayout="row wrap" fxLayout.lt-md="column">
<span fxFlex="40%">Saving control:</span>
<span fxFlex="60%">({{ savingProduct.accountingMappings.savingsControlAccount.glCode }}) {{
savingProduct.accountingMappings.savingsControlAccount.name }}</span>
<span fxFlex="40%">Savings transfers in suspense:</span>
<span fxFlex="60%">({{ savingProduct.accountingMappings.transfersInSuspenseAccount.glCode }}) {{
savingProduct.accountingMappings.transfersInSuspenseAccount.name }}</span>
<div fxFlexFill *ngIf="savingProduct.isDormancyTrackingActive">
<span fxFlex="40%">Escheat liability:</span>
<span fxFlex="60%">({{ savingProduct.accountingMappings.escheatLiabilityAccount.glCode }}) {{
savingProduct.accountingMappings.escheatLiabilityAccount.name }}</span>
</div>
</div>
<h4 fxFlexFill class="mat-h4">Expenses</h4>
<div fxFlexFill fxLayout="row wrap" fxLayout.lt-md="column">
<span fxFlex="40%">Interest on savings:</span>
<span fxFlex="60%">({{ savingProduct.accountingMappings.interestOnSavingsAccount.glCode }}) {{
savingProduct.accountingMappings.interestOnSavingsAccount.name }}</span>
<span fxFlex="40%">Write-off:</span>
<span fxFlex="60%">({{ savingProduct.accountingMappings.writeOffAccount.glCode }}) {{
savingProduct.accountingMappings.writeOffAccount.name }}</span>
</div>
<h4 fxFlexFill class="mat-h4">Income</h4>
<div fxFlexFill fxLayout="row wrap" fxLayout.lt-md="column">
<span fxFlex="40%">Income from fees:</span>
<span fxFlex="60%">({{ savingProduct.accountingMappings.incomeFromFeeAccount.glCode }}) {{
savingProduct.accountingMappings.incomeFromFeeAccount.name }}</span>
<span fxFlex="40%">Income from penalties:</span>
<span fxFlex="60%">({{ savingProduct.accountingMappings.incomeFromPenaltyAccount.glCode }}) {{
savingProduct.accountingMappings.incomeFromPenaltyAccount.name }}</span>
<span fxFlex="40%">Overdraft Interest Income:</span>
<span fxFlex="60%">({{ savingProduct.accountingMappings.incomeFromInterest.glCode }}) {{
savingProduct.accountingMappings.incomeFromInterest.name }}</span>
</div>
<h4 fxFlexFill class="mat-h4">{{'labels.heading.Liabilities' | translate}}</h4>
<mifosx-gl-account-display fxFlex="100%" [accountTitle]="'Saving control'"
[glAccount]="savingProduct.accountingMappings.savingsControlAccount" [withTitle]="'40%'">
</mifosx-gl-account-display>
<mifosx-gl-account-display fxFlex="100%" [accountTitle]="'Savings transfers in suspense'"
[glAccount]="savingProduct.accountingMappings.transfersInSuspenseAccount" [withTitle]="'40%'">
</mifosx-gl-account-display>
<mifosx-gl-account-display fxFlex="100%" [accountTitle]="'Escheat liability'"
*ngIf="savingProduct.accountingMappings.escheatLiabilityAccount"
[glAccount]="savingProduct.accountingMappings.escheatLiabilityAccount" [withTitle]="'40%'">
</mifosx-gl-account-display>
<div
*ngIf="savingProduct.paymentChannelToFundSourceMappings?.length || savingProduct.feeToIncomeAccountMappings?.length || savingProduct.penaltyToIncomeAccountMappings?.length"