From a7a689880108d89f6d3087a1e086d4d06912e3a8 Mon Sep 17 00:00:00 2001 From: Jelte Jansen Date: Mon, 18 Sep 2023 17:47:30 +0200 Subject: [PATCH 1/7] Make sure NL-R-007 only fires on invoices, not on creditnotes (UBL) NL-R-007 requires that a payment means is provided, which only makes sense if there is a payment, i.e. for positive invoices. --- rules/sch/PEPPOL-EN16931-UBL.sch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules/sch/PEPPOL-EN16931-UBL.sch b/rules/sch/PEPPOL-EN16931-UBL.sch index bef742f5..34372a6f 100644 --- a/rules/sch/PEPPOL-EN16931-UBL.sch +++ b/rules/sch/PEPPOL-EN16931-UBL.sch @@ -635,7 +635,7 @@ Last update: 2023 May release 3.0.15. [NL-R-006] For suppliers in the Netherlands, if the fiscal representative is in the Netherlands, the representative's address (cac:TaxRepresentativeParty/cac:PostalAddress) MUST contain street name (cbc:StreetName), city (cbc:CityName) and post code (cbc:PostalZone) - + [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 From 5cc83d53e12c58385f9b43398d4c6693b8d742b2 Mon Sep 17 00:00:00 2001 From: Jelte Jansen Date: Mon, 18 Sep 2023 17:48:48 +0200 Subject: [PATCH 2/7] Make sure NL-R-007 only fires on invoices, not on creditnotes (CII) NL-R-007 requires that a payment means is provided, which only makes sense if there is a payment, i.e. for positive invoices (typecode != 381). --- rules/sch/PEPPOL-EN16931-CII.sch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules/sch/PEPPOL-EN16931-CII.sch b/rules/sch/PEPPOL-EN16931-CII.sch index 3c855f7e..d7a8410f 100644 --- a/rules/sch/PEPPOL-EN16931-CII.sch +++ b/rules/sch/PEPPOL-EN16931-CII.sch @@ -482,7 +482,7 @@ Last update: 2022 May release 3.0.13. - [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 + [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 From 6c84f6e1fb15fb4deb45f34bde2cd326e8b08606 Mon Sep 17 00:00:00 2001 From: Jelte Jansen Date: Wed, 20 Sep 2023 14:46:05 +0200 Subject: [PATCH 3/7] Add test case for update to NL-R-007 to UBL unit tests --- rules/unit-UBL-NL/NL-R-007.xml | 177 ++++++++++++++++++++++++++++++++- 1 file changed, 173 insertions(+), 4 deletions(-) diff --git a/rules/unit-UBL-NL/NL-R-007.xml b/rules/unit-UBL-NL/NL-R-007.xml index 035676e4..66c8161b 100755 --- a/rules/unit-UBL-NL/NL-R-007.xml +++ b/rules/unit-UBL-NL/NL-R-007.xml @@ -1,10 +1,11 @@ - For suppliers in the Netherlands, the supplier MUST provide a means of payment (cac:PaymentMeans) if the payment is from customer to supplier + For suppliers in the Netherlands, the supplier MUST provide a means of payment (cac:PaymentMeans) if the payment is from customer to supplier NL-R-007 + NL-R-007 @@ -181,7 +182,6 @@ - 17409.09 @@ -287,6 +287,7 @@ + NL-R-007 @@ -454,7 +455,6 @@ - 17409.09 @@ -559,4 +559,173 @@ - + + + + NL-R-007 + + + 2.1 + urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0 + urn:fdc:peppol.eu:2017:poacc:billing:01:1.0 + 12115118 + 2015-01-09 + 381 + + Alle leveringen zijn franco. Alle prijzen zijn incl. BTW. Betalingstermijn: 14 dagen netto. Prijswijzigingen voorbehouden. Op al onze + aanbiedingen, leveringen en overeenkomsten zijn van toepassing in de algemene verkoop en leveringsvoorwaarden. Gedeponeerd bij de K.v.K. te + Amsterdam 25-04-'85##Delivery terms + + EUR + 47806 + + 47806 + + + + 46568 + + + + + SITEST00000 + + Simplerstraat 1 + InvoicingStad + 1111 ZZ + + NL + + + + NL1111.11.111.B.01 + + VAT + + + + SimplerInvoicing + SITEST00000 + + + + + + 11111111 + + 10202 + + + Teststraat 123 + Grotestad + 1111 AA + + NL + + + + Ontvanger + 11111111 + + + + + Credit note + + + 27.00 + + 100.00 + 21.00 + + S + 21 + + VAT + + + + + 100.00 + 6.00 + + S + 6 + + VAT + + + + + + 200.00 + 200.00 + 227.00 + 227.00 + + + 1 + 4 + 200.00 + + SimplerInvoicing test invoice + + 166022 + + + S + 21 + + VAT + + + + + 50.00 + + + + 2 + 1 + 100.00 + + Testing procedures + + 661813 + + + S + 6 + + VAT + + + + + 100.00 + + + + 3 + -1 + -100.00 + + Previous Test CreditNote returned + + 438146 + + + S + 21 + + VAT + + + + + 100.00 + + + + + \ No newline at end of file From e63340893cc03e3ff2cb81839a81c930c065a3c1 Mon Sep 17 00:00:00 2001 From: Jelte Jansen Date: Wed, 20 Sep 2023 14:49:19 +0200 Subject: [PATCH 4/7] Add test case for update to NL-R-007 to CII unit tests --- rules/unit-CII-NL/NL-R-007.xml | 251 +++++++++++++++++++++++++++------ 1 file changed, 208 insertions(+), 43 deletions(-) diff --git a/rules/unit-CII-NL/NL-R-007.xml b/rules/unit-CII-NL/NL-R-007.xml index 80aee1b4..46dfa9f6 100755 --- a/rules/unit-CII-NL/NL-R-007.xml +++ b/rules/unit-CII-NL/NL-R-007.xml @@ -1,21 +1,15 @@ - For suppliers in the Netherlands, the supplier MUST provide a means of payment (ram:SpecifiedTradeSettlementPaymentMeans) if the payment is from customer to supplier + For suppliers in the Netherlands, the supplier MUST provide a means of payment (ram:SpecifiedTradeSettlementPaymentMeans) if the payment is from customer to supplier NL-R-007 + NL-R-007 - - + urn:fdc:peppol.eu:2017:poacc:billing:01:1.0 @@ -24,7 +18,6 @@ urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0 - 12345 380 @@ -32,9 +25,7 @@ 20210101 - - 1 @@ -61,7 +52,6 @@ - 2 @@ -88,7 +78,6 @@ - 123_reference @@ -109,7 +98,6 @@ NL1111111111B01 - Buyers B.V. @@ -123,17 +111,14 @@ - Trade Party - 08/00355 SEK - 30 @@ -143,7 +128,6 @@ BANKSBIC - 63 VAT @@ -151,7 +135,6 @@ S 21 - false @@ -182,7 +165,6 @@ 21 - 20180307 @@ -199,21 +181,14 @@ - + NL-R-007 - - + urn:fdc:peppol.eu:2017:poacc:billing:01:1.0 @@ -222,7 +197,6 @@ urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0 - 12345 380 @@ -230,9 +204,7 @@ 20210101 - - 1 @@ -259,7 +231,6 @@ - 2 @@ -286,7 +257,6 @@ - 123_reference @@ -307,7 +277,6 @@ NL1111111111B01 - Buyers B.V. @@ -321,17 +290,14 @@ - Trade Party - 08/00355 SEK - 63 VAT @@ -339,7 +305,6 @@ S 21 - false @@ -370,7 +335,6 @@ 21 - 20180307 @@ -387,7 +351,208 @@ - - + + + + NL-R-007 + + + + + urn:fdc:peppol.eu:2017:poacc:billing:01:1.0 + + + urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0 + + + + 2018210 + 381 + + 20180208 + + + + + + 1 + + + Printing paper + + + + 1 + + + + 1000 + + + + VAT + S + 25 + + + 1000 + + + + + + 2 + + + Parker Pen + + + + 5 + + + + 100 + + + + VAT + S + 25 + + + 500 + + + + + + 3 + + + Eraser P-97 + + + + 5 + + + + 500 + + + + VAT + S + 12 + + + 2500 + + + + + Ref 123 + + Allsälj AB + + 12345678 + + + 1234AA + SellerStreet 1 + Commercity + NL + + + 12345678 + + + SE123456789001 + + + Godkänd för F-skatt + + + + Buyercompany ltd + + DK + + + 87654321 + + + + + + 08/00355 + SEK + + 375 + VAT + 1500 + S + 25 + + + 300 + VAT + 2500 + S + 12 + + + + false + + 10 + 0 + 0 + 95 + Loyal customer + + VAT + S + 25 + + + + + true + + 10 + 0 + 0 + ABL + Packaging + + VAT + S + 25 + + + + + 20180307 + + + + 4000 + 0 + 0 + 4000 + 675 + 4675 + 4675 + + + 12345 + + + + + + \ No newline at end of file From 7b5032fb2917ed5fc857877c8af6713e99eb3255 Mon Sep 17 00:00:00 2001 From: Jelte Jansen Date: Mon, 25 Sep 2023 14:39:17 +0200 Subject: [PATCH 5/7] Do make PaymentMeans mandatory for negative CreditNote (UBL) Addendum to the fix in a7a689880108d89f6d3087a1e086d4d06912e3a8, in case the CreditNote itself is negative, the payment means should be required. --- rules/sch/PEPPOL-EN16931-UBL.sch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rules/sch/PEPPOL-EN16931-UBL.sch b/rules/sch/PEPPOL-EN16931-UBL.sch index 34372a6f..5b4be523 100644 --- a/rules/sch/PEPPOL-EN16931-UBL.sch +++ b/rules/sch/PEPPOL-EN16931-UBL.sch @@ -635,9 +635,9 @@ Last update: 2023 May release 3.0.15. [NL-R-006] For suppliers in the Netherlands, if the fiscal representative is in the Netherlands, the representative's address (cac:TaxRepresentativeParty/cac:PostalAddress) MUST contain street name (cbc:StreetName), city (cbc:CityName) and post code (cbc:PostalZone) - + - [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 + [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 From edc57436a028e4690a990041fbcd6c83888695a3 Mon Sep 17 00:00:00 2001 From: Jelte Jansen Date: Mon, 25 Sep 2023 16:01:47 +0200 Subject: [PATCH 6/7] Do make PaymentMeans mandatory for negative CreditNote (CII) Addendum to the fix in 5cc83d53e12c58385f9b43398d4c6693b8d742b2, in case the CreditNote itself is negative, the payment means should be required. --- rules/sch/PEPPOL-EN16931-CII.sch | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rules/sch/PEPPOL-EN16931-CII.sch b/rules/sch/PEPPOL-EN16931-CII.sch index d7a8410f..003726a2 100644 --- a/rules/sch/PEPPOL-EN16931-CII.sch +++ b/rules/sch/PEPPOL-EN16931-CII.sch @@ -482,7 +482,11 @@ Last update: 2022 May release 3.0.13. - [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 + [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 From 8a1dae1f41a6b6c0faf4fb89b713aebc52bb26a3 Mon Sep 17 00:00:00 2001 From: Jelte Jansen Date: Mon, 25 Sep 2023 16:07:13 +0200 Subject: [PATCH 7/7] Testcase updates Add additional error cases for the fixes in commits 7b5032fb2917ed5fc857877c8af6713e99eb3255 and edc57436a028e4690a990041fbcd6c83888695a3 --- rules/unit-CII-NL/NL-R-007.xml | 202 +++++++++++++++++++++++++++++++++ rules/unit-UBL-NL/NL-R-007.xml | 169 +++++++++++++++++++++++++++ 2 files changed, 371 insertions(+) diff --git a/rules/unit-CII-NL/NL-R-007.xml b/rules/unit-CII-NL/NL-R-007.xml index 46dfa9f6..651e599a 100755 --- a/rules/unit-CII-NL/NL-R-007.xml +++ b/rules/unit-CII-NL/NL-R-007.xml @@ -555,4 +555,206 @@ + + + + NL-R-007 + + + + + urn:fdc:peppol.eu:2017:poacc:billing:01:1.0 + + + urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0 + + + + 2018210 + 381 + + 20180208 + + + + + + 1 + + + Printing paper + + + + 1 + + + + -1000 + + + + VAT + S + 25 + + + -1000 + + + + + + 2 + + + Parker Pen + + + + 5 + + + + -100 + + + + VAT + S + 25 + + + -500 + + + + + + 3 + + + Eraser P-97 + + + + 5 + + + + -500 + + + + VAT + S + 12 + + + -2500 + + + + + Ref 123 + + Allsälj AB + + 12345678 + + + 1234AA + SellerStreet 1 + Commercity + NL + + + 12345678 + + + SE123456789001 + + + Godkänd för F-skatt + + + + Buyercompany ltd + + DK + + + 87654321 + + + + + + 08/00355 + SEK + + -375 + VAT + -1500 + S + 25 + + + -300 + VAT + -2500 + S + 12 + + + + false + + 10 + 0 + 0 + 95 + Loyal customer + + VAT + S + 25 + + + + + true + + 10 + 0 + 0 + ABL + Packaging + + VAT + S + 25 + + + + + 20180307 + + + + -4000 + 0 + 0 + -4000 + -675 + -4675 + -4675 + + + 12345 + + + + + \ No newline at end of file diff --git a/rules/unit-UBL-NL/NL-R-007.xml b/rules/unit-UBL-NL/NL-R-007.xml index 66c8161b..f9704fb1 100755 --- a/rules/unit-UBL-NL/NL-R-007.xml +++ b/rules/unit-UBL-NL/NL-R-007.xml @@ -728,4 +728,173 @@ + + + + NL-R-007 + + + 2.1 + urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0 + urn:fdc:peppol.eu:2017:poacc:billing:01:1.0 + 12115118 + 2015-01-09 + 381 + + Alle leveringen zijn franco. Alle prijzen zijn incl. BTW. Betalingstermijn: 14 dagen netto. Prijswijzigingen voorbehouden. Op al onze + aanbiedingen, leveringen en overeenkomsten zijn van toepassing in de algemene verkoop en leveringsvoorwaarden. Gedeponeerd bij de K.v.K. te + Amsterdam 25-04-'85##Delivery terms + + EUR + 47806 + + 47806 + + + + 46568 + + + + + SITEST00000 + + Simplerstraat 1 + InvoicingStad + 1111 ZZ + + NL + + + + NL1111.11.111.B.01 + + VAT + + + + SimplerInvoicing + SITEST00000 + + + + + + 11111111 + + 10202 + + + Teststraat 123 + Grotestad + 1111 AA + + NL + + + + Ontvanger + 11111111 + + + + + Credit note + + + -27.00 + + -100.00 + -21.00 + + S + 21 + + VAT + + + + + -100.00 + -6.00 + + S + 6 + + VAT + + + + + + -200.00 + -200.00 + -227.00 + -227.00 + + + 1 + -4 + -200.00 + + SimplerInvoicing test invoice + + 166022 + + + S + 21 + + VAT + + + + + 50.00 + + + + 2 + -1 + -100.00 + + Testing procedures + + 661813 + + + S + 6 + + VAT + + + + + 100.00 + + + + 3 + 1 + 100.00 + + Previous Test CreditNote returned + + 438146 + + + S + 21 + + VAT + + + + + 100.00 + + + + \ No newline at end of file