Fix: On row edit, the value of the control was set as number and not text, leding to error on add row.

This commit is contained in:
Amritanshu 2018-11-26 09:07:58 +05:30
parent bdb8bc7005
commit dd59bfdfb4
1 changed files with 1 additions and 4 deletions

View File

@ -150,10 +150,7 @@ export class JournalComponent implements OnInit, AfterViewInit {
}
Object.assign(row, j);
this.journalObservable.next(this.voucher.journals);
const amount = Math.abs(this.voucher.journals.map((x) => x.debit * x.amount).reduce((p, c) => p + c, 0));
this.form.get('addRow').patchValue({
amount: amount
});
this.resetAddRow();
});
}