From dd59bfdfb411959f3355200435774d10b1a342b8 Mon Sep 17 00:00:00 2001 From: Amritanshu Date: Mon, 26 Nov 2018 09:07:58 +0530 Subject: [PATCH] Fix: On row edit, the value of the control was set as number and not text, leding to error on add row. --- overlord/src/app/journal/journal.component.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/overlord/src/app/journal/journal.component.ts b/overlord/src/app/journal/journal.component.ts index 2e854a81..e32d95a4 100644 --- a/overlord/src/app/journal/journal.component.ts +++ b/overlord/src/app/journal/journal.component.ts @@ -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(); }); }