UK VAT MTD Reporting Module - not generating values on the VAT report

Now I have installed the UK VAT module ( as discussed by @banksy. But the ‘New VAT Return’ does not seem to return any data on the test data.

First I have configured the tax categories as per the advice on GitHub.

Then created some Item Tax Templates. Initially I had each template linked to separate purchase and sales tax accounts. However as this did not work and looking through the forums and at GitHub @Paul-STHL seems to have used only single tax account, modified all the ‘Item Tax Templates’ to link only one account ‘2230 - VAT Liability’. But did not solve the issue.

This where I am not sure how the UK VAT module should work. How does it pull the entries to the VAT return? Looking through the forum if I understand correctly only ‘VAT Details’ inside the yellow box on the below image are used to create the VAT entry to report. Is this correct? If it is then it should be possible to use separate VAT Purchase and VAT Sales accounts on the Accounts Ledger.

The documentation on the module (GitHub - software-to-hardware/erpnext-vat-mtd: ERPNext VAT return generator and Making Tax Digital (MTD) Submission) implies also using ‘Item Groups’. I don’t seem the find these on V13 ERPNext.

Then I created Purchase invoice to a supplier. On the supplier I set the ‘Tax Category’ to ‘UK’, as defined in ‘Tax Categories’ above.

Then I created new purchase invoice and posted it, it appears on the account ledger on 2230 VAT Liability.

When I then create ‘New UK VAT Return’ nothing appears in the boxes. Any ideas what have I missed in the configuration?

On the technical note, does the ‘Item Tax Template’ ‘VAT Details’ section create extra columns to the mysql database for these details (VAT rule, type, VAT rate) to the specific transaction. And then the VAT return goes through all the transactions for the period and pull the relevant data to the relevant boxes on the UK VAT Return?

Thank you in advance.

Have been investigating further the UK VAT MODULE operations, and when it is generating the tax return in the Python script it pulls data from the MarianDB tables

‘tabItem Tax Template’ - Item Tax Template configuration
‘tabPurchase Invoice’ - Purchase Invoice details
‘tabPurchase Invoice Item’ - Purchase Invoice Item Details

However my ‘tabPurchase Invoice Item’ entries do not have the ‘item-tax_template’ registered (and item_code is empty)

I think after Submitting the invoice the ERPNEXT should assign the ‘item_tax_template’ to the Purchase Invoice Item? Any reason why it would not do that?

OK - I think I fixed it !

Do NOT put the percentage in brackets e.g. (20%) to the ‘Item Tax Template’ name. If you put it in, the ‘tabPurchase Invoice Item’ table in the database will not get the ‘item_tax_template’ reference posted. There is no error on this when creating the template, so perhaps something that ERPNEXT team could add things to do list!


Now ‘item_tax_template’ has entry and the VAT report is generated!