shareneus 1.6.74 → 1.6.75

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.
@@ -8,6 +8,7 @@ const pdf_table_section_1 = require("../../../shared/table-section/pdf-table.sec
8
8
  const pdf_totals_section_1 = require("../../../shared/totals-section/pdf-totals.section");
9
9
  const pdf_shared_utils_1 = require("../../../shared/header-footer-section/pdf-shared.utils");
10
10
  const pdf_header_footer_section_1 = require("../../../shared/header-footer-section/pdf-header-footer.section");
11
+ const shared_pdf_service_1 = require("../../../shared/shared-pdf.service");
11
12
  const PAGE_MARGINS = [20, 20, 20, 20];
12
13
  const CELL_PADDING_LEFT = 4;
13
14
  const CELL_PADDING_RIGHT = 4;
@@ -61,6 +62,13 @@ function GetInvoicePdfDataUrl(PDFInvoiceData = {}, PrintConfigData = {}, printCo
61
62
  // }
62
63
  // });
63
64
  }
65
+ function SalesReceiptHeaderData(Entity, Image, AColor, HColor, text) {
66
+ return [
67
+ shared_pdf_service_1.SharedPDFService.GetMainHeader(Entity, Image, AColor, HColor, text),
68
+ shared_pdf_service_1.SharedPDFService.GetPrintType('Sales Receipt'),
69
+ shared_pdf_service_1.SharedPDFService.HeaderAfterLine()
70
+ ];
71
+ }
64
72
  function buildPdfDocDefinition(PDFInvoiceData = {}, PrintConfigData = {}, printCopies = []) {
65
73
  var _a;
66
74
  const PrintConfig = normalizePrintConfig(PDFInvoiceData, PrintConfigData);
@@ -83,7 +91,9 @@ function buildPdfDocDefinition(PDFInvoiceData = {}, PrintConfigData = {}, printC
83
91
  const availableWidth = (0, pdf_table_section_1.getAvailablePageWidth)(pageSize, requestedPageOrientation, pageMargins);
84
92
  const content = [];
85
93
  copyLabels.forEach((copyLabel, index) => {
86
- const invoiceHeaderContent = (0, pdf_header_footer_section_1.buildDocumentHeaderSection)(PrintConfig, PDFInvoiceData);
94
+ var _a, _b, _c;
95
+ // const invoiceHeaderContent = buildDocumentHeaderSection(PrintConfig, PDFInvoiceData);
96
+ const invoiceHeaderContent = SalesReceiptHeaderData(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, (_c = PrintConfig === null || PrintConfig === void 0 ? void 0 : PrintConfig.headerData) === null || _c === void 0 ? void 0 : _c.OrgName);
87
97
  const invoiceHeadingContent = (0, pdf_header_footer_section_1.buildDocumentHeadingSection)(PDFInvoiceData, PrintConfig, availableWidth);
88
98
  const invoicePartyDetailsContent = (0, pdf_party_details_section_1.buildInvoicePartyDetailsSection)(PDFInvoiceData, PrintConfig === null || PrintConfig === void 0 ? void 0 : PrintConfig.Customer, PrintConfig);
89
99
  const invoiceTotalsAndNotesContent = (0, pdf_totals_section_1.buildInvoiceTotalsAndNotesSection)(PDFInvoiceData, availableWidth, PrintConfigData);
@@ -289,7 +289,7 @@ class SharedPDFService {
289
289
  }
290
290
  static GetEntityDetails(Entity) {
291
291
  let SetData = [];
292
- if (Entity.PrUPI && !Entity.IsProforma) {
292
+ if (Entity.PrUPI && !Entity.IsProforma && !tr_utils_1.TrUtils.IsEmpty(Entity.UPI)) {
293
293
  SetData.push({ qr: Entity.UPI, fit: '125', marginLeft: 150 });
294
294
  SetData.push({ text: 'Scan To Pay', fontSize: this.TermsandCond, marginLeft: 151, bold: true, marginTop: 2 });
295
295
  // SetData.push({ text: 'UPI Number: ' + Entity.UPIPhone, fontSize: 9, marginLeft: 151, bold: true, marginTop: 5 });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shareneus",
3
- "version": "1.6.74",
3
+ "version": "1.6.75",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",