Skip to content

Commit

Permalink
resolves #395
Browse files Browse the repository at this point in the history
  • Loading branch information
oriol committed Oct 3, 2024
1 parent 232e76f commit bef4697
Show file tree
Hide file tree
Showing 6 changed files with 95 additions and 82 deletions.
9 changes: 6 additions & 3 deletions cii/schematron/CII/EN16931-CII-syntax.sch
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,6 @@
value="not(ram:GrossPriceProductTradePrice/ram:AppliedTradeAllowanceCharge/ram:CategoryTradeTax)"/>
<param name="CII-SR-131"
value="not(ram:GrossPriceProductTradePrice/ram:AppliedTradeAllowanceCharge/ram:ActualTradeCurrencyExchange)"/>
<param name="CII-SR-440"
value="count(ram:GrossPriceProductTradePrice/ram:AppliedTradeAllowanceCharge/ram:ActualAmount) &lt;= 1"/>

<param name="CII-SR-445" value="not(ram:GrossPriceProductTradePrice/ram:IncludedTradeTax)"/>
<param name="CII-SR-132"
value="not(ram:GrossPriceProductTradePrice/ram:ValiditySpecifiedPeriod)"/>
Expand Down Expand Up @@ -207,6 +204,11 @@
<param name="CII-SR-150" value="not(ram:IncludedSpecifiedMarketplace)"/>
<param name="CII-SR-447" value="not(ram:UltimateCustomerOrderReferencedDocument)"/>

<!-- AppliedTradeAllowanceCharge -->
<param name="CII-SR-440"
value="count(ram:ActualAmount) &lt;= 1"/>


<!-- SpecifiedLineTradeDelivery -->
<param name="CII-SR-151" value="not(ram:RequestedQuantity)"/>
<param name="CII-SR-152" value="not(ram:ReceivedQuantity)"/>
Expand Down Expand Up @@ -815,4 +817,5 @@
<param name="SpecifiedTradeSettlementHeaderMonetarySummation"
value="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation"/>
<param name="DateTimeString" value="//udt:DateTimeString[@format = '102']"/>
<param name="AppliedTradeAllowanceCharge" value="//ram:GrossPriceProductTradePrice/ram:AppliedTradeAllowanceCharge"/>
</pattern>
4 changes: 3 additions & 1 deletion cii/schematron/abstract/EN16931-CII-syntax.sch
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@
<assert test="$CII-SR-129" flag="warning" id="CII-SR-129">[CII-SR-129] - TypeCode should not be present</assert>
<assert test="$CII-SR-130" flag="warning" id="CII-SR-130">[CII-SR-130] - CategoryTradeTax should not be present</assert>
<assert test="$CII-SR-131" flag="warning" id="CII-SR-131">[CII-SR-131] - ActualTradeCurrencyExchange should not be present</assert>
<assert test="$CII-SR-440" flag="fatal" id="CII-SR-440">[CII-SR-440] - ActualAmount should exist maximum once</assert>

<assert test="$CII-SR-445" flag="warning" id="CII-SR-445">[CII-SR-445] - IncludedTradeTax should not be present</assert>
<assert test="$CII-SR-132" flag="warning" id="CII-SR-132">[CII-SR-132] - ValiditySpecifiedPeriod should not be present</assert>
Expand Down Expand Up @@ -189,6 +188,9 @@
<assert test="$CII-SR-447" flag="warning" id="CII-SR-447">[CII-SR-447] - UltimateCustomerOrderReferencedDocument should not be present</assert>

</rule>
<rule context="$AppliedTradeAllowanceCharge">
<assert test="$CII-SR-440" flag="fatal" id="CII-SR-440">[CII-SR-440] - ActualAmount should exist maximum once</assert>
</rule>
<rule context="$SpecifiedLineTradeDelivery">
<assert test="$CII-SR-151" flag="warning" id="CII-SR-151">[CII-SR-151] - RequestedQuantity should not be present</assert>
<assert test="$CII-SR-152" flag="warning" id="CII-SR-152">[CII-SR-152] - ReceivedQuantity should not be present</assert>
Expand Down
Loading

0 comments on commit bef4697

Please sign in to comment.