@stackforge-eu/factur-x 1.0.5 → 1.0.6
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 +15 -0
- package/dist/index.cjs +5 -5
- package/dist/index.js +5 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.0.6] — 2026-05-23
|
|
11
|
+
|
|
12
|
+
- **`SpecifiedTradeSettlementPaymentMeans` emitted its child elements in the
|
|
13
|
+
wrong order.** The EN16931 / CII XSD `TradeSettlementPaymentMeansType`
|
|
14
|
+
sequence requires `PayerPartyDebtorFinancialAccount` before
|
|
15
|
+
`PayeePartyCreditorFinancialAccount` and
|
|
16
|
+
`PayeeSpecifiedCreditorFinancialInstitution`, but the builder appended the
|
|
17
|
+
debtor account last. Any invoice combining a SEPA direct debit
|
|
18
|
+
(`payment.meansCode = "59"`) with `payment.debtorIban` plus a payee
|
|
19
|
+
IBAN/BIC failed XSD validation with `Element 'PayerPartyDebtorFinancialAccount':
|
|
20
|
+
This element is not expected`. Reordered the three blocks in
|
|
21
|
+
`src/core/xml-builder.ts`; regression test added in
|
|
22
|
+
`tests/xml-builder.test.ts`.
|
|
23
|
+
|
|
10
24
|
## [1.0.5] — 2026-05-12
|
|
11
25
|
|
|
12
26
|
- **`ChargeIndicator`'s inner `Indicator` element was emitted in the wrong XML
|
|
@@ -80,6 +94,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
|
|
|
80
94
|
- Deno compatibility test suite
|
|
81
95
|
|
|
82
96
|
[Unreleased]: https://github.com/StackForge-EU/factur-x/commits/main
|
|
97
|
+
[1.0.6]: https://github.com/StackForge-EU/factur-x/compare/v1.0.5...v1.0.6
|
|
83
98
|
[1.0.5]: https://github.com/StackForge-EU/factur-x/compare/v1.0.4...v1.0.5
|
|
84
99
|
[1.0.4]: https://github.com/StackForge-EU/factur-x/compare/v1.0.3...v1.0.4
|
|
85
100
|
[1.0.3]: https://github.com/StackForge-EU/factur-x/compare/v1.0.2...v1.0.3
|
package/dist/index.cjs
CHANGED
|
@@ -591,6 +591,11 @@ function buildXml(input, profile, flavor) {
|
|
|
591
591
|
sett += tag("ram:PayeeTradeParty", buildParty(input.payee, profile));
|
|
592
592
|
if (payment?.meansCode && atLeast(profile, "BASIC_WL" /* BASIC_WL */)) {
|
|
593
593
|
let pm = tag("ram:TypeCode", escapeXml(payment.meansCode));
|
|
594
|
+
if (payment.debtorIban)
|
|
595
|
+
pm += tag(
|
|
596
|
+
"ram:PayerPartyDebtorFinancialAccount",
|
|
597
|
+
tag("ram:IBANID", escapeXml(payment.debtorIban))
|
|
598
|
+
);
|
|
594
599
|
if (payment.iban || payment.accountId || payment.accountName) {
|
|
595
600
|
let acct = "";
|
|
596
601
|
if (payment.iban) acct += tag("ram:IBANID", escapeXml(payment.iban));
|
|
@@ -604,11 +609,6 @@ function buildXml(input, profile, flavor) {
|
|
|
604
609
|
"ram:PayeeSpecifiedCreditorFinancialInstitution",
|
|
605
610
|
tag("ram:BICID", escapeXml(payment.bic))
|
|
606
611
|
);
|
|
607
|
-
if (payment.debtorIban)
|
|
608
|
-
pm += tag(
|
|
609
|
-
"ram:PayerPartyDebtorFinancialAccount",
|
|
610
|
-
tag("ram:IBANID", escapeXml(payment.debtorIban))
|
|
611
|
-
);
|
|
612
612
|
sett += tag("ram:SpecifiedTradeSettlementPaymentMeans", pm);
|
|
613
613
|
}
|
|
614
614
|
if (input.vatBreakdown && atLeast(profile, "BASIC_WL" /* BASIC_WL */))
|
package/dist/index.js
CHANGED
|
@@ -561,6 +561,11 @@ function buildXml(input, profile, flavor) {
|
|
|
561
561
|
sett += tag("ram:PayeeTradeParty", buildParty(input.payee, profile));
|
|
562
562
|
if (payment?.meansCode && atLeast(profile, "BASIC_WL" /* BASIC_WL */)) {
|
|
563
563
|
let pm = tag("ram:TypeCode", escapeXml(payment.meansCode));
|
|
564
|
+
if (payment.debtorIban)
|
|
565
|
+
pm += tag(
|
|
566
|
+
"ram:PayerPartyDebtorFinancialAccount",
|
|
567
|
+
tag("ram:IBANID", escapeXml(payment.debtorIban))
|
|
568
|
+
);
|
|
564
569
|
if (payment.iban || payment.accountId || payment.accountName) {
|
|
565
570
|
let acct = "";
|
|
566
571
|
if (payment.iban) acct += tag("ram:IBANID", escapeXml(payment.iban));
|
|
@@ -574,11 +579,6 @@ function buildXml(input, profile, flavor) {
|
|
|
574
579
|
"ram:PayeeSpecifiedCreditorFinancialInstitution",
|
|
575
580
|
tag("ram:BICID", escapeXml(payment.bic))
|
|
576
581
|
);
|
|
577
|
-
if (payment.debtorIban)
|
|
578
|
-
pm += tag(
|
|
579
|
-
"ram:PayerPartyDebtorFinancialAccount",
|
|
580
|
-
tag("ram:IBANID", escapeXml(payment.debtorIban))
|
|
581
|
-
);
|
|
582
582
|
sett += tag("ram:SpecifiedTradeSettlementPaymentMeans", pm);
|
|
583
583
|
}
|
|
584
584
|
if (input.vatBreakdown && atLeast(profile, "BASIC_WL" /* BASIC_WL */))
|