Hi,

On Thu, 17 Mar 2016 16:48:57 -0700 Martin Michlmayr wrote:
> Tobias Pfeiffer <[email protected]> [2016-03-17 23:55]:
> > Therefore I considered to write a script that merges
> > these files in the correct date order into some big "all.ledger"
> > file.
> 
> I use something similar at the moment instead of include directives
> because the latter doesn't show line numbers of the included files
> properly when there are errors.
> 
> I do something like:
> 
> cat bank/2016/*.ledger | ledger -f - --sort d print > 2016

Amazing!! Wow, there it is, my to-be-written "merge script"! Great,
thank you very much!

> But regarding transactions in different accounts (e.g. paying your
> credit card bill with your bank account): I use an Assets:Transfer
> account, as someone suggested on this list a few years ago. (I can
> look for a link if you want, but the basic idea is: one transaction
> does: Assets:Bank -> Assets:Transfer; and the other Assets:Transfer ->
> Liabilities:Credit Card).
> 
> The other solution would be use to an UUID tag; if two transactions
> have the same UUID, ledger will ignore one.

Wow, that again is a very, very helpful advice, thank you!! Adding a
Assets:Transfer account makes it more difficult to track money flow
between accounts, I think, but that UUID tag is maybe exactly what I
was looking for.

> > - Often it will become necessary to edit transactions by hand, for
> >   example, change the clearing state, add or remove tags or edit the
> >   payee. I wonder in which files to do this and if it will work
> >   correctly with merging.
> 
> I only add *new* transactions to my ledger files with my import
> scripts. This way, I can modify old entries without any problems.

I see. That was also the flow that I had in mind, but since I am just
starting with Ledger, I was wondering if at some point I will be
thinking something like "uhm, if only transactions that have properties
A and B would have a different wording/tag/account" and thought about
re-importing the whole data from the past, *not* overwriting changes
that I have made. But then, I should probably think about that problem
at that time ;-)

Thank you very much,
Tobias

-- 

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

Attachment: signature.asc
Description: PGP signature

Reply via email to