use correct running balance when adding a new transaction (#5207)

This commit is contained in:
Matt Fiddaman
2025-07-03 13:16:03 -04:00
committed by GitHub
parent 2cd79960a9
commit c1d70722b8
2 changed files with 9 additions and 8 deletions

View File

@@ -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>
)}

View File

@@ -0,0 +1,6 @@
---
category: Bugfix
authors: [matt-fidd]
---
Hide running balance when adding a new transaction