2020-01-01 commodity MILE
2020-01-01 commodity USD
2020-01-01 open Assets:Bank:Checking USD
2020-01-01 open Assets:Deffered-Tax
2020-01-01 open Income:Tax-Refund:Car-Mileage
2020-01-02 * "Driving car somewhere, which is tax deductible"
; I think you need to put here not the actual rate (e.g. 65.5 cents/mile), but expected tax return you will get. Let us assume 0.3 USD/mile
Income:Tax-Refund:Car-Mileage -100 MILE @ 0.3 USD
Assets:Deffered-Tax 30 USD
2020-03-02 * "Tax authorities" "Tax refund received"
Assets:Bank:Checking 40 USD
Assets:Deffered-Tax -40 USD
; You will probably never guess the tax return 100% correctly, so you will need to pad it
2020-03-02 pad Assets:Deffered-Tax Income:Tax-Refund
2020-03-03 balance Assets:Deffered-Tax 0 USD