Skip to content

Commit

Permalink
release 1.3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
oriol committed Apr 6, 2024
2 parents 2455116 + a49e182 commit 2274554
Show file tree
Hide file tree
Showing 16 changed files with 1,120 additions and 901 deletions.
66 changes: 33 additions & 33 deletions cii/schematron/CII/EN16931-CII-model.sch
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Licensed under European Union Public Licence (EUPL) version 1.2.
-->
<!-- Schematron binding rules generated by Andreas Pelekies -->
<!-- Schematron binding rules generated by Oriol Bausà -->
<!-- Data binding to CII syntax for EN16931 -->
<pattern xmlns="http://purl.oclc.org/dsdl/schematron" is-a="EN16931" id="EN16931-CII-Model">
<param name="BR-01" value="normalize-space(rsm:ExchangedDocumentContext/ram:GuidelineSpecifiedDocumentContextParameter/ram:ID) != ''"/>
Expand Down Expand Up @@ -36,16 +36,16 @@
<param name="BR-28" value="(ram:SpecifiedLineTradeAgreement/ram:GrossPriceProductTradePrice/ram:ChargeAmount &gt;= 0) or not(ram:SpecifiedLineTradeAgreement/ram:GrossPriceProductTradePrice/ram:ChargeAmount)"/>
<param name="BR-29" value="(ram:EndDateTime/udt:DateTimeString[@format = '102']) &gt;= (ram:StartDateTime/udt:DateTimeString[@format = '102']) or not (ram:EndDateTime) or not (ram:StartDateTime)"/>
<param name="BR-30" value="(ram:EndDateTime/udt:DateTimeString[@format = '102']) &gt;= (ram:StartDateTime/udt:DateTimeString[@format = '102']) or not (ram:EndDateTime) or not (ram:StartDateTime)"/>
<param name="BR-31" value="(ram:ActualAmount)"/>
<param name="BR-32" value="(ram:CategoryTradeTax[upper-case(ram:TypeCode) = 'VAT']/ram:CategoryCode)"/>
<param name="BR-33" value="(ram:Reason) or (ram:ReasonCode)"/>
<param name="BR-36" value="(ram:ActualAmount)"/>
<param name="BR-37" value="(ram:CategoryTradeTax[upper-case(ram:TypeCode) = 'VAT']/ram:CategoryCode)"/>
<param name="BR-38" value="(ram:Reason) or (ram:ReasonCode)"/>
<param name="BR-41" value="(ram:ActualAmount)"/>
<param name="BR-42" value="(ram:Reason) or (ram:ReasonCode)"/>
<param name="BR-43" value="(ram:ActualAmount)"/>
<param name="BR-44" value="(ram:Reason) or (ram:ReasonCode)"/>
<param name="BR-31" value="(../ram:ActualAmount)"/>
<param name="BR-32" value="(../ram:CategoryTradeTax[upper-case(ram:TypeCode) = 'VAT']/ram:CategoryCode)"/>
<param name="BR-33" value="(../ram:Reason) or (../ram:ReasonCode)"/>
<param name="BR-36" value="(../ram:ActualAmount)"/>
<param name="BR-37" value="(../ram:CategoryTradeTax[upper-case(ram:TypeCode) = 'VAT']/ram:CategoryCode)"/>
<param name="BR-38" value="(../ram:Reason) or (../ram:ReasonCode)"/>
<param name="BR-41" value="(../ram:ActualAmount)"/>
<param name="BR-42" value="(../ram:Reason) or (../ram:ReasonCode)"/>
<param name="BR-43" value="(../ram:ActualAmount)"/>
<param name="BR-44" value="(../ram:Reason) or (../ram:ReasonCode)"/>
<param name="BR-45" value="(ram:BasisAmount)"/>
<param name="BR-46" value="(ram:CalculatedAmount)"/>
<param name="BR-47" value="(.[upper-case(ram:TypeCode) = 'VAT']/ram:CategoryCode)"/>
Expand All @@ -60,8 +60,8 @@
<param name="BR-56" value="normalize-space(ram:SpecifiedTaxRegistration/ram:ID[@schemeID='VA']) != ''"/>
<param name="BR-57" value="(ram:ShipToTradeParty/ram:PostalTradeAddress and normalize-space(ram:ShipToTradeParty/ram:PostalTradeAddress/ram:CountryID) != '') or not (ram:ShipToTradeParty/ram:PostalTradeAddress)"/>
<param name="BR-61" value="(ram:IBANID) or (ram:ProprietaryID)"/>
<param name="BR-62" value="normalize-space(rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:URIUniversalCommunication/ram:URIID/@schemeID) != '' or not (rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:URIUniversalCommunication)"/>
<param name="BR-63" value="normalize-space(rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:URIUniversalCommunication/ram:URIID/@schemeID) != '' or not (rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:URIUniversalCommunication)"/>
<param name="BR-62" value="normalize-space(rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:URIUniversalCommunication[1]/ram:URIID/@schemeID) != '' or not (rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:URIUniversalCommunication)"/>
<param name="BR-63" value="normalize-space(rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:URIUniversalCommunication[1]/ram:URIID/@schemeID) != '' or not (rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:URIUniversalCommunication)"/>
<param name="BR-64" value="normalize-space(ram:SpecifiedTradeProduct/ram:GlobalID/@schemeID) != '' or not (ram:SpecifiedTradeProduct/ram:GlobalID)"/>
<param name="BR-65" value="normalize-space(ram:ClassCode/@listID) != '' or not (ram:ClassCode)"/>
<param name="BR-66" value="(ram:ChargeIndicator)"/>
Expand Down Expand Up @@ -106,10 +106,10 @@
<param name="BR-CO-18" value="//rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax"/>
<param name="BR-CO-19" value="(ram:StartDateTime) or (ram:EndDateTime)"/>
<param name="BR-CO-20" value="(ram:StartDateTime) or (ram:EndDateTime)"/>
<param name="BR-CO-21" value="(ram:Reason) or (ram:ReasonCode)"/>
<param name="BR-CO-22" value="(ram:Reason) or (ram:ReasonCode)"/>
<param name="BR-CO-23" value="(ram:Reason) or (ram:ReasonCode)"/>
<param name="BR-CO-24" value="(ram:Reason) or (ram:ReasonCode)"/>
<param name="BR-CO-21" value="(../ram:Reason) or (../ram:ReasonCode)"/>
<param name="BR-CO-22" value="(../ram:Reason) or (../ram:ReasonCode)"/>
<param name="BR-CO-23" value="(../ram:Reason) or (../ram:ReasonCode)"/>
<param name="BR-CO-24" value="(../ram:Reason) or (../ram:ReasonCode)"/>
<param name="BR-CO-25" value="(number(//ram:DuePayableAmount) &gt; 0 and ((//ram:SpecifiedTradePaymentTerms/ram:DueDateDateTime) or (//ram:SpecifiedTradePaymentTerms/ram:Description))) or not(number(//ram:DuePayableAmount)&gt;0)"/>
<param name="BR-CO-26" value="(ram:ID) or (ram:GlobalID) or (ram:SpecifiedLegalOrganization/ram:ID) or (ram:SpecifiedTaxRegistration/ram:ID[@schemeID='VA'])"/>
<param name="BR-CO-27" value="(ram:PayeePartyCreditorFinancialAccount/ram:IBANID) or (ram:PayeePartyCreditorFinancialAccount/ram:ProprietaryID) or (not(ram:PayeePartyCreditorFinancialAccount/ram:IBANID) and not(ram:PayeePartyCreditorFinancialAccount/ram:ProprietaryID))"/>
Expand Down Expand Up @@ -168,9 +168,9 @@
<param name="BR-E-09" value="../ram:CalculatedAmount = 0"/>
<param name="BR-E-10" value="(../ram:ExemptionReason) or (../ram:ExemptionReasonCode)"/>
<param name="BR-AE-01" value="(count(//ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='AE'])=0 and count(//ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='AE'])=0 and count(//ram:CategoryTradeTax[ram:CategoryCode='AE'])=0) or ( count(//ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='AE'])=1 and (exists(//ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='AE']) or exists(//ram:CategoryTradeTax[ram:CategoryCode='AE'])))"/>
<param name="BR-AE-02" value="(//ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA'] or //ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']) and (//ram:BuyerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA'] or //ram:BuyerTradeParty/ram:SpecifiedLegalOrganization/ram:ID)"/>
<param name="BR-AE-03" value="(//ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA'] or //ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']) and (//ram:BuyerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA'] or //ram:BuyerTradeParty/ram:SpecifiedLegalOrganization/ram:ID)"/>
<param name="BR-AE-04" value="(//ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA'] or //ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']) and (//ram:BuyerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA'] or //ram:BuyerTradeParty/ram:SpecifiedLegalOrganization/ram:ID)"/>
<param name="BR-AE-02" value="(//ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = ('VA', 'FC')] or //ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']) and (//ram:BuyerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA'] or //ram:BuyerTradeParty/ram:SpecifiedLegalOrganization/ram:ID)"/>
<param name="BR-AE-03" value="(//ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = ('VA', 'FC')] or //ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']) and (//ram:BuyerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA'] or //ram:BuyerTradeParty/ram:SpecifiedLegalOrganization/ram:ID)"/>
<param name="BR-AE-04" value="(//ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = ('VA', 'FC')] or //ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']) and (//ram:BuyerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA'] or //ram:BuyerTradeParty/ram:SpecifiedLegalOrganization/ram:ID)"/>
<param name="BR-AE-05" value="ram:RateApplicablePercent = 0"/>
<param name="BR-AE-06" value="ram:RateApplicablePercent = 0"/>
<param name="BR-AE-07" value="ram:RateApplicablePercent = 0"/>
Expand Down Expand Up @@ -221,10 +221,10 @@
<param name="BR-O-13" value="not(//ram:CategoryTradeTax[ram:CategoryCode != 'O'])"/>
<param name="BR-O-14" value="not(//ram:CategoryTradeTax[ram:CategoryCode != 'O'])"/>

