Giter Club home page Giter Club logo

erpnext-vat-mtd's Introduction

UK VAT Module

The UK VAT module is an application for ERPNext to extend it to include:

  • A VAT Return generator for UK/EU VAT. This uses data from your invoices to automatically produce a VAT return;

  • A drilldown report to show the underlying composition of the VAT return; and

  • An optional Making-Tax-Digital submission. (Please note: This feature requires additional client credentials from HMRC.)

We hope you find it useful. Please feel free to raise issues or submit pull requests as required.

Installation

You can install this module into your existing installation with :

	bench get-app uk_vat https://github.com/software-to-hardware/erpnext-vat-mtd
	bench install-app uk_vat

Configuration of the VAT return

Overview

The VAT return derives its information from the line items in each invoice, both purchases and sales.

The line items are linked to "Item Tax Templates" which describe how the VAT return should process each line item.

Finally, the "Item Tax Templates" can be chosen dynamically, depending on where your customer is based by linking them to "Tax Categories."

You can use your own "Tax Categories" and "Item Tax Templates" or you can configure them as described here. To provide maximum flexibility, the VAT Return uses only the additional data attached to the "Item Tax Templates" and does not rely on fixed naming or configuration.

Defining Tax Categories

The "Tax Categories" are applied to customers and suppliers to determine which overall tax rules to apply to that entity.

For our example installation, we shall refer to three categories:

  • UK
  • EU VAT registered
  • RoW (Rest of World)

These categories are not fixed. You are free to define additional categories to suit your needs.

Define the tax categories in the "Tax Category List." You can get this by searching for it in the search box at the top of the screen.

Defining the "Tax Item Templates"

The Tax Item Templates are used to describe the tax rules that apply to individual invoice line items.

Example Tax Item Templates are:

  • Standard rated
  • Lower rate
  • Exempt
  • Zero Rated
  • VAT does not apply
  • EU Goods
  • EU Services
  • EU Goods (Zero rated)

When you install UK VAT, the "Tax Item Template" is extended so it can hold additional information describing the rules for your VAT return. An example of this is shown here:

Tax Item Template Example

The "Tax Rates" section at the top defines which ledger accounts this transaction should affect.

The fields in the "VAT Details" section at the bottom define which boxes on the VAT return will be affected.

You are free to define the categories as you see fit or use existing categories if you have them.

By way of example, we configured ours like this:

Item Template Name Ledger Tax Rate Include in VAT return? VAT Rules Reverse? Transaction Type VAT Rate
Standard Rated 20% Yes UK No Not applicable 20%
Lower Rate 5% Yes UK No Not applicable 5%
Exempt 0% Yes UK No Not applicable 0%
Zero Rated 0% Yes UK No Not applicable 0%
VAT does not apply 0% No UK No Not applicable 0%
EU Goods 0% Yes EU No Goods 20%
EU Services 0% Yes EU Yes Services 20%
EU Goods (Zero rated) 0% Yes EU No Goods 0%

Applying the Tax Item Templates

The tax item templates are linked to your invoice items by using Item Groups. Using item groups allows you to apply the Tax Item Templates to a group of items without needing to visit each one. However, if you need to specialise an item, you can apply a Tax Item Template directly to it if you wish.

For example, our "services" item group may define the following links:

Tax Item Group Example

Note that both EU Service and Goods are defined. The order defines which one is chosen by default. Having both allows the invoice line items to be customised at the time the invoice is made to use either. This is required because if service delivery is a component of goods delivery then for VAT purposes it may need to be counted as goods for the purposes of the VAT return.

Generating a VAT return

A VAT return can be generated by searching for "New UK VAT Return" from the search bar.

New VAT returns

After selecting your company, if you have configured MTD (described later in this document) you can press the "Fetch open return from HMRC" button to select dates of outstanding VAT returns.

Selecting HMRC returns

Otherwise enter the dates manually and save the document to generate the return.

VAT Return Example

VAT return drilldown

To understand how the VAT return is made up, a drilldown report is provided. You can either access this directly, or by pressing the "Show drilldown" button at the top of a VAT return.

VAT Return Drilldown Example

The report shows each box on the VAT return and then, underneath, which invoice line-items were used to make up that figure.

Submitting VAT returns to HMRC

The UK VAT module provides the ability to submit a VAT return electronically to HMRC using their Making-Tax-Digital (MTD) internet service.

To use this facility an MTD Client Identifier and Secret are required. These are provided to you by HMRC and are additional to your government gateway id.

