Skip to content

Commit

Permalink
Merge pull request #60 from OpenPEPPOL/2021-fall-ReleaseCandidate
Browse files Browse the repository at this point in the history
2021 fall release candidate
  • Loading branch information
jerouris authored Nov 1, 2021
2 parents 1bc6ca7 + 72d8538 commit 1c22c95
Show file tree
Hide file tree
Showing 39 changed files with 763 additions and 32 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/build-and-deploy-branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Build and deploy non-master branch to test-docs
on:
push:
branches-ignore:
- master

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v2

- name: Build Spec
run: bash ./build.sh

- name: Deploy on S3
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |
aws s3 sync --acl public-read --region eu-west-1 target/site ${{ secrets.AWS_S3_PATH }}/${GITHUB_REF#refs/heads/}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

# PEPPOL BIS Upgrade

This repository is used for the PEPPOL BIS Upgrade project
This repository is used for the PEPPOL BIS Upgrade project.
1 change: 0 additions & 1 deletion guides/profiles/1-catalogueonly/main.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ include::../../shared/links.adoc[]

= image:../../shared/images/peppol.png[float="right"]PEPPOL BIS Catalogue With Response 3.1
{author}

:doctype: book
:icons: font
:stem:
Expand Down
2 changes: 1 addition & 1 deletion guides/profiles/42-orderagreement/process/use-case1.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[[use-case-1-web-store-used-for-booking-tickets]]
== Use case 1 – Web store used for booking tickets
= Use case 1 – Web store used for booking tickets

This use case describes the process where a customer/buyer orders tickets.

Expand Down
2 changes: 1 addition & 1 deletion guides/profiles/42-orderagreement/process/use-case3.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[[use-case-3-telephone-and-e-mail-is-used-to-order-items]]
== Use case 3 – Telephone and e-mail is used to order items
= Use case 3 – Telephone and e-mail is used to order items

[cols="1h,5",]
|====
Expand Down
2 changes: 2 additions & 0 deletions guides/release-notes/main.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ IMPORTANT: Changes in code lists are also reflected by changes in the validation

:leveloffset: +1

include::v3.0.8.adoc[]

include::v3.0.7.adoc[]

include::v3.0.6-hotfix.adoc[]
Expand Down
26 changes: 26 additions & 0 deletions guides/release-notes/v3.0.8.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
= Version 3.0.8
[horizontal]
Release date:: 2021-11-15

== Changes to BIS document

* BIS Order Agreement - editorial changes in the sub-numbering of a chapters for use cases. [POACC-401]
* BIS Order Only - editorial update to section 6.10 regarding Tax total [POACC-413]
* BIS Order Only, BIS Ordering, BIS Order Agreement - Editorial update to the description of tax usage on line level [POACC-440][POACC-441][POACC-442]

== Changes to syntax

* Catalogue transaction - Clarified description of the business term Cataloge identifier. Changed wording "positive referencing" to "uniquely referencing" [POACC-406].
* Order Response - Editorial update to cac:Party for SellerSupplierParty to be mandatory instead of optional [POACC-428]
* Invoice Response - Removed trailing note left in description of DocumentReference/ID and DocumentReference/issueDate [POACC-447]
* Duplicate tir identifiers in seller and buyer party legal information in order corrected by assignin new id's for Seller party legal information using tir01-p038 to tir01-p041. [POACC-414]

== Changes to code lists and validation artefacts

* Added rule (severity warning) for validation of format for Belgian organisation numbers (ICD:0208). Rule is planned to be changed to severity fatal in 2022 spring release. [POACC-408]

* Added rule (severity warning) for validation of format for Italian identifiers (ICD:0201, 0210, 0211 and EAS 9906 and 9907). Rules are planned to be changed to severity fatal in 2022 spring release. [POACC-423]

* Added transport handling unit (tir16-085) and packaging type (tir16-090) codes to align with CEF listing of codes. (O1, O2, O3, O4, O5, O6, O7, O8, O9, OG, OH, OI, OJ, OL, OM, ON, OP, OQ, OR, OS, OV, OW, OX, OY, OZ, P1, P3, P4, SX). [POACC-427]

* Added UOM codes IUG, KWN, KWS, ODG, ODK, ODM, Q41, Q42, XZZ to aling with CEF listing of codes. [POACC-427]
5 changes: 2 additions & 3 deletions guides/shared/files/vat-cat-line.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@

TAX information on line level is provided in the class `cac:ClassifiedTaxCategory`.

Each line shall have the item TAX information including category code and percentage rate except when the invoice as a whole is not subject to TAX, in which case the percentage shall not be given on line level.
Each line may have the item TAX information including category code and percentage.

.UBL example of line TAX category, when TAX is VAT
[source, xml, indent=0]
----
include::../snippets/snippet-common.xml[tags=vat-line]
----
<1> TAX category according to codelist {vat-codes}
<2> TAX percentage. For EN must be present unless TAX category code is O (the value "O" means "Out of scope for TAX").
<3> Value must identify the correct tax type. For example VAT, GST or sales tax.
<2> Value must identify the correct tax type. For example VAT, GST or sales tax.
2 changes: 1 addition & 1 deletion guides/transactions/01-order/description/tax-total.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[[tax-total]]
= Tax total

It is possible to state the tax amount of the order, on the header level (tax total) and also on line level.
It is possible to state the tax information of the order, on the header level (tax total) and also on line level (taxCategory and rate).

.Example of tax total (header level)
[source, xml, indent=0]
Expand Down
8 changes: 7 additions & 1 deletion rules/sch/PEPPOLBIS-T01.sch
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@
<xi:include href="parts/function/gln.xml"/>
<xi:include href="parts/function/slack.xml"/>
<xi:include href="parts/function/mod11.xml"/>

<xi:include href="parts/function/checkCodiceIPA.xml"/>
<xi:include href="parts/function/addPIVA.xml"/>
<xi:include href="parts/function/checkCF.xml"/>
<xi:include href="parts/function/checkCF16.xml"/>
<xi:include href="parts/function/checkPIVA.xml"/>
<xi:include href="parts/function/checkPIVAseIT.xml"/>
<xi:include href="parts/function/mod97-0208.xml"/>
<!-- Rules -->

<include href="parts/common/empty-elements.sch"/>
Expand Down
8 changes: 7 additions & 1 deletion rules/sch/PEPPOLBIS-T110.sch
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,13 @@
<xi:include href="parts/function/slack.xml"/>
<xi:include href="parts/function/cat2str.xml"/>
<xi:include href="parts/function/mod11.xml"/>

<xi:include href="parts/function/checkCodiceIPA.xml"/>
<xi:include href="parts/function/addPIVA.xml"/>
<xi:include href="parts/function/checkCF.xml"/>
<xi:include href="parts/function/checkCF16.xml"/>
<xi:include href="parts/function/checkPIVA.xml"/>
<xi:include href="parts/function/checkPIVAseIT.xml"/>
<xi:include href="parts/function/mod97-0208.xml"/>
<!-- Rules -->

<include href="parts/common/empty-elements.sch"/>
Expand Down
8 changes: 7 additions & 1 deletion rules/sch/PEPPOLBIS-T111.sch
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,13 @@

<xi:include href="parts/function/gln.xml"/>
<xi:include href="parts/function/mod11.xml"/>

<xi:include href="parts/function/checkCodiceIPA.xml"/>
<xi:include href="parts/function/addPIVA.xml"/>
<xi:include href="parts/function/checkCF.xml"/>
<xi:include href="parts/function/checkCF16.xml"/>
<xi:include href="parts/function/checkPIVA.xml"/>
<xi:include href="parts/function/checkPIVAseIT.xml"/>
<xi:include href="parts/function/mod97-0208.xml"/>
<!-- Rules -->

<include href="parts/common/empty-elements.sch"/>
Expand Down
8 changes: 7 additions & 1 deletion rules/sch/PEPPOLBIS-T16.sch
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,13 @@

<xi:include href="parts/function/gln.xml"/>
<xi:include href="parts/function/mod11.xml"/>

<xi:include href="parts/function/checkCodiceIPA.xml"/>
<xi:include href="parts/function/addPIVA.xml"/>
<xi:include href="parts/function/checkCF.xml"/>
<xi:include href="parts/function/checkCF16.xml"/>
<xi:include href="parts/function/checkPIVA.xml"/>
<xi:include href="parts/function/checkPIVAseIT.xml"/>
<xi:include href="parts/function/mod97-0208.xml"/>
<!-- Rules -->

<include href="parts/common/empty-elements.sch"/>
Expand Down
8 changes: 7 additions & 1 deletion rules/sch/PEPPOLBIS-T19.sch
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@
<xi:include href="parts/function/gln.xml"/>
<xi:include href="parts/function/slack.xml"/>
<xi:include href="parts/function/mod11.xml"/>

<xi:include href="parts/function/checkCodiceIPA.xml"/>
<xi:include href="parts/function/addPIVA.xml"/>
<xi:include href="parts/function/checkCF.xml"/>
<xi:include href="parts/function/checkCF16.xml"/>
<xi:include href="parts/function/checkPIVA.xml"/>
<xi:include href="parts/function/checkPIVAseIT.xml"/>
<xi:include href="parts/function/mod97-0208.xml"/>
<!-- Rules -->

<include href="parts/common/empty-elements.sch"/>
Expand Down
8 changes: 7 additions & 1 deletion rules/sch/PEPPOLBIS-T58.sch
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@
<xi:include href="parts/function/gln.xml"/>
<xi:include href="parts/function/slack.xml"/>
<xi:include href="parts/function/mod11.xml"/>

<xi:include href="parts/function/checkCodiceIPA.xml"/>
<xi:include href="parts/function/addPIVA.xml"/>
<xi:include href="parts/function/checkCF.xml"/>
<xi:include href="parts/function/checkCF16.xml"/>
<xi:include href="parts/function/checkPIVA.xml"/>
<xi:include href="parts/function/checkPIVAseIT.xml"/>
<xi:include href="parts/function/mod97-0208.xml"/>
<!-- Rules -->

<include href="parts/common/empty-elements.sch"/>
Expand Down
8 changes: 7 additions & 1 deletion rules/sch/PEPPOLBIS-T71.sch
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,13 @@

<xi:include href="parts/function/gln.xml"/>
<xi:include href="parts/function/mod11.xml"/>

<xi:include href="parts/function/checkCodiceIPA.xml"/>
<xi:include href="parts/function/addPIVA.xml"/>
<xi:include href="parts/function/checkCF.xml"/>
<xi:include href="parts/function/checkCF16.xml"/>
<xi:include href="parts/function/checkPIVA.xml"/>
<xi:include href="parts/function/checkPIVAseIT.xml"/>
<xi:include href="parts/function/mod97-0208.xml"/>
<!-- Rules -->

<include href="parts/common/empty-elements.sch"/>
Expand Down
8 changes: 7 additions & 1 deletion rules/sch/PEPPOLBIS-T76.sch
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,13 @@

<xi:include href="parts/function/gln.xml"/>
<xi:include href="parts/function/mod11.xml"/>

<xi:include href="parts/function/checkCodiceIPA.xml"/>
<xi:include href="parts/function/addPIVA.xml"/>
<xi:include href="parts/function/checkCF.xml"/>
<xi:include href="parts/function/checkCF16.xml"/>
<xi:include href="parts/function/checkPIVA.xml"/>
<xi:include href="parts/function/checkPIVAseIT.xml"/>
<xi:include href="parts/function/mod97-0208.xml"/>
<!-- Rules -->

<include href="parts/common/empty-elements.sch"/>
Expand Down
8 changes: 7 additions & 1 deletion rules/sch/PEPPOLBIS-T77.sch
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,13 @@

<xi:include href="parts/function/gln.xml"/>
<xi:include href="parts/function/mod11.xml"/>

<xi:include href="parts/function/checkCodiceIPA.xml"/>
<xi:include href="parts/function/addPIVA.xml"/>
<xi:include href="parts/function/checkCF.xml"/>
<xi:include href="parts/function/checkCF16.xml"/>
<xi:include href="parts/function/checkPIVA.xml"/>
<xi:include href="parts/function/checkPIVAseIT.xml"/>
<xi:include href="parts/function/mod97-0208.xml"/>
<!-- Rules -->

<include href="parts/common/empty-elements.sch"/>
Expand Down
8 changes: 8 additions & 0 deletions rules/sch/parts/common.sch
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@

<include href="function/gln.xml"/>
<include href="function/mod11.xml"/>
<include href="function/addPIVA.xml"/>
<include href="function/checkCF.xml"/>
<include href="function/checkCF16.xml"/>
<include href="function/checkPIVA.xml"/>
<include href="function/checkPIVAseIT.xml"/>
<include href="function/mod97-0208.xml"/>
<include href="function/checkCodiceIPA.xml"/>


<include href="common/empty-elements.sch"/>
<include href="common/rules.sch"/>
Expand Down
19 changes: 18 additions & 1 deletion rules/sch/parts/common/rules.sch
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,22 @@
test="matches(normalize-space(), '^[0-9]{9}$') and u:mod11(normalize-space())"
flag="fatal">Norwegian organization number MUST be stated in the correct format.</assert>
</rule>

<rule context="cbc:EndpointID[@schemeID = '0208'] | cac:PartyIdentification/cbc:ID[@schemeID = '0208'] | cbc:CompanyID[@schemeID = '0208']">
<assert id="PEPPOL-COMMON-R043" test="matches(normalize-space(), '^[0-9]{10}$') and u:mod97-0208(normalize-space())" flag="warning">Belgian enterprise number MUST be stated in the correct format.</assert>
</rule>
<rule context="cbc:EndpointID[@schemeID = '0201'] | cac:PartyIdentification/cbc:ID[@schemeID = '0201'] | cbc:CompanyID[@schemeID = '0201']">
<assert id="PEPPOL-COMMON-R044" test="u:checkCodiceIPA(normalize-space())" flag="warning">IPA Code (Codice Univoco Unità Organizzativa) must be stated in the correct format</assert>
</rule>
<rule context="cbc:EndpointID[@schemeID = '0210'] | cac:PartyIdentification/cbc:ID[@schemeID = '0210'] | cbc:CompanyID[@schemeID = '0210']">
<assert id="PEPPOL-COMMON-R045" test="u:checkCF(normalize-space())" flag="warning">Tax Code (Codice Fiscale) must be stated in the correct format</assert>
</rule>
<rule context="cbc:EndpointID[@schemeID = '9907']">
<assert id="PEPPOL-COMMON-R046" test="u:checkCF(normalize-space())" flag="warning">Tax Code (Codice Fiscale) must be stated in the correct format</assert>
</rule>
<rule context="cbc:EndpointID[@schemeID = '0211'] | cac:PartyIdentification/cbc:ID[@schemeID = '0211'] | cbc:CompanyID[@schemeID = '0211']">
<assert id="PEPPOL-COMMON-R047" test="u:checkPIVAseIT(normalize-space())" flag="warning">Italian VAT Code (Partita Iva) must be stated in the correct format</assert>
</rule>
<rule context="cbc:EndpointID[@schemeID = '9906']">
<assert id="PEPPOL-COMMON-R048" test="u:checkPIVAseIT(normalize-space())" flag="warning">Italian VAT Code (Partita Iva) must be stated in the correct format</assert>
</rule>
</pattern>
11 changes: 11 additions & 0 deletions rules/sch/parts/function/addPIVA.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<function name="u:addPIVA" as="xs:integer" xmlns="http://www.w3.org/1999/XSL/Transform">
<param name="arg" as="xs:string"/>
<param name="pari" as="xs:integer"/>
<variable name="tappo" select="if (not($arg castable as xsd:integer)) then 0 else 1"/>
<variable name="mapper" select="if ($tappo = 0) then 0 else
( if ($pari = 1)
then ( xs:integer(substring('0246813579', ( xs:integer(substring($arg,1,1)) +1 ) ,1)) )
else ( xs:integer(substring($arg,1,1) ) )
)"/>
<sequence select="if ($tappo = 0) then $mapper else ( xs:integer($mapper) + u:addPIVA(substring(xs:string($arg),2), (if($pari=0) then 1 else 0) ) )"/>
</function>
31 changes: 31 additions & 0 deletions rules/sch/parts/function/checkCF.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<function name="u:checkCF" as="xs:boolean" xmlns="http://www.w3.org/1999/XSL/Transform">
<param name="arg" as="xs:string?"/>
<sequence select="
if ( (string-length($arg) = 16) or (string-length($arg) = 11) )
then
(
if ((string-length($arg) = 16))
then
(
if (u:checkCF16($arg))
then
(
true()
)
else
(
false()
)
)
else
(
if(($arg castable as xsd:integer)) then true() else false()
)
)
else
(
false()
)
"/>
</function>
16 changes: 16 additions & 0 deletions rules/sch/parts/function/checkCF16.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<function name="u:checkCF16" as="xs:boolean" xmlns="http://www.w3.org/1999/XSL/Transform">
<param name="arg" as="xs:string?"/>
<variable name="allowed-characters">ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz</variable>
<sequence select="
if ( (string-length(translate(substring($arg,1,6), $allowed-characters, '')) = 0) and
(substring($arg,7,2) castable as xsd:integer) and
(string-length(translate(substring($arg,9,1), $allowed-characters, '')) = 0) and
(substring($arg,10,2) castable as xsd:integer) and
(substring($arg,12,3) castable as xsd:string) and
(substring($arg,15,1) castable as xsd:integer) and
(string-length(translate(substring($arg,16,1), $allowed-characters, '')) = 0)
)
then true()
else false()
"/>
</function>
5 changes: 5 additions & 0 deletions rules/sch/parts/function/checkCodiceIPA.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<function name="u:checkCodiceIPA" as="xs:boolean" xmlns="http://www.w3.org/1999/XSL/Transform">
<param name="arg" as="xs:string?"/>
<variable name="allowed-characters">ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789</variable>
<sequence select="if ( (string-length(translate($arg, $allowed-characters, '')) = 0) and (string-length($arg) = 6) ) then true() else false()"/>
</function>
7 changes: 7 additions & 0 deletions rules/sch/parts/function/checkPIVA.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<function name="u:checkPIVA" as="xs:integer" xmlns="http://www.w3.org/1999/XSL/Transform">
<param name="arg" as="xs:string?"/>
<sequence select="
if (not($arg castable as xsd:integer))
then 1
else ( u:addPIVA($arg,xs:integer(0)) mod 10 )"/>
</function>
26 changes: 26 additions & 0 deletions rules/sch/parts/function/checkPIVAseIT.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<function name="u:checkPIVAseIT" as="xs:boolean" xmlns="http://www.w3.org/1999/XSL/Transform">
<param name="arg" as="xs:string"/>
<variable name="paese" select="substring($arg,1,2)"/>
<variable name="codice" select="substring($arg,3)"/>
<sequence select="
if ( $paese = 'IT' or $paese = 'it' )
then
(
if ( ( string-length($codice) = 11 ) and ( if (u:checkPIVA($codice)!=0) then false() else true() ))
then
(
true()
)
else
(
false()
)
)
else
(
true()
)
"/>
</function>
Loading

0 comments on commit 1c22c95

Please sign in to comment.