Skip to content

Commit

Permalink
resolves #387
Browse files Browse the repository at this point in the history
  • Loading branch information
oriol committed Sep 11, 2024
1 parent d2df04f commit 5117f6b
Show file tree
Hide file tree
Showing 5 changed files with 1,424 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cii/schematron/CII/EN16931-CII-syntax.sch
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@
<param name="CII-SR-459" value="count(ram:SellerTradeParty/ram:URIUniversalCommunication) &lt;= 1"/>
<param name="CII-SR-460" value="count(ram:BuyerTradeParty/ram:URIUniversalCommunication) &lt;= 1"/>
<param name="CII-SR-461" value="count(ram:ApplicableTradeTax/ram:TaxPointDate) &lt;= 1"/>
<param name="CII-SR-462" value="count(ram:ApplicableTradeTax/ram:DueDateTypeCode) &lt;= 1"/>
<param name="CII-SR-462" value="count(//ram:ApplicableTradeTax/ram:DueDateTypeCode) = 0 or count(distinct-values(//ram:ApplicableTradeTax/ram:DueDateTypeCode)) = 1"/>

<!-- Invoice -->
<param name="CII-SR-438" value="not(ram:ValuationBreakdownStatement)"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@
<assert id="CII-SR-452" flag="warning" test="count(ram:SpecifiedTradePaymentTerms) &lt;= 1">[CII-SR-452] - Only one SpecifiedTradePaymentTerms should be present</assert>
<assert id="CII-SR-453" flag="warning" test="count(ram:SpecifiedTradePaymentTerms/ram:Description) &lt;= 1">[CII-SR-453] - Only one SpecifiedTradePaymentTerms Description should be present</assert>
<assert id="CII-SR-461" flag="fatal" test="count(ram:ApplicableTradeTax/ram:TaxPointDate) &lt;= 1">[CII-SR-461] - Only one TaxPointDate shall be present</assert>
<assert id="CII-SR-462" flag="fatal" test="count(ram:ApplicableTradeTax/ram:DueDateTypeCode) &lt;= 1">[CII-SR-462] - Only one DueDateTypeCode shall be present</assert>
<assert id="CII-SR-462" flag="fatal" test="count(//ram:ApplicableTradeTax/ram:DueDateTypeCode) = 0 or count(distinct-values(//ram:ApplicableTradeTax/ram:DueDateTypeCode)) = 1">[CII-SR-462] - Only one DueDateTypeCode shall be present</assert>
</rule>
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation">
<assert id="CII-SR-411" flag="warning" test="not(ram:InformationAmount)">[CII-SR-411] - InformationAmount should not be present</assert>
Expand Down
4 changes: 2 additions & 2 deletions cii/xslt/EN16931-CII-validation.xslt
Original file line number Diff line number Diff line change
Expand Up @@ -10237,9 +10237,9 @@

<!--ASSERT -->
<xsl:choose>
<xsl:when test="count(ram:ApplicableTradeTax/ram:DueDateTypeCode) &lt;= 1" />
<xsl:when test="count(//ram:ApplicableTradeTax/ram:DueDateTypeCode) = 0 or count(distinct-values(//ram:ApplicableTradeTax/ram:DueDateTypeCode)) = 1" />
<xsl:otherwise>
<svrl:failed-assert test="count(ram:ApplicableTradeTax/ram:DueDateTypeCode) &lt;= 1">
<svrl:failed-assert test="count(//ram:ApplicableTradeTax/ram:DueDateTypeCode) = 0 or count(distinct-values(//ram:ApplicableTradeTax/ram:DueDateTypeCode)) = 1">
<xsl:attribute name="id">CII-SR-462</xsl:attribute>
<xsl:attribute name="flag">fatal</xsl:attribute>
<xsl:attribute name="location">
Expand Down
Loading

0 comments on commit 5117f6b

Please sign in to comment.