Skip to main content
Key: pt-saft-v1 Portugal doesn’t have an e-invoicing format per se. Tax information is reported electronically to the AT (Autoridade Tributária e Aduaneira) either periodically in batches via a SAF-T (PT) report or individually in real time via a web service. This addon ensures that the GOBL documents have all the required fields to be able to be reported to the AT.

Sources

Extensions

Invoice Type

SAF-T’s InvoiceType (Tipo de documento) specifies the type of a sales invoice. In GOBL, this type can be set using the pt-saft-invoice-type extension in the tax section. GOBL will set the extension for you based on the type and the tax tags you set in your invoice. Example:

Payment Type

To report payment receipts to the AT, GOBL provides conversion from bill.Payment documents. In a payment, the SAF-T’s PaymentType (Tipo de documento) field specifies its type. In GOBL, this type can be set using the pt-saft-payment-type extension. GOBL will set the extension automatically based on the type and the tax tags you set. The table below shows how this mapping is done: For example:

Tax Rate Code

The SAF-T’s TaxCode (Código do imposto) is required for invoice items that apply VAT. GOBL provides the pt-saft-tax-rate extension to set this code at line tax level. It also determines it automatically this code using the rate field (when present). The following table lists the supported tax codes and how GOBL will map them:

Tax exemption reason code

AT’s TaxExemptionCode (Código do motivo de isenção de imposto) is a code that specifies the reason the VAT tax is exempt in a Portuguese invoice. When the exempt tag is used in a tax combo, the ext map’s pt-exemption-code property is required. For example, you could define an invoice line exempt of tax as follows:

Product Type

SAF-T’s ProductType (Indicador de produto ou serviço) indicates the type of each line item in an invoice. The pt-saft-product-type extension used at line item level allows to set the product type to one of the allowed values. Example:

Payment Means

The SAF-T’s PaymentMechanism (Meios de pagamento) field specifies the payment means in a sales invoice or payment. GOBL provides the pt-saft-payment-means extension to set this value in your bill.Invoice advances or in you bill.Receipt method. GOBL maps certain payment mean keys automatically to this extension: (*) For codes not mapped from a GOBL Payment Mean, use other and explicitly set the extension. For example, in an GOBL invoice:
For example, in a GOBL receipt: