Es un informe sencillo e interesante que no es tan fácil de obtener.
Con patrones de datos típicos, puede ser suficiente encadenar dos informes de esta forma:
$ ledger print --raw Checking | ledger -f - --permissive reg Liabilities something something
...
$ hledger print Checking | hledger -f- -I areg -w120 Liabilities amt:'>0'
Transactions in Liabilities and subaccounts:
2012-01-08 Chase:Slate | Paying off credit card As:US:Bo:Checking 140.36 USD 140.36 USD
2012-02-11 Chase:Slate | Paying off credit card As:US:Bo:Checking 725.96 USD 866.32 USD
2012-03-09 Chase:Slate | Paying off credit card As:US:Bo:Checking 580.00 USD 1446.32 USD
Se puede conseguir un informe más sólido con hledger y sqlite:
$ hq() { (hledger print -O sql; echo "$1") | sqlite3 -column -header; } # run sqlite queries on hledger data
$ echo; hq "select * from postings where txnidx in \
(select txnidx from postings where account regexp 'Liabilities' and amount > 0 and txnidx in \
(select txnidx from postings where account regexp 'Checking' and amount < 0))"
> >
id txnidx date1 date2 status code description comment account amount commodity credit debit posting_status posting_comment
-- ------ ---------- ----- ------ ---- ------------------------------------ ------- --------------------------- ------- --------- ------ ------ -------------- ---------------
147 2012-01-08 * Chase:Slate | Paying off credit card Liabilities:US:Chase:Slate 140.36 USD 140.36
147 2012-01-08 * Chase:Slate | Paying off credit card Assets:US:BofA:Checking -140.36 USD 140.36
163 2012-02-11 * Chase:Slate | Paying off credit card Liabilities:US:Chase:Slate 725.96 USD 725.96
163 2012-02-11 * Chase:Slate | Paying off credit card Assets:US:BofA:Checking -725.96 USD 725.96
177 2012-03-09 * Chase:Slate | Paying off credit card Liabilities:US:Chase:Slate 580 USD 580
177 2012-03-09 * Chase:Slate | Paying off credit card Assets:US:BofA:Checking -580 USD 580
Y hay un camino hacerlo también con tackler.