Skip to content

Commit 11d0d42

Browse files
authored
Merge pull request #2518 from JebronLames32/SavingsAccountingFix
Fix: reset accrual-specific form fields on accounting rule change
2 parents c926431 + 354bb57 commit 11d0d42

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/app/products/saving-products/saving-product-stepper/saving-product-accounting-step/saving-product-accounting-step.component.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,11 @@ export class SavingProductAccountingStepComponent implements OnInit {
206206
new UntypedFormControl('', Validators.required)
207207
);
208208
}
209+
if (accountingRule === 2) {
210+
this.savingProductAccountingForm.removeControl('feesReceivableAccountId');
211+
this.savingProductAccountingForm.removeControl('penaltiesReceivableAccountId');
212+
this.savingProductAccountingForm.removeControl('interestPayableAccountId');
213+
}
209214

210215
if (this.isDormancyTrackingActive.value) {
211216
this.savingProductAccountingForm.addControl(

0 commit comments

Comments
 (0)