shareneus 1.6.79 → 1.6.80
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.
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.CreateInvoicePDFService = CreateInvoicePDFService;
|
|
7
7
|
exports.DownloadInvoicePDFService = DownloadInvoicePDFService;
|
|
8
8
|
exports.GetInvoicePdfDataUrl = GetInvoicePdfDataUrl;
|
|
9
|
+
const pdf_party_details_section_1 = require("../../../shared/party-details-section/pdf-party-details.section");
|
|
9
10
|
const pdf_table_section_1 = require("../../../shared/table-section/pdf-table.section");
|
|
10
11
|
const pdf_totals_section_1 = require("../../../shared/totals-section/pdf-totals.section");
|
|
11
12
|
const pdf_shared_utils_1 = require("../../../shared/header-footer-section/pdf-shared.utils");
|
|
@@ -67,11 +68,11 @@ function GetInvoicePdfDataUrl(PDFInvoiceData = {}, PrintConfigData = {}, printCo
|
|
|
67
68
|
}
|
|
68
69
|
function CustomerInfo(InvoicePDFData) {
|
|
69
70
|
let CustomerTable = [
|
|
70
|
-
[{ text: 'Name', style: ['headerstyle'] }, { text: ':', style: ['headerstyle'] }, { text: InvoicePDFData.Customer.Name, style: ['headerstyle'] }],
|
|
71
|
-
[{ text: '
|
|
71
|
+
[{ text: 'Name', style: ['headerstyle'], fontSize: 9 }, { text: ':', style: ['headerstyle'], fontSize: 9 }, { text: InvoicePDFData.Customer.Name, style: ['headerstyle'], fontSize: 9 }],
|
|
72
|
+
[{ text: 'Address', style: ['headerstyle'], fontSize: 9 }, { text: ':', style: ['headerstyle'], fontSize: 9 }, { text: InvoicePDFData.Customer.Adrs1, style: ['headerstyle'], fontSize: 9 }],
|
|
72
73
|
];
|
|
73
74
|
if (InvoicePDFData.Customer.Code) {
|
|
74
|
-
CustomerTable.unshift([{ text: 'UHID', style: ['headerstyle'] }, { text: ':', style: ['headerstyle'] }, { text: InvoicePDFData.Customer.Code, style: ['headerstyle'] }]);
|
|
75
|
+
CustomerTable.unshift([{ text: 'UHID', style: ['headerstyle'], fontSize: 9 }, { text: ':', style: ['headerstyle'], fontSize: 9 }, { text: InvoicePDFData.Customer.Code, style: ['headerstyle'], fontSize: 9 }]);
|
|
75
76
|
}
|
|
76
77
|
return CustomerTable;
|
|
77
78
|
}
|
|
@@ -101,7 +102,7 @@ function GetPartyDetails(Entity, InvoicePDFData) {
|
|
|
101
102
|
[{
|
|
102
103
|
// marginTop: 4,
|
|
103
104
|
marginLeft: 5,
|
|
104
|
-
marginBottom:
|
|
105
|
+
marginBottom: 10,
|
|
105
106
|
// stack: [{ text: 'UHID : ' + InvoicePDFData.Customer.Code, style: ['headerstyle'] },
|
|
106
107
|
// { text: 'Name : ' + InvoicePDFData.Customer.Name, style: ['headerstyle'] },
|
|
107
108
|
// { text: 'Doctor : ' + InvoicePDFData.Name, style: ['headerstyle'] }],
|
|
@@ -120,9 +121,10 @@ function GetPartyDetails(Entity, InvoicePDFData) {
|
|
|
120
121
|
table: {
|
|
121
122
|
lineHeight: 0.5,
|
|
122
123
|
body: [
|
|
123
|
-
[{ text: 'Receipt No', style: ['headerstyle'] }, { text: ':', style: ['headerstyle'] }, { text: InvoicePDFData._id, style: ['headerstyle'] }],
|
|
124
|
-
[{ text: 'Date', style: ['headerstyle'] }, { text: ':', style: ['headerstyle'] }, { text: InvoicePDFData.CrDate, style: ['headerstyle'] }],
|
|
124
|
+
[{ text: 'Receipt No', style: ['headerstyle'], fontSize: 9 }, { text: ':', style: ['headerstyle'], fontSize: 9 }, { text: InvoicePDFData._id, style: ['headerstyle'], fontSize: 9 }],
|
|
125
|
+
[{ text: 'Date', style: ['headerstyle'], fontSize: 9 }, { text: ':', style: ['headerstyle'], fontSize: 9 }, { text: InvoicePDFData.CrDate, style: ['headerstyle'], fontSize: 9 }],
|
|
125
126
|
// [{text:'Doctor', style: ['headerstyle']}, {text:':', style: ['headerstyle']}, {text: InvoicePDFData.Name, style: ['headerstyle']}]
|
|
127
|
+
[{ text: 'Doctor', style: ['headerstyle'], fontSize: 9 }, { text: ':', style: ['headerstyle'], fontSize: 9 }, { text: InvoicePDFData.Name, style: ['headerstyle'], fontSize: 9 }]
|
|
126
128
|
]
|
|
127
129
|
}, layout: 'noBorders'
|
|
128
130
|
}]
|
|
@@ -227,12 +229,21 @@ function buildPdfDocDefinition(PDFInvoiceData = {}, PrintConfigData = {}, printC
|
|
|
227
229
|
const content = [];
|
|
228
230
|
copyLabels.forEach((copyLabel, index) => {
|
|
229
231
|
var _a, _b;
|
|
232
|
+
let invoiceHeaderContent;
|
|
233
|
+
let invoiceHeadingContent;
|
|
234
|
+
let invoicePartyDetailsContent;
|
|
235
|
+
if (PrintConfigData.IsPoSPrint) {
|
|
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
|
+
invoicePartyDetailsContent = [GetPartyDetails(PDFInvoiceData === null || PDFInvoiceData === void 0 ? void 0 : PDFInvoiceData.Entity, PDFInvoiceData)];
|
|
238
|
+
}
|
|
239
|
+
else {
|
|
240
|
+
invoiceHeaderContent = (0, pdf_header_footer_section_1.buildDocumentHeaderSection)(PrintConfig, PDFInvoiceData);
|
|
241
|
+
invoiceHeadingContent = (0, pdf_header_footer_section_1.buildDocumentHeadingSection)(PDFInvoiceData, PrintConfig, availableWidth);
|
|
242
|
+
invoicePartyDetailsContent = (0, pdf_party_details_section_1.buildInvoicePartyDetailsSection)(PDFInvoiceData, PrintConfig === null || PrintConfig === void 0 ? void 0 : PrintConfig.Customer, PrintConfig);
|
|
243
|
+
}
|
|
230
244
|
// const invoiceHeaderContent = buildDocumentHeaderSection(PrintConfig, PDFInvoiceData);
|
|
231
|
-
const 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)];
|
|
232
245
|
// const invoiceHeadingContent = buildDocumentHeadingSection(PDFInvoiceData, PrintConfig, availableWidth);
|
|
233
|
-
const invoiceHeadingContent = [{}];
|
|
234
246
|
// const invoicePartyDetailsContent = buildInvoicePartyDetailsSection(PDFInvoiceData, PrintConfig?.Customer, PrintConfig);
|
|
235
|
-
const invoicePartyDetailsContent = [GetPartyDetails(PDFInvoiceData === null || PDFInvoiceData === void 0 ? void 0 : PDFInvoiceData.Entity, PDFInvoiceData)];
|
|
236
247
|
const invoiceTotalsAndNotesContent = (0, pdf_totals_section_1.buildInvoiceTotalsAndNotesSection)(PDFInvoiceData, availableWidth, PrintConfigData);
|
|
237
248
|
const signatureContent = (0, pdf_totals_section_1.buildSignatureSection)(PrintConfig, PDFInvoiceData, availableWidth);
|
|
238
249
|
const tableData = (0, pdf_table_section_1.buildInvoiceTableData)(PDFInvoiceData, PrintConfig, availableWidth);
|