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

Berechnung der AppliedAllowance und SpecifiedTradeAllowanceCharges #754

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

weclapp-dev
Copy link
Contributor

Wir hatten ein paar Problem bzgl der Allowances und Charges.
Die ZUGFeRD-Rechnungen der DKV interpretieren die anders als die Mustang-lib.
Ich habe da mal eine Version gebaut, die nahe an der Spezifikation ist und zwischen drei verschiedenen Allowances/Charges unterscheidet:
Auf Dokument-Ebene (0..n), auf Positionsebene (0...n) und auf Positionspreis-Ebene (0..1)
Ich habe dazu auch ein issue gefunden:
#663
#660

There is only one allowance of grossPrice. It is calculated on price level and results in netPrice.
The other allowances/charges are calculated on item level. This results in the line total amount.
@FrankHossfeld
Copy link

Will this also fix #640?

@weclapp-dev
Copy link
Contributor Author

No, sorry.
This fix affects only the calculation of charges/allowances on item level.

@FrankHossfeld
Copy link

ok, thanks!

@InnuceEAN
Copy link
Contributor

InnuceEAN commented Feb 25, 2025

Sehr schön, vielleicht brauchen wir dann #568 endlich nicht mehr (ist auch DKV)

Edit: nvm, getItemTotalAllowances() ist drin, getItemTotalCharges() scheint noch zu fehlen

@weclapp-dev
Copy link
Contributor Author

In der Spezifikation sieht es für mich so aus als gäbe es auf der GrossPrice-Ebene nur allowances. Dafür werden aktuell die getItemTotalAllowances verwendet und somit fehlen (hoffentlichI) die getItemTotalCharges nicht.
Aber generell würde ich hier gerne einige Umbenennungen vornehmen und sogar neue Interfaces erstellen.
Und ja, ich denke #568 wird dadurch nicht mehr benötigt.

@InnuceEAN
Copy link
Contributor

InnuceEAN commented Feb 25, 2025

In meiner Spezifikation Factur-X Version 1.0.06 (ZUGFeRD v. 2.2) von https://www.ferd-net.de sehe ich unter "7.1.11 Zuschläge, Abschläge und Rabatte bzw. Ermäßigungen" sowohl Zuschläge als auch Rabatte auf Positionsebene, oder verstehe ich da was falsch? DKV benutzt übrigens auch die Charges auf Positionsebene (Fee)

@weclapp-dev
Copy link
Contributor Author

Ich beziehe mich auf das Feld BT-147 - hier gibt es nur Allowances. Die Charges/Allowances auf Positionsebene stehen mMn unter BG-27 und BG-28. Das sind die, die von der DKV genutzt werden.

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

Successfully merging this pull request may close these issues.

3 participants