Hi, I wanted to ask the mailing list for a kind of "best practice" approach when working with multiple "physical" (that word doesn't fit at all, though) accounts, like bank, credit card, PayPal etc.
To import data from the past into ledger, I have written scripts that read my account statements from multiple accounts (CSV in all possible formats, PDFs etc.) and write them to ledger files, such as "credit-card.ledger", "savings.ledger", "paypal.ledger" etc. Now with that approach, I can do stuff like $ ledger -f credit-card.ledger -f savings.ledger -f paypal.ledger bal and that works correctly, but there are several issues I was thinking about: - The entries are in correct date order within each file, but when I combine them (either using multiple `-f` parameters or one file with `include` directive) then they are not, so without extra sorting parameters, `ledger reg` gives an unordered output. Also, balance assertions for transactions from one of those account to another account do not work if the transaction is not in the correct position. Therefore I considered to write a script that merges these files in the correct date order into some big "all.ledger" file. - For future updates, of course I want to use the exact same scripts, rather than adding transactions by hand. In fact, since I add my cash expenses to a mobile app right away and can import into ledger from there, it should hardly be necessary to add transactions manually. That means that every month or so (whenever a new account statement arrives), I would re-run my scripts and then merge them with all.ledger. However, I would have to deal with transactions that appear in *two* account statements (like, when sending money from my savings account to PayPal). - 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. So, all of this is not exactly rocket science and surely doable, but I thought that probably everyone that maintains multiple files and/or does not enter all transactions by hand must have run into similar issues, so maybe there is a set of recommendations or best practices, or even helper scripts available? Looking forward to hearing any advice! Thanks, 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 ledger-cli+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
signature.asc
Description: PGP signature