On Tue, Jul 1, 2014 at 8:01 PM, Simon Michael <[email protected]> wrote:
> On 7/1/14 7:55 AM, Martin Blais wrote: > >> because of this, if you reorder your directives, e.g., you insert a new >> directive before one that has a balance assertion on a posting that >> affects an account with another assertion on the same date, it might >> break a balance assertion that had previously been working. >> > > I'm used to h/ledger working this way (entries with the same date being > processed in journal order). I don't mind it because a. it's intuitive to > users and b. it allows you to assert intra-day balances as well as > inter-day ones. > A dedicated balance directive is also quite intuitive IMO. I do see that being completely independent of journal order is nice too. > > > IMHO, when designing this, the question you have to ask yourself is: >> where do the balance amounts you report come from? Usually they come >> from some statement, you copy the value from the line on your statement >> which says "your balance on YYYY/MM/DD is X". OFX also has a field that >> > > I haven't made a balance assertion corresponding to a bank statement yet > (good idea). Mine are more commonly for cash and need not be at the end of > the day. Eg: > > 2014/6/25 * adjust/reconcile cash > assets:personal:cash:wallet $-1 = $14.50 > expenses:personal:misc > > > Choosing to define balance assertions on their own removes _just_ enough >> degrees of freedom that it makes it unambiguous and order-invariant. I >> think you could easily do the same thing in Ledger, in fact, this _may_ >> be the only thing that is needed to make Ledger's balance assertions >> order-invariant. >> > > Order invariance, and having balance assertions on postings or as separate > directives, are mostly orthogonal issues I think. No... that's exactly the problem I'm pointing out! They're not orthogonal. If you place balance assertions on transaction postings, they are assumed to apply after each transaction is added to the balance (or even each posting). OTOH if you have a dedicated directive, it can be constrained to only apply at the beginning or end of a day, in which case there is no ambiguity. There is no ambiguity because doing it that way does not provide the opportunity to the user to set intra-day balance assertions (it's a tiny bit less powerful, but I don't see intra-day balance assertions as necessary, I've been living without them for a while, not an issue in practice). > > > If the posting-based assertions do remain, then hledger will >> probably go ahead and add == to assert against the full >> multi-commodity amount. >> >> How do you plan to disambiguate for the case I point out above? >> > > Do you mean the ordering issue ? The comment you're quoting there doesn't > change anything there, hledger would still process transactions, postings > and assertions in (1) date and (2) journal order. So HLedger is or is not subject to the same problem that I point out in my example? -- --- You received this message because you are subscribed to the Google Groups "Ledger" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
