Skip to content

Commit

Permalink
improving documentation and examples for IT an MX
Browse files Browse the repository at this point in the history
  • Loading branch information
juanmoliner committed Oct 7, 2024
1 parent 1a8eaba commit 0039bd1
Show file tree
Hide file tree
Showing 3 changed files with 129 additions and 10 deletions.
2 changes: 1 addition & 1 deletion regimes/it/examples/flat-rate.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
{
"key": "exempt",
"ext": {
"it-sdi-nature": "N2.1"
"it-sdi-nature": "N2.2"
},
"base": "125.00",
"amount": "0.00"
Expand Down
21 changes: 12 additions & 9 deletions regimes/mx/README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
# 🇲🇽 GOBL Mexico Tax Regime

Mexico uses the CFDI (Comprobante Fiscal Digital por Internet) format for their e-invoicing system.
Mexico uses the CFDI (Comprobante Fiscal Digital por Internet) format for e-invoicing.

Example MX GOBL files can be found in the [`examples`](./examples) (YAML uncalculated documents) and [`examples/out`](./examples/out) (JSON calculated envelopes) subdirectories.
Find example MX GOBL files in the [`examples`](./examples) (YAML uncalculated documents) and [`examples/out`](./examples/out) (JSON calculated envelopes) subdirectories.

## Public Documentation

- [Formato de factura (Anexo 20)](http://omawww.sat.gob.mx/tramitesyservicios/Paginas/anexo_20.htm)
- [Invoice Format (Anexo 20)](http://omawww.sat.gob.mx/tramitesyservicios/Paginas/anexo_20.htm)
- [CFDI 4.0 Filling Guide](http://omawww.sat.gob.mx/tramitesyservicios/Paginas/documentos/Anexo_20_Guia_de_llenado_CFDI.pdf)
- [Global CFDI 4.0 Filling Guide](http://omawww.sat.gob.mx/tramitesyservicios/Paginas/documentos/GuiallenadoCFDIglobal311221.pdf)

## Mexico specifics
## Mexico-specific Requirements

Mexican invoices as defined in the CFDI specification must include a set of specific codes that will either need to be known in advance by the supplier or requested from the customer during their purchase process.
Mexican invoices require specific codes as defined in the CFDI specification. Suppliers need to know these in advance or request them from customers during purchase.

The following sections highlight these codes and how they can be defined inside your GOBL documents.
Here's how to include these codes in your GOBL documents:

### `LugarExpedicion` - Issue Place
### Issue Place (`LugarExpedicion`)

Every MX invoice needs to specify the postal code of place where it was issued. In a GOBL Invoice, you can provide this value using the `mx-cfdi-issue-place` extension under the `tax` of the invoice.
Specify the postal code where the invoice was issued using the `mx-cfdi-issue-place` extension under the `tax` field of the invoice.

#### Example

Expand Down Expand Up @@ -316,7 +318,7 @@ The following GOBL maps to the `10101602` ("live ducks") value to the `ClaveProd
}
```

### Generic RFCs
### Generic RFCs (B2C sales)

In MX, CFDI invoices to end consumers need to use a generic RFC code (`XAXX010101000`) in the document's `Receptor` and some specific values for the supplier extensions. In GOBL, you don't need to enter those values explicitly. Just set the `simplified` tax tag in your invoice and exclude the customer, the GOBL to CFDI conversor will take care of the rest:

Expand All @@ -336,6 +338,7 @@ In MX, CFDI invoices to end consumers need to use a generic RFC code (`XAXX01010

}
```
Sellers can issue one simplified invoice for every B2C sale or aggregate all daily transactions into a single invoice to _the general public_ ("al público en general"). The rules on how to issue global B2C invoices are available in the [public documentation](http://omawww.sat.gob.mx/tramitesyservicios/Paginas/documentos/GuiallenadoCFDIglobal311221.pdf).

Similarly, CFDI invoices to foreign customers are required to use the foreign generic RFC (`XEXX010101000`) along with some specific values for the extensions. The country and the local tax code of the supplier are included in separated CFDI fields. And again, in GOBL, you just need to provide the actual country and tax code of the supplier (without extensions), and the GOBL to CFDI conversor will take care of producing the correct document:

Expand Down
116 changes: 116 additions & 0 deletions regimes/mx/examples/out/simplified-invoice.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
{
"$schema": "https://gobl.org/draft-0/envelope",
"head": {
"uuid": "8a51fd30-2a27-11ee-be56-0242ac120002",
"dig": {
"alg": "sha256",
"val": "a05c95940f0b46b4db0e091487a802454be50513ada6c6ba12ab252c29e942f7"
},
"draft": true
},
"doc": {
"$schema": "https://gobl.org/draft-0/bill/invoice",
"type": "standard",
"series": "TEST",
"code": "00001",
"issue_date": "2023-07-10",
"currency": "MXN",
"tax": {
"tags": [
"simplified"
]
},
"supplier": {
"name": "ESCUELA KEMPER URGATE",
"tax_id": {
"country": "MX",
"zone": "21000",
"code": "EKU9003173C9"
},
"ext": {
"mx-cfdi-fiscal-regime": "601"
}
},
"lines": [
{
"i": 1,
"quantity": "1",
"item": {
"name": "Cobro por tarjetas",
"price": "10.00",
"ext": {
"mx-cfdi-prod-serv": "84141602"
}
},
"sum": "10.00",
"discounts": [
{
"percent": "10.0%",
"amount": "1.00"
}
],
"taxes": [
{
"cat": "VAT",
"rate": "standard",
"percent": "16.0%"
}
],
"total": "9.00"
},
{
"i": 2,
"quantity": "1",
"item": {
"name": "Porcentaje sobre GMV",
"price": "10.00",
"unit": "service",
"ext": {
"mx-cfdi-prod-serv": "80141628"
}
},
"sum": "10.00",
"taxes": [
{
"cat": "VAT",
"rate": "standard",
"percent": "16.0%"
}
],
"total": "10.00"
}
],
"payment": {
"terms": {
"notes": "Condiciones de pago"
},
"instructions": {
"key": "online+wallet"
}
},
"totals": {
"sum": "19.00",
"total": "19.00",
"taxes": {
"categories": [
{
"code": "VAT",
"rates": [
{
"key": "standard",
"base": "19.00",
"percent": "16.0%",
"amount": "3.04"
}
],
"amount": "3.04"
}
],
"sum": "3.04"
},
"tax": "3.04",
"total_with_tax": "22.04",
"payable": "22.04"
}
}
}

0 comments on commit 0039bd1

Please sign in to comment.