shareneus 1.6.80 → 1.6.82

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.
@@ -102,7 +102,7 @@ function GetPartyDetails(Entity, InvoicePDFData) {
102
102
  [{
103
103
  // marginTop: 4,
104
104
  marginLeft: 5,
105
- marginBottom: 10,
105
+ marginBottom: 20,
106
106
  // stack: [{ text: 'UHID : ' + InvoicePDFData.Customer.Code, style: ['headerstyle'] },
107
107
  // { text: 'Name : ' + InvoicePDFData.Customer.Name, style: ['headerstyle'] },
108
108
  // { text: 'Doctor : ' + InvoicePDFData.Name, style: ['headerstyle'] }],
@@ -159,7 +159,7 @@ function GetMainHeaderInfo(Entity, Image, AColor, HColor, InvoicePDFData) {
159
159
  {
160
160
  stack: [
161
161
  { text: Entity.CName, style: ['headerstyle'], color: HColor, alignment: 'left', fontSize: 15 },
162
- { text: GetAddress(Entity), alignment: 'left', style: ['headerstyle'], color: AColor },
162
+ { text: GetAddress(Entity), alignment: 'left', style: ['headerstyle'], color: AColor, fontSize: 9 },
163
163
  {
164
164
  columns: GetHeaderInfo(InvoicePDFData, 0)
165
165
  },
@@ -173,7 +173,7 @@ function GetMainHeaderInfo(Entity, Image, AColor, HColor, InvoicePDFData) {
173
173
  return {
174
174
  stack: [
175
175
  { text: InvoicePDFData.Entity.CName, style: ['headerstyle'], alignment: 'center', fontSize: 15 },
176
- { text: GetAddress(InvoicePDFData.Entity), alignment: 'center', style: ['headerstyle'] },
176
+ { text: GetAddress(InvoicePDFData.Entity), alignment: 'center', style: ['headerstyle'], fontSize: 9 },
177
177
  {
178
178
  columns: GetHeaderInfo(InvoicePDFData.Entity, 5, InvoicePDFData)
179
179
  },
@@ -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(...invoiceHeaderContent, ...invoiceHeadingContent, ...invoicePartyDetailsContent, {
272
+ content.push(...invoiceContentSections, {
263
273
  table: {
264
274
  lineHeight: 2,
265
275
  headerRows: tableData.headerRows.length,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shareneus",
3
- "version": "1.6.80",
3
+ "version": "1.6.82",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",