73b5952c1daf35991f1710f03c557824c57e0bd9
The line-level BasisAmount in SpecifiedTradeAllowanceCharge must equal the value the percentage is applied to (BT-137/BT-142 semantic definition, EN 16931-1:2017+A1:2019). For an item with basisQuantity != 1 that value is (price / basisQuantity) * quantity = the line subtotal, not the per-unit price/basisQuantity value. Also matches the line-net formula confirmed for EN 16931-1:2026 (BR-67, ConnectingEurope/eInvoicing-EN16931 issue #445). - ZUGFeRD2PullProvider.getItemTotalAllowanceChargeStr: emit currencyFormat(item.getValue().multiply(item.getQuantity())). - getAllowanceChargeStr (product-level, BG-29 GrossPrice path) is intentionally NOT changed: there BasisAmount is the gross unit price per BT-148, which is per-unit by definition. - CalculationTest: two new XML-level regression tests asserting BasisAmount and ActualAmount in emitted CII XML for allowance and charge cases with basisQuantity != 1 (Extended profile). Fixes #925 (Extended profile), related to #948. Made-with: Cursor
Merge branch 'issue/1095' of https://github.com/philippfischer143/mustangproject into philippfischer143-issue/1095
Mustangproject
Source code repository for the Mustang project open source java PDF invoice metadata library in ZUGFeRD format.
Build
These are the recommended dependencies for the project:
- OpenJDK 21.0.2 2024-01-16
- Apache Maven 3.9.6
You can build the project with:
mvn clean install
This will run the tests, build the project artefacts, and install the artifacts to the local cache. After that the mustang JAR can be used.
More information on how to develop on mustang:
Usage
If you set up a Maven project, you can reference the mustang artifact like this:
<dependency>
<groupId>org.mustangproject</groupId>
<artifactId>validator</artifactId>
<version>2.22.0</version>
<classifier>shaded</classifier>
</dependency>
Further docs on how to develop with mustang:
- Usage examples: Read and write electronic invoices.
- Mustang classes: Using the mustang classes.
Contact
Developer: Jochen Stärk. For questions please contact Jochen at jstaerk [at] usegroup.de
License
Subject to the Apache-2.0 license.
Description
Languages
XSLT
96%
Java
2.9%
HTML
1.1%