A report wrangling question: how to concisely display my list of bills to 
pay?

When I receive a bill on May 1 due May 27 I create a transaction such as 
this:

2015/05/01=2015/05/27 The Telephone Company
   Liabilities:Bills:The Telephone Company
   Expenses:Communication    $34.21

Then when I pay the bill from my checking account I create a transaction 
such as this:

2015/05/10  The Telephone Company
   Liabilities:Bills:The Telephone Company    $34.21
   Assets:Checking

This works swell and I use the following little bash script to display 
upcoming bills I need to pay:

for bill in $(ledger bal --flat --no-total Liabilities:Bills | awk '{print 
$2}')
do
    ledger reg --aux-date $bill
done

It finds each account under Liabilities:Bills with a balance, then prints 
the register for those accounts, telling me the amount due and when it's 
due (the aux date).

My problem is that I would like to restrict the final output to only the 
outstanding amounts (whatever their date), excluding paid bills. As it is 
now, I get things like this:

15-May-06 PhoneCo               Liabilit:Bills:PhoneCo       $28.91       
$28.91
15-May-11 PhoneCo               Liabilit:Bills:PhoneCo      
$-28.91            0
15-Jun-10 PhoneCo               Liabilit:Bills:PhoneCo      $-28.63      
$-28.63

Showing my previous month's bill being entered and paid, and then this 
month's bill outstanding.

I could just display the latest-date transaction for each account, which 
would mostly work, but then i would lose information if there were two 
bills due at a time, or an old one hadn't been paid for some reason.

Any thoughts on a good way to accomplish this? Have something that goes 
through and pairs up old transactions (by payee/acct and amount) and 
applies some "paid bill" tag to them so the final report excludes such 
transactions? Some kind of filter on the final report that can find the 
most recent date the balance was 0 and exclude everything before that? 
Something else?

Thanks,
David




-- 

--- 
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.

Reply via email to