From 84728eb037d8dd70fe97a739f8c5a7aa5d06500b Mon Sep 17 00:00:00 2001 From: Amritanshu Date: Tue, 15 Aug 2023 06:39:02 +0530 Subject: [PATCH] Fix: Since pydantic v2 is sending decimal as string. It is fucking things up. --- overlord/src/app/ledger/ledger.component.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/overlord/src/app/ledger/ledger.component.ts b/overlord/src/app/ledger/ledger.component.ts index cae3d2bc..d1a048d2 100644 --- a/overlord/src/app/ledger/ledger.component.ts +++ b/overlord/src/app/ledger/ledger.component.ts @@ -95,13 +95,13 @@ export class LedgerComponent implements OnInit, AfterViewInit { this.running = 0; this.info.body.forEach((item) => { if (item.type !== 'Opening Balance') { - this.debit += item.debit; - this.credit += item.credit; + this.debit += +item.debit; + this.credit += +item.credit; if (item.posted) { - this.running += item.debit - item.credit; + this.running += +item.debit - +item.credit; } } else { - this.running += item.debit - item.credit; + this.running += +item.debit - +item.credit; } item.running = this.running; });