Skip to content
This repository has been archived by the owner on Jan 19, 2023. It is now read-only.

Commit

Permalink
Merge pull request #6 from bitmarck-service/IK_Zahlungsempfänger
Browse files Browse the repository at this point in the history
Add support for a differing payee in DiGA invoices
  • Loading branch information
christian-schlichtherle authored Nov 27, 2020
2 parents 99dca10 + 293d8dc commit 38eb392
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 15 deletions.
18 changes: 18 additions & 0 deletions src/main/schematron/dre0.sch
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,23 @@
<assert id="DRE0-AHTS-3" test="normalize-space(ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:TaxTotalAmount[@currencyID = 'EUR']) != ''"
>Eine DiGA-Rechnung muß den Mehrwertsteuerbetrag in Euro (EUR) enthalten.</assert>
</rule>
<rule context="ram:CreditorReferenceID[@schemeID = 'IK']">
<assert id="DRE0-CRID-1" test="matches(normalize-space(.), '^\d{9}$')"
>Das Institutionskennzeichen (IK) eines abweichenden Zahlungsempfängers muss exakt neun Ziffern haben.</assert>
<assert id="DRE0-CRID-2" test="normalize-space(.) != normalize-space(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:ID[@schemeID = 'IK'])"
>Das Institutionskennzeichen (IK) eines abweichenden Zahlungsempfängers muss vom IK des DiGA-Herstellers verschieden sein.</assert>
</rule>
<rule context="ram:SpecifiedTradeSettlementPaymentMeans">
<assert id="DRE0-AHTS-4" test="not(ram:ApplicableTradeSettlementFinancialCard)"
>Eine DiGA-Rechnung darf keine Informationen zur Kartenzahlung enthalten.</assert>
<assert id="DRE0-AHTS-5" test="not(ram:PayerPartyDebtorFinancialAccount)"
>Eine DiGA-Rechnung darf keine Informationen zum Konto des Debitors enthalten.</assert>
<assert id="DRE0-AHTS-6" test="not(ram:PayeePartyCreditorFinancialAccount)"
>Eine DiGA-Rechnung darf keine Informationen zum Konto des Kreditors enthalten.</assert>
<assert id="DRE0-AHTS-7" test="not(ram:PayerSpecifiedDebtorFinancialInstitution)"
>Eine DiGA-Rechnung darf keine Informationen zur Bank des Debitors enthalten.</assert>
<assert id="DRE0-AHTS-8" test="not(ram:PayeeSpecifiedCreditorFinancialInstitution)"
>Eine DiGA-Rechnung darf keine Informationen zur Bank des Kreditors enthalten.</assert>
</rule>
</pattern>
</schema>
9 changes: 2 additions & 7 deletions src/test/resources/dre0/xrechnung-1.2-richtig.xml
Original file line number Diff line number Diff line change
Expand Up @@ -125,17 +125,12 @@
</ram:ActualDeliverySupplyChainEvent>
</ram:ApplicableHeaderTradeDelivery>
<ram:ApplicableHeaderTradeSettlement>
<!-- IK des Zahlungsempfängers als "Payee Identifier" (BT-60), nur falls abweichend vom DiGA-Hersteller: -->
<ram:CreditorReferenceID schemeID="IK">987654322</ram:CreditorReferenceID>
<ram:TaxCurrencyCode>EUR</ram:TaxCurrencyCode>
<ram:InvoiceCurrencyCode>EUR</ram:InvoiceCurrencyCode>
<ram:SpecifiedTradeSettlementPaymentMeans>
<ram:TypeCode>30</ram:TypeCode>
<ram:PayeePartyCreditorFinancialAccount>
<ram:IBANID>DE87123456781234567890</ram:IBANID>
<ram:AccountName>Rechnungssteller</ram:AccountName>
</ram:PayeePartyCreditorFinancialAccount>
<ram:PayeeSpecifiedCreditorFinancialInstitution>
<ram:BICID>DEUTSCHBANK</ram:BICID>
</ram:PayeeSpecifiedCreditorFinancialInstitution>
</ram:SpecifiedTradeSettlementPaymentMeans>
<ram:ApplicableTradeTax>
<ram:CalculatedAmount>19.00</ram:CalculatedAmount>
Expand Down
13 changes: 5 additions & 8 deletions src/test/resources/dre0/xrechnung-2.0-richtig.xml
Original file line number Diff line number Diff line change
Expand Up @@ -125,17 +125,14 @@
</ram:ActualDeliverySupplyChainEvent>
</ram:ApplicableHeaderTradeDelivery>
<ram:ApplicableHeaderTradeSettlement>
<!-- <ram:TaxCurrencyCode>EUR</ram:TaxCurrencyCode>-->
<!-- IK des Zahlungsempfängers als "Payee Identifier" (BT-60), nur falls abweichend vom DiGA-Hersteller: -->
<ram:CreditorReferenceID schemeID="IK">987654322</ram:CreditorReferenceID>
<!--
<ram:TaxCurrencyCode>EUR</ram:TaxCurrencyCode>
-->
<ram:InvoiceCurrencyCode>EUR</ram:InvoiceCurrencyCode>
<ram:SpecifiedTradeSettlementPaymentMeans>
<ram:TypeCode>30</ram:TypeCode>
<ram:PayeePartyCreditorFinancialAccount>
<ram:IBANID>DE87123456781234567890</ram:IBANID>
<ram:AccountName>Rechnungssteller</ram:AccountName>
</ram:PayeePartyCreditorFinancialAccount>
<ram:PayeeSpecifiedCreditorFinancialInstitution>
<ram:BICID>DEUTSCHBANK</ram:BICID>
</ram:PayeeSpecifiedCreditorFinancialInstitution>
</ram:SpecifiedTradeSettlementPaymentMeans>
<ram:ApplicableTradeTax>
<ram:CalculatedAmount>19.00</ram:CalculatedAmount>
Expand Down

0 comments on commit 38eb392

Please sign in to comment.