Fix: Recurring Deposit product edition using IRC ids
This commit is contained in:
committed by
Adam Saghy
parent
4117b45aff
commit
dd1245c997
+12
-1
@@ -111,6 +111,7 @@ export class RecurringDepositProductInterestRateChartStepComponent implements On
|
||||
this.chartsDetail[i].chartSlabs.forEach((chartSlabDetail: any, j: number) => {
|
||||
|
||||
const chartSlabInfo = this.formBuilder.group({
|
||||
id: [chartSlabDetail.id],
|
||||
amountRangeFrom: [chartSlabDetail.amountRangeFrom],
|
||||
amountRangeTo: [chartSlabDetail.amountRangeTo],
|
||||
annualInterestRate: [chartSlabDetail.annualInterestRate, Validators.required],
|
||||
@@ -154,6 +155,9 @@ export class RecurringDepositProductInterestRateChartStepComponent implements On
|
||||
name: chartData.name,
|
||||
chartSlabs: this.getChartSlabsData(chartData)
|
||||
};
|
||||
if (chartData.id) {
|
||||
chart['id'] = chartData.id;
|
||||
}
|
||||
this.chartsDetail.push(chart);
|
||||
});
|
||||
this.recurringDepositProductInterestRateChartForm.patchValue({
|
||||
@@ -182,6 +186,9 @@ export class RecurringDepositProductInterestRateChartStepComponent implements On
|
||||
toPeriod: eachChartSlabData.toPeriod,
|
||||
incentives: this.getIncentivesData(chartSlabData)
|
||||
};
|
||||
if (eachChartSlabData.id) {
|
||||
chartSlab['id'] = eachChartSlabData.id;
|
||||
}
|
||||
chartSlabs.push(chartSlab);
|
||||
});
|
||||
return chartSlabs;
|
||||
@@ -224,6 +231,7 @@ export class RecurringDepositProductInterestRateChartStepComponent implements On
|
||||
|
||||
createChartForm(): UntypedFormGroup {
|
||||
return this.formBuilder.group({
|
||||
'id': [null],
|
||||
'name': [''],
|
||||
'description': [''],
|
||||
'fromDate': ['', Validators.required],
|
||||
@@ -376,7 +384,7 @@ export class RecurringDepositProductInterestRateChartStepComponent implements On
|
||||
for (const chart of recurringDepositProductInterestRateChart.charts) {
|
||||
chart.dateFormat = dateFormat;
|
||||
chart.locale = locale;
|
||||
chart.fromDate = this.dateUtils.formatDate(chart.fromDate, dateFormat) || '';
|
||||
chart.fromDate = this.dateUtils.formatDate(chart.fromDate, dateFormat);
|
||||
chart.endDate = this.dateUtils.formatDate(chart.endDate, dateFormat) || '';
|
||||
if (chart.endDate === '') {
|
||||
delete chart.endDate;
|
||||
@@ -384,6 +392,9 @@ export class RecurringDepositProductInterestRateChartStepComponent implements On
|
||||
if (chart.description === '') {
|
||||
delete chart.description;
|
||||
}
|
||||
if (chart.id === null) {
|
||||
delete chart.id;
|
||||
}
|
||||
}
|
||||
return recurringDepositProductInterestRateChart;
|
||||
}
|
||||
|
||||
+4
-2
@@ -380,8 +380,10 @@
|
||||
<div fxFlexFill fxLayout="row wrap" fxLayout.lt-md="column">
|
||||
<span fxFlex="40%">Interest on savings:</span>
|
||||
<span fxFlex="60%">{{ recurringDepositProduct.accountingMappings.interestOnSavingsAccount.name }}</span>
|
||||
<span fxFlex="40%">Write-off:</span>
|
||||
<span fxFlex="60%">{{ recurringDepositProduct.accountingMappings.writeOffAccount.name }}</span>
|
||||
<span *ngIf="recurringDepositProduct.accountingMappings.writeOffAccount">
|
||||
<span fxFlex="40%">Write-off:</span>
|
||||
<span fxFlex="60%">{{ recurringDepositProduct.accountingMappings.writeOffAccount.name }}</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<h4 fxFlexFill class="mat-h4">Income</h4>
|
||||
|
||||
Reference in New Issue
Block a user