Data Import not populating Sales Taxes and Charges

Tried importing some sales invoices with data import tool. The system correctly set the item tax template and tax category. But the tax table is empty and the total taxes and charges remains 0.

Tried setting a hook on Sales Invoice validate to run calculate_taxes_and_totals() but hooks aren’t triggered on import.

Any way I can achieve the same?

Were you able to fix this? Workaround is to calculate and include taxes in the upload file, which I really don’t want to do

Couldn’t get it to work, although if you add the account heads of tax table in the rows, system will automatically calculate the tax amount.

So, using the following links, it should be possible:

and this:

it should be possible to calculate the sales/purchase tax using the before_submit event. It will have to be a custom app

Let me experiment this week.

Yeah, this can be possible. Import it all in draft mode and run a script to set the tax heads.

Am able to do this for some limited use cases now. I haven’t covered all of the Sales/Purchase Invoice use cases, however.

Created a ‘hook’ on the ‘before_submit’ event.

It will calculate taxes whenever you submit an invoice - if the ‘taxes and charges’ section is empty.

I am using tax rules to get the tax details. So, if you want to use the tweak, you will have to define tax rules.