ERPNext.com Frappe Cloud Support Partners Foundation Frappe School

JPK_V7M for ERPNext (Standard Audit File for Tax in Poland)

Lack of JPK_V7M makes ERPNext useless for most companies in Poland, so I started to create my own implementation. You can try it to check if it fits your needs. You can also suggest changes, but I don’t promise that I will do anything with them. Finally: you can extend the features of the app with your own code (you can contribute, or fork, or anything - it’s MIT licensed).

The app is provided “as is”, with no warranty. You are responsible for sending wrong data to the tax office, so please check if the output file is correct before uploading it to the government server.

Installation:

bench get-app https://github.com/Semiranis/jpk_v7m
bench --site [site_name] install-app jpk_v7m

Note: replace [site_name] with your site name (e.g. site1.local)

It’s only partial implementation, made for my own needs. If you know Polish, you can check what is implemented here:

If you know English only, you can search for “TODO” in source code to check which parts are missing:

1 Like

Thanks for sharing. May I know what is the purpose of this app? Perhaps there are similar request in other countries

It creates XML file for value added tax (VAT) report and declaration containing:

  • list of sales invoices, purchase invoices and customs declarations with tax bases and tax amounts in various categories (other documents are not implemented in my app, so the app isn’t usable for some companies)
  • the results of tax calculations in a few categories
  • other required data.

In most ERP and accounting apps used in Poland the file can be automatically uploaded to the government server, but I don’t have enough time to implement this feature. The user has to upload it manually (via special tool on government site).

I heard that standard audit files (SAF-T) are used in many countries, including Austria, Belgium, Denmark, Netherlands, Lithuania, Luxembourg, Germany, Slovenia, Sweden, Portugal and Great Britain, but I didn’t check if the list is correct or complete.

Polish version is country-specific and I bet that every country has their own version.

JPK_V7 (JPK_V7M or JPK_V7K, depending on company) is mandatory, but in Poland there are other standard audit files that have to be send on tax office request (during the tax inspection):

  • JPK_KR - for accounting books (report of all operations in general ledger)
  • JPK_PKPIR - for companies using simplified accounting (not accounting books)
  • JPK_FA - for sales invoices (will be replaced by e-invoice in near future)
  • JPK_EWP - for income
  • JPK_MAG - for stock
  • JPK_WB - for bank statements

I don’t have enough time to implement all the reports (and even all the features of JPK_V7). Therefore, I wish there were more Polish users who can write a piece of code. But I made some research previously and there were 1 person from Poland active in this forum long time ago. Maybe my effort will encourage new users.

As a curiosity: The stupid name of JPK_V7M comes from:
JPK - Jednolity Plik Kontrolny (Standard Audit File)
V7M - previous version was called JPK_VAT, but then they included VAT-7M declaration into it, making JPK_V7M.
VAT-7M was a monthly version o VAT-7 (other version was VAT-7K - quarter version).
VAT-7 contained amounts of VAT from various operations (both input and output tax, like import of goods, import of services, intra community purchase of goods, sales with various tax rates, etc.) and some calculations (including tax to be payed by or returned to taxpayer). It contained over 70 fields. These fields are now a part of JPK_V7M.