Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XRechnung Skonto-Unterstützung #284

Open
Cakmakli-a opened this issue Sep 19, 2022 · 4 comments
Open

XRechnung Skonto-Unterstützung #284

Cakmakli-a opened this issue Sep 19, 2022 · 4 comments

Comments

@Cakmakli-a
Copy link

Cakmakli-a commented Sep 19, 2022

Laut dem "KoSIT-Validator" (v. 1.4.2), konfiguriert mit Validator Configuration 2022-07-15 compatible with XRechnung 2.2.0,
ist die von Mustang (v. 2.5.4) erstellte XRechnung (v. 2.2.0) nicht valide.

Hier der Fehler:

<rep:message id="val-sch.1.2"
level="error"
xpathLocation="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction[1]/ram:ApplicableHeaderTradeSettlement[1]/ram:SpecifiedTradePaymentTerms[1]/ram:ApplicableTradePaymentDiscountTerms[1]/ram:BasisAmount[1]"
code="CII-DT-031">[CII-DT-031] - currencyID should not be present</rep:message>

Hier die betroffene Stelle in der XRechnung:

<ram:ApplicableTradePaymentDiscountTerms>
  <ram:BasisAmount currencyID="EUR">330.65</ram:BasisAmount>
  <ram:CalculationPercent>3</ram:CalculationPercent>
</ram:ApplicableTradePaymentDiscountTerms>

In der Klasse ZUGFeRD2PullProvider wird in Zeile 778 die currencyID eingefügt:
paymentTermsXml += "<ram:BasisAmount currencyID=\"" + currency + "\">" + basisAmount + "</ram:BasisAmount>";

Bitte verifizieren.

@jstaerk
Copy link
Collaborator

jstaerk commented Sep 19, 2022

hallo,
ich würde gern auch validieren, kann ich die Rechnung bitte mal bekommen? XML reicht.

@Cakmakli-a
Copy link
Author

Cakmakli-a commented Sep 19, 2022

Mit Testdaten erstellte "eRechnungen". Die Endung ist einfach mit "txt" angegeben, damit die Datei hier akzeptiert wird.

Factur-x_Extended.txt

XRechnung2.2.0.txt

Auf der Seite Kosit Validator ist eine Validierung auch möglich.
Auch hier der selbe Fehler wie oben.

@jstaerk
Copy link
Collaborator

jstaerk commented Sep 21, 2022

EN16931 verbietet (aus politischen Gründen, außer Deutschland hats keiner gewollt) Skonto, i.e. ApplicableTradePaymentDiscountTerms, da kommt auch die currencyID her. Die XRechnung definiert eine proprietäre Angabe von Skonto im Feld (BT-20, in der XR 2.1.1 spec auf S. 36f) bspw. #SKONTO#TAGE=14#PROZENT=2.25#BASISBETRAG=357.93#. In library\src\test\java\org\mustangproject\ZUGFeRD\XRTest.java ist ein Beispiel in testXREdgeExport wie das mit setPaymentTermDescription gesetzt werden kann.

Man könnte versuchen das (anstelle der XML-Struktur) automatisch zu generieren wenn als Profil XRechnung gewählt ist.
Mögen Sie sich dran versuchen?

@jstaerk jstaerk changed the title XRechnung 2.2 ist nicht valide! XRechnung Skonto-Unterstützung Sep 21, 2022
@Cakmakli-a
Copy link
Author

Cakmakli-a commented Sep 21, 2022

XR v. 2.2 wird ab dem 01.08.2022 empfohlen. Die Specs für XR 2.1.1 ist damit obsolet.
XR mit Angabe des Skontos, in welcher Variante auch immer, sollte valide sein.
XR, die von der aktuellen Mustang Library erstellt wird, wird vom KOSIT Validator
als nicht valide erklärt und empfiehlt diese zurückzuweisen.

Es ist kein Aufwand, das Attribut currencyID aus dem Element ram:BasisAmount zu entfernen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants