shareneus 1.7.19 → 1.7.21

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.
@@ -42,6 +42,20 @@ export declare function CreateReceiptPDFService(DocumentData?: any, PrintConfigD
42
42
  columnGap: number;
43
43
  stack?: undefined;
44
44
  width: string;
45
+ } | {
46
+ columns: ({
47
+ width: number;
48
+ image: string;
49
+ fit: number[];
50
+ margin: number[];
51
+ } | {
52
+ width: string;
53
+ marginLeft: number;
54
+ stack: any[];
55
+ })[];
56
+ columnGap: number;
57
+ stack?: undefined;
58
+ width: string;
45
59
  })[];
46
60
  columnGap: number;
47
61
  margin: number[];
@@ -290,6 +304,20 @@ export declare function DownloadReceiptPDFService(filename?: string, DocumentDat
290
304
  columnGap: number;
291
305
  stack?: undefined;
292
306
  width: string;
307
+ } | {
308
+ columns: ({
309
+ width: number;
310
+ image: string;
311
+ fit: number[];
312
+ margin: number[];
313
+ } | {
314
+ width: string;
315
+ marginLeft: number;
316
+ stack: any[];
317
+ })[];
318
+ columnGap: number;
319
+ stack?: undefined;
320
+ width: string;
293
321
  })[];
294
322
  columnGap: number;
295
323
  margin: number[];
@@ -538,6 +566,20 @@ export declare function GetReceiptPdfDataUrl(DocumentData?: any, PrintConfigData
538
566
  columnGap: number;
539
567
  stack?: undefined;
540
568
  width: string;
569
+ } | {
570
+ columns: ({
571
+ width: number;
572
+ image: string;
573
+ fit: number[];
574
+ margin: number[];
575
+ } | {
576
+ width: string;
577
+ marginLeft: number;
578
+ stack: any[];
579
+ })[];
580
+ columnGap: number;
581
+ stack?: undefined;
582
+ width: string;
541
583
  })[];
542
584
  columnGap: number;
543
585
  margin: number[];
@@ -786,6 +828,20 @@ export declare function buildPdfDocDefinition(DocumentData?: any, PrintConfigDat
786
828
  columnGap: number;
787
829
  stack?: undefined;
788
830
  width: string;
831
+ } | {
832
+ columns: ({
833
+ width: number;
834
+ image: string;
835
+ fit: number[];
836
+ margin: number[];
837
+ } | {
838
+ width: string;
839
+ marginLeft: number;
840
+ stack: any[];
841
+ })[];
842
+ columnGap: number;
843
+ stack?: undefined;
844
+ width: string;
789
845
  })[];
790
846
  columnGap: number;
791
847
  margin: number[];
@@ -77,6 +77,20 @@ export declare function buildDocumentHeaderSection(PrintConfig: any, DocumentDat
77
77
  columnGap: number;
78
78
  stack?: undefined;
79
79
  width: string;
80
+ } | {
81
+ columns: ({
82
+ width: number;
83
+ image: string;
84
+ fit: number[];
85
+ margin: number[];
86
+ } | {
87
+ width: string;
88
+ marginLeft: number;
89
+ stack: any[];
90
+ })[];
91
+ columnGap: number;
92
+ stack?: undefined;
93
+ width: string;
80
94
  })[];
81
95
  columnGap: number;
82
96
  margin: number[];
@@ -447,6 +447,7 @@ function buildHeaderContentWithLogo(logoDataUrl, hasLogo, organizationStack, log
447
447
  logoBlock,
448
448
  {
449
449
  width: '*',
450
+ marginLeft: -50,
450
451
  stack: safeOrganizationStack
451
452
  }
452
453
  ],
