Skip to content

Commit

Permalink
Merge branch '53-add-test-cen-unexpected-for-br-co-25' into 'master'
Browse files Browse the repository at this point in the history
Resolve "Add test CEN unexpected for BR-CO-25"

Closes #53 and #59

See merge request xrechnung/validator-configuration-xrechnung!47
  • Loading branch information
rkottmann committed Oct 13, 2022
2 parents 26672f3 + 0b38e25 commit ee8e0df
Show file tree
Hide file tree
Showing 3 changed files with 157 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,17 @@ This release is compatible with XRechnung ?.?.?
### Added

* Test to monitor implementation of HUF rounding rules
* Test to monitor implementation of BR-CO-25
* infrastructure to validate custom tests via Ant target `create-validator-reports-from-custom-tests`

### Changed

* Unexpected behaviour tests follow target state logic

### Fixed

* removed empty file in `test/unexpected`

## 2022-07-15

This release is compatible with XRechnung 2.2.0
Expand Down
Empty file.
152 changes: 152 additions & 0 deletions src/test/unexpected/cii-br-co-25.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright © 2020 BITMARCK Service GmbH
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-->
<rsm:CrossIndustryInvoice xmlns:rsm="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100"
xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100"
xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100">
<rsm:ExchangedDocumentContext>
<ram:GuidelineSpecifiedDocumentContextParameter>
<ram:ID>urn:cen.eu:en16931:2017#compliant#urn:xoev-de:kosit:standard:xrechnung_2.2</ram:ID>
</ram:GuidelineSpecifiedDocumentContextParameter>
</rsm:ExchangedDocumentContext>
<rsm:ExchangedDocument>
<ram:ID>2020-1</ram:ID>
<ram:TypeCode>380</ram:TypeCode>
<ram:IssueDateTime>
<udt:DateTimeString format="102">20200103</udt:DateTimeString>
</ram:IssueDateTime>
<ram:IncludedNote>
<ram:Content>Eine Testrechnung für das Projekt DiGA-Rechnung.</ram:Content>
</ram:IncludedNote>
</rsm:ExchangedDocument>
<rsm:SupplyChainTradeTransaction>
<ram:IncludedSupplyChainTradeLineItem>
<ram:AssociatedDocumentLineDocument>
<ram:LineID>TEST_POSITION_01</ram:LineID>
</ram:AssociatedDocumentLineDocument>
<ram:SpecifiedTradeProduct>
<ram:GlobalID schemeID="0088">12345678</ram:GlobalID>
<ram:BuyerAssignedID>ABCDEFGHIJKLMNOP</ram:BuyerAssignedID>
<ram:Name>Tinnitus Rex</ram:Name>
<ram:Description>Ein Artikel für Testrechnungen.</ram:Description>
</ram:SpecifiedTradeProduct>
<ram:SpecifiedLineTradeAgreement>
<ram:NetPriceProductTradePrice>
<ram:ChargeAmount>100.00</ram:ChargeAmount>
</ram:NetPriceProductTradePrice>
</ram:SpecifiedLineTradeAgreement>
<ram:SpecifiedLineTradeDelivery>
<!-- Eine Packungseinheit: -->
<ram:BilledQuantity unitCode="C62">1</ram:BilledQuantity>
</ram:SpecifiedLineTradeDelivery>
<ram:SpecifiedLineTradeSettlement>
<ram:ApplicableTradeTax>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:CategoryCode>S</ram:CategoryCode>
<ram:RateApplicablePercent>19.00</ram:RateApplicablePercent>
</ram:ApplicableTradeTax>
<ram:SpecifiedTradeSettlementLineMonetarySummation>
<ram:LineTotalAmount>100.00</ram:LineTotalAmount>
</ram:SpecifiedTradeSettlementLineMonetarySummation>
</ram:SpecifiedLineTradeSettlement>
</ram:IncludedSupplyChainTradeLineItem>
<ram:ApplicableHeaderTradeAgreement>
<ram:BuyerReference>Leitweg-ID</ram:BuyerReference>
<ram:SellerTradeParty>
<ram:GlobalID schemeID="0088">987654321</ram:GlobalID>
<ram:Name>Rechnungssteller</ram:Name>
<ram:DefinedTradeContact>
<ram:PersonName>Max Mustermann</ram:PersonName>
<ram:TelephoneUniversalCommunication>
<ram:CompleteNumber>+49 000 001 0001</ram:CompleteNumber>
</ram:TelephoneUniversalCommunication>
<ram:EmailURIUniversalCommunication>
<ram:URIID>max.mustermann@rechnungssteller.de</ram:URIID>
</ram:EmailURIUniversalCommunication>
</ram:DefinedTradeContact>
<ram:PostalTradeAddress>
<ram:PostcodeCode>01234</ram:PostcodeCode>
<ram:LineOne>Musterstraße 1</ram:LineOne>
<ram:CityName>Berlin</ram:CityName>
<ram:CountryID>DE</ram:CountryID>
</ram:PostalTradeAddress>
<ram:SpecifiedTaxRegistration>
<ram:ID schemeID="VA">DE 123 456 789</ram:ID>
</ram:SpecifiedTaxRegistration>
</ram:SellerTradeParty>
<ram:BuyerTradeParty>
<ram:GlobalID schemeID="0088">123456789</ram:GlobalID>
<ram:Name>Rechnungsempfänger</ram:Name>
<ram:PostalTradeAddress>
<ram:PostcodeCode>01234</ram:PostcodeCode>
<ram:LineOne>Musterstraße 2</ram:LineOne>
<ram:CityName>Berlin</ram:CityName>
<ram:CountryID>DE</ram:CountryID>
</ram:PostalTradeAddress>
</ram:BuyerTradeParty>
</ram:ApplicableHeaderTradeAgreement>
<ram:ApplicableHeaderTradeDelivery>
<ram:ActualDeliverySupplyChainEvent>
<ram:OccurrenceDateTime>
<!-- Tag der Leistungserbringung -->
<udt:DateTimeString format="102">20200102</udt:DateTimeString>
</ram:OccurrenceDateTime>
</ram:ActualDeliverySupplyChainEvent>
</ram:ApplicableHeaderTradeDelivery>
<ram:ApplicableHeaderTradeSettlement>
<ram:InvoiceCurrencyCode>EUR</ram:InvoiceCurrencyCode>
<ram:PayeeTradeParty>
<ram:GlobalID schemeID="0088">987654322</ram:GlobalID>
<ram:Name>Payee</ram:Name>
</ram:PayeeTradeParty>

