Skip to content

Commit

Permalink
Test cleanup before release
Browse files Browse the repository at this point in the history
  • Loading branch information
Jerry Dimitriou committed May 5, 2023
1 parent e00d8c7 commit c933243
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 38 deletions.
12 changes: 5 additions & 7 deletions rules/sch/PEPPOL-EN16931-UBL.sch
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,10 @@ Last update: 2023 May release 3.0.15.
<rule context="cac:AccountingSupplierParty[$isGreekSender]/cac:Party">
<!-- Supplier Name Mandatory -->
<assert id="GR-R-002" test="string-length(./cac:PartyName/cbc:Name)>0" flag="fatal">Greek Suppliers must provide their full name as they are registered in the Greek Business Registry (G.E.MH.) as a legal entity or in the Tax Registry as a natural person </assert>
<!-- Supplier VAT Mandatory -->
<assert id="GR-S-011" test="count(cac:PartyTaxScheme[normalize-space(cac:TaxScheme/cbc:ID) = 'VAT']/cbc:CompanyID)=1 and
substring(cac:PartyTaxScheme[normalize-space(cac:TaxScheme/cbc:ID) = 'VAT']/cbc:CompanyID,1,2) = 'EL' and
u:TinVerification(substring(cac:PartyTaxScheme[normalize-space(cac:TaxScheme/cbc:ID) = 'VAT']/cbc:CompanyID,3))" flag="warning">Greek suppliers must provide their Seller Tax Registration Number, prefixed by the country code</assert>
</rule>
<!-- VAT Number Rules -->
<rule context="cac:AccountingSupplierParty[$isGreekSender]/cac:Party/cac:PartyTaxScheme[normalize-space(cac:TaxScheme/cbc:ID) = 'VAT']/cbc:CompanyID">
Expand Down Expand Up @@ -566,13 +570,7 @@ Last update: 2023 May release 3.0.15.
<!-- Greek Sender and Greek Receiver rules -->
<pattern>
<!-- VAT Number Rules -->
<rule context="cac:AccountingSupplierParty[$isGreekSender]/cac:Party">
<assert id="GR-S-011" test="count(cac:PartyTaxScheme[normalize-space(cac:TaxScheme/cbc:ID) = 'VAT']/cbc:CompanyID)=1 and
substring(cac:PartyTaxScheme[normalize-space(cac:TaxScheme/cbc:ID) = 'VAT']/cbc:CompanyID,1,2) = 'EL' and
u:TinVerification(substring(cac:PartyTaxScheme[normalize-space(cac:TaxScheme/cbc:ID) = 'VAT']/cbc:CompanyID,3))" flag="warning">Greek suppliers must provide their Seller Tax Registration Number, prefixed by the country code</assert>
</rule>

<rule context="cac:AccountingCustomerParty[$isGreekSenderandReceiver]/cac:Party">
<rule context="cac:AccountingCustomerParty[$isGreekSenderandReceiver]/cac:Party">
<assert id="GR-R-006" test="count(cac:PartyTaxScheme[normalize-space(cac:TaxScheme/cbc:ID) = 'VAT']/cbc:CompanyID)=1 and
substring(cac:PartyTaxScheme[normalize-space(cac:TaxScheme/cbc:ID) = 'VAT']/cbc:CompanyID,1,2) = 'EL' and
u:TinVerification(substring(cac:PartyTaxScheme[normalize-space(cac:TaxScheme/cbc:ID) = 'VAT']/cbc:CompanyID,3))" flag="fatal">Greek Suppliers must provide the VAT number of the buyer, if the buyer is Greek </assert>
Expand Down
6 changes: 3 additions & 3 deletions rules/unit-UBL-GR/GR_Validation_GRR011.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
<testSet xmlns="http://difi.no/xsd/vefa/validator/1.0" configuration="peppolbis-en16931-base-3.0-ubl">
<assert>
<description>Greek Suppliers must have a Tax Registration Number</description>
<scope>GR-R-011</scope>
<scope>GR-S-011</scope>
</assert>
<test>
<assert>
<success>GR-R-011</success>
<success>GR-S-011</success>
</assert>
<Invoice xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2 "
Expand All @@ -32,7 +32,7 @@
</test>
<test>
<assert>
<warning>GR-R-011</warning>
<warning>GR-S-011</warning>
</assert>
<Invoice xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2 "
Expand Down
55 changes: 27 additions & 28 deletions rules/unit-UBL-PEPPOL/PEPPOL-COMMON-R048.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,34 @@
<description>ICD (9906) provided.</description>
<scope>PEPPOL-COMMON-R048</scope>
</assert>

<!-- Rule is commented out
<test>
<assert>
<success>PEPPOL-COMMON-R048</success>
</assert>
<Invoice xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2">
<cac:AccountingCustomerParty>
<cac:Party>
<cbc:EndpointID schemeID="9906">IT02985591201</cbc:EndpointID>
</cac:Party>
</cac:AccountingCustomerParty>
</Invoice>
</test>
<test>
<assert>
<success>PEPPOL-COMMON-R048</success>
</assert>
<Invoice xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2">
<cac:AccountingCustomerParty>
<cac:Party>
<cbc:EndpointID schemeID="9906">IT02985591201</cbc:EndpointID>
</cac:Party>
</cac:AccountingCustomerParty>
</Invoice>
</test>

<test>
<assert>
<warning>PEPPOL-COMMON-R048</warning>
</assert>
<Invoice xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2">
<cac:AccountingCustomerParty>
<cac:Party>
<cbc:EndpointID schemeID="9906">ITABC</cbc:EndpointID>
</cac:Party>
</cac:AccountingCustomerParty>
</Invoice>
</test>


<test>
<assert>
<warning>PEPPOL-COMMON-R048</warning>
</assert>
<Invoice xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2">
<cac:AccountingCustomerParty>
<cac:Party>
<cbc:EndpointID schemeID="9906">ITABC</cbc:EndpointID>
</cac:Party>
</cac:AccountingCustomerParty>
</Invoice>
</test>
-->

</testSet>

0 comments on commit c933243

Please sign in to comment.