Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions snippets/documents/pt/accordion.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import ATB2BInvoiceMin from '/snippets/invoices/pt/at-b2b.min.mdx';
import ATB2BInvoice from '/snippets/invoices/pt/at-b2b.mdx';
import ATCashVATInvoiceMin from '/snippets/invoices/pt/at-cash-vat.min.mdx';
import ATCashVATInvoice from '/snippets/invoices/pt/at-cash-vat.mdx';
import DeliveryMin from '/snippets/deliveries/pt/delivery.min.mdx';
import Delivery from '/snippets/deliveries/pt/delivery.mdx';
import ReturnMin from '/snippets/deliveries/pt/return.min.mdx';
Expand All @@ -12,6 +14,8 @@ import ReturnFromGlobalMin from '/snippets/deliveries/pt/return-from-global.min.
import ReturnFromGlobal from '/snippets/deliveries/pt/return-from-global.mdx';
import PaymentMin from '/snippets/payments/pt/payment.min.mdx';
import Payment from '/snippets/payments/pt/payment.mdx';
import CashVATReceiptMin from '/snippets/payments/pt/cash-vat.min.mdx';
import CashVATReceipt from '/snippets/payments/pt/cash-vat.mdx';

<AccordionGroup>
<Accordion title="AT B2B invoice">
Expand All @@ -33,6 +37,22 @@ import Payment from '/snippets/payments/pt/payment.mdx';
</CodeGroup>
</Accordion>

<Accordion title="AT Cash VAT invoice">

In this example, we're issuing a standard invoice from a Portuguese supplier that has adhered to the **Cash VAT scheme** (_regime de IVA de Caixa_), under which VAT becomes due only when the customer actually pays rather than when the invoice is issued.

Notice:

