From ccf1acd21ed0d175a291faf903214efda380b3e1 Mon Sep 17 00:00:00 2001 From: William Brawner Date: Wed, 17 Nov 2021 17:53:27 -0700 Subject: [PATCH] Fix decimal multiplication weirdness by rounding There's probably a better way to go about handling this but for now this is good enough. --- .../add-edit-transaction/add-edit-transaction.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/transactions/add-edit-transaction/add-edit-transaction.component.ts b/src/app/transactions/add-edit-transaction/add-edit-transaction.component.ts index 09bf1c8..003dada 100644 --- a/src/app/transactions/add-edit-transaction/add-edit-transaction.component.ts +++ b/src/app/transactions/add-edit-transaction/add-edit-transaction.component.ts @@ -79,7 +79,7 @@ export class AddEditTransactionComponent implements OnInit, OnChanges { this.budgetId, this.currentTransaction.title, this.currentTransaction.description, - this.currentTransaction.amount * 100, + Math.round(this.currentTransaction.amount * 100), this.currentTransaction.date, this.currentTransaction.expense, this.currentTransaction.categoryId, @@ -91,7 +91,7 @@ export class AddEditTransactionComponent implements OnInit, OnChanges { { title: this.currentTransaction.title, description: this.currentTransaction.description, - amount: this.currentTransaction.amount * 100, + amount: Math.round(this.currentTransaction.amount * 100), date: this.currentTransaction.date, categoryId: this.currentTransaction.categoryId, expense: this.currentTransaction.expense