Hi,

I've recently migrated to Beancount from Ledger. I'm really happy with it 
so far. :)

One issue I've had is around transaction ordering across files. (To be 
clear, this is not at all a criticism of Beancount relative to Ledger; the 
plugin I'm trying to write wouldn't be possible in Ledger for a dozen 
reasons.)

I mostly keep one file per "physical" account (e.g. one file for my 
Vanguard 401k). I also have a "budget" file that keeps transactions I use 
for envelope budgeting. Some of the budget transactions are logically 
linked with a debit to my checking account; in effect, money is divided up 
the instant it arrives.

I'm trying to implement a plugin that ensures that my various budget 
accounts never drop below zero. However, if I'm reading the code correctly, 
transactions are sorted based on their date, type, and line number -- but 
not based on filename, and not based on anything that a plugin is supposed 
to be able to control.

My questions are:

1. Is there a reason for this particular sorting order? It seems odd that 
line number would be used without filename -- it means that the order of 
two transactions could be changed by adding a lot of whitespace to one 
file, or by adding/removing metadata tags. (I tested this out, and 
confirmed that whitespace does have this effect.)

2. More generally, are there any recommended patterns for imposing partial 
orders on transactions in different files? I know that I could put 
everything in one file, but I'd rather not; it's much easier for me to read 
and write (and make bulk changes to) my files if they're split up as they 
are now.

Note that addressing #1 (e.g. by changing the sort key to include filename 
before lineno) would not fully address my use case, since I want to 
interleave transactions between different files.

Thanks!
~ aleksandra (pronouns: she/her)

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/2c8b10d2-12e6-4170-829b-de5a0bb269c8%40googlegroups.com.

Reply via email to