@@ -20,6 +20,8 @@ function buildInvoiceTableData(PDFInvoiceData, PrintConfig, availableWidth) {
20
20
  const taxMode = resolveInvoiceTaxMode(PDFInvoiceData);
21
21
  const showSectionSummaryRows = !resolveIsPoSPrint(PrintConfig);
22
22
  const tableConfig = normalizeTableConfig(PrintConfig === null || PrintConfig === void 0 ? void 0 : PrintConfig.TableConfig, PDFInvoiceData);
23
+ console.log('tableConfig:', tableConfig);
24
+ console.log('ShowDiscountColumn:', PDFInvoiceData === null || PDFInvoiceData === void 0 ? void 0 : PDFInvoiceData.ShowDiscountColumn);
23
25
  const headerConfig = (0, pdf_table_header_1.GetTableHeader)(tableConfig, taxMode)[0];
24
26
  const renderColumns = (0, pdf_table_header_1.getRenderableColumns)(headerConfig, sType);
25
27
  const headerRows = (0, pdf_table_header_1.buildHeaderRows)(headerConfig, sType);
@@ -360,14 +362,15 @@ function normalizeTableConfig(tableConfig, pdfInvoiceData) {
360
362
  if (!Array.isArray(tableConfig) || tableConfig.length === 0) {
361
363
  return Array.isArray(tableConfig) ? tableConfig : [];
362
364
  }
363
- if (!(pdfInvoiceData === null || pdfInvoiceData === void 0 ? void 0 : pdfInvoiceData.ShowDiscountColumn)) {
365
+ console.log('Original Table Config:', pdfInvoiceData === null || pdfInvoiceData === void 0 ? void 0 : pdfInvoiceData.ShowDiscountColumn);
366
+ if (pdfInvoiceData === null || pdfInvoiceData === void 0 ? void 0 : pdfInvoiceData.ShowDiscountColumn) {
364
367
  return tableConfig;
365
368
  }
366
369
  return tableConfig.map((column) => {
367
370
  if (!isDiscountColumnConfig(column)) {
368
371
  return column;
369
372
  }
370
- return Object.assign(Object.assign({}, column), { show: true, Show: true });
373
+ return Object.assign(Object.assign({}, column), { show: false, Show: false });
371
374
  });
372
375
  }
373
376
  function isDiscountColumnConfig(column) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shareneus",
3
- "version": "1.7.19",
3
+ "version": "1.7.21",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -511,6 +511,7 @@ function buildHeaderContentWithLogo(
511
511
  logoBlock,
512
512
  {
513
513
  width: '*',
514
+ marginLeft: -50,
514
515
  stack: safeOrganizationStack
515
516
  }
516
517
  ],
@@ -14,6 +14,8 @@ export function buildInvoiceTableData(PDFInvoiceData: any, PrintConfig: any, ava
14
14
  const taxMode = resolveInvoiceTaxMode(PDFInvoiceData);
15
15
  const showSectionSummaryRows = !resolveIsPoSPrint(PrintConfig);
16
16
  const tableConfig = normalizeTableConfig(PrintConfig?.TableConfig, PDFInvoiceData);
17
+ console.log('tableConfig:', tableConfig);
18
+ console.log('ShowDiscountColumn:', PDFInvoiceData?.ShowDiscountColumn);
17
19
  const headerConfig = GetTableHeader(tableConfig, taxMode)[0];
18
20
  const renderColumns = getRenderableColumns(headerConfig, sType);
19
21
  const headerRows = buildHeaderRows(headerConfig, sType);
@@ -386,7 +388,9 @@ function normalizeTableConfig(tableConfig: any[], pdfInvoiceData: any) {
386
388
  return Array.isArray(tableConfig) ? tableConfig : [];
387
389
  }
388
390
 
389
- if (!pdfInvoiceData?.ShowDiscountColumn) {
391
+ console.log('Original Table Config:', pdfInvoiceData?.ShowDiscountColumn);
392
+
393
+ if (pdfInvoiceData?.ShowDiscountColumn) {
390
394
  return tableConfig;
391
395
  }
392
396
 
@@ -397,8 +401,8 @@ function normalizeTableConfig(tableConfig: any[], pdfInvoiceData: any) {
397
401
 
398
402
  return {
399
403
  ...column,
400
- show: true,
401
- Show: true
404
+ show: false,
405
+ Show: false
402
406
  };
403
407
  });
404
408
  }