Merge pull request #2545 from JohnAlva/saving_changes

WEB-241: Front End fix on Savings Accounts
This commit is contained in:
Felix van Hove
2025-07-08 17:46:28 +02:00
committed by GitHub
3 changed files with 113 additions and 86 deletions
@@ -52,6 +52,16 @@
> >
</mifosx-gl-account-selector> </mifosx-gl-account-selector>
<mifosx-gl-account-selector
class="flex-48"
*ngIf="isAccrualAccounting()"
[inputFormControl]="savingProductAccountingForm.controls.interestReceivableAccountId"
[glAccountList]="assetAccountData"
[required]="true"
[inputLabel]="'Interest Receivable'"
>
</mifosx-gl-account-selector>
<mat-divider class="flex-98"></mat-divider> <mat-divider class="flex-98"></mat-divider>
<h4 class="mat-h4 flex-98">{{ 'labels.heading.Liabilities' | translate }}</h4> <h4 class="mat-h4 flex-98">{{ 'labels.heading.Liabilities' | translate }}</h4>
@@ -153,7 +163,7 @@
<div <div
*ngIf="savingProductAccountingForm.value.advancedAccountingRules" *ngIf="savingProductAccountingForm.value.advancedAccountingRules"
class="flex-fill layout-row-wrap gap-2percent responsive-column" class="flex-fill layout-row-wrap gap-1percent responsive-column"
> >
<div class="layout-row flex-100"> <div class="layout-row flex-100">
<h4 class="mat-h4 flex-63"> <h4 class="mat-h4 flex-63">
@@ -215,7 +225,7 @@
</table> </table>
</div> </div>
<div class="flex-100" *ngIf="existCharges()"> <div class="flex-100 layout-row-wrap gap-0percent responsive-column" *ngIf="existCharges()">
<h4 class="mat-h4 flex-63">{{ 'labels.heading.Map Fees to Specific Income Accounts' | translate }}</h4> <h4 class="mat-h4 flex-63">{{ 'labels.heading.Map Fees to Specific Income Accounts' | translate }}</h4>
<div class="flex-33" *ngIf="existCharges()"> <div class="flex-33" *ngIf="existCharges()">
@@ -267,7 +277,7 @@
</table> </table>
</div> </div>
<div class="flex-100" *ngIf="existCharges()"> <div class="flex-100 layout-row-wrap gap-0percent responsive-column" *ngIf="existCharges()">
<h4 class="mat-h4 flex-63"> <h4 class="mat-h4 flex-63">
{{ 'labels.heading.Map Penalties to Specific Income Accounts' | translate }} {{ 'labels.heading.Map Penalties to Specific Income Accounts' | translate }}
</h4> </h4>
@@ -157,6 +157,10 @@ export class SavingProductAccountingStepComponent implements OnInit {
this.savingProductAccountingForm.patchValue({ this.savingProductAccountingForm.patchValue({
feesReceivableAccountId: this.savingProductsTemplate.accountingMappings.feeReceivableAccount.id, feesReceivableAccountId: this.savingProductsTemplate.accountingMappings.feeReceivableAccount.id,
penaltiesReceivableAccountId: this.savingProductsTemplate.accountingMappings.penaltyReceivableAccount.id, penaltiesReceivableAccountId: this.savingProductsTemplate.accountingMappings.penaltyReceivableAccount.id,
interestReceivableAccountId:
this.savingProductsTemplate.accountingMappings.interestReceivableAccount == null || undefined
? ''
: this.savingProductsTemplate.accountingMappings.interestReceivableAccount.id,
interestPayableAccountId: this.savingProductsTemplate.accountingMappings.interestPayableAccount.id interestPayableAccountId: this.savingProductsTemplate.accountingMappings.interestPayableAccount.id
}); });
} }
@@ -252,6 +256,10 @@ export class SavingProductAccountingStepComponent implements OnInit {
'penaltiesReceivableAccountId', 'penaltiesReceivableAccountId',
new UntypedFormControl('', Validators.required) new UntypedFormControl('', Validators.required)
); );
this.savingProductAccountingForm.addControl(
'interestReceivableAccountId',
new UntypedFormControl('', Validators.required)
);
this.savingProductAccountingForm.addControl( this.savingProductAccountingForm.addControl(
'interestPayableAccountId', 'interestPayableAccountId',
new UntypedFormControl('', Validators.required) new UntypedFormControl('', Validators.required)
@@ -311,6 +319,7 @@ export class SavingProductAccountingStepComponent implements OnInit {
this.savingProductAccountingForm.removeControl('escheatLiabilityId'); this.savingProductAccountingForm.removeControl('escheatLiabilityId');
this.savingProductAccountingForm.removeControl('feesReceivableAccountId'); this.savingProductAccountingForm.removeControl('feesReceivableAccountId');
this.savingProductAccountingForm.removeControl('penaltiesReceivableAccountId'); this.savingProductAccountingForm.removeControl('penaltiesReceivableAccountId');
this.savingProductAccountingForm.removeControl('interestReceivableAccountId');
this.savingProductAccountingForm.removeControl('interestPayableAccountId'); this.savingProductAccountingForm.removeControl('interestPayableAccountId');
} }
}); });
@@ -45,7 +45,14 @@
[withTitle]="'40%'" [withTitle]="'40%'"
> >
</mifosx-gl-account-display> </mifosx-gl-account-display>
</div> <mifosx-gl-account-display
class="flex-100"
[accountTitle]="'Interest Receivable'"
*ngIf="isAccrualAccounting()"
[glAccount]="accountingMappings.interestReceivableAccount"
[withTitle]="'40%'"
>
</mifosx-gl-account-display>
<h4 class="mat-h4 flex-100">{{ 'labels.heading.Liabilities' | translate }}</h4> <h4 class="mat-h4 flex-100">{{ 'labels.heading.Liabilities' | translate }}</h4>
<div class="flex-100 layout-row-wrap responsive-column"> <div class="flex-100 layout-row-wrap responsive-column">
@@ -140,3 +147,4 @@
</div> </div>
</div> </div>
</div> </div>
</div>