OK, I see what was going on here. I was tagging the two parts of the
"reimbursement" that feel to me like they really are abstractly what
the reimbursement are about: the healthcare expense (positive amount),
and the reimbursement from my FSA account (negative amount). Even
though their amounts canceled out, ledger won't add them together
since they are in separate accounts.
If instead I tagged my bank account (which seems to me to be the less
interesting detail) both times, then it would cancel out in
--group-by:
1/1 Doctor
Expenses:Healthcare $100
Assets:Bank
; FSA: R1234
1/30 Reimburse from FSA
Assets:Bank $100
; FSA: R1234
Assets:FSA
However, this doesn't support the case where there are four different
accounts involved; eg, let's say I pay a healthcare expense with a
credit card, cash, or another bank account from the one that i have
FSA reimbursement set up with. I really just want to be able to say
"show me the sum of all FSA:R1234 postings, no matter what account
they are to".
--dave
On Mon, Jan 12, 2015 at 1:38 PM, Stefano Zacchiroli <[email protected]> wrote:
> On Mon, Jan 12, 2015 at 12:39:14PM -0800, David Glasser wrote:
>> Thanks. With the example above, though, it does not seem to suppress 0
>> groups (unless I just need to upgrade ledger or something?)
>
> I think you're not posting your pending reimbursement quite right (or at
> least in a way that is uncommon for double-entry accounting) and that is
> striking back.
>
> Here is how I do that, for expenses, before reimbursement:
>
> 1/1 * doctor visit
> ; reimbursement-id: id1
> Assets:Checking -50 EUR
> Assets:Reimbursable 50 EUR
>
> 2/2 * another doctor visit
> ; reimbursement-id: id2
> Assets:Checking -50 EUR
> Assets:Reimbursable 50 EUR
>
> When you get reimbursed:
>
> 3/3 * reimbursement - doctor visit
> ; reimbursement-id: id1
> Assets:Checking 50 EUR
> Assets:Reimbursable -50 EUR
>
> with such a ledger:
>
> $ ledger -f foo.ledger --group-by "tag('reimbursement-id')" bal --empty
> id2
> 0 Assets
> -50 EUR Checking
> 50 EUR Reimbursable
> --------------------
> 0
>
> while id1 is not shown, as desired.
>
> Cheers.
> --
> Stefano Zacchiroli . . . . . . . [email protected] . . . . o . . . o . o
> Maître de conférences . . . . . http://upsilon.cc/zack . . . o . . . o o
> Former Debian Project Leader . . @zack on identi.ca . . o o o . . . o .
> « the first rule of tautology club is the first rule of tautology club »
>
> --
>
> ---
> 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.
--
[email protected] | langtonlabs.org | flickr.com/photos/glasser/
--
---
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.