shareneus 1.7.17 → 1.7.18
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.
|
@@ -261,11 +261,18 @@ function buildPdfDocDefinition(PDFInvoiceData = {}, PrintConfigData = {}, printC
|
|
|
261
261
|
}, ...invoiceTotalsAndNotesContent, ...signatureContent);
|
|
262
262
|
});
|
|
263
263
|
const dd = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ pageSize: pageSize }, (typeof pageSize === 'string' ? { pageOrientation: requestedPageOrientation } : {})), { pageMargins: pageMargins, content: content, info: {
|
|
264
|
-
title:
|
|
264
|
+
title: GetFileName(PDFInvoiceData),
|
|
265
265
|
subject: Array.isArray(printCopies) ? printCopies.join(', ') : ''
|
|
266
266
|
} }), (background ? { background } : {})), (watermark ? { watermark } : {})), (pageHeader !== null ? { header: pageHeader } : {})), (pageFooter !== null ? { footer: pageFooter } : {}));
|
|
267
267
|
return dd;
|
|
268
268
|
}
|
|
269
|
+
function GetFileName(ROPrintData) {
|
|
270
|
+
let fileName = ROPrintData.HeaderName;
|
|
271
|
+
if (!tr_utils_1.TrUtils.IsNull(ROPrintData.Product) && !tr_utils_1.TrUtils.IsEmpty(ROPrintData.Product.RegNo)) {
|
|
272
|
+
fileName = fileName + '-' + ROPrintData.Product.RegNo;
|
|
273
|
+
}
|
|
274
|
+
return fileName;
|
|
275
|
+
}
|
|
269
276
|
function normalizeCopyLabels(printCopies = []) {
|
|
270
277
|
const labels = Array.isArray(printCopies)
|
|
271
278
|
? printCopies
|
package/package.json
CHANGED
|
@@ -296,7 +296,7 @@ function buildPdfDocDefinition(PDFInvoiceData: any = {}, PrintConfigData: any =
|
|
|
296
296
|
pageMargins: pageMargins,
|
|
297
297
|
content: content,
|
|
298
298
|
info: {
|
|
299
|
-
title:
|
|
299
|
+
title: GetFileName(PDFInvoiceData),
|
|
300
300
|
subject: Array.isArray(printCopies) ? printCopies.join(', ') : ''
|
|
301
301
|
},
|
|
302
302
|
...(background ? { background } : {}),
|
|
@@ -308,6 +308,14 @@ function buildPdfDocDefinition(PDFInvoiceData: any = {}, PrintConfigData: any =
|
|
|
308
308
|
return dd;
|
|
309
309
|
}
|
|
310
310
|
|
|
311
|
+
function GetFileName(ROPrintData: any) {
|
|
312
|
+
let fileName: string = ROPrintData.HeaderName;
|
|
313
|
+
if (!TrUtils.IsNull(ROPrintData.Product) && !TrUtils.IsEmpty(ROPrintData.Product.RegNo)) {
|
|
314
|
+
fileName = fileName + '-' + ROPrintData.Product.RegNo;
|
|
315
|
+
}
|
|
316
|
+
return fileName;
|
|
317
|
+
}
|
|
318
|
+
|
|
311
319
|
function normalizeCopyLabels(printCopies: string[] = []) {
|
|
312
320
|
const labels = Array.isArray(printCopies)
|
|
313
321
|
? printCopies
|