On 01.05.18,07:33, Johann Höchtl wrote:
>
>
> On 2018-05-01 01:54, Jostein Berntsen wrote:
> > On 30.04.18,02:22, Johann Höchtl wrote:
> > You might look at the comment in this post regarding problem with
> > balancing with assertions and multiple files:
> >
> > https://felixcrux.com/blog/ledger-practices-separate-your-journals
> >
> > It might work better if you keep your transacations in one file here,
> > the result seems more like you expect.
> Thank you for the pointer which will help me to understand how to structure
> files.
>
> Meanwhile I identified the underlying problem. The definition for automated
> shared transactions is in both files as I would like to keep them separated
> and usable on their own. However if they are combined with multiple -f
> specifications on the command line these automated transactions become
> defined and applied twice.
>
> Ideally some sort of #idef ... #define .... #endif functionality to
> prevent the semantically same second definition of an automated transaction
> to be defined would be a solution.
>
> Maybe I could get around with a
>
> define variable=true
>
> or like functionality?
> >
You can have a header file with your accounts and automated transactions
there and use the include statement for your transaction files:
; Header file ledger.dat
= /^Expenses:/
[Share] 1
[Share:Person:A] -0.5
[Share:Person:B] -0.5
= /^Person:/
[Share:$account] -1
[Share] 1
include ~/ledger/transacationA.dat
include ~/ledger/transacationB.dat
Jostein
--
---
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.