fix(ZUGFeRD encoder & dependency): Update @tsclass/tsclass dependency to ^8.2.0 and fix paymentOptions field in ZUGFeRD encoder for proper description output
This commit is contained in:
parent
518b2219bc
commit
fef3b422df
@ -1,5 +1,12 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 2025-04-04 - 4.1.7 - fix(ZUGFeRD encoder & dependency)
|
||||||
|
Update @tsclass/tsclass dependency to ^8.2.0 and fix paymentOptions field in ZUGFeRD encoder for proper description output
|
||||||
|
|
||||||
|
- Bump @tsclass/tsclass from ^8.1.1 to ^8.2.0 in package.json
|
||||||
|
- Replace invoice.paymentOptions.info with invoice.paymentOptions.description in ts/formats/cii/zugferd/zugferd.encoder.ts
|
||||||
|
- Update PDF metadata timestamps in test output
|
||||||
|
|
||||||
## 2025-04-04 - 4.1.6 - fix(core)
|
## 2025-04-04 - 4.1.6 - fix(core)
|
||||||
Improve PDF XML extraction, embedding, and format detection; update loadPdf/exportPdf error handling; add new validator implementations and enhance IPdf metadata.
|
Improve PDF XML extraction, embedding, and format detection; update loadPdf/exportPdf error handling; add new validator implementations and enhance IPdf metadata.
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@push.rocks/smartfile": "^11.2.0",
|
"@push.rocks/smartfile": "^11.2.0",
|
||||||
"@push.rocks/smartxml": "^1.1.1",
|
"@push.rocks/smartxml": "^1.1.1",
|
||||||
"@tsclass/tsclass": "^8.1.1",
|
"@tsclass/tsclass": "^8.2.0",
|
||||||
"jsdom": "^26.0.0",
|
"jsdom": "^26.0.0",
|
||||||
"pako": "^2.1.0",
|
"pako": "^2.1.0",
|
||||||
"pdf-lib": "^1.17.1",
|
"pdf-lib": "^1.17.1",
|
||||||
|
10
pnpm-lock.yaml
generated
10
pnpm-lock.yaml
generated
@ -15,8 +15,8 @@ importers:
|
|||||||
specifier: ^1.1.1
|
specifier: ^1.1.1
|
||||||
version: 1.1.1
|
version: 1.1.1
|
||||||
'@tsclass/tsclass':
|
'@tsclass/tsclass':
|
||||||
specifier: ^8.1.1
|
specifier: ^8.2.0
|
||||||
version: 8.1.1
|
version: 8.2.0
|
||||||
jsdom:
|
jsdom:
|
||||||
specifier: ^26.0.0
|
specifier: ^26.0.0
|
||||||
version: 26.0.0
|
version: 26.0.0
|
||||||
@ -1508,8 +1508,8 @@ packages:
|
|||||||
'@tsclass/tsclass@4.4.4':
|
'@tsclass/tsclass@4.4.4':
|
||||||
resolution: {integrity: sha512-YZOAF+u+r4u5rCev2uUd1KBTBdfyFdtDmcv4wuN+864lMccbdfRICR3SlJwCfYS1lbeV3QNLYGD30wjRXgvCJA==}
|
resolution: {integrity: sha512-YZOAF+u+r4u5rCev2uUd1KBTBdfyFdtDmcv4wuN+864lMccbdfRICR3SlJwCfYS1lbeV3QNLYGD30wjRXgvCJA==}
|
||||||
|
|
||||||
'@tsclass/tsclass@8.1.1':
|
'@tsclass/tsclass@8.2.0':
|
||||||
resolution: {integrity: sha512-1hCqVj7uIpMfTw8aAiEyAiAhJ18WKRFT2JaHkXBk9dMtLaL0E6sLDxsEp7jjcMRpRvVBzt9aE8fguJth37phNg==}
|
resolution: {integrity: sha512-qh3hhW5k030n3XVz6hDNrRPYZTTAvy7FZSnKYZXCRYV/JpNZw84daI4G4CgECOX/LAWAiW57MRwsFbShTddYBA==}
|
||||||
|
|
||||||
'@types/accepts@1.3.7':
|
'@types/accepts@1.3.7':
|
||||||
resolution: {integrity: sha512-Pay9fq2lM2wXPWbteBsRAGiWH2hig4ZE2asK+mm7kUzlxRTfL961rj89I6zV/E3PcIkDqyuBEcMxFT7rccugeQ==}
|
resolution: {integrity: sha512-Pay9fq2lM2wXPWbteBsRAGiWH2hig4ZE2asK+mm7kUzlxRTfL961rj89I6zV/E3PcIkDqyuBEcMxFT7rccugeQ==}
|
||||||
@ -7398,7 +7398,7 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
type-fest: 4.37.0
|
type-fest: 4.37.0
|
||||||
|
|
||||||
'@tsclass/tsclass@8.1.1':
|
'@tsclass/tsclass@8.2.0':
|
||||||
dependencies:
|
dependencies:
|
||||||
type-fest: 4.39.1
|
type-fest: 4.39.1
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# XInvoice Corpus Testing Summary
|
# XInvoice Corpus Testing Summary
|
||||||
|
|
||||||
Generated on: 2025-04-04T12:11:35.722Z
|
Generated on: 2025-04-04T13:08:19.930Z
|
||||||
|
|
||||||
## Overall Summary
|
## Overall Summary
|
||||||
|
|
||||||
|
Binary file not shown.
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@fin.cx/xinvoice',
|
name: '@fin.cx/xinvoice',
|
||||||
version: '4.1.6',
|
version: '4.1.7',
|
||||||
description: 'A TypeScript module for creating, manipulating, and embedding XML data within PDF files specifically tailored for xinvoice packages.'
|
description: 'A TypeScript module for creating, manipulating, and embedding XML data within PDF files specifically tailored for xinvoice packages.'
|
||||||
}
|
}
|
||||||
|
@ -370,7 +370,7 @@ export class ZUGFeRDEncoder extends CIIBaseEncoder {
|
|||||||
if (invoice.paymentOptions) {
|
if (invoice.paymentOptions) {
|
||||||
// Add payment instructions as description - this is generic enough to work with any payment type
|
// Add payment instructions as description - this is generic enough to work with any payment type
|
||||||
const descriptionElement = doc.createElement('ram:Description');
|
const descriptionElement = doc.createElement('ram:Description');
|
||||||
descriptionElement.textContent = `Due in ${invoice.dueInDays} days. ${invoice.paymentOptions.info || ''}`;
|
descriptionElement.textContent = `Due in ${invoice.dueInDays} days. ${invoice.paymentOptions.description || ''}`;
|
||||||
paymentTermsElement.appendChild(descriptionElement);
|
paymentTermsElement.appendChild(descriptionElement);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -398,10 +398,10 @@ export class ZUGFeRDEncoder extends CIIBaseEncoder {
|
|||||||
typeCodeElement.textContent = '58';
|
typeCodeElement.textContent = '58';
|
||||||
paymentMeansElement.appendChild(typeCodeElement);
|
paymentMeansElement.appendChild(typeCodeElement);
|
||||||
|
|
||||||
// Information (optional)
|
// Description (optional)
|
||||||
if (invoice.paymentOptions.info) {
|
if (invoice.paymentOptions.description) {
|
||||||
const infoElement = doc.createElement('ram:Information');
|
const infoElement = doc.createElement('ram:Information');
|
||||||
infoElement.textContent = invoice.paymentOptions.info;
|
infoElement.textContent = invoice.paymentOptions.description;
|
||||||
paymentMeansElement.appendChild(infoElement);
|
paymentMeansElement.appendChild(infoElement);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user