The general steps to get this to work are :

  • Setting up the API
  • Authorising your ERPNext installation to access VAT data
  • Submitting your returns

Setting up the API

To use the electronic submission facility, the API must be enabled and the Client ID and secret must be entered. You do this by searching for the "HMRC API Settings" page, selecting "Enable" and entering the required values.

HMRC API Setup

Save the document and press the "Test HMRC Connectivity" button to check the details have been entered correctly.

Using HMRC's test servers

By default, the submission facility targets HMRC's production servers, however, If you wish to test the submission facility against HMRCs test servers, you can change the endpoints under the "Advanced" view at the bottom of the page.

Authorising your ERPNext to access your VAT data

The next step is to obtain an authorisation from HMRC to allow ERPNext to submit VAT returns. This is acheived electronically, as follows.

  1. Go to the HMRC Authorisations List. (search for it.)

  2. Create a new authorisation, select your company and save the document.

  3. Select the "Request above authorisations" option. This will open a new pop-up window (you may need to allow this). Follow the on-screen instructions from HMRC.

When complete, you will be returned to the authorisation document and it should look like this:

HMRC API Setup

This authorisation is valid (at the time of writing) for 18 months after which you will need to repeat this step (by pressing the Request above authorisations button) again.

Submitting your VAT returns

At the bottom of the VAT return page is a submission section for submitting the return to HMRC.

After agreeing to the declaraion, a submit button appears. Pressing it will cause ERPNext to ask HMRC for a list of outstanding returns. It will then attempt to match the dates of your VAT return to one of these outstanding obligations. If there is a match, it will then submit your return.

License

GNU/General Public License (see license.txt)

erpnext-vat-mtd's People

Contributors

paul-sthl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

erpnext-vat-mtd's Issues

VAT Report Setup

Hi Steph

I was I want you to help me with my country's VAT code.
Please How Do I get in touch you?

Vat Return Not Displaying Correctly

if you generate the vat return and then cancel an invoice the vat calculations in the boxes is not adjusted.

for example i have an invoice of 20 and vat 4.20 so total 24.20

Vat 4.20 goes into the boxes thats fine.

I cancel the invoice and reload the vat return page.

4.20 vat (that has been cancelled) is still present which should not be the case.

Can you add a button to "refresh/update" the values?

feat: could be used as a basis for EU-wide VAT

This could be done via amending Item Tax Template to include:

  • A country select list
  • Changing VAT rules drop down to "Domestic, EU, Rest of World"

That seems to allow the correct recording of info required to calculate the return in least three countries with EU VAT systems (UK, DE, MT). Might possibly need an exempt category?

The actual return in EU countries is often a lot more involved than it is in the UK, so creating the reports for other countries is likely to be a lot of work! With a suitable foundation

Sample Return Forms
UK VAT100 - VAT Return Form.pdf
Malta VAT Return Form.pdf
Germany Annual VAT summary 2020.pdf (I haven't got an English version, sorry!)

Impossible to setup supervisor

Hello,
I'm following your doc about CentOS 8 and when I do bench setup supervisor, I obtain:

WARN: superuser privileges required for this command

SELinux is in targeted mode during this setup
Regards

minor: Display a spinner when waiting for HMRC

For HMRC API interactions:

  1. Display an "in progress" spinner or something to indicate that an action is in progress.

  2. Disable the button whilst an action is in progress to prevent inadvertent resubmits.

Using sudo to install frappe-bench

Hi,

Following your guide (a clear and concise guide by the way) one can successfully create frappe-bench for development.
But not when proceeding to setting up production (as mentioned in other issue here).

There is a note from Trent's blog on installing on Debian that the pip3 install --user frappe-bench MUST be done with sudo. But doing so will make the subsequent bench command not found (as mentioned in this discuss topic)

What is your suggestion?
Thanks.

feat: Generate report using nominals instead of invoice tables

Aka there's more to ERPNext than just invoices.

This should capture places where VATtable stuff happens outside the invoice workflow (e.g. expenses.)

It should allow posting journal entries to update the VAT return too.

I think I have a way to do this as flexibly as we did for invoices so... watch this space.

Publish on FC Marketplace?

Hi @Paul-STHL,

This is Umair, co-founder Frappe Tech.

This is certainly a FrappeCloud marketplace worthy, where you can attract more users for your app. We have some community members who already published their localization app. Here is the video tutorial on how can you make an application for publishing an app FC marketplace.

https://youtu.be/qwv1grkU5fQ?t=206

Will be great to see you guys getting traction from FC marketplace. Do give a thought. When ready, @NagariaHussain can assist with reviews from our end.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.