diff --git a/addons/br-nfe-v4.mdx b/addons/br-nfe-v4.mdx index 199899c..48e1c96 100644 --- a/addons/br-nfe-v4.mdx +++ b/addons/br-nfe-v4.mdx @@ -419,15 +419,23 @@ according to the RTM (applies to IBS/CBS only). | `series` | | `GOBL-BR-NFE-BILL-INVOICE-24`
Invoice series format is invalid; must be 0 or 1-999 | | `tax` | | `GOBL-BR-NFE-BILL-INVOICE-25`
Invoice tax is required | | `tax.ext` | | `GOBL-BR-NFE-BILL-INVOICE-26`
Invoice tax requires 'br-nfe-model', 'br-nfe-presence', 'br-nfe-purpose' and 'br-nfe-operation-type' extensions | +| `tax.ext` | | `GOBL-BR-NFE-BILL-INVOICE-44`
'br-nfe-model' extension, when set, must be a valid code | +| `tax.ext` | | `GOBL-BR-NFE-BILL-INVOICE-45`
'br-nfe-presence' extension, when set, must be a valid code | +| `tax.ext` | | `GOBL-BR-NFE-BILL-INVOICE-46`
'br-nfe-purpose' extension, when set, must be a valid code | +| `tax.ext` | | `GOBL-BR-NFE-BILL-INVOICE-47`
'br-nfe-operation-type' extension, when set, must be a valid code | | `tax.ext` | | `GOBL-BR-NFE-BILL-INVOICE-27`
NF-e invoices do not support '4' for 'br-nfe-presence' | | `tax.ext` | | `GOBL-BR-NFE-BILL-INVOICE-28`
NFC-e invoices require in-person or delivery for 'br-nfe-presence' | | `tax.ext` | | `GOBL-BR-NFE-BILL-INVOICE-40`
Credit note invoices require 'br-nfe-credit-note-type' extension | +| `tax.ext` | | `GOBL-BR-NFE-BILL-INVOICE-48`
'br-nfe-credit-note-type' extension, when set, must be a valid code | | `tax.ext` | | `GOBL-BR-NFE-BILL-INVOICE-41`
Debit note invoices require 'br-nfe-debit-note-type' extension | +| `tax.ext` | | `GOBL-BR-NFE-BILL-INVOICE-49`
'br-nfe-debit-note-type' extension, when set, must be a valid code | | `notes[*].text` | | `GOBL-BR-NFE-BILL-INVOICE-29`
Invoice reason note text must be between 1 and 60 characters | | `payment` | | `GOBL-BR-NFE-BILL-INVOICE-31`
Invoice payment is required when invoice is unpaid | | `payment.instructions` | | `GOBL-BR-NFE-BILL-INVOICE-32`
Invoice payment instructions are required when invoice is unpaid | | `totals.due`
Calculated | | `GOBL-BR-NFE-BILL-INVOICE-33`
Invoice due amount must not be negative | -| `lines[*].ext` | | `GOBL-BR-NFE-BILL-INVOICE-35`
NF-e invoice lines require 'br-nfe-cfop' extension | +| `lines[*].ext` | | `GOBL-BR-NFE-BILL-INVOICE-35`
Invoice lines require 'br-nfe-cfop' extension | +| `lines[*].taxes[*].ext` | | `GOBL-BR-NFE-BILL-INVOICE-42`
Only Simples Nacional issuers can use 'br-nfe-icms-csosn'; others must use 'br-nfe-icms-cst' | +| `lines[*].taxes[*].ext` | | `GOBL-BR-NFE-BILL-INVOICE-43`
Simples Nacional issuers (regime 1 or 4) must use 'br-nfe-icms-csosn'; 'br-nfe-icms-cst' is only allowed for fuel codes 02, 15, 53 and 61 | @@ -443,19 +451,46 @@ according to the RTM (applies to IBS/CBS only). | ----- | ---- | ------------------------- | | `ext` | | `GOBL-BR-NFE-TAX-COMBO-01`
ICMS tax combo requires 'br-nfe-icms-cst' or 'br-nfe-icms-csosn' extension | | `ext` | | `GOBL-BR-NFE-TAX-COMBO-02`
ICMS tax combo requires 'br-nfe-icms-origin' extension | +| `ext` | | `GOBL-BR-NFE-TAX-COMBO-05`
ICMS tax combo cannot include both 'br-nfe-icms-cst' and 'br-nfe-icms-csosn' extensions | +| `ext` | | `GOBL-BR-NFE-TAX-COMBO-10`
'br-nfe-icms-cst' extension, when set, must be a valid code | +| `ext` | | `GOBL-BR-NFE-TAX-COMBO-11`
'br-nfe-icms-csosn' extension, when set, must be a valid code | +| `ext` | | `GOBL-BR-NFE-TAX-COMBO-12`
'br-nfe-icms-origin' extension, when set, must be a valid code | +| `percent`
Calculated | | `GOBL-BR-NFE-TAX-COMBO-06`
ICMS percent must be zero for CSOSN codes 102, 103, 202, 203, 300, 400 and 500: they carry no ICMS value | +| `percent`
Calculated | | `GOBL-BR-NFE-TAX-COMBO-07`
ICMS percent must be zero for CST codes 40, 41, 50 and 60: they carry no ICMS value | | `ext` | | `GOBL-BR-NFE-TAX-COMBO-03`
PIS tax combo requires 'br-nfe-pis-cst' extension | +| `ext` | | `GOBL-BR-NFE-TAX-COMBO-13`
'br-nfe-pis-cst' extension, when set, must be a valid code | +| `percent`
Calculated | | `GOBL-BR-NFE-TAX-COMBO-08`
PIS percent must be zero for CST codes 04 to 09: they carry no PIS value | | `ext` | | `GOBL-BR-NFE-TAX-COMBO-04`
COFINS tax combo requires 'br-nfe-cofins-cst' extension | +| `ext` | | `GOBL-BR-NFE-TAX-COMBO-14`
'br-nfe-cofins-cst' extension, when set, must be a valid code | +| `percent`
Calculated | | `GOBL-BR-NFE-TAX-COMBO-09`
COFINS percent must be zero for CST codes 04 to 09: they carry no COFINS value | +
+ + +| Field | Test | Validation Code / Message | +| ----- | ---- | ------------------------- | +| `code` | | `GOBL-BR-NFE-ORG-IDENTITY-01`
CEST identity code must be a 7-digit number | +| `code` | | `GOBL-BR-NFE-ORG-IDENTITY-02`
NCM identity code must be an 8-digit number (or 2 digits in exceptional cases), without separators | +
+ + +| Field | Test | Validation Code / Message | +| ----- | ---- | ------------------------- | +| `ext` | | `GOBL-BR-NFE-ORG-PARTY-01`
'br-nfe-regime' extension, when set, must be a valid code | +| `ext` | | `GOBL-BR-NFE-ORG-PARTY-02`
'br-nfe-fiscal-incentive' extension, when set, must be a valid code | +| `ext` | | `GOBL-BR-NFE-ORG-PARTY-03`
'br-nfe-special-regime' extension, when set, must be a valid code |
| Field | Test | Validation Code / Message | | ----- | ---- | ------------------------- | | `ext` | | `GOBL-BR-NFE-PAY-INSTRUCTIONS-01`
Payment instructions require 'br-nfe-payment-means' extension | +| `ext` | | `GOBL-BR-NFE-PAY-INSTRUCTIONS-02`
'br-nfe-payment-means' extension, when set, must be a valid code |
| Field | Test | Validation Code / Message | | ----- | ---- | ------------------------- | | `ext` | | `GOBL-BR-NFE-PAY-RECORD-01`
Payment advance requires 'br-nfe-payment-means' extension | +| `ext` | | `GOBL-BR-NFE-PAY-RECORD-02`
'br-nfe-payment-means' extension, when set, must be a valid code |
\ No newline at end of file diff --git a/addons/pt-saft-v1.mdx b/addons/pt-saft-v1.mdx index 7631837..e60b95e 100644 --- a/addons/pt-saft-v1.mdx +++ b/addons/pt-saft-v1.mdx @@ -712,10 +712,14 @@ Example: | Delivery | | `GOBL-PT-SAFT-BILL-DELIVERY-03`
Delivery code format must be valid | | `supplier.tax_id` | | `GOBL-PT-SAFT-BILL-DELIVERY-04`
Delivery supplier tax ID is required | | `supplier.tax_id.code` | | `GOBL-PT-SAFT-BILL-DELIVERY-05`
Delivery supplier tax ID code is required | +| `supplier.addresses[*].code` | | `GOBL-PT-SAFT-BILL-DELIVERY-10`
Delivery supplier post code must be in the 'NNNN-NNN' format | | `despatch_date` | | `GOBL-PT-SAFT-BILL-DELIVERY-06`
Delivery despatch date is required | | `preceding` | | `GOBL-PT-SAFT-BILL-DELIVERY-07`
Delivery preceding must have at most one entry | | `preceding[*].series` | | `GOBL-PT-SAFT-BILL-DELIVERY-08`
Delivery preceding series is required | | `preceding[*].code` | | `GOBL-PT-SAFT-BILL-DELIVERY-09`
Delivery preceding code is required | +| `customer.addresses[*].code` | | `GOBL-PT-SAFT-BILL-DELIVERY-11`
Delivery customer post code must be in the 'NNNN-NNN' format | +| `despatcher.addresses[*].code` | | `GOBL-PT-SAFT-BILL-DELIVERY-12`
Delivery despatcher post code must be in the 'NNNN-NNN' format | +| `receiver.addresses[*].code` | | `GOBL-PT-SAFT-BILL-DELIVERY-13`
Delivery receiver post code must be in the 'NNNN-NNN' format | diff --git a/go.mod b/go.mod index 8ad8cde..af8a297 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.25.0 require ( github.com/invopop/gobl v0.503.0 - github.com/invopop/gobl.dev v0.500.12 + github.com/invopop/gobl.dev v0.500.14 github.com/wk8/go-ordered-map/v2 v2.1.8 ) @@ -17,11 +17,11 @@ require ( github.com/expr-lang/expr v1.17.8 // indirect github.com/go-jose/go-jose/v4 v4.1.4 // indirect github.com/google/uuid v1.6.0 // indirect - github.com/invopop/gobl.br.nfe v0.0.1 // indirect + github.com/invopop/gobl.br.nfe v0.0.3 // indirect github.com/invopop/gobl.br.nfse v0.0.1 // indirect github.com/invopop/gobl.fr.ctc v0.0.7 // indirect github.com/invopop/gobl.mx.cfdi v0.63.0 // indirect - github.com/invopop/gobl.pt.saft v0.0.5 // indirect + github.com/invopop/gobl.pt.saft v0.0.6 // indirect github.com/invopop/gobl.sa.zatca v0.0.3 // indirect github.com/invopop/jsonschema v0.14.0 // indirect github.com/invopop/yaml v0.3.1 // indirect diff --git a/go.sum b/go.sum index a340e66..0ce53c9 100644 --- a/go.sum +++ b/go.sum @@ -22,18 +22,18 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/invopop/gobl v0.503.0 h1:i15dqw6OlHdEWZzCgvM7MquMKKzBq7K8VMF8MQUJhGo= github.com/invopop/gobl v0.503.0/go.mod h1:HmiEdQreTSQYyNbhs81VKTmI7BAJKYC/6enh9RDwnE0= -github.com/invopop/gobl.br.nfe v0.0.1 h1:ywJycz2wiyeNygbRhuRJg52gTnIECsbZ5+pGFqh3eyE= -github.com/invopop/gobl.br.nfe v0.0.1/go.mod h1:ZIJSVz5257xciD+RkBhyvqjtS46Pgw23idTca6A8ZIk= +github.com/invopop/gobl.br.nfe v0.0.3 h1:NPeJdiaI8/L3X3VtAocaWOVA3jaQBHz6Bheq9RKdWVs= +github.com/invopop/gobl.br.nfe v0.0.3/go.mod h1:qXzt4bz9S4+nJRbREb9QEAoO1W9r3Sjy6R207W7IuhY= github.com/invopop/gobl.br.nfse v0.0.1 h1:BdwNiG7vk7bPMgE4m102P+UysOxmYWhOKIDfFI6RKEA= github.com/invopop/gobl.br.nfse v0.0.1/go.mod h1:m22voo72ZScRiwIS49wXhzGRahzBO+IEAN0M0Kij3QI= -github.com/invopop/gobl.dev v0.500.12 h1:bva5jXrVOe986VrZhXHmLqBzPjncLwmOz+25OJ565Qs= -github.com/invopop/gobl.dev v0.500.12/go.mod h1:9LjzQPE8ZJqedAmsjY0M+W54uK+Yo622p3MkLIUMnck= +github.com/invopop/gobl.dev v0.500.14 h1:43mQ4begUXjGJ0QRc3wcv8SktanQVjtSvSZbly+lj4o= +github.com/invopop/gobl.dev v0.500.14/go.mod h1:go4xlgOSO+5Cm6D0Sf5+LO/7iV3+k3Y/DFHqVBGmB1s= github.com/invopop/gobl.fr.ctc v0.0.7 h1:O/ihT1EcFA7o8FuYG7EbL6LMVJ/rQrWV/C1nY5ryieo= github.com/invopop/gobl.fr.ctc v0.0.7/go.mod h1:YXJ0G7lCWxUehI4C2xBPL1y6rTNC29t/kOul7wY+3Xs= github.com/invopop/gobl.mx.cfdi v0.63.0 h1:WkwsFCfMZfrG3N8ZHV+7NZ9VlCkYh4vRSUdqvrtEyHA= github.com/invopop/gobl.mx.cfdi v0.63.0/go.mod h1:sXy7JIXauSKRqT0HgHsFICIV9YXuSHK3Quq9uZWZ9L0= -github.com/invopop/gobl.pt.saft v0.0.5 h1:Hc2Sbd280fDgPi9FznI/Xi95lAMzG8A4YEp6SW4H6uY= -github.com/invopop/gobl.pt.saft v0.0.5/go.mod h1:z5L+dLFBx6PmEdacnFWehYWgiYZSM2HaPzx6ld+DnQs= +github.com/invopop/gobl.pt.saft v0.0.6 h1:K0pcFMq/Q5ojPJqdmRsYJKkzWcKWeyh9pPC5BkPUE14= +github.com/invopop/gobl.pt.saft v0.0.6/go.mod h1:z5L+dLFBx6PmEdacnFWehYWgiYZSM2HaPzx6ld+DnQs= github.com/invopop/gobl.sa.zatca v0.0.3 h1:eHG8KBndLF75iBXNKr65q91ANQ7fuqCgYoOccWDvjhw= github.com/invopop/gobl.sa.zatca v0.0.3/go.mod h1:tmLCoaKb4X7sZ2zRU8LalA1sgxM2kQv/uqMzZslhE6A= github.com/invopop/jsonschema v0.14.0 h1:MHQqLhvpNUZfw+hM3AZDYK7jxO8FZoQeQM77g8iyZjg=