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