An account-centric transactions report.
An account transactions report represents transactions affecting a particular account (or possibly several accounts, but we don't use that). It is used eg by hledger-ui's and hledger-web's register view, and hledger's aregister report, where we want to show one row per transaction, in the context of the current account. Report items consist of:
  • the transaction, unmodified
  • the transaction as seen in the context of the current account and query, which means:
  • the transaction date is set to the "transaction context date": the earliest of the transaction date and any other posting dates of postings to the current account (matched by the report query).
  • the transaction's postings are filtered, excluding any which are not matched by the report query
  • a text description of the other account(s) posted to/from
  • a flag indicating whether there's more than one other account involved
  • the total increase/decrease to the current account
  • the report transactions' running total after this transaction; or if historical balance is requested (-H), the historical running total. The historical running total includes transactions from before the report start date if one is specified, filtered by the report query. The historical running total may or may not be the account's historical running balance, depending on the report query.
Items are sorted by transaction register date (the earliest date the transaction posts to the current account), most recent first. Reporting intervals are currently ignored.
Split an account transactions report whose items may involve several commodities, into one or more single-commodity account transactions reports.
Generate transactions report items from a list of transactions, using the provided user-specified report query, a query specifying which account to use as the focus, a starting balance, and a sign-setting function. Each transaction is accompanied by the date that should be shown for it in the report. This is not necessarily the transaction date - see transactionRegisterDate.