-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #153 from OpenPEPPOL/POACC-508
add fatal check on Invoices with external reference attachment URI
- Loading branch information
Showing
19 changed files
with
301 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
@echo off | ||
setlocal | ||
|
||
REM Set the PROJECT variable to the current directory | ||
set "PROJECT=%~dp0" | ||
|
||
REM Check if the target directory exists, if so, remove it | ||
if exist "%PROJECT%target" ( | ||
docker run --rm -i -v "%PROJECT%:/src" alpine:3.11 rm -rf /src/target | ||
) | ||
|
||
REM Structure | ||
docker run --rm -i ^ | ||
-v "%PROJECT%:/src" ^ | ||
-v "%PROJECT%target:/target" ^ | ||
difi/vefa-structure:0.7 | ||
|
||
REM Validator | ||
docker run --rm -i -v "%PROJECT%:/src" anskaffelser/validator:2.1.0 build -x -t -n eu.peppol.postaward.v3.billing -a rules,guide -target target/validator /src | ||
|
||
REM Generate adoc-files from rules | ||
REM CEN-EN16931-UBL | ||
docker run --rm -i -v "%PROJECT%:/src" -v "%PROJECT%target/generated:/target" --entrypoint java klakegg/saxon:9.8.0-7 -cp /saxon.jar net.sf.saxon.Query -s:/src/rules/sch/CEN-EN16931-UBL.sch -q:tools/xquery/rules_asciidoc_cen.xquery -o:/target/CEN-EN16931-UBL-GENERAL.sch.adoc | ||
docker run --rm -i -v "%PROJECT%:/src" -v "%PROJECT%target/generated:/target" --entrypoint java klakegg/saxon:9.8.0-7 -cp /saxon.jar net.sf.saxon.Query -s:/src/rules/sch/CEN-EN16931-UBL.sch -q:tools/xquery/rules_asciidoc_cen_syntax.xquery -o:/target/CEN-EN16931-UBL-SYNTAX.sch.adoc | ||
|
||
REM PEPPOL-EN16931-UBL | ||
docker run --rm -i -v "%PROJECT%:/src" -v "%PROJECT%target/generated:/target" --entrypoint java klakegg/saxon:9.8.0-7 -cp /saxon.jar net.sf.saxon.Query -s:/src/rules/sch/PEPPOL-EN16931-UBL.sch -q:tools/xquery/rules_asciidoc_peppol.xquery -o:/target/PEPPOL-EN16931-UBL-GENERAL.sch.adoc | ||
docker run --rm -i -v "%PROJECT%:/src" -v "%PROJECT%target/generated:/target" --entrypoint java klakegg/saxon:9.8.0-7 -cp /saxon.jar net.sf.saxon.Query -s:/src/rules/sch/PEPPOL-EN16931-UBL.sch -q:tools/xquery/rules_asciidoc_peppol_national.xquery -o:/target/PEPPOL-EN16931-UBL-NATIONAL.sch.adoc | ||
|
||
REM Example files | ||
docker run --rm -i -v "%PROJECT%target/site/files:/src" alpine:3.6 rm -rf /src/BIS-Billing3-Examples.zip | ||
docker run --rm -i -v "%PROJECT%rules/examples:/src" -v "%PROJECT%target/site/files:/target" -w /src kramos/alpine-zip -r /target/BIS-Billing3-Examples.zip . | ||
|
||
REM Guides | ||
docker run --rm -i -v "%PROJECT%:/documents" -v "%PROJECT%target:/target" difi/asciidoctor | ||
|
||
REM Fix ownership | ||
docker run --rm -i -v "%PROJECT%:/src" alpine:3.11 sh -c "chown -R $(id -u).$(id -g) /src/target" | ||
|
||
endlocal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<testSet xmlns="http://difi.no/xsd/vefa/validator/1.0" | ||
configuration="peppolbis-en16931-base-3.0-cii"> | ||
<assert> | ||
<description>Verify that URI has a correct Uniform Resource Locator.</description> | ||
<scope>PEPPOL-EN16931-R131</scope> | ||
</assert> | ||
<test> | ||
<assert> | ||
<success>PEPPOL-EN16931-R131</success> | ||
</assert> | ||
<CrossIndustryInvoice | ||
xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100" | ||
xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100" | ||
xmlns="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100"> | ||
|
||
<SupplyChainTradeTransaction> | ||
<ram:ApplicableHeaderTradeAgreement> | ||
<ram:AdditionalReferencedDocument> | ||
<ram:URIID>ftp://some/invoice/203040</ram:URIID> | ||
</ram:AdditionalReferencedDocument> | ||
</ram:ApplicableHeaderTradeAgreement> | ||
</SupplyChainTradeTransaction> | ||
|
||
</CrossIndustryInvoice> | ||
</test> | ||
<test> | ||
<assert> | ||
<success>PEPPOL-EN16931-R131</success> | ||
</assert> | ||
<CrossIndustryInvoice | ||
xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100" | ||
xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100" | ||
xmlns="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100"> | ||
|
||
<SupplyChainTradeTransaction> | ||
<ram:ApplicableHeaderTradeAgreement> | ||
<ram:AdditionalReferencedDocument> | ||
<ram:URIID>http://some/invoice/203041</ram:URIID> | ||
</ram:AdditionalReferencedDocument> | ||
</ram:ApplicableHeaderTradeAgreement> | ||
</SupplyChainTradeTransaction> | ||
|
||
</CrossIndustryInvoice> | ||
</test> | ||
<test> | ||
<assert> | ||
<success>PEPPOL-EN16931-R131</success> | ||
</assert> | ||
<CrossIndustryInvoice | ||
xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100" | ||
xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100" | ||
xmlns="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100"> | ||
|
||
<SupplyChainTradeTransaction> | ||
<ram:ApplicableHeaderTradeAgreement> | ||
<ram:AdditionalReferencedDocument> | ||
<ram:URIID>FTPS://some/invoice/203042</ram:URIID> | ||
</ram:AdditionalReferencedDocument> | ||
</ram:ApplicableHeaderTradeAgreement> | ||
</SupplyChainTradeTransaction> | ||
|
||
</CrossIndustryInvoice> | ||
</test> | ||
<test> | ||
<assert> | ||
<success>PEPPOL-EN16931-R131</success> | ||
</assert> | ||
<CrossIndustryInvoice | ||
xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100" | ||
xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100" | ||
xmlns="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100"> | ||
|
||
<SupplyChainTradeTransaction> | ||
<ram:ApplicableHeaderTradeAgreement> | ||
<ram:AdditionalReferencedDocument> | ||
<ram:URIID>HTTPS://some/invoice/203043</ram:URIID> | ||
</ram:AdditionalReferencedDocument> | ||
</ram:ApplicableHeaderTradeAgreement> | ||
</SupplyChainTradeTransaction> | ||
|
||
</CrossIndustryInvoice> | ||
</test> | ||
<test> | ||
<assert> | ||
<error>PEPPOL-EN16931-R131</error> | ||
</assert> | ||
<CrossIndustryInvoice | ||
xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100" | ||
xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100" | ||
xmlns="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100"> | ||
|
||
<SupplyChainTradeTransaction> | ||
<ram:ApplicableHeaderTradeAgreement> | ||
<ram:AdditionalReferencedDocument> | ||
<ram:URIID>HTTPSInvoice 203050</ram:URIID> | ||
</ram:AdditionalReferencedDocument> | ||
</ram:ApplicableHeaderTradeAgreement> | ||
</SupplyChainTradeTransaction> | ||
|
||
|
||
</CrossIndustryInvoice> | ||
</test> | ||
<test> | ||
<assert> | ||
<error>PEPPOL-EN16931-R131</error> | ||
</assert> | ||
<CrossIndustryInvoice | ||
xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100" | ||
xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100" | ||
xmlns="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100"> | ||
|
||
<SupplyChainTradeTransaction> | ||
<ram:ApplicableHeaderTradeAgreement> | ||
<ram:AdditionalReferencedDocument> | ||
<ram:URIID>FTPInvoice 203051</ram:URIID> | ||
</ram:AdditionalReferencedDocument> | ||
</ram:ApplicableHeaderTradeAgreement> | ||
</SupplyChainTradeTransaction> | ||
|
||
|
||
</CrossIndustryInvoice> | ||
</test> | ||
</testSet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.