- the only difference from the standard AT B2B invoice above is the `cash-vat` tag (`$tags: ["cash-vat"]`), which flags the supplier's membership in the scheme,
- the [`pt-saft-v1`](https://docs.gobl.org/addons/pt-saft-v1) addon reacts to that tag by setting the [`pt-saft-cash-vat`](https://docs.gobl.org/addons/pt-saft-v1#cash-vat-scheme-indicator) extension to `1` in the invoice's `tax` section, and,
- the document is otherwise a normal `standard` invoice: the [`pt-saft-invoice-type`](https://docs.gobl.org/addons/pt-saft-v1#invoice-type) extension is still set to `FT` (Fatura) and the standard VAT rate still maps to the [`pt-saft-tax-rate`](https://docs.gobl.org/addons/pt-saft-v1#tax-rate-code) extension `NOR`.
Comment thread
cavalle marked this conversation as resolved.

<CodeGroup>
<ATCashVATInvoiceMin />
<ATCashVATInvoice />
</CodeGroup>
</Accordion>

<Accordion title="AT delivery note">

In this example, we're issuing a delivery note from a Portuguese supplier to another Portuguese receiver.
Expand Down Expand Up @@ -137,4 +157,22 @@ import Payment from '/snippets/payments/pt/payment.mdx';
<Payment />
</CodeGroup>
</Accordion>

<Accordion title="AT Cash VAT receipt">

In this example, we're issuing a payment receipt for a supplier under the **Cash VAT scheme** (_regime de IVA de Caixa_). For these suppliers, the receipt is the document that actually triggers the VAT becoming due, so the AT distinguishes it from an ordinary receipt.

Notice:

- the document carries the `cash-vat` tag (`$tags: ["cash-vat"]`), exactly as the Cash VAT invoice does,
- on a `receipt`, that tag drives the [`pt-saft-payment-type`](https://docs.gobl.org/addons/pt-saft-v1#payment-type) extension to `RC` (_Recibo no âmbito do regime de IVA de Caixa_) instead of the default `RG` (_Outro Recibo_) you'd get on the ordinary AT payment receipt above,
- the `series` follows the `RC ` prefix convention and must be registered through the Supplier Portal,
- the payment line references the original invoice being settled, carrying its VAT breakdown so the AT can match the now-due tax to the issued invoice, and,
- as with any receipt, the [`pt-saft-payment-means`](https://docs.gobl.org/addons/pt-saft-v1#payment-means) extension is auto-assigned per method (`TB` for the bank transfer) and the [`pt-saft-source`](https://docs.gobl.org/addons/pt-saft-v1#document-source) extension is set to `P`.

<CodeGroup>
<CashVATReceiptMin />
<CashVATReceipt />
</CodeGroup>
</Accordion>
</AccordionGroup>
126 changes: 126 additions & 0 deletions snippets/invoices/pt/at-cash-vat.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
```json Built version
{
"$schema": "https://gobl.org/draft-0/bill/invoice",
"$regime": "PT",
"$addons": [
"pt-saft-v1"
],
"$tags": [
"cash-vat"
],
"type": "standard",
"series": "FT SERIES-A",
"issue_date": "2024-12-23",
"value_date": "2024-12-23",
"currency": "EUR",
"tax": {
"ext": {
"pt-saft-cash-vat": "1",
"pt-saft-invoice-type": "FT",
"pt-saft-source": "P"
}
},
"supplier": {
"name": "Innovatech Lda",
"tax_id": {
"country": "PT",
"code": "504614240"
},
"addresses": [
{
"num": "156",
"street": "Avenida da República",
"locality": "Lisboa",
"code": "1050-045",
"country": "PT"
}
],
"emails": [
{
"addr": "maria@example.com"
}
],
"registration": {
"capital": "150000.00",
"office": "CRC Lisboa",
"other": "sob NIF 770013813"
}
Comment thread
cavalle marked this conversation as resolved.
},
"customer": {
"name": "Gusto Unipessoal Lda",
"tax_id": {
"country": "PT",
"code": "514329874"
},
"addresses": [
{
"street": "Avenida da Liberdade 152 2º Direito",
"locality": "Lisboa",
"code": "1250-146",
"country": "PT"
}
],
"emails": [
{
"addr": "gusto@example.com"
}
]
},
"lines": [
{
"i": 1,
"quantity": "20.0",
"item": {
"name": "Development services",
"price": "50.00",
"unit": "h",
"ext": {
"pt-saft-product-type": "S"
}
},
"sum": "1000.00",
"taxes": [
{
"cat": "VAT",
"key": "standard",
"rate": "general",
"percent": "23.0%",
"ext": {
"pt-region": "PT",
"pt-saft-tax-rate": "NOR"
}
}
],
"total": "1000.00"
}
],
"totals": {
"sum": "1000.00",
"total": "1000.00",
"taxes": {
"categories": [
{
"code": "VAT",
"rates": [
{
"key": "standard",
"ext": {
"pt-region": "PT",
"pt-saft-tax-rate": "NOR"
},
"base": "1000.00",
"percent": "23.0%",
"amount": "230.00"
}
],
"amount": "230.00"
}
],
"sum": "230.00"
},
"tax": "230.00",
"total_with_tax": "1230.00",
"payable": "1230.00"
}
}
```
78 changes: 78 additions & 0 deletions snippets/invoices/pt/at-cash-vat.min.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
```json AT Cash VAT invoice (minimal)
Comment thread
cavalle marked this conversation as resolved.
{
"$schema": "https://gobl.org/draft-0/bill/invoice",
"$regime": "PT",
"$addons": [
"pt-saft-v1"
],
"$tags": [
"cash-vat"
],
"type": "standard",
"series": "FT SERIES-A",
"issue_date": "2024-12-23",
"currency": "EUR",
"supplier": {
"name": "Innovatech Lda",
"tax_id": {
"country": "PT",
"code": "504614240"
},
"addresses": [
{
"num": "156",
"street": "Avenida da República",
"locality": "Lisboa",
"code": "1050-045",
"country": "PT"
}
],
"emails": [
{
"addr": "maria@example.com"
}
],
"registration": {
"capital": "150000.00",
"office": "CRC Lisboa",
"other": "sob NIF 770013813"
}
Comment thread
cavalle marked this conversation as resolved.
},
"customer": {
"name": "Gusto Unipessoal Lda",
"tax_id": {
"country": "PT",
"code": "514329874"
},
"addresses": [
{
"street": "Avenida da Liberdade 152 2º Direito",
"locality": "Lisboa",
"code": "1250-146",
"country": "PT"
}
],
"emails": [
{
"addr": "gusto@example.com"
}
]
},
"lines": [
{
"quantity": "20.0",
"item": {
"name": "Development services",
"price": "50.00",
"unit": "h"
},
"taxes": [
{
"cat": "VAT",
"rate": "standard"
}
]
}
]
}
```
98 changes: 98 additions & 0 deletions snippets/payments/pt/cash-vat.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
```json Built version
{
"$schema": "https://gobl.org/draft-0/bill/payment",
"$regime": "PT",
"$addons": [
"pt-saft-v1"
],
"$tags": [
"cash-vat"
],
"type": "receipt",
"series": "RC SERIES-A",
"issue_date": "2024-12-23",
"currency": "EUR",
"ext": {
"pt-saft-payment-type": "RC",
"pt-saft-source": "P"
},
"supplier": {
"name": "Innovatech Lda",
"tax_id": {
"country": "PT",
"code": "770013813"
},
"addresses": [
{
"street": "Rua das Flores 200 3º Esquerdo",
"locality": "Porto",
"code": "4050-265",
"country": "PT"
}
],
"registration": {
"capital": "100000.00",
"office": "Porto"
}
},
"customer": {
"name": "Gusto Unipessoal Lda",
"tax_id": {
"country": "PT",
"code": "514329874"
},
"addresses": [
{
"street": "Avenida da Liberdade 152 2º Direito",
"locality": "Lisboa",
"code": "1250-146",
"country": "PT"
}
]
},
"lines": [
{
"i": 1,
"document": {
"issue_date": "2024-12-23",
"series": "FT SERIES-A",
"code": "1",
"description": "Invoice 1"
},
"amount": "61.50",
"tax": {
"categories": [
{
"code": "VAT",
"rates": [
{
"key": "standard",
"ext": {
"pt-region": "PT",
"pt-saft-tax-rate": "NOR"
},
"base": "50.00",
"percent": "23.0%",
"amount": "11.50"
}
],
"amount": "11.50"
}
],
"sum": "11.50"
}
}
],
"methods": [
{
"key": "credit-transfer",
"description": "Bank transfer",
"amount": "61.50",
"ext": {
"pt-saft-payment-means": "TB"
}
}
],
"total": "61.50"
}
```
Loading