Skip to content

Commit

Permalink
Merge pull request #128 from peppolautoriteit-nl/NL-R-007_creditnote_fix
Browse files Browse the repository at this point in the history
Nl r 007 creditnote fix
  • Loading branch information
jerouris authored Mar 27, 2024
2 parents 7f025a6 + 8a1dae1 commit 0045b9d
Show file tree
Hide file tree
Showing 4 changed files with 758 additions and 49 deletions.
6 changes: 5 additions & 1 deletion rules/sch/PEPPOL-EN16931-CII.sch
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,11 @@ Last update: 2022 May release 3.0.13.

<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation[$supplierCountryIsNL]">
<!-- Original rule in NLCIUS: BR-NL-11 -->
<assert id="NL-R-007" test="xs:decimal(ram:DuePayableAmount) &lt;= 0.0 or (/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans)" flag="fatal">[NL-R-007] For suppliers in the Netherlands, the supplier MUST provide a means of payment (ram:SpecifiedTradeSettlementPaymentMeans) if the payment is from customer to supplier</assert>
<assert id="NL-R-007" test="(normalize-space(/rsm:CrossIndustryInvoice/rsm:ExchangedDocument/ram:TypeCode/text()) != '381' and
xs:decimal(ram:DuePayableAmount) &lt;= 0.0) or
(normalize-space(/rsm:CrossIndustryInvoice/rsm:ExchangedDocument/ram:TypeCode/text()) = '381' and
xs:decimal(ram:DuePayableAmount) &gt;= 0.0) or
(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans)" flag="fatal">[NL-R-007] For suppliers in the Netherlands, the supplier MUST provide a means of payment (ram:SpecifiedTradeSettlementPaymentMeans) if the payment is from customer to supplier</assert>
</rule>

<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans[$supplierCountryIsNL]">
Expand Down
2 changes: 1 addition & 1 deletion rules/sch/PEPPOL-EN16931-UBL.sch
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ Last update: 2023 May release 3.0.15.
</rule>
<rule context="cac:LegalMonetaryTotal[$supplierCountryIsNL]">
<!-- Original rule in NLCIUS: BR-NL-11 -->
<assert id="NL-R-007" test="xs:decimal(cbc:PayableAmount) &lt;= 0.0 or (//cac:PaymentMeans)" flag="fatal">[NL-R-007] For suppliers in the Netherlands, the supplier MUST provide a means of payment (cac:PaymentMeans) if the payment is from customer to supplier</assert>
<assert id="NL-R-007" test="(/ubl-invoice:Invoice and xs:decimal(cbc:PayableAmount) &lt;= 0.0) or (/ubl-creditnote:CreditNote and xs:decimal(cbc:PayableAmount) &gt;= 0.0) or (//cac:PaymentMeans)" flag="fatal">[NL-R-007] For suppliers in the Netherlands, the supplier MUST provide a means of payment (cac:PaymentMeans) if the payment is from customer to supplier</assert>
</rule>
<rule context="cac:PaymentMeans[$supplierCountryIsNL]">
<!-- Original rule in NLCIUS: BR-NL-12 -->
Expand Down
Loading

0 comments on commit 0045b9d

Please sign in to comment.