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.

Hello,

Would you like to take this development forward?

Let me know. :slight_smile:

Hi,
I need the same for Portugal. It’s a criterion to select ERPNext or another ERP. Maybe anyone can translate the comments in English, so we or anyone else can try to implement this

The source code (names of various things) and comments are in English. Check the github repo.

Only user-side instructions are in Polish, but you don’t need them if you want to implement your own version for Portugal-specific audit file.

Do you use it? Do you have any specific needs?

Yes I will give it a try. But first I need to do some other things and check the real requirements, then I will try to adopt your code. I’m new to ERPNext, so I have to see how it works.
Thank you. I will leave a message. I think it will be at the end of the year or on begin of 2023

You can find “info for developers” file in the repo. It’s about ERPNext in general, not the JPK_V7M app itself. I made it for new developers potentially interested in improving and expanding the app, because the official resources are quite overwhelming and scattered. I hope it can be a good starting point for newbies.

I can give you an advice from my experience.

First: check if there are other people or companies using ERPNext in your country.

Second: check if there is any ready software solution, even proprietary, and if you are able to spend the money required.

My experience: vicious circle. It looks like there are no ERPNext users in Poland, because ERPNext has no Poland-specific features implemented. ERPNext has no Poland-specific features implemented, because there are no users in Poland. And if there are no users, implementing the country-specific features is pointless. And if the country-specific features are missing, nobody is interested in ERPNext. And so on…

Next time I would use ready solution, with all country-specific features implemented and actively maintained. In Poland there is no opensource solution ready, so I would use proprietary, paid solution. My time spent on modifying ERPNext for my needs costed more than the total cost of subscribing to a ready-made solution. Sometimes you can save a lot by spending some money on paid (proprietary) software instead of modifying the open source software yourself. Now it’s hard to leave the ERPNext, because the time invested, but the migration is still on the table.

1 Like

I am from Frappe, you can find me on LinkedIn.

We are working on localisation and wanted to take such projects forward, and hence I contacted you.

I don’t see such a need. The app was enough for my small company, although it does not meet all the needs of other companies. I was hoping that publishing the app would result in some kind of contact with other users, but I bet no one else in Poland uses ERPNext.

Vanilla ERPNext is not ready for Poland, because we have a lot of country-specific requirements. My app is only licking the tip of the iceberg. I don’t have enough free time to make ERPNext fully ready for Polish market myself. At the moment it’s cheaper to use ready-made proprietary software than making changes to ERPNext.