Frappe
Cloud
Marketplace
Frappe
Products
Insights

Publisher
Supported versions
Categories
E-Commerce
About
A Frappe app that brings Portuguese tax compliance to ERPNext. It implements the requirements of the Portuguese Tax Authority (Autoridade Tributária e Aduaneira — AT) for electronic invoicing, including document series registration, tax type classification, and VAT exemption codes as defined by the SAFT-PT standard.
AT document series management — register and track invoice series with the AT, covering all document types (invoices, credit notes, transport documents, payments, etc.)
Portuguese tax classification — classify tax categories as IVA (VAT), IS (Stamp Duty), or NS (Not subject/exempt)
VAT exemption codes — built-in reference data for all legal exemption codes with the exact mention required on the invoice and the applicable legal standard
Tax codes per line — link each tax template line to the correct Portuguese tax code and, when exempt, to the corresponding exemption code
Regional tax settings — configure a company's tax region (mainland Portugal, Azores, or Madeira) to apply the correct VAT rates
Represents a document series registered (or to be registered) with the AT. The doctype is submittable — submitting it triggers the registration request.
Field | AT service name | Description |
|---|---|---|
| — | Series identifier code (up to 35 chars), e.g. |
| tipoSerie | Series type: N Normal · F Self-billing · R Rectification |
| classeDoc | Document class: SI Sales & Invoicing · MG Stock & Goods · WD Working Documents · PY Payments |
| tipoDoc | AT document type code: FT, FS, FR, ND, NC, GR, GT, GA, GC, GD, CM, CC, FC, FO, NE, OU, OR, PF, RP, RE, CS, LD, RA, RC, RG |
| dataInicioPrevUtiliz | Planned first use date |
| meioProcessamento | Processing method: PI Paper · PF File · OM Online |
| numInicialSeq | Initial sequence number (default: 1) |
After registration the following AT-returned fields are filled in automatically (read-only):
Field | AT service name | Description |
|---|---|---|
| codValidacaoSerie | Validation code returned by the AT |
| dataRegisto | AT registration date |
| Estado | Status: A Active · N Not active · F Finalised |
| seqUltimoDocEmitido | Last document sequence number issued |
Reference table for Portuguese tax codes used in item tax templates. Each record has a 3-character unique code and a human-readable title.
Reference table for all VAT exemption reasons defined by the AT. Each record stores:
Field | Description |
|---|---|
| 3-character unique exemption code (e.g. |
| Exact text required on the invoice |
| Legal basis (e.g. article of the VAT Code) |
This app adds the following fields to standard ERPNext doctypes:
DocType | Field | Type | Description |
|---|---|---|---|
Company |
| Select | Tax region: PT mainland · PT-AC Azores · PT-MA Madeira (required) |
Tax Category |
| Select | Classification: IVA · IS · NS |
Item Tax Template Detail |
| Link → Portugal Tax Code | Tax code for the template line |
Item Tax Template Detail |
| Link → Portugal Tax Exemption | Exemption code (mandatory when tax code is NS) |
Sales Invoice |
| Link → AT Serie | AT-registered series for the invoice (required) |
Frappe v16 and ERPNext v16
Python 3.10+
# 1. Get the app
bench get-app https://github.com/envlab-tech/erpnext_portugal --branch version-16
# 2. Install into your site
bench --site <your-site> install-app erpnext_portugal
# 3. Run migrations
bench --site <your-site> migrate
This app uses pre-commit for code formatting and linting. After cloning, enable it:
cd apps/erpnext_portugal
pre-commit install
Pre-commit runs the following tools on every commit:
ruff — Python linting and formatting
eslint — JavaScript linting
prettier — JavaScript / Vue / SCSS formatting
pyupgrade — Python syntax modernisation
User Reviews
No reviews yet, be the first to review.
0 rating
Explore more apps