I have a bank account for my business and convert the statement (CSV) to ledger items on a periodic basis.
Some bank entries include VAT, which I can reclaim, so if I have an entry like this:
2021-01-01 T-Mobile: January 2021
Expenses:Phone
Assets:Bank -100
I need to add a VAT line like this (25% VAT):
2021-01-01 T-Mobile: January 2021
Expenses:Phone
Assets:AR:VAT 20
Assets:Bank -100
I don’t mind adding the extra row, but I dislike having to calculate the VAT amount and put in an absolute amount (source of error).
I can tag the VAT entries like this:
2021-01-01 T-Mobile: January 2021
Expenses:Phone
Assets:Bank -100; VAT25:
And ideally I would make a rule like this:
= tag:VAT25
Assets:AR:VAT *-0.20
Unfortunately though, the posting has to balance before and after the automatic postings are generated, so the above will give me an error. Instead I have to add an account to my rule, but I don’t know which expense account the rule is applied to, so I end up with:
= tag:VAT25
Expenses:VAT
Assets:AR:VAT *-0.20
But this means that my phone expenses etc. will include VAT, and all VAT expenses are aggregated on the Expenses:VAT account.
I wonder, have anyone found a good solution for this problem?
It seems a solution could either be to allow referencing involved accounts in the rule (which I believe ledger-cli does), or to change the balance requirement, so that this is not enforced until after the generated postings have been added.