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:
@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
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.'
|
||||
}
|
||||
|
@ -370,7 +370,7 @@ export class ZUGFeRDEncoder extends CIIBaseEncoder {
|
||||
if (invoice.paymentOptions) {
|
||||
// Add payment instructions as description - this is generic enough to work with any payment type
|
||||
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);
|
||||
}
|
||||
|
||||
@ -398,10 +398,10 @@ export class ZUGFeRDEncoder extends CIIBaseEncoder {
|
||||
typeCodeElement.textContent = '58';
|
||||
paymentMeansElement.appendChild(typeCodeElement);
|
||||
|
||||
// Information (optional)
|
||||
if (invoice.paymentOptions.info) {
|
||||
// Description (optional)
|
||||
if (invoice.paymentOptions.description) {
|
||||
const infoElement = doc.createElement('ram:Information');
|
||||
infoElement.textContent = invoice.paymentOptions.info;
|
||||
infoElement.textContent = invoice.paymentOptions.description;
|
||||
paymentMeansElement.appendChild(infoElement);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user