shareneus 1.6.80 → 1.6.81
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.
|
@@ -230,23 +230,33 @@ function buildPdfDocDefinition(PDFInvoiceData = {}, PrintConfigData = {}, printC
|
|
|
230
230
|
copyLabels.forEach((copyLabel, index) => {
|
|
231
231
|
var _a, _b;
|
|
232
232
|
let invoiceHeaderContent;
|
|
233
|
-
let invoiceHeadingContent;
|
|
234
233
|
let invoicePartyDetailsContent;
|
|
234
|
+
let invoiceContentSections;
|
|
235
235
|
if (PrintConfigData.IsPoSPrint) {
|
|
236
236
|
invoiceHeaderContent = [GetMainHeaderInfo(PDFInvoiceData === null || PDFInvoiceData === void 0 ? void 0 : PDFInvoiceData.Entity, PrintConfig === null || PrintConfig === void 0 ? void 0 : PrintConfig.Image, (_a = PrintConfig === null || PrintConfig === void 0 ? void 0 : PrintConfig.headerStyles) === null || _a === void 0 ? void 0 : _a.OrgNameClr, (_b = PrintConfig === null || PrintConfig === void 0 ? void 0 : PrintConfig.headerStyles) === null || _b === void 0 ? void 0 : _b.AdrsClr, PDFInvoiceData)];
|
|
237
237
|
invoicePartyDetailsContent = [GetPartyDetails(PDFInvoiceData === null || PDFInvoiceData === void 0 ? void 0 : PDFInvoiceData.Entity, PDFInvoiceData)];
|
|
238
238
|
}
|
|
239
239
|
else {
|
|
240
240
|
invoiceHeaderContent = (0, pdf_header_footer_section_1.buildDocumentHeaderSection)(PrintConfig, PDFInvoiceData);
|
|
241
|
-
invoiceHeadingContent = (0, pdf_header_footer_section_1.buildDocumentHeadingSection)(PDFInvoiceData, PrintConfig, availableWidth);
|
|
242
241
|
invoicePartyDetailsContent = (0, pdf_party_details_section_1.buildInvoicePartyDetailsSection)(PDFInvoiceData, PrintConfig === null || PrintConfig === void 0 ? void 0 : PrintConfig.Customer, PrintConfig);
|
|
243
242
|
}
|
|
244
|
-
// const invoiceHeaderContent = buildDocumentHeaderSection(PrintConfig, PDFInvoiceData);
|
|
245
|
-
// const invoiceHeadingContent = buildDocumentHeadingSection(PDFInvoiceData, PrintConfig, availableWidth);
|
|
246
|
-
// const invoicePartyDetailsContent = buildInvoicePartyDetailsSection(PDFInvoiceData, PrintConfig?.Customer, PrintConfig);
|
|
247
243
|
const invoiceTotalsAndNotesContent = (0, pdf_totals_section_1.buildInvoiceTotalsAndNotesSection)(PDFInvoiceData, availableWidth, PrintConfigData);
|
|
248
244
|
const signatureContent = (0, pdf_totals_section_1.buildSignatureSection)(PrintConfig, PDFInvoiceData, availableWidth);
|
|
249
245
|
const tableData = (0, pdf_table_section_1.buildInvoiceTableData)(PDFInvoiceData, PrintConfig, availableWidth);
|
|
246
|
+
if (PrintConfigData.IsPoSPrint) {
|
|
247
|
+
invoiceContentSections = [
|
|
248
|
+
...invoiceHeaderContent,
|
|
249
|
+
...invoicePartyDetailsContent,
|
|
250
|
+
];
|
|
251
|
+
}
|
|
252
|
+
else {
|
|
253
|
+
const invoiceHeadingContent = (0, pdf_header_footer_section_1.buildDocumentHeadingSection)(PDFInvoiceData, PrintConfig, availableWidth);
|
|
254
|
+
invoiceContentSections = [
|
|
255
|
+
...invoiceHeaderContent,
|
|
256
|
+
...invoiceHeadingContent,
|
|
257
|
+
...invoicePartyDetailsContent,
|
|
258
|
+
];
|
|
259
|
+
}
|
|
250
260
|
if (index > 0) {
|
|
251
261
|
content.push({ text: '', pageBreak: 'before' });
|
|
252
262
|
}
|
|
@@ -259,7 +269,7 @@ function buildPdfDocDefinition(PDFInvoiceData = {}, PrintConfigData = {}, printC
|
|
|
259
269
|
margin: [0, 0, 0, 2]
|
|
260
270
|
});
|
|
261
271
|
}
|
|
262
|
-
content.push(...
|
|
272
|
+
content.push(...invoiceContentSections, {
|
|
263
273
|
table: {
|
|
264
274
|
lineHeight: 2,
|
|
265
275
|
headerRows: tableData.headerRows.length,
|