diff --git a/context.go b/context.go index c9c7dd71..c38243aa 100644 --- a/context.go +++ b/context.go @@ -6,6 +6,7 @@ import ( "github.com/invopop/gobl/addons/de/xrechnung" "github.com/invopop/gobl/addons/eu/en16931" "github.com/invopop/gobl/addons/fr/facturx" + peppolpint "github.com/invopop/gobl/addons/peppol/pint" "github.com/invopop/gobl/bill" "github.com/invopop/gobl/cbc" ) @@ -224,6 +225,28 @@ var ContextZATCA = Context{ }, } +// ContextPeppolPINT defines the default Peppol PINT context. +var ContextPeppolPINT = Context{ + CustomizationID: "urn:peppol:pint:billing-1@aunz-1", + ProfileID: "urn:peppol:bis:billing", + Addons: []cbc.Key{peppolpint.V1}, + VESIDs: VESIDMapping{ + Invoice: "org.peppol.pint.aunz:invoice:1.1.2", + CreditNote: "org.peppol.pint.aunz:creditnote:1.1.2", + }, +} + +// ContextPeppolPINTSelfBilled defines the Peppol PINT self-billed context. +var ContextPeppolPINTSelfBilled = Context{ + CustomizationID: "urn:peppol:pint:selfbilling-1@aunz-1", + ProfileID: "urn:peppol:bis:selfbilling", + Addons: []cbc.Key{peppolpint.V1}, + VESIDs: VESIDMapping{ + Invoice: "org.peppol.pint.aunz:invoice-self-billing:1.1.2", + CreditNote: "org.peppol.pint.aunz:creditnote-self-billing:1.1.2", + }, +} + // contexts is used internally for reverse lookups during parsing. // When adding new contexts, remember to add them here AND as exported variables above. -var contexts = []Context{ContextEN16931, ContextPeppol, ContextPeppolSelfBilled, ContextXRechnung, ContextPeppolFranceCIUS, ContextPeppolFranceExtended, ContextZATCA} +var contexts = []Context{ContextEN16931, ContextPeppol, ContextPeppolSelfBilled, ContextXRechnung, ContextPeppolFranceCIUS, ContextPeppolFranceExtended, ContextZATCA, ContextPeppolPINT, ContextPeppolPINTSelfBilled} diff --git a/examples_test.go b/examples_test.go index 9fd453dc..79a3a69a 100644 --- a/examples_test.go +++ b/examples_test.go @@ -62,6 +62,7 @@ func TestConvertToInvoice(t *testing.T) { {"FranceCIUS", ubl.ContextPeppolFranceCIUS, "france-cius"}, {"FranceExtended", ubl.ContextPeppolFranceExtended, "france-extended"}, {"ZATCA", ubl.ContextZATCA, "zatca"}, + {"PeppolPINT", ubl.ContextPeppolPINT, "peppol-pint"}, } for _, ctx := range contexts { diff --git a/go.mod b/go.mod index 74695b1c..49c8d46d 100644 --- a/go.mod +++ b/go.mod @@ -1,9 +1,9 @@ module github.com/invopop/gobl.ubl -go 1.24.4 +go 1.25.0 require ( - github.com/invopop/gobl v0.500.0 + github.com/invopop/gobl v0.501.1-0.20260718154801-1358939b249e github.com/joho/godotenv v1.5.1 github.com/spf13/cobra v1.9.1 github.com/stretchr/testify v1.11.1 @@ -42,10 +42,10 @@ require ( github.com/russellhaering/goxmldsig v1.6.0 // indirect github.com/spf13/pflag v1.0.6 // indirect go.yaml.in/yaml/v4 v4.0.0-rc.2 // indirect - golang.org/x/crypto v0.47.0 // indirect - golang.org/x/net v0.48.0 // indirect - golang.org/x/sys v0.40.0 // indirect - golang.org/x/text v0.34.0 // indirect + golang.org/x/crypto v0.53.0 // indirect + golang.org/x/net v0.56.0 // indirect + golang.org/x/sys v0.46.0 // indirect + golang.org/x/text v0.38.0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20251202230838-ff82c1b0f217 // indirect google.golang.org/protobuf v1.36.10 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index caa17118..3c4d2469 100644 --- a/go.sum +++ b/go.sum @@ -33,8 +33,8 @@ 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/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/invopop/gobl v0.500.0 h1:Ob3uO8wCywDkzJFpKI8zsUY/pL0sYsFobZlfRAZjd44= -github.com/invopop/gobl v0.500.0/go.mod h1:EGDHHuPbF8JxRfct0q/s9t7ei2gjkOwjH3SytjB3aS0= +github.com/invopop/gobl v0.501.1-0.20260718154801-1358939b249e h1:qURZvnhB6x5KGsE0PJ/61+e4ypUAirsNRQUAxqaQDqU= +github.com/invopop/gobl v0.501.1-0.20260718154801-1358939b249e/go.mod h1:HmiEdQreTSQYyNbhs81VKTmI7BAJKYC/6enh9RDwnE0= github.com/invopop/gobl.fr.ctc v0.0.4 h1:x4eJ3hp9Y9lTCzWFhNqZYm9kCXyuC34EytOuaU03faE= github.com/invopop/gobl.fr.ctc v0.0.4/go.mod h1:YXJ0G7lCWxUehI4C2xBPL1y6rTNC29t/kOul7wY+3Xs= github.com/invopop/gobl.sa.zatca v0.0.2 h1:qU2Y0LP+4mjvZkuG1TOUp/Zs0XxRAzkzQFHy3WOVFEU= @@ -106,14 +106,14 @@ go.opentelemetry.io/otel/trace v1.39.0 h1:2d2vfpEDmCJ5zVYz7ijaJdOF59xLomrvj7bjt6 go.opentelemetry.io/otel/trace v1.39.0/go.mod h1:88w4/PnZSazkGzz/w84VHpQafiU4EtqqlVdxWy+rNOA= go.yaml.in/yaml/v4 v4.0.0-rc.2 h1:/FrI8D64VSr4HtGIlUtlFMGsm7H7pWTbj6vOLVZcA6s= go.yaml.in/yaml/v4 v4.0.0-rc.2/go.mod h1:aZqd9kCMsGL7AuUv/m/PvWLdg5sjJsZ4oHDEnfPPfY0= -golang.org/x/crypto v0.47.0 h1:V6e3FRj+n4dbpw86FJ8Fv7XVOql7TEwpHapKoMJ/GO8= -golang.org/x/crypto v0.47.0/go.mod h1:ff3Y9VzzKbwSSEzWqJsJVBnWmRwRSHt/6Op5n9bQc4A= -golang.org/x/net v0.48.0 h1:zyQRTTrjc33Lhh0fBgT/H3oZq9WuvRR5gPC70xpDiQU= -golang.org/x/net v0.48.0/go.mod h1:+ndRgGjkh8FGtu1w1FGbEC31if4VrNVMuKTgcAAnQRY= -golang.org/x/sys v0.40.0 h1:DBZZqJ2Rkml6QMQsZywtnjnnGvHza6BTfYFWY9kjEWQ= -golang.org/x/sys v0.40.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= -golang.org/x/text v0.34.0 h1:oL/Qq0Kdaqxa1KbNeMKwQq0reLCCaFtqu2eNuSeNHbk= -golang.org/x/text v0.34.0/go.mod h1:homfLqTYRFyVYemLBFl5GgL/DWEiH5wcsQ5gSh1yziA= +golang.org/x/crypto v0.53.0 h1:QZ4Muo8THX6CizN2vPPd5fBGHyogrdK9fG4wLPFUsto= +golang.org/x/crypto v0.53.0/go.mod h1:DNLU434OwVakk9PzuwV8w62mAJpRJL3vsgcfp4Qnsio= +golang.org/x/net v0.56.0 h1:Rw8j/hFzGvJUZwNBXnAtf5sVDVt+65SK2C7IxCxZt5o= +golang.org/x/net v0.56.0/go.mod h1:D3Ku6r+V6JROoZK144D2XfMHFcMq/0zSfLelVTCFKec= +golang.org/x/sys v0.46.0 h1:noSf2Fq6F8DBgS+LysIkx7rIExoNHJsxOAtPp4rthXw= +golang.org/x/sys v0.46.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= +golang.org/x/text v0.38.0 h1:sXmwo9DwP3OK9EZ7PqAdaooSGozfl/3a6/xJcbzPRhE= +golang.org/x/text v0.38.0/go.mod h1:YXZt3QhHUKYT53r2lLKFIVi6Ao1jdzrTR/KQ09qyxF4= gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E= google.golang.org/genproto/googleapis/rpc v0.0.0-20251202230838-ff82c1b0f217 h1:gRkg/vSppuSQoDjxyiGfN4Upv/h/DQmIR10ZU8dh4Ww= diff --git a/party_parse_test.go b/party_parse_test.go index 4f91c071..eee82f93 100644 --- a/party_parse_test.go +++ b/party_parse_test.go @@ -22,7 +22,7 @@ func TestParseParty(t *testing.T) { supplier := inv.Supplier require.NotNil(t, supplier) assert.Equal(t, "Tax handling company AS", supplier.Name) - assert.Equal(t, cbc.Code("967611265"), supplier.TaxID.Code) + assert.Equal(t, cbc.Code("967611265MVA"), supplier.TaxID.Code) assert.Equal(t, l10n.TaxCountryCode("NO"), supplier.TaxID.Country) assert.Equal(t, "Regent street", supplier.Addresses[0].Street) assert.Equal(t, "Newtown", supplier.Addresses[0].Locality) @@ -34,7 +34,7 @@ func TestParseParty(t *testing.T) { seller := inv.Ordering.Seller require.NotNil(t, seller) assert.Equal(t, "Salescompany ltd.", seller.Name) - assert.Equal(t, cbc.Code("123456789"), seller.TaxID.Code) + assert.Equal(t, cbc.Code("123456789MVA"), seller.TaxID.Code) assert.Equal(t, l10n.TaxCountryCode("NO"), seller.TaxID.Country) require.Len(t, seller.Identities, 2) assert.Equal(t, cbc.Code("123456789"), seller.Identities[0].Code) @@ -58,7 +58,7 @@ func TestParseParty(t *testing.T) { customer := inv.Customer require.NotNil(t, customer) assert.Equal(t, "The Buyercompany", customer.Name) - assert.Equal(t, cbc.Code("987654321"), customer.TaxID.Code) + assert.Equal(t, cbc.Code("987654321MVA"), customer.TaxID.Code) assert.Equal(t, l10n.TaxCountryCode("NO"), customer.TaxID.Country) assert.Equal(t, "Anystreet 8", customer.Addresses[0].Street) assert.Equal(t, "Back door", customer.Addresses[0].StreetExtra) diff --git a/test/data/convert/peppol-pint/credit-note-au.json b/test/data/convert/peppol-pint/credit-note-au.json new file mode 100644 index 00000000..6ab31897 --- /dev/null +++ b/test/data/convert/peppol-pint/credit-note-au.json @@ -0,0 +1,181 @@ +{ + "$schema": "https://gobl.org/draft-0/envelope", + "head": { + "uuid": "0195ce71-dc9c-72c8-bf2c-9890a4a9f0a2", + "dig": { + "alg": "sha256", + "val": "a3b94d4cedfac8c9a6e773e6423fd505f475e36f554a9c296007a192899d3173" + }, + "from": "iso6523-actorid-upis::0151:51824753556", + "to": "iso6523-actorid-upis::0151:53004085616" + }, + "doc": { + "$schema": "https://gobl.org/draft-0/bill/invoice", + "$regime": "AU", + "$addons": [ + "eu-en16931-v2017" + ], + "uuid": "0195ce71-dc9c-72c8-bf2c-9890a4a9f0a2", + "type": "credit-note", + "series": "SAMPLE", + "code": "CN-001", + "issue_date": "2024-05-15", + "currency": "AUD", + "tax": { + "ext": { + "untdid-document-type": "381" + } + }, + "supplier": { + "name": "Provide One Pty Ltd", + "tax_id": { + "country": "AU", + "code": "51824753556" + }, + "identities": [ + { + "scope": "legal", + "code": "51824753556", + "ext": { + "iso-scheme-id": "0151" + } + } + ], + "endpoints": [ + { + "uri": "iso6523-actorid-upis::0151:51824753556" + } + ], + "inboxes": [ + { + "key": "peppol", + "scheme": "0151", + "code": "51824753556" + } + ], + "addresses": [ + { + "num": "100", + "street": "Queen Street", + "locality": "Melbourne", + "region": "VIC", + "code": "3000", + "country": "AU" + } + ] + }, + "customer": { + "name": "Sample Customer Pty Ltd", + "tax_id": { + "country": "AU", + "code": "53004085616" + }, + "identities": [ + { + "scope": "legal", + "code": "53004085616", + "ext": { + "iso-scheme-id": "0151" + } + } + ], + "endpoints": [ + { + "uri": "iso6523-actorid-upis::0151:53004085616" + } + ], + "inboxes": [ + { + "key": "peppol", + "scheme": "0151", + "code": "53004085616" + } + ], + "addresses": [ + { + "num": "1", + "street": "Martin Place", + "locality": "Sydney", + "region": "NSW", + "code": "2000", + "country": "AU" + } + ] + }, + "lines": [ + { + "i": 1, + "quantity": "10", + "item": { + "name": "Consulting services", + "price": "100.00", + "unit": "h" + }, + "sum": "1000.00", + "taxes": [ + { + "cat": "GST", + "key": "standard", + "rate": "general", + "percent": "10.0%", + "ext": { + "untdid-tax-category": "O" + } + } + ], + "total": "1000.00" + } + ], + "payment": { + "terms": { + "key": "due-date", + "due_dates": [ + { + "date": "2024-06-15", + "amount": "1100.00", + "percent": "100%" + } + ] + }, + "instructions": { + "key": "credit-transfer", + "credit_transfer": [ + { + "number": "123456789", + "name": "Provide One Pty Ltd" + } + ], + "ext": { + "untdid-payment-means": "30" + } + } + }, + "totals": { + "sum": "1000.00", + "total": "1000.00", + "taxes": { + "categories": [ + { + "code": "GST", + "rates": [ + { + "key": "standard", + "ext": { + "untdid-tax-category": "O" + }, + "base": "1000.00", + "percent": "10.0%", + "amount": "100.00" + } + ], + "amount": "100.00" + } + ], + "sum": "100.00" + }, + "tax": "100.00", + "total_with_tax": "1100.00", + "payable": "1100.00" + } + } +} \ No newline at end of file diff --git a/test/data/convert/peppol-pint/invoice-au-exempt.json b/test/data/convert/peppol-pint/invoice-au-exempt.json new file mode 100644 index 00000000..c03ee439 --- /dev/null +++ b/test/data/convert/peppol-pint/invoice-au-exempt.json @@ -0,0 +1,185 @@ +{ + "$schema": "https://gobl.org/draft-0/envelope", + "head": { + "uuid": "0195ce71-dc9c-72c8-bf2c-9890a4a9f0a2", + "dig": { + "alg": "sha256", + "val": "21869eea3ce44db61c316c42d97799ea229cdcaa828dcc1eb28ed5336b5586aa" + }, + "from": "iso6523-actorid-upis::0151:51824753556", + "to": "iso6523-actorid-upis::0151:53004085616" + }, + "doc": { + "$schema": "https://gobl.org/draft-0/bill/invoice", + "$regime": "AU", + "$addons": [ + "eu-en16931-v2017" + ], + "uuid": "0195ce71-dc9c-72c8-bf2c-9890a4a9f0a2", + "type": "standard", + "series": "SAMPLE", + "code": "E-001", + "issue_date": "2024-05-15", + "currency": "AUD", + "tax": { + "ext": { + "untdid-document-type": "380" + }, + "notes": [ + { + "cat": "GST", + "key": "exempt", + "text": "Input-taxed supply" + } + ] + }, + "supplier": { + "name": "Provide One Pty Ltd", + "tax_id": { + "country": "AU", + "code": "51824753556" + }, + "identities": [ + { + "scope": "legal", + "code": "51824753556", + "ext": { + "iso-scheme-id": "0151" + } + } + ], + "endpoints": [ + { + "uri": "iso6523-actorid-upis::0151:51824753556" + } + ], + "inboxes": [ + { + "key": "peppol", + "scheme": "0151", + "code": "51824753556" + } + ], + "addresses": [ + { + "num": "100", + "street": "Queen Street", + "locality": "Melbourne", + "region": "VIC", + "code": "3000", + "country": "AU" + } + ] + }, + "customer": { + "name": "Sample Customer Pty Ltd", + "tax_id": { + "country": "AU", + "code": "53004085616" + }, + "identities": [ + { + "scope": "legal", + "code": "53004085616", + "ext": { + "iso-scheme-id": "0151" + } + } + ], + "endpoints": [ + { + "uri": "iso6523-actorid-upis::0151:53004085616" + } + ], + "inboxes": [ + { + "key": "peppol", + "scheme": "0151", + "code": "53004085616" + } + ], + "addresses": [ + { + "num": "1", + "street": "Martin Place", + "locality": "Sydney", + "region": "NSW", + "code": "2000", + "country": "AU" + } + ] + }, + "lines": [ + { + "i": 1, + "quantity": "10", + "item": { + "name": "Consulting services", + "price": "100.00", + "unit": "h" + }, + "sum": "1000.00", + "taxes": [ + { + "cat": "GST", + "key": "exempt", + "ext": { + "untdid-tax-category": "O" + } + } + ], + "total": "1000.00" + } + ], + "payment": { + "terms": { + "key": "due-date", + "due_dates": [ + { + "date": "2024-06-15", + "amount": "1000.00", + "percent": "100%" + } + ] + }, + "instructions": { + "key": "credit-transfer", + "credit_transfer": [ + { + "number": "123456789", + "name": "Provide One Pty Ltd" + } + ], + "ext": { + "untdid-payment-means": "30" + } + } + }, + "totals": { + "sum": "1000.00", + "total": "1000.00", + "taxes": { + "categories": [ + { + "code": "GST", + "rates": [ + { + "key": "exempt", + "ext": { + "untdid-tax-category": "O" + }, + "base": "1000.00", + "amount": "0.00" + } + ], + "amount": "0.00" + } + ], + "sum": "0.00" + }, + "tax": "0.00", + "total_with_tax": "1000.00", + "payable": "1000.00" + } + } +} \ No newline at end of file diff --git a/test/data/convert/peppol-pint/invoice-au-mixed.json b/test/data/convert/peppol-pint/invoice-au-mixed.json new file mode 100644 index 00000000..a4a4f992 --- /dev/null +++ b/test/data/convert/peppol-pint/invoice-au-mixed.json @@ -0,0 +1,254 @@ +{ + "$schema": "https://gobl.org/draft-0/envelope", + "head": { + "uuid": "0195ce71-dc9c-72c8-bf2c-9890a4a9f0a2", + "dig": { + "alg": "sha256", + "val": "26b89c5b7d941026c8d207730e22f19b8c498846d9bfd7f0c7046a779e08b6dc" + }, + "from": "iso6523-actorid-upis::0151:51824753556", + "to": "iso6523-actorid-upis::0151:53004085616" + }, + "doc": { + "$schema": "https://gobl.org/draft-0/bill/invoice", + "$regime": "AU", + "$addons": [ + "eu-en16931-v2017" + ], + "uuid": "0195ce71-dc9c-72c8-bf2c-9890a4a9f0a2", + "type": "standard", + "series": "SAMPLE", + "code": "MIX-001", + "issue_date": "2024-05-15", + "currency": "AUD", + "tax": { + "ext": { + "untdid-document-type": "380" + } + }, + "supplier": { + "name": "Provide One Pty Ltd", + "tax_id": { + "country": "AU", + "code": "51824753556" + }, + "identities": [ + { + "scope": "legal", + "code": "51824753556", + "ext": { + "iso-scheme-id": "0151" + } + } + ], + "endpoints": [ + { + "uri": "iso6523-actorid-upis::0151:51824753556" + } + ], + "inboxes": [ + { + "key": "peppol", + "scheme": "0151", + "code": "51824753556" + } + ], + "addresses": [ + { + "num": "100", + "street": "Queen Street", + "locality": "Melbourne", + "region": "VIC", + "code": "3000", + "country": "AU" + } + ] + }, + "customer": { + "name": "Sample Customer Pty Ltd", + "tax_id": { + "country": "AU", + "code": "53004085616" + }, + "identities": [ + { + "scope": "legal", + "code": "53004085616", + "ext": { + "iso-scheme-id": "0151" + } + } + ], + "endpoints": [ + { + "uri": "iso6523-actorid-upis::0151:53004085616" + } + ], + "inboxes": [ + { + "key": "peppol", + "scheme": "0151", + "code": "53004085616" + } + ], + "addresses": [ + { + "num": "1", + "street": "Martin Place", + "locality": "Sydney", + "region": "NSW", + "code": "2000", + "country": "AU" + } + ] + }, + "lines": [ + { + "i": 1, + "quantity": "10", + "item": { + "name": "Consulting", + "price": "100.00", + "unit": "h" + }, + "sum": "1000.00", + "taxes": [ + { + "cat": "GST", + "key": "standard", + "percent": "10%", + "ext": { + "untdid-tax-category": "O" + } + } + ], + "total": "1000.00" + }, + { + "i": 2, + "quantity": "5", + "item": { + "name": "Exported goods", + "price": "50.00", + "unit": "one" + }, + "sum": "250.00", + "taxes": [ + { + "cat": "GST", + "key": "zero", + "percent": "0%", + "ext": { + "untdid-tax-category": "O" + } + } + ], + "total": "250.00" + } + ], + "discounts": [ + { + "i": 1, + "reason": "Loyalty discount", + "amount": "20.00", + "taxes": [ + { + "cat": "GST", + "key": "standard", + "percent": "10%", + "ext": { + "untdid-tax-category": "O" + } + } + ] + } + ], + "charges": [ + { + "i": 1, + "reason": "Freight", + "amount": "15.00", + "taxes": [ + { + "cat": "GST", + "key": "standard", + "percent": "10%", + "ext": { + "untdid-tax-category": "O" + } + } + ] + } + ], + "payment": { + "terms": { + "key": "due-date", + "due_dates": [ + { + "date": "2024-06-15", + "amount": "1344.50", + "percent": "100%" + } + ] + }, + "advances": [ + { + "description": "Deposit", + "amount": "50.00" + } + ], + "instructions": { + "key": "credit-transfer", + "credit_transfer": [ + { + "number": "123456789", + "name": "Provide One Pty Ltd" + } + ], + "ext": { + "untdid-payment-means": "30" + } + } + }, + "totals": { + "sum": "1250.00", + "discount": "20.00", + "charge": "15.00", + "total": "1245.00", + "taxes": { + "categories": [ + { + "code": "GST", + "rates": [ + { + "key": "standard", + "ext": { + "untdid-tax-category": "O" + }, + "base": "995.00", + "percent": "10%", + "amount": "99.50" + }, + { + "key": "zero", + "ext": { + "untdid-tax-category": "O" + }, + "base": "250.00", + "percent": "0%", + "amount": "0.00" + } + ], + "amount": "99.50" + } + ], + "sum": "99.50" + }, + "tax": "99.50", + "total_with_tax": "1344.50", + "payable": "1344.50", + "advance": "50.00", + "due": "1294.50" + } + } +} \ No newline at end of file diff --git a/test/data/convert/peppol-pint/invoice-au-outside-scope.json b/test/data/convert/peppol-pint/invoice-au-outside-scope.json new file mode 100644 index 00000000..6833112b --- /dev/null +++ b/test/data/convert/peppol-pint/invoice-au-outside-scope.json @@ -0,0 +1,178 @@ +{ + "$schema": "https://gobl.org/draft-0/envelope", + "head": { + "uuid": "0195ce71-dc9c-72c8-bf2c-9890a4a9f0a2", + "dig": { + "alg": "sha256", + "val": "aec1667933055b8bdf7ab5f8e5e73f6071b47ceeba1979120e922d7127c57f14" + }, + "from": "iso6523-actorid-upis::0151:51824753556", + "to": "iso6523-actorid-upis::0151:53004085616" + }, + "doc": { + "$schema": "https://gobl.org/draft-0/bill/invoice", + "$regime": "AU", + "$addons": [ + "eu-en16931-v2017" + ], + "uuid": "0195ce71-dc9c-72c8-bf2c-9890a4a9f0a2", + "type": "standard", + "series": "SAMPLE", + "code": "O-001", + "issue_date": "2024-05-15", + "currency": "AUD", + "tax": { + "ext": { + "untdid-document-type": "380" + } + }, + "supplier": { + "name": "Provide One Pty Ltd", + "tax_id": { + "country": "AU", + "code": "51824753556" + }, + "identities": [ + { + "scope": "legal", + "code": "51824753556", + "ext": { + "iso-scheme-id": "0151" + } + } + ], + "endpoints": [ + { + "uri": "iso6523-actorid-upis::0151:51824753556" + } + ], + "inboxes": [ + { + "key": "peppol", + "scheme": "0151", + "code": "51824753556" + } + ], + "addresses": [ + { + "num": "100", + "street": "Queen Street", + "locality": "Melbourne", + "region": "VIC", + "code": "3000", + "country": "AU" + } + ] + }, + "customer": { + "name": "Sample Customer Pty Ltd", + "tax_id": { + "country": "AU", + "code": "53004085616" + }, + "identities": [ + { + "scope": "legal", + "code": "53004085616", + "ext": { + "iso-scheme-id": "0151" + } + } + ], + "endpoints": [ + { + "uri": "iso6523-actorid-upis::0151:53004085616" + } + ], + "inboxes": [ + { + "key": "peppol", + "scheme": "0151", + "code": "53004085616" + } + ], + "addresses": [ + { + "num": "1", + "street": "Martin Place", + "locality": "Sydney", + "region": "NSW", + "code": "2000", + "country": "AU" + } + ] + }, + "lines": [ + { + "i": 1, + "quantity": "10", + "item": { + "name": "Consulting services", + "price": "100.00", + "unit": "h" + }, + "sum": "1000.00", + "taxes": [ + { + "cat": "GST", + "key": "outside-scope", + "ext": { + "untdid-tax-category": "O" + } + } + ], + "total": "1000.00" + } + ], + "payment": { + "terms": { + "key": "due-date", + "due_dates": [ + { + "date": "2024-06-15", + "amount": "1000.00", + "percent": "100%" + } + ] + }, + "instructions": { + "key": "credit-transfer", + "credit_transfer": [ + { + "number": "123456789", + "name": "Provide One Pty Ltd" + } + ], + "ext": { + "untdid-payment-means": "30" + } + } + }, + "totals": { + "sum": "1000.00", + "total": "1000.00", + "taxes": { + "categories": [ + { + "code": "GST", + "rates": [ + { + "key": "outside-scope", + "ext": { + "untdid-tax-category": "O" + }, + "base": "1000.00", + "amount": "0.00" + } + ], + "amount": "0.00" + } + ], + "sum": "0.00" + }, + "tax": "0.00", + "total_with_tax": "1000.00", + "payable": "1000.00" + } + } +} \ No newline at end of file diff --git a/test/data/convert/peppol-pint/invoice-au-zero-rated.json b/test/data/convert/peppol-pint/invoice-au-zero-rated.json new file mode 100644 index 00000000..8a3f5bb2 --- /dev/null +++ b/test/data/convert/peppol-pint/invoice-au-zero-rated.json @@ -0,0 +1,180 @@ +{ + "$schema": "https://gobl.org/draft-0/envelope", + "head": { + "uuid": "0195ce71-dc9c-72c8-bf2c-9890a4a9f0a2", + "dig": { + "alg": "sha256", + "val": "3ce10bbae9bdf1c5a99a04d57e52dd764b40e0060729c49e85961ad845da0cc5" + }, + "from": "iso6523-actorid-upis::0151:51824753556", + "to": "iso6523-actorid-upis::0151:53004085616" + }, + "doc": { + "$schema": "https://gobl.org/draft-0/bill/invoice", + "$regime": "AU", + "$addons": [ + "eu-en16931-v2017" + ], + "uuid": "0195ce71-dc9c-72c8-bf2c-9890a4a9f0a2", + "type": "standard", + "series": "SAMPLE", + "code": "Z-001", + "issue_date": "2024-05-15", + "currency": "AUD", + "tax": { + "ext": { + "untdid-document-type": "380" + } + }, + "supplier": { + "name": "Provide One Pty Ltd", + "tax_id": { + "country": "AU", + "code": "51824753556" + }, + "identities": [ + { + "scope": "legal", + "code": "51824753556", + "ext": { + "iso-scheme-id": "0151" + } + } + ], + "endpoints": [ + { + "uri": "iso6523-actorid-upis::0151:51824753556" + } + ], + "inboxes": [ + { + "key": "peppol", + "scheme": "0151", + "code": "51824753556" + } + ], + "addresses": [ + { + "num": "100", + "street": "Queen Street", + "locality": "Melbourne", + "region": "VIC", + "code": "3000", + "country": "AU" + } + ] + }, + "customer": { + "name": "Sample Customer Pty Ltd", + "tax_id": { + "country": "AU", + "code": "53004085616" + }, + "identities": [ + { + "scope": "legal", + "code": "53004085616", + "ext": { + "iso-scheme-id": "0151" + } + } + ], + "endpoints": [ + { + "uri": "iso6523-actorid-upis::0151:53004085616" + } + ], + "inboxes": [ + { + "key": "peppol", + "scheme": "0151", + "code": "53004085616" + } + ], + "addresses": [ + { + "num": "1", + "street": "Martin Place", + "locality": "Sydney", + "region": "NSW", + "code": "2000", + "country": "AU" + } + ] + }, + "lines": [ + { + "i": 1, + "quantity": "10", + "item": { + "name": "Consulting services", + "price": "100.00", + "unit": "h" + }, + "sum": "1000.00", + "taxes": [ + { + "cat": "GST", + "key": "zero", + "percent": "0%", + "ext": { + "untdid-tax-category": "O" + } + } + ], + "total": "1000.00" + } + ], + "payment": { + "terms": { + "key": "due-date", + "due_dates": [ + { + "date": "2024-06-15", + "amount": "1000.00", + "percent": "100%" + } + ] + }, + "instructions": { + "key": "credit-transfer", + "credit_transfer": [ + { + "number": "123456789", + "name": "Provide One Pty Ltd" + } + ], + "ext": { + "untdid-payment-means": "30" + } + } + }, + "totals": { + "sum": "1000.00", + "total": "1000.00", + "taxes": { + "categories": [ + { + "code": "GST", + "rates": [ + { + "key": "zero", + "ext": { + "untdid-tax-category": "O" + }, + "base": "1000.00", + "percent": "0%", + "amount": "0.00" + } + ], + "amount": "0.00" + } + ], + "sum": "0.00" + }, + "tax": "0.00", + "total_with_tax": "1000.00", + "payable": "1000.00" + } + } +} \ No newline at end of file diff --git a/test/data/convert/peppol-pint/invoice-au.json b/test/data/convert/peppol-pint/invoice-au.json new file mode 100644 index 00000000..05702b2e --- /dev/null +++ b/test/data/convert/peppol-pint/invoice-au.json @@ -0,0 +1,181 @@ +{ + "$schema": "https://gobl.org/draft-0/envelope", + "head": { + "uuid": "0195ce71-dc9c-72c8-bf2c-9890a4a9f0a2", + "dig": { + "alg": "sha256", + "val": "4221042f0c68f73323ebe04202eea94bc015284968cbb6a2f9b8b0a785c06f56" + }, + "from": "iso6523-actorid-upis::0151:51824753556", + "to": "iso6523-actorid-upis::0151:53004085616" + }, + "doc": { + "$schema": "https://gobl.org/draft-0/bill/invoice", + "$regime": "AU", + "$addons": [ + "eu-en16931-v2017" + ], + "uuid": "0195ce71-dc9c-72c8-bf2c-9890a4a9f0a2", + "type": "standard", + "series": "SAMPLE", + "code": "001", + "issue_date": "2024-05-15", + "currency": "AUD", + "tax": { + "ext": { + "untdid-document-type": "380" + } + }, + "supplier": { + "name": "Provide One Pty Ltd", + "tax_id": { + "country": "AU", + "code": "51824753556" + }, + "identities": [ + { + "scope": "legal", + "code": "51824753556", + "ext": { + "iso-scheme-id": "0151" + } + } + ], + "endpoints": [ + { + "uri": "iso6523-actorid-upis::0151:51824753556" + } + ], + "inboxes": [ + { + "key": "peppol", + "scheme": "0151", + "code": "51824753556" + } + ], + "addresses": [ + { + "num": "100", + "street": "Queen Street", + "locality": "Melbourne", + "region": "VIC", + "code": "3000", + "country": "AU" + } + ] + }, + "customer": { + "name": "Sample Customer Pty Ltd", + "tax_id": { + "country": "AU", + "code": "53004085616" + }, + "identities": [ + { + "scope": "legal", + "code": "53004085616", + "ext": { + "iso-scheme-id": "0151" + } + } + ], + "endpoints": [ + { + "uri": "iso6523-actorid-upis::0151:53004085616" + } + ], + "inboxes": [ + { + "key": "peppol", + "scheme": "0151", + "code": "53004085616" + } + ], + "addresses": [ + { + "num": "1", + "street": "Martin Place", + "locality": "Sydney", + "region": "NSW", + "code": "2000", + "country": "AU" + } + ] + }, + "lines": [ + { + "i": 1, + "quantity": "10", + "item": { + "name": "Consulting services", + "price": "100.00", + "unit": "h" + }, + "sum": "1000.00", + "taxes": [ + { + "cat": "GST", + "key": "standard", + "rate": "general", + "percent": "10.0%", + "ext": { + "untdid-tax-category": "O" + } + } + ], + "total": "1000.00" + } + ], + "payment": { + "terms": { + "key": "due-date", + "due_dates": [ + { + "date": "2024-06-15", + "amount": "1100.00", + "percent": "100%" + } + ] + }, + "instructions": { + "key": "credit-transfer", + "credit_transfer": [ + { + "number": "123456789", + "name": "Provide One Pty Ltd" + } + ], + "ext": { + "untdid-payment-means": "30" + } + } + }, + "totals": { + "sum": "1000.00", + "total": "1000.00", + "taxes": { + "categories": [ + { + "code": "GST", + "rates": [ + { + "key": "standard", + "ext": { + "untdid-tax-category": "O" + }, + "base": "1000.00", + "percent": "10.0%", + "amount": "100.00" + } + ], + "amount": "100.00" + } + ], + "sum": "100.00" + }, + "tax": "100.00", + "total_with_tax": "1100.00", + "payable": "1100.00" + } + } +} \ No newline at end of file diff --git a/test/data/convert/peppol-pint/invoice-nz.json b/test/data/convert/peppol-pint/invoice-nz.json new file mode 100644 index 00000000..b5c7a260 --- /dev/null +++ b/test/data/convert/peppol-pint/invoice-nz.json @@ -0,0 +1,179 @@ +{ + "$schema": "https://gobl.org/draft-0/envelope", + "head": { + "uuid": "0195ce71-dc9c-72c8-bf2c-9890a4a9f0a2", + "dig": { + "alg": "sha256", + "val": "393af12a127f63a3ba37b212419c309156ef2973889eeecb4c254dce0b7bfa00" + }, + "from": "iso6523-actorid-upis::0088:9429000000008", + "to": "iso6523-actorid-upis::0088:9429000000015" + }, + "doc": { + "$schema": "https://gobl.org/draft-0/bill/invoice", + "$regime": "NZ", + "$addons": [ + "eu-en16931-v2017" + ], + "uuid": "0195ce71-dc9c-72c8-bf2c-9890a4a9f0a2", + "type": "standard", + "series": "SAMPLE", + "code": "001", + "issue_date": "2024-05-15", + "currency": "NZD", + "tax": { + "ext": { + "untdid-document-type": "380" + } + }, + "supplier": { + "name": "Provide One Limited", + "tax_id": { + "country": "NZ", + "code": "49091850" + }, + "identities": [ + { + "scope": "legal", + "code": "9429000000000", + "ext": { + "iso-scheme-id": "0088" + } + } + ], + "endpoints": [ + { + "uri": "iso6523-actorid-upis::0088:9429000000000" + } + ], + "inboxes": [ + { + "key": "peppol", + "scheme": "0088", + "code": "9429000000000" + } + ], + "addresses": [ + { + "num": "1", + "street": "Queen Street", + "locality": "Auckland", + "code": "1010", + "country": "NZ" + } + ] + }, + "customer": { + "name": "Sample Customer Limited", + "tax_id": { + "country": "NZ", + "code": "136410132" + }, + "identities": [ + { + "scope": "legal", + "code": "9429000000017", + "ext": { + "iso-scheme-id": "0088" + } + } + ], + "endpoints": [ + { + "uri": "iso6523-actorid-upis::0088:9429000000017" + } + ], + "inboxes": [ + { + "key": "peppol", + "scheme": "0088", + "code": "9429000000017" + } + ], + "addresses": [ + { + "num": "10", + "street": "Lambton Quay", + "locality": "Wellington", + "code": "6011", + "country": "NZ" + } + ] + }, + "lines": [ + { + "i": 1, + "quantity": "10", + "item": { + "name": "Consulting services", + "price": "100.00", + "unit": "h" + }, + "sum": "1000.00", + "taxes": [ + { + "cat": "GST", + "key": "standard", + "rate": "general", + "percent": "15.0%", + "ext": { + "untdid-tax-category": "O" + } + } + ], + "total": "1000.00" + } + ], + "payment": { + "terms": { + "key": "due-date", + "due_dates": [ + { + "date": "2024-06-15", + "amount": "1150.00", + "percent": "100%" + } + ] + }, + "instructions": { + "key": "credit-transfer", + "credit_transfer": [ + { + "number": "0100000000000", + "name": "Provide One Limited" + } + ], + "ext": { + "untdid-payment-means": "30" + } + } + }, + "totals": { + "sum": "1000.00", + "total": "1000.00", + "taxes": { + "categories": [ + { + "code": "GST", + "rates": [ + { + "key": "standard", + "ext": { + "untdid-tax-category": "O" + }, + "base": "1000.00", + "percent": "15.0%", + "amount": "150.00" + } + ], + "amount": "150.00" + } + ], + "sum": "150.00" + }, + "tax": "150.00", + "total_with_tax": "1150.00", + "payable": "1150.00" + } + } +} \ No newline at end of file diff --git a/test/data/convert/peppol-pint/out/credit-note-au.xml b/test/data/convert/peppol-pint/out/credit-note-au.xml new file mode 100644 index 00000000..ec26f8fa --- /dev/null +++ b/test/data/convert/peppol-pint/out/credit-note-au.xml @@ -0,0 +1,112 @@ + + + urn:peppol:pint:billing-1@aunz-1 + urn:peppol:bis:billing + SAMPLE-CN-001 + 2024-05-15 + 381 + AUD + + NA + + + + 51824753556 + + Provide One Pty Ltd + + + Queen Street 100 + Melbourne + 3000 + VIC + + AU + + + + AU51824753556 + + GST + + + + Provide One Pty Ltd + 51824753556 + + + + + + 53004085616 + + Sample Customer Pty Ltd + + + Martin Place 1 + Sydney + 2000 + NSW + + AU + + + + AU53004085616 + + GST + + + + Sample Customer Pty Ltd + 53004085616 + + + + + 30 + 2024-06-15 + + 123456789 + Provide One Pty Ltd + + + + 100.00 + + 1000.00 + 100.00 + + S + 10.0 + + GST + + + + + + 1000.00 + 1000.00 + 1100.00 + 1100.00 + + + 1 + 10 + 1000.00 + + Consulting services + + S + 10.0 + + GST + + + + + 100.00 + + + \ No newline at end of file diff --git a/test/data/convert/peppol-pint/out/invoice-au-exempt.xml b/test/data/convert/peppol-pint/out/invoice-au-exempt.xml new file mode 100644 index 00000000..bfd10f3e --- /dev/null +++ b/test/data/convert/peppol-pint/out/invoice-au-exempt.xml @@ -0,0 +1,112 @@ + + + urn:peppol:pint:billing-1@aunz-1 + urn:peppol:bis:billing + SAMPLE-E-001 + 2024-05-15 + 2024-06-15 + 380 + AUD + + NA + + + + 51824753556 + + Provide One Pty Ltd + + + Queen Street 100 + Melbourne + 3000 + VIC + + AU + + + + AU51824753556 + + GST + + + + Provide One Pty Ltd + 51824753556 + + + + + + 53004085616 + + Sample Customer Pty Ltd + + + Martin Place 1 + Sydney + 2000 + NSW + + AU + + + + AU53004085616 + + GST + + + + Sample Customer Pty Ltd + 53004085616 + + + + + 30 + + 123456789 + Provide One Pty Ltd + + + + 0.00 + + 1000.00 + 0.00 + + E + 0 + + GST + + + + + + 1000.00 + 1000.00 + 1000.00 + 1000.00 + + + 1 + 10 + 1000.00 + + Consulting services + + E + 0 + + GST + + + + + 100.00 + + + \ No newline at end of file diff --git a/test/data/convert/peppol-pint/out/invoice-au-mixed.xml b/test/data/convert/peppol-pint/out/invoice-au-mixed.xml new file mode 100644 index 00000000..bf444d4c --- /dev/null +++ b/test/data/convert/peppol-pint/out/invoice-au-mixed.xml @@ -0,0 +1,168 @@ + + + urn:peppol:pint:billing-1@aunz-1 + urn:peppol:bis:billing + SAMPLE-MIX-001 + 2024-05-15 + 2024-06-15 + 380 + AUD + + NA + + + + 51824753556 + + Provide One Pty Ltd + + + Queen Street 100 + Melbourne + 3000 + VIC + + AU + + + + AU51824753556 + + GST + + + + Provide One Pty Ltd + 51824753556 + + + + + + 53004085616 + + Sample Customer Pty Ltd + + + Martin Place 1 + Sydney + 2000 + NSW + + AU + + + + AU53004085616 + + GST + + + + Sample Customer Pty Ltd + 53004085616 + + + + + 30 + + 123456789 + Provide One Pty Ltd + + + + true + Freight + 15.00 + + S + 10 + + GST + + + + + false + Loyalty discount + 20.00 + + S + 10 + + GST + + + + + 99.50 + + 995.00 + 99.50 + + S + 10 + + GST + + + + + 250.00 + 0.00 + + Z + 0 + + GST + + + + + + 1250.00 + 1245.00 + 1344.50 + 20.00 + 15.00 + 50.00 + 1294.50 + + + 1 + 10 + 1000.00 + + Consulting + + S + 10 + + GST + + + + + 100.00 + + + + 2 + 5 + 250.00 + + Exported goods + + Z + 0 + + GST + + + + + 50.00 + + + \ No newline at end of file diff --git a/test/data/convert/peppol-pint/out/invoice-au-outside-scope.xml b/test/data/convert/peppol-pint/out/invoice-au-outside-scope.xml new file mode 100644 index 00000000..74477930 --- /dev/null +++ b/test/data/convert/peppol-pint/out/invoice-au-outside-scope.xml @@ -0,0 +1,110 @@ + + + urn:peppol:pint:billing-1@aunz-1 + urn:peppol:bis:billing + SAMPLE-O-001 + 2024-05-15 + 2024-06-15 + 380 + AUD + + NA + + + + 51824753556 + + Provide One Pty Ltd + + + Queen Street 100 + Melbourne + 3000 + VIC + + AU + + + + AU51824753556 + + GST + + + + Provide One Pty Ltd + 51824753556 + + + + + + 53004085616 + + Sample Customer Pty Ltd + + + Martin Place 1 + Sydney + 2000 + NSW + + AU + + + + AU53004085616 + + GST + + + + Sample Customer Pty Ltd + 53004085616 + + + + + 30 + + 123456789 + Provide One Pty Ltd + + + + 0.00 + + 1000.00 + 0.00 + + O + + GST + + + + + + 1000.00 + 1000.00 + 1000.00 + 1000.00 + + + 1 + 10 + 1000.00 + + Consulting services + + O + + GST + + + + + 100.00 + + + \ No newline at end of file diff --git a/test/data/convert/peppol-pint/out/invoice-au-zero-rated.xml b/test/data/convert/peppol-pint/out/invoice-au-zero-rated.xml new file mode 100644 index 00000000..5730ac45 --- /dev/null +++ b/test/data/convert/peppol-pint/out/invoice-au-zero-rated.xml @@ -0,0 +1,112 @@ + + + urn:peppol:pint:billing-1@aunz-1 + urn:peppol:bis:billing + SAMPLE-Z-001 + 2024-05-15 + 2024-06-15 + 380 + AUD + + NA + + + + 51824753556 + + Provide One Pty Ltd + + + Queen Street 100 + Melbourne + 3000 + VIC + + AU + + + + AU51824753556 + + GST + + + + Provide One Pty Ltd + 51824753556 + + + + + + 53004085616 + + Sample Customer Pty Ltd + + + Martin Place 1 + Sydney + 2000 + NSW + + AU + + + + AU53004085616 + + GST + + + + Sample Customer Pty Ltd + 53004085616 + + + + + 30 + + 123456789 + Provide One Pty Ltd + + + + 0.00 + + 1000.00 + 0.00 + + Z + 0 + + GST + + + + + + 1000.00 + 1000.00 + 1000.00 + 1000.00 + + + 1 + 10 + 1000.00 + + Consulting services + + Z + 0 + + GST + + + + + 100.00 + + + \ No newline at end of file diff --git a/test/data/convert/peppol-pint/out/invoice-au.xml b/test/data/convert/peppol-pint/out/invoice-au.xml new file mode 100644 index 00000000..9e341bf9 --- /dev/null +++ b/test/data/convert/peppol-pint/out/invoice-au.xml @@ -0,0 +1,112 @@ + + + urn:peppol:pint:billing-1@aunz-1 + urn:peppol:bis:billing + SAMPLE-001 + 2024-05-15 + 2024-06-15 + 380 + AUD + + NA + + + + 51824753556 + + Provide One Pty Ltd + + + Queen Street 100 + Melbourne + 3000 + VIC + + AU + + + + AU51824753556 + + GST + + + + Provide One Pty Ltd + 51824753556 + + + + + + 53004085616 + + Sample Customer Pty Ltd + + + Martin Place 1 + Sydney + 2000 + NSW + + AU + + + + AU53004085616 + + GST + + + + Sample Customer Pty Ltd + 53004085616 + + + + + 30 + + 123456789 + Provide One Pty Ltd + + + + 100.00 + + 1000.00 + 100.00 + + S + 10.0 + + GST + + + + + + 1000.00 + 1000.00 + 1100.00 + 1100.00 + + + 1 + 10 + 1000.00 + + Consulting services + + S + 10.0 + + GST + + + + + 100.00 + + + \ No newline at end of file diff --git a/test/data/convert/peppol-pint/out/invoice-nz.xml b/test/data/convert/peppol-pint/out/invoice-nz.xml new file mode 100644 index 00000000..17cfe2df --- /dev/null +++ b/test/data/convert/peppol-pint/out/invoice-nz.xml @@ -0,0 +1,110 @@ + + + urn:peppol:pint:billing-1@aunz-1 + urn:peppol:bis:billing + SAMPLE-001 + 2024-05-15 + 2024-06-15 + 380 + NZD + + NA + + + + 9429000000000 + + Provide One Limited + + + Queen Street 1 + Auckland + 1010 + + NZ + + + + NZ49091850 + + GST + + + + Provide One Limited + 9429000000000 + + + + + + 9429000000017 + + Sample Customer Limited + + + Lambton Quay 10 + Wellington + 6011 + + NZ + + + + NZ136410132 + + GST + + + + Sample Customer Limited + 9429000000017 + + + + + 30 + + 0100000000000 + Provide One Limited + + + + 150.00 + + 1000.00 + 150.00 + + S + 15.0 + + GST + + + + + + 1000.00 + 1000.00 + 1150.00 + 1150.00 + + + 1 + 10 + 1000.00 + + Consulting services + + S + 15.0 + + GST + + + + + 100.00 + + + \ No newline at end of file diff --git a/test/data/parse/en16931/out/ubl-example2.json b/test/data/parse/en16931/out/ubl-example2.json index a600cc81..ca54d197 100644 --- a/test/data/parse/en16931/out/ubl-example2.json +++ b/test/data/parse/en16931/out/ubl-example2.json @@ -4,7 +4,7 @@ "uuid": "0195ce71-dc9c-72c8-bf2c-9890a4a9f0a2", "dig": { "alg": "sha256", - "val": "a8111d5b3ddd689bc88e3f018cb0f6c8c5f49664e87bb811210071359e7134d8" + "val": "282d97abc8a84964422902cedce112870524853712a3f3aae77eeddf1998d769" } }, "doc": { @@ -39,7 +39,7 @@ "name": "Tax handling company AS", "tax_id": { "country": "NO", - "code": "967611265" + "code": "967611265MVA" }, "addresses": [ { @@ -56,7 +56,7 @@ "name": "The Buyercompany", "tax_id": { "country": "NO", - "code": "987654321" + "code": "987654321MVA" }, "identities": [ { @@ -378,7 +378,7 @@ "name": "Salescompany ltd.", "tax_id": { "country": "NO", - "code": "123456789" + "code": "123456789MVA" }, "identities": [ {