<ram:SpecifiedTradeSettlementPaymentMeans>
<ram:TypeCode>30</ram:TypeCode>
<ram:PayeePartyCreditorFinancialAccount>
<ram:IBANID>DE75512108001245126199</ram:IBANID>
</ram:PayeePartyCreditorFinancialAccount>
</ram:SpecifiedTradeSettlementPaymentMeans>
<ram:ApplicableTradeTax>
<ram:CalculatedAmount>19.00</ram:CalculatedAmount>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:BasisAmount>100.00</ram:BasisAmount>
<ram:CategoryCode>S</ram:CategoryCode>
<ram:RateApplicablePercent>19.00</ram:RateApplicablePercent>
</ram:ApplicableTradeTax>
<ram:SpecifiedTradePaymentTerms>
<!-- test to monitor correct implementation of BR-CO-25: currently, an empty Description (BT-20) is accepted, but should throw an error, if BT-9 is not provided -->
<!-- BT-20 Payment Terms -->
<?xmute mutator="identity" schematron-valid="cencii:BR-CO-25" id="cii-br-co-25-bt-9-not-empty"?>
<?xmute mutator="empty" schematron-invalid="cencii:BR-CO-25" id="cii-br-co-25-bt-9-empty" description="expected-to-fail: BT-20 should not be empty"?>
<ram:Description>[Payment Terms]</ram:Description>
<!-- BT-9 Payment Due Date -->
<!--
<ram:DueDateDateTime>
<udt:DateTimeString format="102">20221005</udt:DateTimeString>
</ram:DueDateDateTime>
-->

</ram:SpecifiedTradePaymentTerms>
<ram:SpecifiedTradeSettlementHeaderMonetarySummation>
<ram:LineTotalAmount>100.00</ram:LineTotalAmount>
<ram:TaxBasisTotalAmount>100.00</ram:TaxBasisTotalAmount>
<ram:TaxTotalAmount currencyID="EUR">19.00</ram:TaxTotalAmount>
<ram:GrandTotalAmount>119.00</ram:GrandTotalAmount>
<ram:DuePayableAmount>119.00</ram:DuePayableAmount>
</ram:SpecifiedTradeSettlementHeaderMonetarySummation>
</ram:ApplicableHeaderTradeSettlement>
</rsm:SupplyChainTradeTransaction>
</rsm:CrossIndustryInvoice>

0 comments on commit ee8e0df

Please sign in to comment.