From 96e9bdb2e2bffa072606944686cf9eae571a11ba Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Thu, 11 Apr 2024 17:28:07 -1000 Subject: [PATCH] ;doc: Assertions and ordering: rewrite; update Ledger info --- hledger/hledger.m4.md | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/hledger/hledger.m4.md b/hledger/hledger.m4.md index 3685b5cd6..54eb53587 100644 --- a/hledger/hledger.m4.md +++ b/hledger/hledger.m4.md @@ -1405,18 +1405,12 @@ troubleshooting or for reading Ledger files. ### Assertions and ordering -hledger sorts an account's postings and assertions first by date and -then (for postings on the same day) by parse order. Note this is -different from Ledger, which sorts assertions only by parse -order. (Also, Ledger assertions do not see the accumulated effect of -repeated postings to the same account within a transaction.) +hledger calculates and checks an account's balance assertions in date order +(and when there are multiple assertions on the same day, in parse order). +Note this is different from Ledger, which checks assertions always in parse order, ignoring dates. -So, hledger balance assertions keep working if you reorder -differently-dated transactions within the journal. But if you reorder -same-dated transactions or postings, assertions might break and require -updating. This order dependence does bring an advantage: precise -control over the order of postings and assertions within a day, so you -can assert intra-day balances. +This means in hledger you can freely reorder transactions, postings, or files, and balance assertions will usually keep working. +The exception is when you reorder multiple postings on the same day, to the same account, which have balance assertions; those will likely need updating. ### Assertions and multiple included files