Add account balance anchors
This commit is contained in:
@@ -31,6 +31,16 @@ type Account struct {
|
||||
// broker exports no counterparty column, so deposits and withdrawals carry
|
||||
// this IBAN instead and pair with the funding account like any transfer.
|
||||
ReferenceIBAN string `json:"reference_iban,omitempty"`
|
||||
// AnchorBalance is the bank's booked (CLBD) balance on AnchorDate, captured
|
||||
// once from open banking after a sync. It fixes the start balance of a
|
||||
// date-windowed history: the money that existed before the recorded rows is
|
||||
// AnchorBalance less every movement booked through AnchorDate, so the
|
||||
// account's real balance is computable without complete history. The bank's
|
||||
// figure is stored verbatim — the start balance is derived, never stored —
|
||||
// so importing older history later corrects the derivation by itself.
|
||||
// Cash accounts only: a broker export carries its complete history.
|
||||
AnchorBalance Money `json:"anchor_balance,omitempty"`
|
||||
AnchorDate string `json:"anchor_date,omitempty"`
|
||||
Active bool `json:"active"`
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user