@stackforge-eu/factur-x 1.0.4 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.0.5] — 2026-05-12
11
+
12
+ - **`ChargeIndicator`'s inner `Indicator` element was emitted in the wrong XML
13
+ namespace.** The XSD requires `udt:Indicator` (UnqualifiedDataType:100) but
14
+ the builder emitted `ram:Indicator` (ReusableAggregateBusinessInformationEntity:100).
15
+ The XSD rejected every invoice carrying a `SpecifiedTradeAllowanceCharge`,
16
+ and the BASIC schematron's `udt:Indicator='true'/'false'` predicates silently
17
+ matched nothing — so every downstream sum over allowances/charges (BR-S-08,
18
+ BR-CO-11, BR-CO-14) computed zero on the allowance/charge side and tripped.
19
+ Affects every caller that uses `allowancesCharges`; previously masked because
20
+ the test suite only exercised allowance presence, never XSD round-trip with
21
+ one. Regression test added in `tests/xsd-validator.test.ts`.
22
+
10
23
  ## [1.0.4] — 2026-05-05
11
24
 
12
25
  ### Fixed
@@ -67,6 +80,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
67
80
  - Deno compatibility test suite
68
81
 
69
82
  [Unreleased]: https://github.com/StackForge-EU/factur-x/commits/main
83
+ [1.0.5]: https://github.com/StackForge-EU/factur-x/compare/v1.0.4...v1.0.5
70
84
  [1.0.4]: https://github.com/StackForge-EU/factur-x/compare/v1.0.3...v1.0.4
71
85
  [1.0.3]: https://github.com/StackForge-EU/factur-x/compare/v1.0.2...v1.0.3
72
86
  [1.0.2]: https://github.com/StackForge-EU/factur-x/compare/v1.0.1...v1.0.2
package/dist/index.cjs CHANGED
@@ -415,7 +415,7 @@ function buildLineItem(line, profile) {
415
415
  );
416
416
  }
417
417
  function buildAllowanceCharge(ac) {
418
- let x = tag("ram:ChargeIndicator", tag("ram:Indicator", ac.isCharge ? "true" : "false"));
418
+ let x = tag("ram:ChargeIndicator", tag("udt:Indicator", ac.isCharge ? "true" : "false"));
419
419
  if (ac.percent !== void 0) x += tag("ram:CalculationPercent", ac.percent.toString());
420
420
  if (ac.baseAmount !== void 0) x += tag("ram:BasisAmount", fmtAmt(ac.baseAmount));
421
421
  x += tag("ram:ActualAmount", fmtAmt(ac.amount));
package/dist/index.js CHANGED
@@ -385,7 +385,7 @@ function buildLineItem(line, profile) {
385
385
  );
386
386
  }
387
387
  function buildAllowanceCharge(ac) {
388
- let x = tag("ram:ChargeIndicator", tag("ram:Indicator", ac.isCharge ? "true" : "false"));
388
+ let x = tag("ram:ChargeIndicator", tag("udt:Indicator", ac.isCharge ? "true" : "false"));
389
389
  if (ac.percent !== void 0) x += tag("ram:CalculationPercent", ac.percent.toString());
390
390
  if (ac.baseAmount !== void 0) x += tag("ram:BasisAmount", fmtAmt(ac.baseAmount));
391
391
  x += tag("ram:ActualAmount", fmtAmt(ac.amount));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stackforge-eu/factur-x",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "type": "module",
5
5
  "description": "Embed Factur-X, ZUGFeRD, and XRechnung structured invoice XML into PDF/A-3 documents",
6
6
  "keywords": [