Files @ 7441f4ef0ce1
Branch filter:

Location: NPO-Accounting/conservancy_beancount/tests/books/ledger.beancount

Brett Smith
ledger: Correct period totals. RT#11661.

The period totals were reporting the balance of all the loaded postings, not
just the ones in the reporting date range.

Like the accrual report, introduce a RelatedPostings subclass that records
and saves all the information we need at group definition time, to help us
get it consistently right rather than redoing the same math over and over.
2018-01-01 open Equity:OpeningBalance
2018-01-01 open Assets:Checking
2018-01-01 open Assets:Receivable:Accounts
2018-01-01 open Expenses:Other
2018-01-01 open Income:Other
2018-01-01 open Liabilities:CreditCard
2018-01-01 open Liabilities:Payable:Accounts

2018-02-28 * "Opening balance"
  Equity:OpeningBalance  -10,000 USD
  Assets:Checking         10,000 USD

2018-06-06 * "Accrued expense"
  project: "eighteen"
  Liabilities:Payable:Accounts  -60 USD
  Expenses:Other                 60 USD

2018-09-09 * "Paid expense"
  Liabilities:Payable:Accounts  60 USD
  project: "eighteen"
  Assets:Checking              -60 USD

2018-12-12 * "Accrued income"
  project: "eighteen"
  Assets:Receivable:Accounts  120 USD
  Income:Other               -120 USD

2019-03-03 * "Paid income"
  Assets:Receivable:Accounts  -120 USD
  project: "eighteen"
  Assets:Checking              120 USD

2019-06-06 * "Credit card expense"
  Liabilities:CreditCard  -65 USD
  Expenses:Other           65 USD
  project: "nineteen"

2019-09-09 * "Credit card paid"
  Liabilities:CreditCard  65 USD
  Assets:Checking        -65 USD