shareneus 1.6.88 → 1.6.89

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.
@@ -67,9 +67,10 @@ function GetInvoicePdfDataUrl(PDFInvoiceData = {}, PrintConfigData = {}, printCo
67
67
  // });
68
68
  }
69
69
  function CustomerInfo(InvoicePDFData) {
70
+ var _a;
70
71
  let CustomerTable = [
71
72
  [{ 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 }],
73
+ [{ text: 'Address', style: ['headerstyle'], fontSize: 9 }, { text: ':', style: ['headerstyle'], fontSize: 9 }, { text: (_a = InvoicePDFData.Customer.Adrs) === null || _a === void 0 ? void 0 : _a[0], style: ['headerstyle'], fontSize: 9 }],
73
74
  ];
74
75
  if (InvoicePDFData.Customer.Code) {
75
76
  CustomerTable.unshift([{ text: 'UHID', style: ['headerstyle'], fontSize: 9 }, { text: ':', style: ['headerstyle'], fontSize: 9 }, { text: InvoicePDFData.Customer.Code, style: ['headerstyle'], fontSize: 9 }]);
@@ -92,8 +93,8 @@ function textToSvgBarcode(text) {
92
93
  });
93
94
  return { svg: svgElement.outerHTML };
94
95
  }
95
- function GetPartyDetails(Entity, InvoicePDFData) {
96
- var _a;
96
+ function GetPartyDetails(PrintConfig, InvoicePDFData) {
97
+ var _a, _b;
97
98
  return {
98
99
  style: 'tableExample',
99
100
  marginBottom: 7,
@@ -110,7 +111,7 @@ function GetPartyDetails(Entity, InvoicePDFData) {
110
111
  lineHeight: 0.5,
111
112
  body: CustomerInfo(InvoicePDFData)
112
113
  }, layout: 'noBorders'
113
- }, GetBarCode((_a = InvoicePDFData.Customer) === null || _a === void 0 ? void 0 : _a.Code, InvoicePDFData.Entity.PrCustBar),
114
+ }, GetBarCode((_a = InvoicePDFData.Customer) === null || _a === void 0 ? void 0 : _a.Code, (_b = PrintConfig === null || PrintConfig === void 0 ? void 0 : PrintConfig.Customer) === null || _b === void 0 ? void 0 : _b.ShowBarCode),
114
115
  {
115
116
  // marginTop: 4,
116
117
  marginRight: 5,
@@ -161,7 +162,7 @@ function GetMainHeaderInfo(Entity, Image, AColor, HColor, InvoicePDFData) {
161
162
  { text: Entity.CName, style: ['headerstyle'], color: HColor, alignment: 'left', fontSize: 15 },
162
163
  { text: GetAddress(Entity), alignment: 'left', style: ['headerstyle'], color: AColor, fontSize: 9 },
163
164
  {
164
- columns: GetHeaderInfo(InvoicePDFData, 0, InvoicePDFData)
165
+ columns: GetHeaderInfo(InvoicePDFData.Entity, 0, InvoicePDFData)
165
166
  },
166
167
  { text: InvoicePDFData.HeaderName, alignment: 'center', style: ['Receiptheader1'], marginTop: 5 }
167
168
  ]
@@ -234,7 +235,7 @@ function buildPdfDocDefinition(PDFInvoiceData = {}, PrintConfigData = {}, printC
234
235
  let invoiceContentSections;
235
236
  if (PrintConfigData.IsPoSPrint) {
236
237
  invoiceHeaderContent = [GetMainHeaderInfo(PDFInvoiceData === null || PDFInvoiceData === void 0 ? void 0 : PDFInvoiceData.Entity, PDFInvoiceData === null || PDFInvoiceData === void 0 ? void 0 : PDFInvoiceData.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
+ invoicePartyDetailsContent = [GetPartyDetails(PrintConfig, PDFInvoiceData)];
238
239
  }
239
240
  else {
240
241
  invoiceHeaderContent = (0, pdf_header_footer_section_1.buildDocumentHeaderSection)(PrintConfig, PDFInvoiceData);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shareneus",
3
- "version": "1.6.88",
3
+ "version": "1.6.89",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",