1331 Commits

Author SHA1 Message Date
langfr
c97c949a2c Enhance javadoc. 2026-05-28 15:39:58 +01:00
langfr
3cd2273621 Merge branch 'master' of https://github.com/ladapos/mustangproject into ladapos-master 2026-05-28 15:12:57 +01:00
A422382
938d23dc87 Fix #1126 IncludedNote SubjectCode ACB, INV 2026-05-27 12:15:23 +02:00
Jochen Stärk
926a953292 [maven-release-plugin] prepare for next development iteration 2026-05-21 10:04:24 +02:00
Jochen Stärk
55486cca41 [maven-release-plugin] prepare release core-2.23.1 2026-05-21 09:59:26 +02:00
Jochen Stärk
7a28c24c91 Around an hour of manual javadoc documentation (why don't I just use chatGPT for that?) 2026-05-21 09:55:06 +02:00
Jochen Stärk
a9b72da265 closes #1120 2026-05-21 09:03:54 +02:00
Jochen Stärk
abf8468958 [maven-release-plugin] rollback the release of core-2.23.1 2026-05-16 14:18:43 +02:00
Jochen Stärk
b7c778d6db [maven-release-plugin] prepare for next development iteration 2026-05-16 09:14:07 +02:00
Jochen Stärk
3c34115c34 [maven-release-plugin] prepare release core-2.23.1 2026-05-16 09:10:45 +02:00
langfr
448bd0b356 Merge branch 'dont-emit-empty-node-for-definedTradeContact' of https://github.com/WorkProg/mustangproject into WorkProg-dont-emit-empty-node-for-definedTradeContact 2026-05-14 21:30:40 +01:00
langfr
7ebd1b61a5 Merge branch 'feature/UltimateShipToTradeParty' of https://github.com/langfr/mustangproject into langfr-feature/UltimateShipToTradeParty 2026-05-14 13:30:17 +01:00
langfr
3655c1de7a Support <ram:DeliveryTypeCode/> 2026-05-13 22:15:02 +01:00
langfr
04d06b14f0 Support <ram:UltimateShipToTradeParty/> 2026-05-13 19:35:35 +01:00
Roland Fredenhagen
dcd9012cd0 dont emit empty node for definedTradeContact 2026-05-12 13:39:44 +02:00
Jochen Staerk
13a85809da Merge pull request #1043 from PhilippGoetje/fix/allowance-charge-percent
Fix percentage-based allowance/charge calculations (EN16931 compliance)
2026-05-12 12:33:56 +02:00
Jochen Stärk
42df52275d Revert "Merge pull request #1067 from phax/java17-base"
This reverts commit f6b6c0a36e, reversing
changes made to d8313dae20.
2026-05-07 13:24:02 +02:00
Jochen Staerk
f6b6c0a36e Merge pull request #1067 from phax/java17-base
Set Java 17 as base + dependency updates + test fix
2026-05-07 13:22:43 +02:00
Jochen Stärk
d8313dae20 Merge branch 'master' of github.com:ZUGFeRD/mustangproject 2026-05-07 13:15:19 +02:00
Marcel Westenberg Aimpulse
1af1e2f14a Added variable for XML_DESCRIPTION string 2026-05-04 15:59:52 +02:00
Marcel Westenberg Aimpulse
81a3e857e2 Added correct link to ZUGFeRD documentation 2026-05-04 15:47:51 +02:00
Philip Helger
51a216bb94 Merge branch 'ZUGFeRD-master' into java17-base 2026-05-01 20:29:46 +02:00
Philip Helger
1abbccc878 Auto-close 2026-05-01 20:26:47 +02:00
Philip Helger
8f484dfc2c Added @TestMethodOrder to honour @Ordered annotation 2026-05-01 20:25:57 +02:00
Philip Helger
48c5c8b5cb Updated to Java 17 + version bumps 2026-05-01 20:25:52 +02:00
Philipp
73b5952c1d Fix line-level SpecifiedTradeAllowanceCharge BasisAmount (BT-137/BT-142)
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
2026-04-27 18:13:56 +02:00
Philipp
dd32514938 Fix percentage-based allowance/charge calculations (EN16931 compliance)
Two arithmetic bugs caused wrong line totals when percentage-based allowances
or charges were used:

Bug A — Product-level (product.allowances): The percent discount was computed
as (price * pct/100) * quantity (line total), then subtracted from the unit
price and multiplied by quantity again — discount applied twice.

Bug B — Item-level (itemAllowances) with basisQuantity != 1: The percent was
applied to price * quantity instead of price * quantity / basisQuantity.

Fix: LineCalculator and XML pull providers now pass context-appropriate
IAbsoluteValueProvider wrappers (perUnitProvider for product-level,
itemBasisProvider for item-level). Allowance.java uses RoundingMode.HALF_UP
in getPercent().divide(100). BasisAmount in XML is formatted via
currencyFormat().

Files changed:
- LineCalculator.java: perUnitProvider, itemBasisProvider in allowance/charge loops
- Allowance.java: RoundingMode.HALF_UP, scale 18
- ZUGFeRD2PullProvider.java: correct providers, format BasisAmount
- OXPullProvider.java, DAPullProvider.java: perUnitProvider for product-level
- CalculationTest.java: @Test on 5 methods, 4 new regression tests

Verification: mvn test -pl library -Dtest=CalculationTest

Full PR description with before/after XML proof: see .project/PR-allowance-charge-fix.md
(Test evidence files in C:\temp\mustang-test\ are for PR attachment only, not in repo.)

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-04-27 18:09:13 +02:00
langfr
2490d1caf9 Add BasisAmount to CashDiscount. 2026-04-25 14:20:27 +01:00
langfr
6e9b5a1223 Merge branch 'bugfix/1022' of https://github.com/langfr/mustangproject into langfr-bugfix/1022 2026-04-25 13:20:19 +01:00
langfr
f5150d962a Merge branch 'bugfix/DespatchDelivery' of https://github.com/langfr/mustangproject into langfr-bugfix/DespatchDelivery 2026-04-25 12:55:29 +01:00
Frank Langelage
bd69a3f32d Merge branch 'master' into bugfix/1062 2026-04-25 12:58:10 +02:00
Jochen Stärk
7db3b1fa0e [maven-release-plugin] prepare for next development iteration 2026-04-23 18:02:33 +02:00
Jochen Stärk
443771cce5 [maven-release-plugin] prepare release core-2.23.0 2026-04-23 18:02:31 +02:00
Jochen Stärk
6418c811bc corrected history, test 2026-04-23 17:46:59 +02:00
Jochen Stärk
d0d6d99192 Added Extended-CTC-FR to profiles for commandline 2026-04-23 17:42:13 +02:00
Jochen Stärk
ca392054e5 corrected tests 2026-04-16 13:53:44 +02:00
Jochen Stärk
3040687147 corrected a test 2026-04-16 13:24:21 +02:00
Jochen Stärk
56e4be84bf removed debug output 2026-04-16 13:23:55 +02:00
Jochen Stärk
98e3168d1d Adding quotes around Strings sometimes helps... 2026-04-10 15:43:05 +02:00
Jochen Staerk
406f3c83d9 Merge pull request #1037 from pgjacobs/zugferd_pdf_xml_compression
Compress attachments
2026-04-10 15:38:23 +02:00
Jochen Staerk
a6946755a3 Merge pull request #1039 from xedaniel/master
fix: #1038
2026-04-10 15:35:49 +02:00
Philip Helger
07f0e32a6a Auto-close 2026-04-10 13:53:25 +02:00
Jochen Staerk
1bcca05fc5 Merge pull request #1083 from truearken/feature-pdf-langs
PDF Visualizations in English and French
2026-04-09 11:22:16 +02:00
Jochen Staerk
6b9961d3e9 Merge pull request #1084 from Marcel-Aimpulse/fix-xml-description
Fix xml description
2026-04-08 16:20:28 +02:00
Jochen Staerk
edb032310d Merge pull request #1055 from langfr/bugfix/ApplicableTradeTax
Correct order of ApplicableTradeTax sub-elements.
2026-04-08 16:17:13 +02:00
Jochen Staerk
060cf623be Merge pull request #1052 from langfr/bugfix/1048
Remove parsing OriginatorDocumentReference.ID as date.
2026-04-08 16:05:39 +02:00
Jochen Staerk
d705f06f95 Merge pull request #1073 from kschwank/feature/hierarchical-positions-xml-export
add hierarchical invoice positions in CII XML export for EXTENDED pro…
2026-04-08 15:52:31 +02:00
Marcel Westenberg Aimpulse
b0f43c0bb5 Extracted local constant for XML description 2026-04-07 18:01:36 +02:00
Marcel Westenberg Aimpulse
e880bf7f6e Changed old invalid link to new ZUGFeRD/factur-x link 2026-04-07 17:31:42 +02:00
Jochen Staerk
7fcf1e93cb Merge pull request #1050 from klaus0x7c4/validation-report-pdf-with-validator-info
Add validator information to PDF report (name and version)
2026-04-07 15:56:59 +02:00