Does anyone know if there is any way to suppress "asset" accounts with
a negative balance (for example, an overdrawn current account) from
showing up in a balance under the normal assets category, and instead
have it show up as a liability in that case only? I know ledger-cli
doesn't care, but the government processing my tax return does. I know
that I can do this adjustment manually myself, but that sort of
defeats the purpose of trying to automate this. I have tried various
things with the print command, --limit filter, etc. but haven't found
a satisfactory solution yet. If there is no simple solution, I am
happy to pipe my data through some script to get to the desired
results.
Ofcourse, after a few more experiments and not too long after writing
this, I think I have found a way... but I am not sure if it is the most
elegant:
ledger equity | grep -v "€ -[0-9]" > tmp; ledger equity | grep "€ -[0-9]" | sed
's/assets/liabilities/' >> tmp ; ledger -f tmp bal
I first translate the balances I am interested in, into equity entries and
then I filter out all lines from this which do not have negative amounts
and store these in a tmp file. Then I repeat this exercise, appending to
the tmp file all records which do have a negative amount, and replace all
"assets" entries with "liabilities" account names.
At this point I have the input I want, and can safely use this for my
reporting needs to make a balance as desired.
It probably is not perfect, but it will do the job for me for now!
Kind regards,
Remco Rijnders
--
---
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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ledger-cli/20191006205843.GQ2603%40settler.webconquest.com.