Skip to content

Commit

Permalink
POACC-777
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinForsberg-Ecru committed Oct 28, 2024
1 parent 872d504 commit 4f604b7
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 14 deletions.
1 change: 1 addition & 0 deletions guide/release-notes/v3.0.18.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Release date:: November 2024
* The rule (PEPPOL-EN16931-R002), which ensures that the Invoice Note (BT-22) appears no more than once, will not apply if both the buyer and seller are German organizations.
* Update for country-specific rule NL-R-008 Make rule domestic-only.
* sample files and snippits have been updated to reflect the new rule PEPPOL-EN16931-R131
* Severity of Swedish country specific rules SE-R-003, SE-R-004 and SE-R-013 which verifies format of Swedish organization numbers are changed from warning to fatal.

[attributes]
====
Expand Down
6 changes: 3 additions & 3 deletions rules/sch/PEPPOL-EN16931-CII.sch
Original file line number Diff line number Diff line change
Expand Up @@ -444,9 +444,9 @@ Last update: 2024 May release 3.0.17.
<assert id="SE-R-002" test="string(number(substring(ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VAT'], 3, 12))) != 'NaN'" flag="fatal">For Swedish suppliers, the Swedish VAT-numbers must have the trailing 12 characters in numeric form</assert>
</rule>
<rule context="rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:SpecifiedLegalOrganization[../ram:PostalTradeAddress/ram:CountryID = 'SE' and ram:ID]">
<assert id="SE-R-003" test="string(number(ram:ID)) != 'NaN'" flag="warning">Swedish organisation numbers should be numeric.</assert>
<assert id="SE-R-004" test="string-length(normalize-space(ram:ID)) = 10" flag="warning">Swedish organisation numbers consist of 10 characters.</assert>
<assert id="SE-R-013" test="u:checkSEOrgnr(normalize-space(ram:ID))" flag="warning">The last digit of a Swedish organization number must be valid according to the Luhn algorithm.</assert>
<assert id="SE-R-003" test="string(number(ram:ID)) != 'NaN'" flag="fatal">Swedish organisation numbers should be numeric.</assert>
<assert id="SE-R-004" test="string-length(normalize-space(ram:ID)) = 10" flag="fatal">Swedish organisation numbers consist of 10 characters.</assert>
<assert id="SE-R-013" test="u:checkSEOrgnr(normalize-space(ram:ID))" flag="fatal">The last digit of a Swedish organization number must be valid according to the Luhn algorithm.</assert>
</rule>
<rule context="rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty[ram:PostalTradeAddress/ram:CountryID = 'SE' and ram:SpecifiedLegalOrganization/ram:ID]/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'FC']">
<assert id="SE-R-005" test="normalize-space(upper-case(.)) = 'GODKÄND FÖR F-SKATT'" flag="fatal">For Swedish suppliers, when using Seller tax registration identifier, 'Godkänd för F-skatt' must be stated</assert>
Expand Down
6 changes: 3 additions & 3 deletions rules/sch/PEPPOL-EN16931-UBL.sch
Original file line number Diff line number Diff line change
Expand Up @@ -698,11 +698,11 @@ Last update: 2024 November release 3.0.18.
</rule>
<rule
context="//cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity[../cac:PostalAddress/cac:Country/cbc:IdentificationCode = 'SE' and cbc:CompanyID]">
<assert id="SE-R-003" test="string(number(cbc:CompanyID)) != 'NaN'" flag="warning">Swedish
<assert id="SE-R-003" test="string(number(cbc:CompanyID)) != 'NaN'" flag="fatal">Swedish
organisation numbers should be numeric.</assert>
<assert id="SE-R-004" test="string-length(normalize-space(cbc:CompanyID)) = 10" flag="warning">Swedish
<assert id="SE-R-004" test="string-length(normalize-space(cbc:CompanyID)) = 10" flag="fatal">Swedish
organisation numbers consist of 10 characters.</assert>
<assert id="SE-R-013" test="u:checkSEOrgnr(normalize-space(cbc:CompanyID))" flag="warning">The
<assert id="SE-R-013" test="u:checkSEOrgnr(normalize-space(cbc:CompanyID))" flag="fatal">The
last digit of a Swedish organization number must be valid according to the Luhn algorithm.</assert>
</rule>
<rule
Expand Down
2 changes: 1 addition & 1 deletion rules/unit-CII-SE/CII-IN_SE-R-003.xml
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@
</test>
<test>
<assert>
<warning>SE-R-003</warning>
<error>SE-R-003</error>
</assert>
<rsm:CrossIndustryInvoice
xmlns:rsm="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100"
Expand Down
2 changes: 1 addition & 1 deletion rules/unit-CII-SE/CII-IN_SE-R-004.xml
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@
</test>
<test>
<assert>
<warning>SE-R-004</warning>
<error>SE-R-004</error>
</assert>
<rsm:CrossIndustryInvoice
xmlns:rsm="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100"
Expand Down
2 changes: 1 addition & 1 deletion rules/unit-CII-SE/CII-IN_SE-R-013.xml
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@
</test>
<test>
<assert>
<warning>SE-R-004</warning>
<error>SE-R-013</error>
</assert>
<rsm:CrossIndustryInvoice
xmlns:rsm="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100"
Expand Down
2 changes: 1 addition & 1 deletion rules/unit-UBL-SE/UBL-CN_SE-R-003.xml
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@
</test>
<test>
<assert>
<warning>SE-R-003</warning>
<error>SE-R-003</error>
</assert>
<CreditNote
xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
Expand Down
2 changes: 1 addition & 1 deletion rules/unit-UBL-SE/UBL-CN_SE-R-004.xml
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@
</test>
<test>
<assert>
<warning>SE-R-004</warning>
<error>SE-R-004</error>
</assert>
<CreditNote
xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
Expand Down
2 changes: 1 addition & 1 deletion rules/unit-UBL-SE/UBL-IN_SE-R-003.xml
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@
</test>
<test>
<assert>
<warning>SE-R-003</warning>
<error>SE-R-003</error>
</assert>
<Invoice
xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
Expand Down
2 changes: 1 addition & 1 deletion rules/unit-UBL-SE/UBL-IN_SE-R-004.xml
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@
</test>
<test>
<assert>
<warning>SE-R-004</warning>
<error>SE-R-004</error>
</assert>
<Invoice
xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
Expand Down
2 changes: 1 addition & 1 deletion rules/unit-UBL-SE/UBL-IN_SE-R-013.xml
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@
</test>
<test>
<assert>
<warning>SE-R-013</warning>
<error>SE-R-013</error>
</assert>
<Invoice
xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
Expand Down

0 comments on commit 4f604b7

Please sign in to comment.