Merge pull request #2635 from JohnAlva/saving_changes
WEB-305:Enables the interest receivables accounting account, when the overdraft field is enabled.
This commit is contained in:
+1
-1
@@ -74,10 +74,10 @@
|
||||
[accountingRuleData]="accountingRuleData"
|
||||
[isDormancyTrackingActive]="savingProductSettingsForm.get('isDormancyTrackingActive')"
|
||||
[savingProductFormValid]="savingProductFormValid"
|
||||
[allowOverdraft]="savingProductSettingsForm.get('allowOverdraft')"
|
||||
>
|
||||
</mifosx-saving-product-accounting-step>
|
||||
</mat-step>
|
||||
|
||||
<mat-step state="preview" *ngIf="savingProductFormValid" completed>
|
||||
<ng-template matStepLabel>{{ 'labels.inputs.PREVIEW' | translate }}</ng-template>
|
||||
|
||||
|
||||
+1
@@ -76,6 +76,7 @@
|
||||
[accountingRuleData]="accountingRuleData"
|
||||
[isDormancyTrackingActive]="savingProductSettingsForm.get('isDormancyTrackingActive')"
|
||||
[savingProductFormValid]="savingProductFormValidAndNotPristine"
|
||||
[allowOverdraft]="savingProductSettingsForm.get('allowOverdraft')"
|
||||
>
|
||||
</mifosx-saving-product-accounting-step>
|
||||
</mat-step>
|
||||
|
||||
+2
-2
@@ -54,10 +54,10 @@
|
||||
|
||||
<mifosx-gl-account-selector
|
||||
class="flex-48"
|
||||
*ngIf="isAccrualAccounting()"
|
||||
*ngIf="isAccrualAccounting() && allowOverdraft.value"
|
||||
[inputFormControl]="savingProductAccountingForm.controls.interestReceivableAccountId"
|
||||
[glAccountList]="assetAccountData"
|
||||
[required]="true"
|
||||
[required]="false"
|
||||
[inputLabel]="'Interest Receivable'"
|
||||
>
|
||||
</mifosx-gl-account-selector>
|
||||
|
||||
+11
-4
@@ -70,6 +70,7 @@ export class SavingProductAccountingStepComponent implements OnInit {
|
||||
@Input() accountingRuleData: any;
|
||||
@Input() isDormancyTrackingActive: UntypedFormControl;
|
||||
@Input() savingProductFormValid: boolean;
|
||||
@Input() allowOverdraft: UntypedFormControl;
|
||||
|
||||
savingProductAccountingForm: UntypedFormGroup;
|
||||
|
||||
@@ -256,10 +257,16 @@ export class SavingProductAccountingStepComponent implements OnInit {
|
||||
'penaltiesReceivableAccountId',
|
||||
new UntypedFormControl('', Validators.required)
|
||||
);
|
||||
this.savingProductAccountingForm.addControl(
|
||||
'interestReceivableAccountId',
|
||||
new UntypedFormControl('', Validators.required)
|
||||
);
|
||||
if (this.allowOverdraft.value) {
|
||||
this.savingProductAccountingForm.addControl('interestReceivableAccountId', new UntypedFormControl(''));
|
||||
}
|
||||
this.allowOverdraft.valueChanges.subscribe((allowOverdraft: boolean) => {
|
||||
if (allowOverdraft) {
|
||||
this.savingProductAccountingForm.addControl('interestReceivableAccountId', new UntypedFormControl(''));
|
||||
} else {
|
||||
this.savingProductAccountingForm.removeControl('interestReceivableAccountId');
|
||||
}
|
||||
});
|
||||
this.savingProductAccountingForm.addControl(
|
||||
'interestPayableAccountId',
|
||||
new UntypedFormControl('', Validators.required)
|
||||
|
||||
Reference in New Issue
Block a user