Money tracker: bank balance is the source of truth for synced accounts
All checks were successful
Deploy production / deploy (push) Successful in 2m43s
All checks were successful
Deploy production / deploy (push) Successful in 2m43s
Sync stores the bank-reported balance (ITAV preferred) on the account and keeps one Bank balance adjustment row so the tracker total equals the bank balance. Accounts panel shows the bank balance and flags any drift.
This commit is contained in:
@@ -32,6 +32,10 @@ export const moneyAccounts = moneySchema.table(
|
||||
// Bank-side account identifier (Enable Banking account uid) for synced accounts.
|
||||
externalUid: text('external_uid'),
|
||||
provider: text('provider').notNull().default('manual'),
|
||||
// Last balance reported by the bank (synced accounts); the source of truth for the total.
|
||||
bankBalanceCents: integer('bank_balance_cents'),
|
||||
bankBalanceType: text('bank_balance_type'),
|
||||
bankBalanceAt: timestamptz('bank_balance_at'),
|
||||
...timestamps
|
||||
},
|
||||
(table) => [
|
||||
|
||||
Reference in New Issue
Block a user