Thanks John, this is definately in the right direction. Still having some
trouble though:
$ cat foo.ledger
= expr account =~ /^Salary:/
; alias: Costs:Taxable:$account
; accountcode: 1234
2013-01-01 payee
Salary:Someone 100 NOK
Cost
$ ledger -f foo.ledger bal --account=alias
While evaluating value expression:
alias
^^^^^
While handling posting from "foo.ledger", line 7:
> Salary:Someone 100 NOK
Error: Unknown identifier 'alias'
$ ledger -f foo.ledger bal
-100 NOK Cost
100 NOK Salary:Someone
--------------------
--account=alias throws an error, and without it nothing happens - any idea
what I'm doing wrong?
K.
On Saturday, June 8, 2013 3:12:29 AM UTC+2, John Wiegley wrote:
>
> >>>>> kristian <[email protected] <javascript:>> writes:
>
> > We've got accounts like this:
> > Salary:Collegue1
> > Salary:Collegue2
> > Salary:Collegue3
>
> > And we'd like to make aliases to all of these, like this:
> > alias Salary:*=Costs:Taxable:Salary
> > note accountcode=1234
>
> > So that when we print, we get this
> > Costs:Taxable:Salary:Collegue1
> > Costs:Taxable:Salary:Collegue2
> > Costs:Taxable:Salary:Collegue3
>
> I think you want something like:
>
> = expr account =~ /^Salary:/
> ; alias: Costs:Taxable:$account
> ; accountcode: 1234
>
> And now you can report with --account=alias, or --meta=accountcode, or
> even
> --pivot=accountcode.
>
> John
>
--
---
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/groups/opt_out.