Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial German National Ruleset XRechnung #127

Merged
merged 96 commits into from
Sep 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
d5cfc19
Test
phax Jul 14, 2023
fbf565d
added de rules and first test file
lkumai Jul 14, 2023
274f5de
added two rules two structure
lkumai Jul 16, 2023
409640a
added de-r-002
lkumai Jul 17, 2023
992394d
fixed wrong id
lkumai Jul 17, 2023
5ce678b
fixed wrong customizationid
lkumai Jul 17, 2023
0f763d3
wip fixed validation errors
lkumai Jul 17, 2023
410d1cd
fixed wrong namespace
lkumai Jul 17, 2023
11822d8
test de-r-001 fixed. test de-r-003 added
lkumai Jul 17, 2023
fbdf06c
wip: more tests added
lkumai Jul 17, 2023
29f9a42
fixed test
lkumai Jul 17, 2023
f9e0757
wip removed email
lkumai Jul 17, 2023
2dae8ac
removed email address
lkumai Jul 17, 2023
d171e06
added updated german ruleset
lkumai Jul 17, 2023
62e0213
added rule description
lkumai Jul 17, 2023
ea92289
unit test de-r-014 added
lkumai Jul 17, 2023
50d13fd
remove whitespace
bdewein Jul 18, 2023
376ab4e
add DE-R-015
bdewein Jul 18, 2023
7ea9aae
add DE-R-017 UBL Inv
bdewein Jul 18, 2023
58ea682
add DE-R-018 UBL Inv
bdewein Jul 18, 2023
d0d0d24
add DE-R-019
bdewein Jul 18, 2023
a53ebbb
add DE-R-020 UBL Inv
bdewein Jul 18, 2023
d659309
add DE-R-022 UBL Inv
bdewein Jul 18, 2023
a157696
fix typo
bdewein Jul 18, 2023
f50d3f6
add DE-R-023-1 and DE-R-23-2
bdewein Jul 18, 2023
f7bd609
set error to warning in DE-R-017, DE-R-019, DE-R-20
bdewein Jul 18, 2023
8565ed0
add DE-R-024-1 and DE-R-024-2
bdewein Jul 18, 2023
3e009b4
add DE-R-025-1 and DE-R-025-2 UBL Inv
bdewein Jul 18, 2023
d22ef7a
add DE-R-26 UBL Inv
bdewein Jul 18, 2023
72ad7a3
fix customization id
bdewein Jul 18, 2023
32c6845
add DE-R-027 UBL Inv
bdewein Jul 18, 2023
9af8441
add DE-R-028 UBL Inv
bdewein Jul 18, 2023
556b3d8
add DE-R-030 UBL Inv
bdewein Jul 18, 2023
558a3b8
add DE-R-31 UBL Inv
bdewein Jul 18, 2023
150bb6a
add de-r-014 to structure
lkumai Jul 20, 2023
3f5a017
added rules to structure
lkumai Jul 20, 2023
1bf99a7
added de-r-001 to structure
lkumai Jul 20, 2023
06f456f
fixed type
lkumai Jul 20, 2023
6def475
moved de-r-001 in structures
lkumai Jul 20, 2023
8f85a28
minor fix
lkumai Jul 20, 2023
7915df8
replaced test bg-16
lkumai Jul 20, 2023
ffced00
removed mutator command
lkumai Jul 20, 2023
c09c13f
fixed test
lkumai Jul 20, 2023
5415031
corrected test file
lkumai Jul 20, 2023
61ec70f
added new de-r-016
lkumai Jul 20, 2023
5d0e453
fixed de-r-020
lkumai Jul 20, 2023
297a3be
removed test entry
lkumai Jul 20, 2023
5cfeebe
Delete build-and-deploy-barnch.yml
phax Jul 20, 2023
f77f079
Merge branch 'master' of https://github.com/itplr-kosit/peppol-bis-in…
lkumai Jul 20, 2023
eb16dc9
Update build-and-deploy-master.yml
phax Jul 20, 2023
bdff981
Create build2.sh
phax Jul 20, 2023
4deb14a
Update build2.sh
phax Jul 20, 2023
7a8d94a
Update UBL-IN_DE-R-001.xml
phax Jul 20, 2023
6215bd2
Update UBL-IN_DE-R-001.xml
phax Jul 20, 2023
458d0c6
Update UBL-IN_DE-R-001.xml
phax Jul 20, 2023
bc7b903
Update UBL-IN_DE-R-001.xml
phax Jul 20, 2023
31f88e0
edit description
lkumai Jul 21, 2023
16518f5
fixed address scheme
lkumai Jul 21, 2023
4616e62
add description
lkumai Jul 21, 2023
b75154d
reduced error assert to one per test
lkumai Jul 21, 2023
5a3cb7d
modified rules in structure
lkumai Jul 24, 2023
163a4e9
modify for only one rule per assert
lkumai Jul 24, 2023
aa94460
modifed test
lkumai Jul 24, 2023
1579a4f
fixed xml structure. replaced tests
lkumai Jul 24, 2023
a95c534
replaced tests
lkumai Jul 24, 2023
acd04f8
added test
lkumai Jul 24, 2023
9e34b0c
modified tests
lkumai Jul 24, 2023
6db9c8f
checked references
lkumai Jul 24, 2023
0f57199
wip replaced tests
lkumai Jul 24, 2023
72d7e71
corrected tests
lkumai Jul 24, 2023
30a124b
corrected test
lkumai Jul 24, 2023
0c538e1
corrected test
lkumai Jul 24, 2023
966d8f7
corrected test and referenced
lkumai Jul 24, 2023
eb133cd
Merge branch 'master' of https://github.com/itplr-kosit/peppol-bis-in…
lkumai Jul 24, 2023
a10157d
fixed wrong type code
lkumai Jul 24, 2023
589fab2
fixed wrong references
lkumai Jul 24, 2023
a135ce2
added second scope
lkumai Jul 24, 2023
d68dfcd
Merge branch 'master' of https://github.com/lkumai/peppol-bis-invoice-3
lkumai Jul 24, 2023
8dcf2bf
fixed test
lkumai Jul 24, 2023
c14e303
try fix
bdewein Jul 25, 2023
f90cc8d
set warning to error
bdewein Jul 25, 2023
20d8115
remove misplaced tag
bdewein Jul 25, 2023
d7d27b0
remove test assert description
bdewein Jul 25, 2023
366f784
reduce test file to relevant elements and add references
bdewein Jul 25, 2023
1845725
test no references
bdewein Jul 25, 2023
d368380
add references
bdewein Jul 25, 2023
c8f778f
test
bdewein Jul 25, 2023
36e7252
remove reference from creditnote
bdewein Jul 25, 2023
4b8a269
add reference
bdewein Jul 25, 2023
4a64b6c
update with XRechnung schematron version 2.0.0
bdewein Jul 25, 2023
13db8a5
various changes
bdewein Jul 25, 2023
a9842e3
Revert "Update build2.sh"
bdewein Aug 30, 2024
79f360a
Revert "Create build2.sh"
bdewein Aug 30, 2024
367248c
Revert "Update build-and-deploy-master.yml"
bdewein Aug 30, 2024
276d874
Revert "Delete build-and-deploy-barnch.yml"
bdewein Aug 30, 2024
966d84f
Revert "Test"
bdewein Aug 30, 2024
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
1 change: 1 addition & 0 deletions rules/buildconfig.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<testfolder>unit-UBL-NO</testfolder>
<testfolder>unit-UBL-IT</testfolder>
<testfolder>unit-UBL-DK</testfolder>
<testfolder>unit-UBL-DE</testfolder>
<testfolder>unit-UBL-SE</testfolder>
<testfolder>unit-UBL-GR</testfolder>

