A local-first personal finance app
use correct running balance when adding a new transaction (#5207)
Matt Fiddamanc1d70722b8c1
diff --git a/packages/desktop-client/src/components/transactions/TransactionsTable.tsx b/packages/desktop-client/src/components/transactions/TransactionsTable.tsxindex 8fe99dda89..b1034b7546 100644--- a/packages/desktop-client/src/components/transactions/TransactionsTable.tsx+++ b/packages/desktop-client/src/components/transactions/TransactionsTable.tsx@@ -1615,7 +1615,7 @@ const Transaction = memo(function Transaction({/* Balance field for all transactions */name="balance"value={- runningBalance == null || isChild+ runningBalance == null || isChild || isTemporaryId(id)? '': integerToCurrency(runningBalance)}@@ -1723,7 +1723,6 @@ function TransactionError({type NewTransactionProps = {accounts: AccountEntity[];- balance: number;categoryGroups: CategoryGroupEntity[];dateFormat: string;editingTransaction: TransactionEntity['id'];@@ -1750,6 +1749,7 @@ type NewTransactionProps = {payees: PayeeEntity[];showAccount?: boolean;showBalance?: boolean;+ balance?: number | null;showCleared?: boolean;transactions: TransactionEntity[];transferAccountsByTransaction: {@@ -1843,7 +1843,7 @@ function NewTransaction({onNavigateToTransferAccount={onNavigateToTransferAccount}onNavigateToSchedule={onNavigateToSchedule}onNotesTagClick={onNotesTagClick}- balance={balance}+ balance={balance ?? 0}showSelection={true}allowSplitTransaction={true}/>@@ -2197,11 +2197,6 @@ function TransactionTableInner({onNavigateToSchedule={onNavigateToSchedule}onNotesTagClick={onNotesTagClick}onDistributeRemainder={props.onDistributeRemainder}- balance={- props.transactions?.length > 0- ? (props.balances?.[props.transactions[0]?.id]?.balance ?? 0)- : 0- }/></View>)}diff --git a/upcoming-release-notes/5207.md b/upcoming-release-notes/5207.mdnew file mode 100644index 0000000000..b397d1a10b--- /dev/null+++ b/upcoming-release-notes/5207.md@@ -0,0 +1,6 @@+---+category: Bugfix+authors: [matt-fidd]+---++Hide running balance when adding a new transaction