Skip to content

Commit

Permalink
Merge pull request #27 from BEAst-AB/4.0.2
Browse files Browse the repository at this point in the history
Example data bug fix
  • Loading branch information
RikardLarsson-BEAst authored Apr 22, 2024
2 parents 1779cd8 + 7cc5aad commit 06388b6
Show file tree
Hide file tree
Showing 65 changed files with 24,640 additions and 41,516 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-and-deploy-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
with:
default_author: github_actions
message: 'Generated by github actions'
add: '*.xml'
add: '["*.xml", "*.sch"]'

- name: Branch name
run: echo Deploying on ${{ secrets.AWS_S3_PATH }}/${GITHUB_REF#refs/heads/}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-and-deploy-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
with:
default_author: github_actions
message: 'Generated by github actions'
add: '*.xml'
add: '["*.xml", "*.sch"]'

- name: Deploy on S3
env:
Expand Down
13 changes: 7 additions & 6 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,12 @@ docker run --rm -i -v $PROJECT:/src -v $PROJECT/target/generated:/target atomgra
-s:/src/structure/syntax/ubl-orderagreement.xml \
-xsl:/src/tools/create-mapping-document.xsl \
-o:/src/rules/mapping/Orderagreement.xml -ext:on --allow-external-functions:on
#echo ""Generating mapping documents: Catalogue"
#docker run --rm -i -v $PROJECT:/src -v $PROJECT/target/generated:/target atomgraph/saxon \
# -s:/src/structure/syntax/ubl-catalogue.xml \
# -xsl:/src/tools/create-mapping-document.xsl \
# -o:/src/rules/mapping/Catalogue.xml -ext:on --allow-external-functions:on
echo "Generating mapping documents: Catalogue"
docker run --rm -i -v $PROJECT:/src -v $PROJECT/target/generated:/target atomgraph/saxon \
-s:/src/structure/syntax/ubl-catalogue.xml \
-xsl:/src/tools/create-mapping-document.xsl \
-o:/src/rules/mapping/Catalogue.xml -ext:on --allow-external-functions:on

echo "Generating mapping documents: Advanced Despatch advice"
docker run --rm -i -v $PROJECT:/src -v $PROJECT/target/generated:/target atomgraph/saxon \
-s:/src/structure/syntax/ubl-advanced-despatch-advice.xml \
Expand Down Expand Up @@ -273,4 +274,4 @@ echo "Generating guides"
docker run --rm -i -v $PROJECT:/documents -v $PROJECT/target:/target difi/asciidoctor

echo "Fix ownership"
docker run --rm -i -v $PROJECT:/src alpine:3.6 chown -R $(id -g $USER).$(id -g $USER) /src/target
docker run --rm -i -v $PROJECT:/src alpine:3.6 chown -R $(id -g $USER).$(id -g $USER) /src/target
4 changes: 1 addition & 3 deletions rules/examples/AdvancedDespatchAdvice_Example_Full.xml
Original file line number Diff line number Diff line change
Expand Up @@ -288,9 +288,7 @@
<cac:OriginalDespatchTransportationService>
<cbc:TransportServiceCode>FuelReport</cbc:TransportServiceCode>
<cac:TransportEquipment>
<cbc:TransportEquipmentTypeCode listID="FuelGroup"
listAgencyID="Trafikverket"
listVersionID="2023:1">HVO</cbc:TransportEquipmentTypeCode>
<cbc:TransportEquipmentTypeCode listID="FuelGroup" listAgencyID="Boverket" listVersionID="2023:1">HVO</cbc:TransportEquipmentTypeCode>
<cbc:Description>HVO Diesel</cbc:Description>
<cac:MeasurementDimension>
<cbc:AttributeID>FuelConsumption</cbc:AttributeID>
Expand Down
270 changes: 135 additions & 135 deletions rules/examples/Invoice_Example_Full.xml

Large diffs are not rendered by default.

187 changes: 187 additions & 0 deletions rules/examples/Order use cases/UC1_Order.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@
<?xml version="1.0" encoding="UTF-8"?>
<Order xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="urn:oasis:names:specification:ubl:schema:xsd:Order-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:order:3</cbc:CustomizationID>
<cbc:ProfileID>urn:fdc:peppol.eu:poacc:bis:order_only:3</cbc:ProfileID>
<cbc:ID>1</cbc:ID>
<cbc:IssueDate>2013-07-01</cbc:IssueDate>
<cbc:IssueTime>05:10:10</cbc:IssueTime>
<cbc:DocumentCurrencyCode listID="ISO4217">EUR</cbc:DocumentCurrencyCode>
<cbc:AccountingCost>MAFO</cbc:AccountingCost>
<cac:ValidityPeriod>
<cbc:EndDate>2013-07-30</cbc:EndDate>
</cac:ValidityPeriod>
<cac:Contract>
<cbc:ID>C1</cbc:ID>
</cac:Contract>
<cac:BuyerCustomerParty>
<cac:Party>
<cbc:EndpointID schemeID="0088">7300010000001</cbc:EndpointID>
<cac:PartyIdentification>
<cbc:ID schemeID="0088">7300010000001</cbc:ID>
</cac:PartyIdentification>
<cac:PartyName>
<cbc:Name>City Hospital</cbc:Name>
</cac:PartyName>
<cac:PartyLegalEntity>
<cbc:RegistrationName>City Hospital 345433</cbc:RegistrationName>
<cbc:CompanyID schemeID="0088">7300010000001</cbc:CompanyID>
<cac:RegistrationAddress>
<cbc:CityName>Eurocity</cbc:CityName>
<cac:Country>
<cbc:IdentificationCode listID="ISO3166-1:Alpha2">SE</cbc:IdentificationCode>
</cac:Country>
</cac:RegistrationAddress>
</cac:PartyLegalEntity>
<cac:Contact>
<cbc:Name>Martin Foggerty</cbc:Name>
<cbc:Telephone>+46555785488</cbc:Telephone>
<cbc:ElectronicMail>[email protected]</cbc:ElectronicMail>
</cac:Contact>
</cac:Party>
</cac:BuyerCustomerParty>
<cac:SellerSupplierParty>
<cac:Party>
<cbc:EndpointID schemeID="0192">987654325</cbc:EndpointID>
<cac:PartyIdentification>
<cbc:ID schemeID="0192">987654325</cbc:ID>
</cac:PartyIdentification>
<cac:PostalAddress>
<cbc:StreetName>Harbour street</cbc:StreetName>
<cbc:AdditionalStreetName>Dock 45</cbc:AdditionalStreetName>
<cbc:CityName>Bergen</cbc:CityName>
<cbc:PostalZone>5005</cbc:PostalZone>
<cbc:CountrySubentity>Region West</cbc:CountrySubentity>
<cac:AddressLine>
<cbc:Line>Gate 34</cbc:Line>
</cac:AddressLine>
<cac:Country>
<cbc:IdentificationCode>NO</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyLegalEntity>
<cbc:RegistrationName>The Supplier AB</cbc:RegistrationName>
</cac:PartyLegalEntity>
</cac:Party>
</cac:SellerSupplierParty>
<cac:Delivery>
<cac:DeliveryLocation>
<cac:Address>
<cbc:StreetName>Lower street 5</cbc:StreetName>
<cbc:AdditionalStreetName>Reception</cbc:AdditionalStreetName>
<cbc:CityName>Stockholm</cbc:CityName>
<cbc:PostalZone>11120</cbc:PostalZone>
<cac:Country>
<cbc:IdentificationCode listID="ISO3166-1:Alpha2">SE</cbc:IdentificationCode>
</cac:Country>
</cac:Address>
</cac:DeliveryLocation>
<cac:RequestedDeliveryPeriod>
<cbc:StartDate>2013-07-15</cbc:StartDate>
<cbc:EndDate>2013-07-16</cbc:EndDate>
</cac:RequestedDeliveryPeriod>
<cac:DeliveryParty>
<cac:PartyName>
<cbc:Name>Hospital Tourist Department</cbc:Name>
</cac:PartyName>
<cac:Contact>
<cbc:Name>John</cbc:Name>
<cbc:Telephone>+465558877523</cbc:Telephone>
<cbc:ElectronicMail>[email protected]</cbc:ElectronicMail>
</cac:Contact>
</cac:DeliveryParty>
</cac:Delivery>
<cac:TaxTotal>
<cbc:TaxAmount currencyID="EUR">28.75</cbc:TaxAmount>
</cac:TaxTotal>
<cac:AnticipatedMonetaryTotal>
<cbc:LineExtensionAmount currencyID="EUR">115</cbc:LineExtensionAmount>
<cbc:PayableAmount currencyID="EUR">143.75</cbc:PayableAmount>
</cac:AnticipatedMonetaryTotal>
<cac:OrderLine>
<cac:LineItem>
<cbc:ID>1</cbc:ID>
<cbc:Quantity unitCode="NAR" unitCodeListID="UNECERec20">10</cbc:Quantity>
<cbc:LineExtensionAmount currencyID="EUR">40</cbc:LineExtensionAmount>
<cbc:AccountingCost>MAFO-1</cbc:AccountingCost>
<cac:Price>
<cbc:PriceAmount currencyID="EUR">4</cbc:PriceAmount>
</cac:Price>
<cac:Item>
<cbc:Description>1x12 pack sauce bags</cbc:Description>
<cbc:Name>Brown sauce</cbc:Name>
<cac:SellersItemIdentification>
<cbc:ID>SN-33</cbc:ID>
</cac:SellersItemIdentification>
<cac:StandardItemIdentification>
<cbc:ID schemeID="0160">05704066204093</cbc:ID>
</cac:StandardItemIdentification>
<cac:ClassifiedTaxCategory>
<cbc:ID schemeID="UNCL5305">S</cbc:ID>
<cbc:Percent>25</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
</cac:LineItem>
</cac:OrderLine>
<cac:OrderLine>
<cac:LineItem>
<cbc:ID>2</cbc:ID>
<cbc:Quantity unitCode="NAR" unitCodeListID="UNECERec20">5</cbc:Quantity>
<cbc:LineExtensionAmount currencyID="EUR">30</cbc:LineExtensionAmount>
<cbc:AccountingCost>MAFO-1</cbc:AccountingCost>
<cac:Price>
<cbc:PriceAmount currencyID="EUR">6</cbc:PriceAmount>
</cac:Price>
<cac:Item>
<cbc:Description>1x12 pack sauce bags</cbc:Description>
<cbc:Name>White sauce</cbc:Name>
<cac:SellersItemIdentification>
<cbc:ID>SN-34</cbc:ID>
</cac:SellersItemIdentification>
<cac:StandardItemIdentification>
<cbc:ID schemeID="0160">08722700575887</cbc:ID>
</cac:StandardItemIdentification>
<cac:ClassifiedTaxCategory>
<cbc:ID schemeID="UNCL5305">S</cbc:ID>
<cbc:Percent>25</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
</cac:LineItem>
</cac:OrderLine>
<cac:OrderLine>
<cac:LineItem>
<cbc:ID>3</cbc:ID>
<cbc:Quantity unitCode="NAR" unitCodeListID="UNECERec20">15</cbc:Quantity>
<cbc:LineExtensionAmount currencyID="EUR">45</cbc:LineExtensionAmount>
<cbc:AccountingCost>MAFO-1</cbc:AccountingCost>
<cac:Price>
<cbc:PriceAmount currencyID="EUR">3</cbc:PriceAmount>
</cac:Price>
<cac:Item>
<cbc:Description>1x12 pack sauce bags</cbc:Description>
<cbc:Name>Pepper sauce</cbc:Name>
<cac:SellersItemIdentification>
<cbc:ID>SN-35</cbc:ID>
</cac:SellersItemIdentification>
<cac:StandardItemIdentification>
<cbc:ID schemeID="0160">08722700577584</cbc:ID>
</cac:StandardItemIdentification>
<cac:ClassifiedTaxCategory>
<cbc:ID schemeID="UNCL5305">S</cbc:ID>
<cbc:Percent>25</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
</cac:LineItem>
</cac:OrderLine>
</Order>
Loading

0 comments on commit 06388b6

Please sign in to comment.