A local-first personal finance app
fix losing transaction amount decimals on update (#5807)
Çağdaş Şenele54dc0c1ca0d
diff --git a/packages/desktop-client/src/components/transactions/TransactionsTable.tsx b/packages/desktop-client/src/components/transactions/TransactionsTable.tsxindex 7ba6fe9f55..11c529d18d 100644--- a/packages/desktop-client/src/components/transactions/TransactionsTable.tsx+++ b/packages/desktop-client/src/components/transactions/TransactionsTable.tsx@@ -1021,13 +1021,16 @@ const Transaction = memo(function Transaction({}// If entering an amount in either of the credit/debit fields, we- // need to clear out the other one so it's always properly+ // need to clear out the other one or both so it's always properly// translated into the desired amount (see// `deserializeTransaction`)if (name === 'credit') {newTransaction['debit'] = '';} else if (name === 'debit') {newTransaction['credit'] = '';+ } else {+ newTransaction['debit'] = '';+ newTransaction['credit'] = '';}if (name === 'account' && transaction.account !== value) {diff --git a/upcoming-release-notes/5807.md b/upcoming-release-notes/5807.mdnew file mode 100644index 0000000000..c668639bbc--- /dev/null+++ b/upcoming-release-notes/5807.md@@ -0,0 +1,6 @@+---+category: Bugfix+authors: [csenel]+---++fix losing transaction amount decimals on update while "hide decimal places" setting is active