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!


Hi @Jukkis how did you enabled the UK VAT MTD in the ERPNEXT?

Was done using this custom app:

Using the ERPNext UK VAT MTD module. I had some installation issues, and the fix I managed to do is under post

Once Installed few things to note:

  • You must not use the Purchase and Sales Tax templates on the ERPNext, they will not work with UK MTD module
  • You must use the Item Tax templates (go accounting and taxes - Item Tax Template)
  • UK MTD Module adds ‘VAT Details’ section to Item Tax template, you have to set
  • VAT Rules (you can use this to assign specific rules to e.g. supplier or customer)
  • Transaction type (see details in guide as if I remember right this is only required to EU Services /Good imports)
  • VAT Rate

You must not use special character (e.g. %) in the name as then module will not work.

When you then create purchase/sales invoices, do not use Sales/Purchase tax template, but go to individual Items and set the tax template there for the items. This way they are included in the generated VAT report.

I have not figured out how to :

  1. Do actual submissions digitally (have two months to figure that out :-))
  2. How do count import VAT. What I mean is imports e.g. from China where the Courier/customs at the time of import calculated the duty and VAT. As this is not fixed amount of VAT cannot use Item Tax template to set the percentage. It should be possible to manually define the VAT amount on the Purchase Invoice. Could anyone help on this?

Below is setting from my Item Tax template for UK standard 20% VAT

1 Like

Some practical feedback after using UK MTD module 6 months.

  1. If you are just involved in buying / selling in the UK the UK MTD module works OK
  2. We are also using it for EU Sales and purchases

Where it is running short is when you are doing imports from the third party countries e.g from Asia. On the imports you will either
a. need to pay import VAT (and duty). This is paid to couriers. The couriers create import VAT amount using their formula which (due to exchange rate variations) never seems to be 20% of the purchase order value.
b. you can use deferred VAT accounting in which case you do not need to pay VAT but still need to report import VAT on the VAT return

In our case both a. and b. apply.

So what we do:-

  1. We create VAT return using UK MTD VAT return module and the export the drill-down report to Excel
  2. For b. (deferred VAT) we then enter on the Excel to Box1 (VAT due on sales) and Box4 (VAT reclaimed purchases). These will come to 0 sum but needs to be recorded. You will also need to put under Total purchases Box 7 the total value of the imports.
  3. For a. items we will manually change the VAT amount on the purchase invoice, which is in this case the Courier invoice consisting of the charges + VAT (you can actually write the exact VAT amount on the purchase invoice VAT column). This is then present on Box 4 and Box 7.

Now on Excel you get the totals.

After this we will then transfer the Box 1 - Box 9 values to Anna Money MTD Spreadhseet (free) and then use it to submit the VAT report digitally to HMRC.

Anyone knows a better way?