Expand Down
128 changes: 128 additions & 0 deletions rules/sch/PEPPOL-EN16931-UBL.sch
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,134 @@ Last update: 2023 May release 3.0.15.
<assert id="NL-R-009" test="exists(/*/cac:OrderReference/cbc:ID)" flag="fatal">[NL-R-009] For suppliers in the Netherlands, if an order line reference (cac:OrderLineReference/cbc:LineID) is used, there must be an order reference on the document level (cac:OrderReference/cbc:ID)</assert>
</rule>
</pattern>
<!-- German rules -->
<pattern id="german-rules">
<let name="supplierCountryIsDE"
value="(upper-case(normalize-space(/*/cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cac:Country/cbc:IdentificationCode)) = 'DE')"/>
<let name="customerCountryIsDE"
value="(upper-case(normalize-space(/*/cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cac:Country/cbc:IdentificationCode)) = 'DE')"/>
<let name="XR-SKONTO-REGEX"
value="'#(SKONTO)#TAGE=([0-9]+#PROZENT=[0-9]+\.[0-9]{2})(#BASISBETRAG=-?[0-9]+\.[0-9]{2})?#$'"/>
<let name="XR-EMAIL-REGEX"
value="'^[a-zA-Z0-9!#\$%&amp;&#34;*+/=?^_`{|}~-]+(\.[a-zA-Z0-9!#\$%&amp;&#34;*+/=?^_`{|}~-]+)*@([a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?$'"/>
<let name="XR-TELEPHONE-REGEX" value="'.*([0-9].*){3,}.*'"/>
<rule context="(/ubl-invoice:Invoice | /ubl-creditnote:CreditNote)[$supplierCountryIsDE and $customerCountryIsDE]">
<assert test="cac:PaymentMeans" flag="fatal" id="DE-R-001">An invoice shall contain information on "PAYMENT INSTRUCTIONS" (BG-16).</assert>
<assert test="cbc:BuyerReference[boolean(normalize-space(.))]"
flag="fatal"
id="DE-R-015">The element "Buyer reference" (BT-10) shall be provided.</assert>
<let name="supportedVATCodes"
value="('S', 'Z', 'E', 'AE', 'K', 'G', 'L', 'M')"/>
<let name="BT-31orBT-32Path"
value="cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID[boolean(normalize-space(.))]"/>
<let name="BT-95-UBL-Inv"
value="cac:AllowanceCharge/cac:TaxCategory/cbc:ID[ancestor::cac:AllowanceCharge/cbc:ChargeIndicator = 'false' and following-sibling::cac:TaxScheme/cbc:ID = 'VAT']"/>
<let name="BT-95-UBL-CN"
value="cac:AllowanceCharge/cac:TaxCategory/cbc:ID[ancestor::cac:AllowanceCharge/cbc:ChargeIndicator = 'false']"/>
<let name="BT-102"
value="cac:AllowanceCharge/cac:TaxCategory/cbc:ID[ancestor::cac:AllowanceCharge/cbc:ChargeIndicator = 'true']"/>
<let name="BT-151"
value="(cac:InvoiceLine | cac:CreditNoteLine)/cac:Item/cac:ClassifiedTaxCategory/cbc:ID"/>
<!-- If one of BT-95, BT-102, BT-151 is in List of supportedVATCodes then either BG-11=cac:TaxRepresentativeParty or $BT-31orBT-32Path has to exist -->
<assert test=" (not( ($BT-95-UBL-Inv = $supportedVATCodes or $BT-95-UBL-CN = $supportedVATCodes) or ($BT-102 = $supportedVATCodes) or ($BT-151 = $supportedVATCodes) ) or (cac:TaxRepresentativeParty, $BT-31orBT-32Path)) "
flag="fatal"
id="DE-R-016">If one of the VAT codes S, Z, E, AE, K, G, L, or M is used, an invoice shall contain at least one of the following elements: "Seller VAT identifier" (BT-31) or "Seller tax registration identifier" (BT-32) or "SELLER TAX REPRESENTATIVE PARTY" (BG-11).</assert>
<let name="supportedInvAndCNTypeCodes"
value="('326', '380', '384', '389', '381', '875', '876', '877')"/>
<assert test="cbc:InvoiceTypeCode = $supportedInvAndCNTypeCodes or cbc:CreditNoteTypeCode = $supportedInvAndCNTypeCodes"
flag="warning"
id="DE-R-017">The element "Invoice type code" (BT-3) should only contain the following values from code list UNTDID 1001: 326 (Partial invoice), 380 (Commercial invoice), 384 (Corrected invoice), 389 (Self-billed invoice), 381 (Credit note), 875 (Partial construction invoice), 876 (Partial final construction invoice), 877 (Final construction invoice).</assert>
<assert test="every $line in cac:PaymentTerms/cbc:Note[1]/tokenize(. , '(\r?\n)')[starts-with( normalize-space(.) , '#')] satisfies matches ( normalize-space ($line), $XR-SKONTO-REGEX) and matches( cac:PaymentTerms/cbc:Note[1]/tokenize(. , '#.+#')[last()], '^\s*\n' )"
flag="fatal"
id="DE-R-018">Information on cash discounts for prompt payment (Skonto) shall be provided within the element "Payment terms" BT-20 in the following way: First segment "SKONTO", second segment amount of days ("TAGE=N"), third segment percentage ("PROZENT=N"). Percentage must be separated by dot with two decimal places. In case the base value of the invoiced amount is not provided in BT-115 but as a partial amount, the base value shall be provided as fourth segment "BASISBETRAG=N" as semantic data type amount. Each entry shall start with a #, the segments must be separated by # and a row shall end with a #. A complete statement on cash discount for prompt payment shall end with a XML-conformant line break. All statements on cash discount for prompt payment shall be given in capital letters. Additional whitespaces (blanks, tabulators or line breaks) are not allowed. Other characters or texts than defined above are not allowed.</assert>
<assert test="count(cac:AdditionalDocumentReference) = count(cac:AdditionalDocumentReference[not(./cac:Attachment/cbc:EmbeddedDocumentBinaryObject/@filename = preceding-sibling::cac:AdditionalDocumentReference/cac:Attachment/cbc:EmbeddedDocumentBinaryObject/@filename)])"
flag="fatal"
id="DE-R-022">Attached documents provided with an invoice in "ADDITIONAL SUPPORTING DOCUMENTS" (BG-24) shall have a unique filename (non case-sensitive) within the element ″Attached document″ (BT-125).</assert>
<assert test="((not(cbc:InvoiceTypeCode = 384 or cbc:CreditNoteTypeCode = 384) or (cac:BillingReference/cac:InvoiceDocumentReference)))"
flag="warning"
id="DE-R-026">If "Invoice type code" (BT-3) contains the code 384 (Corrected invoice), "PRECEDING INVOICE REFERENCE" (BG-3) should be provided at least once.</assert>
<assert test="not(cac:PaymentMeans/cac:PaymentMandate) or (cac:AccountingSupplierParty/cac:Party/cac:PartyIdentification/cbc:ID[@schemeID='SEPA'] | cac:PayeeParty/cac:PartyIdentification/cbc:ID[@schemeID='SEPA'])"
flag="fatal"
id="DE-R-030">If the group "DIRECT DEBIT" (BG-19) is delivered, the element "Bank assigned creditor identifier" (BT-90) shall be provided.</assert>
<assert test="not(cac:PaymentMeans/cac:PaymentMandate) or (cac:PaymentMeans/cac:PaymentMandate/cac:PayerFinancialAccount/cbc:ID)"
flag="fatal"
id="DE-R-031">If the group "DIRECT DEBIT" (BG-19) is delivered, the element "Debited account identifier" (BT-91) shall be provided.</assert>
</rule>
<rule context="(/ubl-invoice:Invoice/cac:AccountingSupplierParty | /ubl-creditnote:CreditNote/cac:AccountingSupplierParty)[$supplierCountryIsDE and $customerCountryIsDE]">
<assert test="cac:Party/cac:Contact" flag="fatal" id="DE-R-002">The group "SELLER CONTACT" (BG-6) shall be provided.</assert>
</rule>
<rule context="(/ubl-invoice:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PostalAddress | /ubl-creditnote:CreditNote/cac:AccountingSupplierParty/cac:Party/cac:PostalAddress)[$supplierCountryIsDE and $customerCountryIsDE]">
<assert test="cbc:CityName[boolean(normalize-space(.))]"
flag="fatal"
id="DE-R-003">The element "Seller city" (BT-37) shall be provided.</assert>
<assert test="cbc:PostalZone[boolean(normalize-space(.))]"
flag="fatal"
id="DE-R-004">The element "Seller post code" (BT-38) shall be provided.</assert>
</rule>
<rule context="(/ubl-invoice:Invoice/cac:AccountingSupplierParty/cac:Party/cac:Contact | /ubl-creditnote:CreditNote/cac:AccountingSupplierParty/cac:Party/cac:Contact)[$supplierCountryIsDE and $customerCountryIsDE]">
<assert test="cbc:Name[boolean(normalize-space(.))]"
flag="fatal"
id="DE-R-005">The element "Seller contact point" (BT-41) shall be provided.</assert>
<assert test="cbc:Telephone[boolean(normalize-space(.))]"
flag="fatal"
id="DE-R-006">The element "Seller contact telephone number" (BT-42) shall be provided.</assert>
<assert test="cbc:ElectronicMail[boolean(normalize-space(.))]"
flag="fatal"
id="DE-R-007">The element "Seller contact email address" (BT-43) shall be provided.</assert>
<assert test="matches(normalize-space(cbc:Telephone), $XR-TELEPHONE-REGEX)"
flag="warning"
id="DE-R-027">"Seller contact telephone number" (BT-42) should contain a valid telephone number. A valid telephone should consist of 3 digits minimum.</assert>
<assert test="matches(normalize-space(cbc:ElectronicMail), $XR-EMAIL-REGEX)"
flag="warning"
id="DE-R-028">"Seller contact email address" (BT-43) should contain exactly one @-sign, which should not be framed by a whitespace or a dot but by at least two characters on each side. A dot should not be the first or last character.</assert>
</rule>
<rule context="(/ubl-invoice:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PostalAddress | /ubl-creditnote:CreditNote/cac:AccountingCustomerParty/cac:Party/cac:PostalAddress)[$supplierCountryIsDE and $customerCountryIsDE]">
<assert test="cbc:CityName[boolean(normalize-space(.))]"
flag="fatal"
id="DE-R-008">The element "Buyer city" (BT-52) shall be provided.</assert>
<assert test="cbc:PostalZone[boolean(normalize-space(.))]"
flag="fatal"
id="DE-R-009">The element "Buyer post code" (BT-53) shall be provided.</assert>
</rule>
<rule context="(/ubl-invoice:Invoice/cac:Delivery/cac:DeliveryLocation/cac:Address | /ubl-creditnote:CreditNote/cac:Delivery/cac:DeliveryLocation/cac:Address)[$supplierCountryIsDE and $customerCountryIsDE]">
<assert test="cbc:CityName[boolean(normalize-space(.))]"
flag="fatal"
id="DE-R-010">The element "Deliver to city" (BT-77) shall be provided if the group "DELIVER TO ADDRESS" (BG-15) is delivered.</assert>
<assert test="cbc:PostalZone[boolean(normalize-space(.))]"
flag="fatal"
id="DE-R-011">The element "Deliver to post code" (BT-78) shall be provided if the group "DELIVER TO ADDRESS" (BG-15) is delivered.</assert>
</rule>
<rule context="(/ubl-invoice:Invoice/cac:PaymentMeans[cbc:PaymentMeansCode = (30,58)] | /ubl-creditnote:CreditNote/cac:PaymentMeans[cbc:PaymentMeansCode = (30,58)])[$supplierCountryIsDE and $customerCountryIsDE]">
<!-- check for PaymentMeansCode 30 was not added by purpose in 2.1.1. -->
<assert test="not(cbc:PaymentMeansCode = '58') or matches(normalize-space(replace(cac:PayeeFinancialAccount/cbc:ID, '([ \n\r\t\s])', '')), '^[A-Z]{2}[0-9]{2}[a-zA-Z0-9]{0,30}$') and xs:integer(string-join(for $cp in string-to-codepoints(concat(substring(normalize-space(replace(cac:PayeeFinancialAccount/cbc:ID, '([ \n\r\t\s])', '')),5),upper-case(substring(normalize-space(replace(cac:PayeeFinancialAccount/cbc:ID, '([ \n\r\t\s])', '')),1,2)),substring(normalize-space(replace(cac:PayeeFinancialAccount/cbc:ID, '([ \n\r\t\s])', '')),3,2))) return (if($cp &gt; 64) then string($cp - 55) else string($cp - 48)),'')) mod 97 = 1"
flag="warning"
id="DE-R-019">The element "Payment account identifier" (BT-84) should contain a valid IBAN if code 58 SEPA is provided in "Payment means type code" (BT-81).</assert>
<assert test="cac:PayeeFinancialAccount" flag="fatal" id="DE-R-023-1">If "Payment means type code" (BT-81) contains a code for credit transfer (30, 58), "CREDIT TRANSFER" (BG-17) shall be provided.</assert>
<assert test="not(cac:CardAccount) and not(cac:PaymentMandate)"
flag="fatal"
id="DE-R-023-2">If "Payment means type code" (BT-81) contains a code for credit transfer (30, 58), BG-18 and BG-19 shall not be provided.</assert>
</rule>
<rule context="(/ubl-invoice:Invoice/cac:PaymentMeans[cbc:PaymentMeansCode = (48,54,55)] |/ubl-creditnote:CreditNote/cac:PaymentMeans[cbc:PaymentMeansCode = (48,54,55)])[$supplierCountryIsDE and $customerCountryIsDE]">
<assert test="cac:CardAccount" flag="fatal" id="DE-R-024-1">If "Payment means type code" (BT-81) contains a code for payment card (48, 54, 55), "PAYMENT CARD INFORMATION" (BG-18) shall be provided.</assert>
<assert test="not(cac:PayeeFinancialAccount) and not(cac:PaymentMandate)"
flag="fatal"
id="DE-R-024-2">If "Payment means type code" (BT-81) contains a code for payment card (48, 54, 55), BG-17 and BG-19 shall not be provided.</assert>
</rule>
<rule context="(/ubl-invoice:Invoice/cac:PaymentMeans[cbc:PaymentMeansCode = 59] | /ubl-creditnote:CreditNote/cac:PaymentMeans[cbc:PaymentMeansCode = 59])[$supplierCountryIsDE and $customerCountryIsDE]">
<assert test="not(cbc:PaymentMeansCode = '59') or matches(normalize-space(replace(cac:PaymentMandate/cac:PayerFinancialAccount/cbc:ID, '([ \n\r\t\s])', '')), '^[A-Z]{2}[0-9]{2}[a-zA-Z0-9]{0,30}$') and xs:decimal(string-join(for $cp in string-to-codepoints(concat(substring(normalize-space(replace(cac:PaymentMandate/cac:PayerFinancialAccount/cbc:ID, '([ \n\r\t\s])', '')),5),upper-case(substring(normalize-space(replace(cac:PaymentMandate/cac:PayerFinancialAccount/cbc:ID, '([ \n\r\t\s])', '')),1,2)),substring(normalize-space(replace(cac:PaymentMandate/cac:PayerFinancialAccount/cbc:ID, '([ \n\r\t\s])', '')),3,2))) return (if($cp &gt; 64) then string($cp - 55) else string($cp - 48)),'')) mod 97 = 1"
flag="warning"
id="DE-R-020">The element "Debited account identifier" (BT-91) should contain a valid IBAN if code 59 SEPA is provided in "Payment means type code" (BT-81). </assert>
<assert test="cac:PaymentMandate" flag="fatal" id="DE-R-025-1">If "Payment means type code" (BT-81) contains a code for direct debit (59), "DIRECT DEBIT" (BG-19) shall be provided.</assert>
<assert test="not(cac:PayeeFinancialAccount) and not(cac:CardAccount)"
flag="fatal"
id="DE-R-025-2">If "Payment means type code" (BT-81) contains a code for direct debit (59), BG-17 and BG-18 shall not be provided.</assert>
</rule>
<rule context="(/ubl-invoice:Invoice/cac:TaxTotal/cac:TaxSubtotal | /ubl-creditnote:CreditNote/cac:TaxTotal/cac:TaxSubtotal)[$supplierCountryIsDE and $customerCountryIsDE]">
<assert test="cac:TaxCategory/cbc:Percent[boolean(normalize-space(.))]"
flag="fatal"
id="DE-R-014">The element "VAT category rate" (BT-119) shall be provided.</assert>
</rule>
</pattern>
<!-- Restricted code lists and formatting -->
<pattern>
<let name="ISO3166" value="tokenize('AD AE AF AG AI AL AM AO AQ AR AS AT AU AW AX AZ BA BB BD BE BF BG BH BI BJ BL BM BN BO BQ BR BS BT BV BW BY BZ CA CC CD CF CG CH CI CK CL CM CN CO CR CU CV CW CX CY CZ DE DJ DK DM DO DZ EC EE EG EH ER ES ET FI FJ FK FM FO FR GA GB GD GE GF GG GH GI GL GM GN GP GQ GR GS GT GU GW GY HK HM HN HR HT HU ID IE IL IM IN IO IQ IR IS IT JE JM JO JP KE KG KH KI KM KN KP KR KW KY KZ LA LB LC LI LK LR LS LT LU LV LY MA MC MD ME MF MG MH MK ML MM MN MO MP MQ MR MS MT MU MV MW MX MY MZ NA NC NE NF NG NI NL NO NP NR NU NZ OM PA PE PF PG PH PK PL PM PN PR PS PT PW PY QA RE RO RS RU RW SA SB SC SD SE SG SH SI SJ SK SL SM SN SO SR SS ST SV SX SY SZ TC TD TF TG TH TJ TK TL TM TN TO TR TT TV TW TZ UA UG UM US UY UZ VA VC VE VG VI VN VU WF WS YE YT ZA ZM ZW 1A XI', '\s')"/>
Expand Down
Loading