<param name="BR-DEC-01" value="string-length(substring-after(ram:ActualAmount,'.'))&lt;=2"/>
<param name="BR-DEC-02" value="string-length(substring-after(ram:BasisAmount,'.'))&lt;=2"/>
<param name="BR-DEC-05" value="string-length(substring-after(ram:ActualAmount,'.'))&lt;=2"/>
<param name="BR-DEC-06" value="string-length(substring-after(ram:BasisAmount,'.'))&lt;=2"/>
<param name="BR-DEC-01" value="string-length(substring-after(../ram:ActualAmount,'.'))&lt;=2"/>
<param name="BR-DEC-02" value="string-length(substring-after(../ram:BasisAmount,'.'))&lt;=2"/>
<param name="BR-DEC-05" value="string-length(substring-after(../ram:ActualAmount,'.'))&lt;=2"/>
<param name="BR-DEC-06" value="string-length(substring-after(../ram:BasisAmount,'.'))&lt;=2"/>
<param name="BR-DEC-09" value="string-length(substring-after(ram:LineTotalAmount,'.'))&lt;=2"/>
<param name="BR-DEC-10" value="string-length(substring-after(ram:AllowanceTotalAmount,'.'))&lt;=2"/>
<param name="BR-DEC-11" value="string-length(substring-after(ram:ChargeTotalAmount,'.'))&lt;=2"/>
Expand All @@ -237,11 +237,11 @@
<param name="BR-DEC-18" value="string-length(substring-after(ram:DuePayableAmount,'.'))&lt;=2"/>
<param name="BR-DEC-19" value="string-length(substring-after(ram:BasisAmount,'.'))&lt;=2"/>
<param name="BR-DEC-20" value="string-length(substring-after(ram:CalculatedAmount,'.'))&lt;=2"/>
<param name="BR-DEC-23" value="string-length(substring-after(ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount,'.'))&lt;=2"/>
<param name="BR-DEC-24" value="string-length(substring-after(ram:ActualAmount,'.'))&lt;=2"/>
<param name="BR-DEC-25" value="string-length(substring-after(ram:BasisAmount,'.'))&lt;=2"/>
<param name="BR-DEC-27" value="string-length(substring-after(ram:ActualAmount,'.'))&lt;=2"/>
<param name="BR-DEC-28" value="string-length(substring-after(ram:BasisAmount,'.'))&lt;=2"/>
<param name="BR-DEC-23" value="string-length(substring-after(ram:SpecifiedTradeSettlement/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount,'.'))&lt;=2"/>
<param name="BR-DEC-24" value="string-length(substring-after(../ram:ActualAmount,'.'))&lt;=2"/>
<param name="BR-DEC-25" value="string-length(substring-after(../ram:BasisAmount,'.'))&lt;=2"/>
<param name="BR-DEC-27" value="string-length(substring-after(../ram:ActualAmount,'.'))&lt;=2"/>
<param name="BR-DEC-28" value="string-length(substring-after(../ram:BasisAmount,'.'))&lt;=2"/>
<param name="BR-B-01" value="(not(//ram:CountryID != 'IT') and //ram:CategoryCode ='B') or (not(//ram:CategoryCode ='B'))"/>
<param name="BR-B-02" value="(//ram:CategoryCode ='B' and (not(//ram:CategoryCode ='S'))) or (not(//ram:CategoryCode ='B'))"/>

Expand All @@ -251,10 +251,10 @@
<param name="Tax_Representative " value="//ram:SellerTaxRepresentativeTradeParty"/>
<param name="Invoice_Line " value="//ram:IncludedSupplyChainTradeLineItem"/>
<param name="Invoice_Line_Period " value="//ram:SpecifiedLineTradeSettlement/ram:BillingSpecifiedPeriod"/>
<param name="Document_level_allowances " value="//ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=false()]"/>
<param name="Document_level_charges " value="//ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=true()]"/>
<param name="Invoice_line_allowances " value="//ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator = false()]"/>
<param name="Invoice_line_charges " value="//ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator = true()]"/>
<param name="Document_level_allowances " value="//ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:ChargeIndicator[udt:Indicator='false']"/>
<param name="Document_level_charges " value="//ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:ChargeIndicator[udt:Indicator='true']"/>
<param name="Invoice_line_allowances " value="//ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:ChargeIndicator[udt:Indicator = 'false']"/>
<param name="Invoice_line_charges " value="//ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:ChargeIndicator[udt:Indicator = 'true']"/>

<param name="VAT_breakdown " value="//ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax"/>

Expand Down
Loading

0 comments on commit 2274554

Please sign in to comment.