ZUV icon indicating copy to clipboard operation
ZUV copied to clipboard

schematron(?) errors if ram:TaxCurrencyCode is present?

Open jstaerk opened this issue 4 years ago • 1 comments

Original text:

if a invoice contains both tax currencycode and invoicecurrencycode like the one on https://www.zugferd-community.net/forum/posting.php?mode=reply&f=4&t=57

    <ram:ApplicableHeaderTradeSettlement>
      <ram:TaxCurrencyCode>EUR</ram:TaxCurrencyCode>
      <ram:InvoiceCurrencyCode>EUR</ram:InvoiceCurrencyCode>

returns a

<error type="4" location="/*[local-name()='CrossIndustryInvoice']/*[local-name()='SupplyChainTradeTransaction']/*[local-name()='ApplicableHeaderTradeSettlement']/*[local-name()='SpecifiedTradeSettlementHeaderMonetarySummation']" criterion="not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:TaxCurrencyCode) or (/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:TaxCurrencyCode and (ram:TaxTotalAmount/@currencyID = /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:TaxCurrencyCode) and not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:TaxCurrencyCode = /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceCurrencyCode))">
	Wenn eine Währung für die Umsatzsteuerabrechnung angegeben wurde, muss der Umsatzsteuergesamtbetrag in der Abrechnungswährung „Invoice total VAT amount in accounting currency“ (BT-111) angegeben werden.</error>

which can be solved if
<ram:TaxCurrencyCode>EUR</ram:TaxCurrencyCode> is removed, but that does not make sense, maybe wrong brackets in the Schematron?

Original attachment M1_RE100084.zip

jstaerk avatar Sep 28 '19 14:09 jstaerk