Skip to content

Commit

Permalink
Add ”cac:DocumentReference” to Certificate in Peppol PunchOut.
Browse files Browse the repository at this point in the history
  • Loading branch information
Hans Petersen committed Aug 31, 2024
1 parent 21c0a1c commit 40886c8
Show file tree
Hide file tree
Showing 4 changed files with 185 additions and 92 deletions.
38 changes: 38 additions & 0 deletions build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
@echo off
setlocal

:: Get the directory of the script
set "PROJECT=%~dp0"
set "PROJECT=%PROJECT:~0,-1%" :: Remove trailing backslash if any

:: Delete target folder if found
if exist "%PROJECT%\target" (
docker run --rm -i -v "%PROJECT%:/src" alpine:3.6 rm -rf /src/target
)

:: Structure
docker run --rm -i -v "%PROJECT%:/src" -v "%PROJECT%\target:/target" difi/vefa-structure:0.6.1

:: Testing validation rules
docker run --rm -i -v "%PROJECT%:/src" anskaffelser/validator:2.1.0 build -x -t -n eu.peppol.poacc.upgrade.v3 -a rules -target target/validator-test /src

:: Schematron
for %%s in ("%PROJECT%\rules\sch\*.sch") do (
docker run --rm -i -v "%PROJECT%:/src" -v "%PROJECT%\target\schematron:/target" klakegg/schematron prepare /src/rules/sch/%%~nxs /target/%%~nxs
)

docker run --rm -i -v "%PROJECT%\target\site\files:/src" alpine:3.6 rm -rf /src/PEPPOLBIS-Upgrade-Schematron.zip
docker run --rm -i -v "%PROJECT%\target\schematron:/src" -v "%PROJECT%\target\site\files:/target" -w /src kramos/alpine-zip -r /target/PEPPOLBIS-Upgrade-Schematron.zip .

:: Example files
docker run --rm -i -v "%PROJECT%\target\site\files:/src" alpine:3.6 rm -rf /src/PEPPOLBIS-Examples.zip
docker run --rm -i -v "%PROJECT%\rules\examples:/src" -v "%PROJECT%\target\site\files:/target" -w /src kramos/alpine-zip -r /target/PEPPOLBIS-Examples.zip .

:: Guides
docker run --rm -i -v "%PROJECT%:/documents" -v "%PROJECT%\target:/target" difi/asciidoctor

:: Fix ownership (Windows doesn't use the same concept of user/group ownership, so this part is usually not necessary)
:: You can skip this part or just leave it for Unix-like environments using Docker.

endlocal
pause
1 change: 1 addition & 0 deletions guides/release-notes/v3.0.14.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Release date:: November 2024
* Order Response transaction (T76)
* Order Response transaction Advanced (T116)
* Catalogue transaction (T19)
* Punchout transaction (T77)

== Changes to code lists and validation artefacts

Expand Down
12 changes: 8 additions & 4 deletions rules/examples/PunchOut_Example.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="ISO-8859-1"?>

<Catalogue xmlns="urn:oasis:names:specification:ubl:schema:xsd:Catalogue-2"
xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">
xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">
<cbc:CustomizationID>urn:fdc:peppol.eu:poacc:trns:punch_out:3</cbc:CustomizationID>
<cbc:ProfileID>urn:fdc:peppol.eu:poacc:bis:punch_out:3</cbc:ProfileID>
<cbc:ID>1387</cbc:ID>
Expand Down Expand Up @@ -84,7 +84,8 @@
<cbc:ID>12345</cbc:ID>

<cac:Attachment>
<cbc:EmbeddedDocumentBinaryObject mimeCode="image/png" filename="image1.png">UjBsR09EbGhjZ0dTQUxNQUFBUUNBRU1tQ1p0dU1GUXhEUzhi</cbc:EmbeddedDocumentBinaryObject>
<cbc:EmbeddedDocumentBinaryObject mimeCode="image/png" filename="image1.png">
UjBsR09EbGhjZ0dTQUxNQUFBUUNBRU1tQ1p0dU1GUXhEUzhi</cbc:EmbeddedDocumentBinaryObject>
</cac:Attachment>
</cac:ItemSpecificationDocumentReference>
<cac:OriginCountry>
Expand Down Expand Up @@ -124,6 +125,9 @@
<cbc:Name>NA</cbc:Name>
</cac:PartyName>
</cac:IssuerParty>
<cac:DocumentReference>
<cbc:ID>https://someref/to/123450</cbc:ID>
</cac:DocumentReference>
</cac:Certificate>
</cac:Item>
</cac:CatalogueLine>
Expand Down Expand Up @@ -166,4 +170,4 @@
</cac:AdditionalItemProperty>
</cac:Item>
</cac:CatalogueLine>
</Catalogue>
</Catalogue>
Loading

0 comments on commit 40886c8

Please sign in to comment.