shareneus 1.4.49 → 1.4.50

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.
Files changed (68) hide show
  1. package/dist/accounting/invoice/reports/excel/analysis-excel.service.d.ts +3 -3
  2. package/dist/accounting/invoice/reports/excel/analysis-excel.service.js +8 -7
  3. package/dist/accounting/invoice/reports/excel/category-wise-item-excel.service.d.ts +4 -4
  4. package/dist/accounting/invoice/reports/excel/category-wise-item-excel.service.js +14 -14
  5. package/dist/accounting/invoice/reports/excel/cust-wise-sales-details.d.ts +4 -4
  6. package/dist/accounting/invoice/reports/excel/cust-wise-sales-details.js +8 -8
  7. package/dist/accounting/invoice/reports/excel/cust-wise-sales-summary-excel.service.d.ts +4 -4
  8. package/dist/accounting/invoice/reports/excel/cust-wise-sales-summary-excel.service.js +8 -8
  9. package/dist/accounting/invoice/reports/excel/invoice-wise-excel.service.d.ts +4 -4
  10. package/dist/accounting/invoice/reports/excel/invoice-wise-excel.service.js +8 -8
  11. package/dist/accounting/invoice/reports/excel/item-wise-doctor-sale-excel.service.d.ts +4 -4
  12. package/dist/accounting/invoice/reports/excel/item-wise-doctor-sale-excel.service.js +10 -10
  13. package/dist/accounting/invoice/reports/excel/items-wise-sales-excel.service.d.ts +4 -4
  14. package/dist/accounting/invoice/reports/excel/items-wise-sales-excel.service.js +14 -13
  15. package/dist/accounting/invoice/reports/excel/manf-wise-sales-excel.service.d.ts +4 -4
  16. package/dist/accounting/invoice/reports/excel/manf-wise-sales-excel.service.js +8 -8
  17. package/dist/accounting/invoice/reports/excel/operator-wise-details.d.ts +4 -4
  18. package/dist/accounting/invoice/reports/excel/operator-wise-details.js +8 -8
  19. package/dist/accounting/invoice/reports/excel/operator-wise-summary.d.ts +4 -4
  20. package/dist/accounting/invoice/reports/excel/operator-wise-summary.js +8 -8
  21. package/dist/gst/excel/GSTR-RO-excel.service.d.ts +4 -4
  22. package/dist/gst/excel/GSTR-RO-excel.service.js +8 -8
  23. package/dist/gst/excel/GSTR1-excel.service.d.ts +4 -4
  24. package/dist/gst/excel/GSTR1-excel.service.js +10 -10
  25. package/dist/gst/excel/GSTR2-excel.service.d.ts +4 -4
  26. package/dist/gst/excel/GSTR2-excel.service.js +9 -9
  27. package/dist/gst/excel/tally-sales-import.service.d.ts +4 -4
  28. package/dist/gst/excel/tally-sales-import.service.js +8 -8
  29. package/dist/inventory/items/issue-parts-pdf.service.d.ts +6 -6
  30. package/dist/inventory/items/issue-parts-pdf.service.js +32 -32
  31. package/dist/inventory/items/reports/excel/expiring-drugs-excel.service.d.ts +4 -4
  32. package/dist/inventory/items/reports/excel/expiring-drugs-excel.service.js +11 -10
  33. package/dist/inventory/items/reports/excel/item-wise-mout-details.d.ts +4 -4
  34. package/dist/inventory/items/reports/excel/item-wise-mout-details.js +8 -8
  35. package/dist/inventory/items/reports/excel/item-wise-mout-summary.d.ts +4 -4
  36. package/dist/inventory/items/reports/excel/item-wise-mout-summary.js +8 -8
  37. package/dist/inventory/items/reports/excel/spares-issue-excel.service.d.ts +4 -4
  38. package/dist/inventory/items/reports/excel/spares-issue-excel.service.js +12 -12
  39. package/dist/inventory/items/reports/excel/stock-excel.service.d.ts +4 -4
  40. package/dist/inventory/items/reports/excel/stock-excel.service.js +8 -8
  41. package/dist/purchases/payment-made/reports/excel/payments-made-excel.service.d.ts +4 -4
  42. package/dist/purchases/payment-made/reports/excel/payments-made-excel.service.js +9 -9
  43. package/dist/purchases/payment-made/reports/excel/ven-balance-excel.service.d.ts +6 -6
  44. package/dist/purchases/payment-made/reports/excel/ven-balance-excel.service.js +14 -14
  45. package/dist/purchases/vendor-credit-note/vendor-credit-note-print.service.d.ts +1 -1
  46. package/dist/purchases/vendor-credit-note/vendor-credit-note-print.service.js +20 -20
  47. package/dist/purchases/vendor-credit-note/vendor-credit-note-totals.service.d.ts +8 -8
  48. package/dist/purchases/vendor-credit-note/vendor-credit-note-totals.service.js +31 -32
  49. package/dist/purchases/vendor-debit-note/vendor-debit-note-totals.service.d.ts +6 -6
  50. package/dist/purchases/vendor-debit-note/vendor-debit-note-totals.service.js +19 -19
  51. package/dist/sales/delivery-challan/delivery-challan-print.service.js +2 -2
  52. package/dist/sales/delivery-challan/delivery-challan-totals.d.ts +6 -6
  53. package/dist/sales/delivery-challan/delivery-challan-totals.js +20 -20
  54. package/dist/sales/sales/sales-print.service.js +1 -1
  55. package/dist/sales/sales/sales-totals.service.d.ts +6 -6
  56. package/dist/sales/sales/sales-totals.service.js +19 -19
  57. package/dist/services/est.print-service.js +1 -1
  58. package/dist/services/reports/excel/insurance-expire-excel.service.d.ts +4 -4
  59. package/dist/services/reports/excel/insurance-expire-excel.service.js +8 -8
  60. package/dist/services/reports/excel/next-service-date-excel.service.d.ts +4 -4
  61. package/dist/services/reports/excel/next-service-date-excel.service.js +8 -8
  62. package/dist/services/reports/excel/repair-orders-excel.service.d.ts +5 -5
  63. package/dist/services/reports/excel/repair-orders-excel.service.js +11 -11
  64. package/dist/services/ro-print-service.js +1 -1
  65. package/dist/services/ro-totals.service.d.ts +11 -11
  66. package/dist/services/ro-totals.service.js +50 -50
  67. package/dist/utils/tr-utils.js +2 -1
  68. package/package.json +1 -1
@@ -78,7 +78,7 @@ class IssuePartsprintService {
78
78
  if (tr_utils_1.TrUtils.IsNull(ROPrintData.PrintInfo[i].Text)) {
79
79
  ROPrintData.PrintInfo[i].Text = '';
80
80
  }
81
- List.push(ROPrintData.PrintInfo[i].Text, this.WithOutDiscountFieldTable(tr_utils_1.TrUtils.Stringify(ROPrintData.PrintInfo[i].Items), tr_utils_1.TrUtils.Stringify(ROPrintData.PrintInfo[i].Ops), ROPrintData.ShowTaxColumn, ROPrintData.Entity.MPN, ROPrintData.Entity.Body, ROPrintData.ShowIGST, ROPrintData.ConsolidateGST, ROPrintData.ShowDiscountColumn, isAuto));
81
+ List.push(ROPrintData.PrintInfo[i].Text, this.WithOutDiscountFieldTable(tr_utils_1.TrUtils.Stringify(ROPrintData.PrintInfo[i].Items), tr_utils_1.TrUtils.Stringify(ROPrintData.PrintInfo[i].Ops), ROPrintData.ShowTaxColumn, ROPrintData.Entity.MPN, ROPrintData.Entity.Body, ROPrintData.ShowIGST, ROPrintData.ConsolidateGST, ROPrintData.ShowDiscountColumn, isAuto, ROPrintData.Entity.DecimalsNumber));
82
82
  }
83
83
  }
84
84
  else {
@@ -90,7 +90,7 @@ class IssuePartsprintService {
90
90
  if (tr_utils_1.TrUtils.IsNull(ROPrintData.PrintInfo[i].Text)) {
91
91
  ROPrintData.PrintInfo[i].Text = '';
92
92
  }
93
- List.push(ROPrintData.PrintInfo[i].Text, this.GetWithOutDiscAndTaxFieldHeader(tr_utils_1.TrUtils.Stringify(ROPrintData.PrintInfo[i].Items), tr_utils_1.TrUtils.Stringify(ROPrintData.PrintInfo[i].Ops), ROPrintData.ShowTaxColumn, ROPrintData.Entity.MPN, ROPrintData.Entity.Body, ROPrintData.ShowIGST, ROPrintData.ConsolidateGST, ROPrintData.ShowDiscountColumn, isAuto));
93
+ List.push(ROPrintData.PrintInfo[i].Text, this.GetWithOutDiscAndTaxFieldHeader(tr_utils_1.TrUtils.Stringify(ROPrintData.PrintInfo[i].Items), tr_utils_1.TrUtils.Stringify(ROPrintData.PrintInfo[i].Ops), ROPrintData.ShowTaxColumn, ROPrintData.Entity.MPN, ROPrintData.Entity.Body, ROPrintData.ShowIGST, ROPrintData.ConsolidateGST, ROPrintData.ShowDiscountColumn, isAuto, ROPrintData.Entity.DecimalsNumber));
94
94
  }
95
95
  }
96
96
  }
@@ -129,7 +129,7 @@ class IssuePartsprintService {
129
129
  return a;
130
130
  }
131
131
  }
132
- static WithOutDiscountFieldTable(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto) {
132
+ static WithOutDiscountFieldTable(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto, DecimalsNumber) {
133
133
  if (Parts.length !== 0 || Ops.length !== 0) {
134
134
  if (PrintPartNo) {
135
135
  return {
@@ -138,7 +138,7 @@ class IssuePartsprintService {
138
138
  table: {
139
139
  widths: [25, 60, 155, 30, 50, 60, 30, 50],
140
140
  headerRows: 1,
141
- body: this.BuildTableBodyForLaborAndParts(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto)
141
+ body: this.BuildTableBodyForLaborAndParts(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto, DecimalsNumber)
142
142
  },
143
143
  layout: shared_print_service_1.PrintSharedService.LayOutStyleanother()
144
144
  };
@@ -150,7 +150,7 @@ class IssuePartsprintService {
150
150
  table: {
151
151
  widths: [25, 215, 25, 50, 60, 45, 50],
152
152
  headerRows: 1,
153
- body: this.BuildTableBodyForLaborAndParts(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto)
153
+ body: this.BuildTableBodyForLaborAndParts(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto, DecimalsNumber)
154
154
  },
155
155
  layout: shared_print_service_1.PrintSharedService.LayOutStyleanother()
156
156
  };
@@ -161,7 +161,7 @@ class IssuePartsprintService {
161
161
  return a;
162
162
  }
163
163
  }
164
- static BuildTableBodyForLaborAndParts(Parts, Labor, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto) {
164
+ static BuildTableBodyForLaborAndParts(Parts, Labor, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto, DecimalsNumber) {
165
165
  var body = [];
166
166
  let columns = shared_print_service_1.PrintSharedService.GetWithOutDiscountFieldHeader(PrintPartNo, ShowTaxColumn, Body, ShowIGST, ShowDiscountColumn);
167
167
  // if (ShowTaxColumn) {
@@ -194,14 +194,14 @@ class IssuePartsprintService {
194
194
  let dpartadding1 = {};
195
195
  dpartadding1.SNo = '';
196
196
  dpartadding1.Desc = 'Spare Total';
197
- dpartadding1.QtyAndUoM = tr_utils_1.TrUtils.FixedTo(Qty);
197
+ dpartadding1.QtyAndUoM = tr_utils_1.TrUtils.FixedTo(Qty, DecimalsNumber);
198
198
  dpartadding1.bold = true;
199
- dpartadding1.UnPr = tr_utils_1.TrUtils.FixedTo(Taxable);
200
- dpartadding1.SGSTAmt = tr_utils_1.TrUtils.FixedTo(SGSTAMT);
201
- dpartadding1.IGSTAmt = tr_utils_1.TrUtils.FixedTo(IGSTAMT);
202
- dpartadding1.CGSTAmt = tr_utils_1.TrUtils.FixedTo(CGSTAMT);
199
+ dpartadding1.UnPr = tr_utils_1.TrUtils.FixedTo(Taxable, DecimalsNumber);
200
+ dpartadding1.SGSTAmt = tr_utils_1.TrUtils.FixedTo(SGSTAMT, DecimalsNumber);
201
+ dpartadding1.IGSTAmt = tr_utils_1.TrUtils.FixedTo(IGSTAMT, DecimalsNumber);
202
+ dpartadding1.CGSTAmt = tr_utils_1.TrUtils.FixedTo(CGSTAMT, DecimalsNumber);
203
203
  dpartadding1.TCode = ShowTaxColumn ? 114 : undefined;
204
- dpartadding1.LineTotal = tr_utils_1.TrUtils.FixPriceValue(FinalTotal);
204
+ dpartadding1.LineTotal = tr_utils_1.TrUtils.FixPriceValue(FinalTotal, DecimalsNumber);
205
205
  Parts.push({ SNo: '' });
206
206
  Parts.push(dpartadding1);
207
207
  }
@@ -313,13 +313,13 @@ class IssuePartsprintService {
313
313
  dpartadding1.SNo = '';
314
314
  dpartadding1.Desc = 'Labor Total';
315
315
  // dpartadding1.QtyAndUoM = Qty;
316
- dpartadding1.UnPr = tr_utils_1.TrUtils.FixedTo(Taxable);
317
- dpartadding1.SGSTAmt = tr_utils_1.TrUtils.FixedTo(SGSTAMT);
318
- dpartadding1.IGSTAmt = tr_utils_1.TrUtils.FixedTo(IGSTAMT);
319
- dpartadding1.CGSTAmt = tr_utils_1.TrUtils.FixedTo(CGSTAMT);
316
+ dpartadding1.UnPr = tr_utils_1.TrUtils.FixedTo(Taxable, DecimalsNumber);
317
+ dpartadding1.SGSTAmt = tr_utils_1.TrUtils.FixedTo(SGSTAMT, DecimalsNumber);
318
+ dpartadding1.IGSTAmt = tr_utils_1.TrUtils.FixedTo(IGSTAMT, DecimalsNumber);
319
+ dpartadding1.CGSTAmt = tr_utils_1.TrUtils.FixedTo(CGSTAMT, DecimalsNumber);
320
320
  dpartadding1.TCode = ShowTaxColumn ? 114 : undefined;
321
321
  dpartadding1.bold = true;
322
- dpartadding1.LineTotal = tr_utils_1.TrUtils.FixPriceValue(FinalTotal);
322
+ dpartadding1.LineTotal = tr_utils_1.TrUtils.FixPriceValue(FinalTotal, DecimalsNumber);
323
323
  Labor.push({ SNo: '' });
324
324
  Labor.push(dpartadding1);
325
325
  }
@@ -405,17 +405,17 @@ class IssuePartsprintService {
405
405
  });
406
406
  return body;
407
407
  }
408
- static GetWithOutDiscAndTaxFieldHeader(Parts, Ops, ShowTaxColumn, PrintPartNo, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto) {
408
+ static GetWithOutDiscAndTaxFieldHeader(Parts, Ops, ShowTaxColumn, PrintPartNo, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto, DecimalsNumber) {
409
409
  if (Parts.length !== 0 || Ops.length !== 0) {
410
410
  if (ShowTaxColumn) {
411
- return this.TaxDataTable(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto);
411
+ return this.TaxDataTable(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto, DecimalsNumber);
412
412
  }
413
413
  else {
414
414
  if (ConsolidateGST) {
415
- return this.ConsolidateDataTable(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto);
415
+ return this.ConsolidateDataTable(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto, DecimalsNumber);
416
416
  }
417
417
  else {
418
- return this.NoTaxDataTable(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto);
418
+ return this.NoTaxDataTable(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto, DecimalsNumber);
419
419
  }
420
420
  }
421
421
  }
@@ -424,7 +424,7 @@ class IssuePartsprintService {
424
424
  return a;
425
425
  }
426
426
  }
427
- static TaxDataTable(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto) {
427
+ static TaxDataTable(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto, DecimalsNumber) {
428
428
  if (PrintPartNo) {
429
429
  if (ShowIGST) {
430
430
  return {
@@ -432,7 +432,7 @@ class IssuePartsprintService {
432
432
  table: {
433
433
  widths: shared_print_service_1.PrintSharedService.TaxTableWidths(PrintPartNo, ShowIGST, ShowDiscountColumn),
434
434
  // headerRows: 2,
435
- body: this.BuildTableBodyForLaborAndParts(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto)
435
+ body: this.BuildTableBodyForLaborAndParts(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto, DecimalsNumber)
436
436
  },
437
437
  layout: shared_print_service_1.PrintSharedService.LayOutStyle()
438
438
  };
@@ -443,7 +443,7 @@ class IssuePartsprintService {
443
443
  table: {
444
444
  widths: shared_print_service_1.PrintSharedService.TaxTableWidths(PrintPartNo, ShowIGST, ShowDiscountColumn),
445
445
  // headerRows: 2,
446
- body: this.BuildTableBodyForLaborAndParts(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto)
446
+ body: this.BuildTableBodyForLaborAndParts(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto, DecimalsNumber)
447
447
  },
448
448
  layout: shared_print_service_1.PrintSharedService.LayOutStyle()
449
449
  };
@@ -456,7 +456,7 @@ class IssuePartsprintService {
456
456
  table: {
457
457
  widths: shared_print_service_1.PrintSharedService.TaxTableWidths(PrintPartNo, ShowIGST, ShowDiscountColumn),
458
458
  // headerRows: 2,
459
- body: this.BuildTableBodyForLaborAndParts(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto)
459
+ body: this.BuildTableBodyForLaborAndParts(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto, DecimalsNumber)
460
460
  },
461
461
  layout: shared_print_service_1.PrintSharedService.LayOutStyle()
462
462
  };
@@ -467,21 +467,21 @@ class IssuePartsprintService {
467
467
  table: {
468
468
  widths: shared_print_service_1.PrintSharedService.TaxTableWidths(PrintPartNo, ShowIGST, ShowDiscountColumn),
469
469
  // headerRows: 2,
470
- body: this.BuildTableBodyForLaborAndParts(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto)
470
+ body: this.BuildTableBodyForLaborAndParts(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto, DecimalsNumber)
471
471
  },
472
472
  layout: shared_print_service_1.PrintSharedService.LayOutStyle()
473
473
  };
474
474
  }
475
475
  }
476
476
  }
477
- static ConsolidateDataTable(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto) {
477
+ static ConsolidateDataTable(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto, DecimalsNumber) {
478
478
  if (PrintPartNo) {
479
479
  return {
480
480
  style: 'tableExample',
481
481
  table: {
482
482
  widths: [25, 70, 263, 25, 60, 80, 10, 40],
483
483
  // headerRows: 1,
484
- body: this.BuildTableBodyForLaborAndParts(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto)
484
+ body: this.BuildTableBodyForLaborAndParts(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto, DecimalsNumber)
485
485
  },
486
486
  layout: shared_print_service_1.PrintSharedService.LayOutStyle()
487
487
  };
@@ -492,20 +492,20 @@ class IssuePartsprintService {
492
492
  table: {
493
493
  widths: [25, 295, 50, 80, 80, 10, 40],
494
494
  // headerRows: 1,
495
- body: this.BuildTableBodyForLaborAndParts(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto)
495
+ body: this.BuildTableBodyForLaborAndParts(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto, DecimalsNumber)
496
496
  },
497
497
  layout: shared_print_service_1.PrintSharedService.LayOutStyle()
498
498
  };
499
499
  }
500
500
  }
501
- static NoTaxDataTable(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto) {
501
+ static NoTaxDataTable(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto, DecimalsNumber) {
502
502
  if (PrintPartNo) {
503
503
  return {
504
504
  style: 'tableExample',
505
505
  table: {
506
506
  widths: shared_print_service_1.PrintSharedService.WidthForInsuranceOrNot(ShowDiscountColumn, PrintPartNo),
507
507
  // headerRows: 1,
508
- body: this.BuildTableBodyForLaborAndParts(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto)
508
+ body: this.BuildTableBodyForLaborAndParts(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto, DecimalsNumber)
509
509
  },
510
510
  layout: shared_print_service_1.PrintSharedService.LayOutStyle()
511
511
  };
@@ -516,7 +516,7 @@ class IssuePartsprintService {
516
516
  table: {
517
517
  widths: shared_print_service_1.PrintSharedService.WidthForInsuranceOrNot(ShowDiscountColumn, PrintPartNo),
518
518
  // headerRows: 1,
519
- body: this.BuildTableBodyForLaborAndParts(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto)
519
+ body: this.BuildTableBodyForLaborAndParts(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto, DecimalsNumber)
520
520
  },
521
521
  layout: shared_print_service_1.PrintSharedService.LayOutStyle()
522
522
  };
@@ -13,11 +13,11 @@ export declare class ExpiringDrugsXlsxFileService {
13
13
  };
14
14
  };
15
15
  static ws: any;
16
- static GetExpiringDrugsExcelData(MainData: any, isSale: boolean, searchValue: any, HeaderName: any): any;
16
+ static GetExpiringDrugsExcelData(MainData: any, isSale: boolean, searchValue: any, HeaderName: any, EntitySettings: any): any;
17
17
  static setHeadingInCell(HeaderName: any, showSearch: any): void;
18
- static setInvoiceDetailsInCell(MainData: any, isSale: boolean): void;
19
- static SetInvoiceDataInExcel(InvoiceInfo: any, isSale: boolean): void;
20
- static ConvertToString(Text: any, IsString: any): any;
18
+ static setInvoiceDetailsInCell(MainData: any, isSale: boolean, DecimalsNumber: number): void;
19
+ static SetInvoiceDataInExcel(InvoiceInfo: any, isSale: boolean, DecimalsNumber: number): void;
20
+ static ConvertToString(Text: any, IsString: any, DecimalsNumber: number): any;
21
21
  static SetDataInCell(Data: any, ColRange: number, RowNum: any): void;
22
22
  static getcelltype(cell: any): any;
23
23
  static ConvertDateToReadableFormat(DateObject: any): any;
@@ -27,8 +27,9 @@ exports.ExpiringDrugsXlsxFileService = void 0;
27
27
  const XLSX = __importStar(require("xlsx"));
28
28
  const my_date_1 = require("../../../../utils/my-date");
29
29
  const tr_utils_1 = require("../../../../utils/tr-utils");
30
+ const math_operations_1 = require("../../../../shared/math-operations");
30
31
  class ExpiringDrugsXlsxFileService {
31
- static GetExpiringDrugsExcelData(MainData, isSale, searchValue, HeaderName) {
32
+ static GetExpiringDrugsExcelData(MainData, isSale, searchValue, HeaderName, EntitySettings) {
32
33
  this.wb = {};
33
34
  this.ws = {};
34
35
  this.Row = 0;
@@ -66,7 +67,7 @@ class ExpiringDrugsXlsxFileService {
66
67
  // console.log(`${key}: ${searchValue[key]}`);
67
68
  }
68
69
  this.setHeadingInCell(HeaderName, showSearch);
69
- this.setInvoiceDetailsInCell(MainData, isSale);
70
+ this.setInvoiceDetailsInCell(MainData, isSale, EntitySettings.DecimalsNumber);
70
71
  this.ws['!ref'] = XLSX.utils.encode_range(this.range);
71
72
  this.ws['!merges'] = this.MergeArray;
72
73
  this.ws["!cols"] = [{ wch: 50 }, { wch: 10 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }];
@@ -182,26 +183,26 @@ class ExpiringDrugsXlsxFileService {
182
183
  });
183
184
  this.Row += 2;
184
185
  }
185
- static setInvoiceDetailsInCell(MainData, isSale) {
186
+ static setInvoiceDetailsInCell(MainData, isSale, DecimalsNumber) {
186
187
  MainData.forEach((InvoiceList) => {
187
- this.SetInvoiceDataInExcel(InvoiceList, isSale);
188
+ this.SetInvoiceDataInExcel(InvoiceList, isSale, DecimalsNumber);
188
189
  });
189
190
  }
190
- static SetInvoiceDataInExcel(InvoiceInfo, isSale) {
191
+ static SetInvoiceDataInExcel(InvoiceInfo, isSale, DecimalsNumber) {
191
192
  InvoiceInfo.CrDate = this.ConvertDateToReadableFormat(InvoiceInfo.CrDate);
192
193
  let InvoiceData = [
193
194
  { text: InvoiceInfo.Name, ColRange: 1, IsString: true },
194
195
  { text: InvoiceInfo.Batch.BN, ColRange: 1, IsString: true },
195
196
  { text: my_date_1.MyDate.ConvertUTCDateToReadableExDateTxt(InvoiceInfo.Batch.ExDt), ColRange: 1, IsString: true },
196
197
  { text: InvoiceInfo.Batch.Qty, ColRange: 1, IsString: true },
197
- { text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Batch.Cost), ColRange: 1, IsString: true },
198
- { text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Batch.Qty * InvoiceInfo.Batch.Cost), ColRange: 1, IsString: true },
198
+ { text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Batch.Cost, DecimalsNumber), ColRange: 1, IsString: true },
199
+ { text: tr_utils_1.TrUtils.FixPriceValue((0, math_operations_1.Multiply)(InvoiceInfo.Batch.Qty, InvoiceInfo.Batch.Cost), DecimalsNumber), ColRange: 1, IsString: true },
199
200
  // { text: InvoiceInfo.Round, ColRange: 1, IsString: true },
200
201
  // { text: InvoiceInfo.Total, ColRange: 1, IsString: false }
201
202
  ];
202
203
  let ColStart = 0;
203
204
  InvoiceData.forEach((InvData) => {
204
- InvData.text = this.ConvertToString(InvData.text, InvData.IsString);
205
+ InvData.text = this.ConvertToString(InvData.text, InvData.IsString, DecimalsNumber);
205
206
  this.SetDataInCell(InvData.text, ColStart, this.Row);
206
207
  this.MergeArray.push({
207
208
  s: { r: this.Row, c: ColStart },
@@ -211,7 +212,7 @@ class ExpiringDrugsXlsxFileService {
211
212
  });
212
213
  this.Row += 1;
213
214
  }
214
- static ConvertToString(Text, IsString) {
215
+ static ConvertToString(Text, IsString, DecimalsNumber) {
215
216
  if (IsString) {
216
217
  if (Text == null) {
217
218
  Text = '';
@@ -223,7 +224,7 @@ class ExpiringDrugsXlsxFileService {
223
224
  }
224
225
  }
225
226
  if (typeof Text === 'number') {
226
- return Number(tr_utils_1.TrUtils.FixedTo(Text));
227
+ return Number(tr_utils_1.TrUtils.FixedTo(Text, DecimalsNumber));
227
228
  }
228
229
  else {
229
230
  return Text;
@@ -13,11 +13,11 @@ export declare class ItemWiseMODetailsXlsxFileService {
13
13
  };
14
14
  };
15
15
  static ws: any;
16
- static GetItemWiseMODetailsExcelData(MainData: any, searchValue: any, HeaderName: any): any;
16
+ static GetItemWiseMODetailsExcelData(MainData: any, searchValue: any, HeaderName: any, EntitySettings: any): any;
17
17
  static setHeadingInCell(HeaderName: any, searchValue: any): void;
18
- static setInvoiceDetailsInCell(MainData: any): void;
19
- static SetInvoiceDataInExcel(InvoiceInfo: any): void;
20
- static ConvertToString(Text: any, IsString: any): any;
18
+ static setInvoiceDetailsInCell(MainData: any, DecimalsNumber: any): void;
19
+ static SetInvoiceDataInExcel(InvoiceInfo: any, DecimalsNumber: number): void;
20
+ static ConvertToString(Text: any, IsString: any, DecimalsNumber: number): any;
21
21
  static SetDataInCell(Data: any, ColRange: number, RowNum: any): void;
22
22
  static getcelltype(cell: any): any;
23
23
  }
@@ -28,7 +28,7 @@ const XLSX = __importStar(require("xlsx"));
28
28
  const tr_utils_1 = require("../../../../utils/tr-utils");
29
29
  const my_date_1 = require("../../../../utils/my-date");
30
30
  class ItemWiseMODetailsXlsxFileService {
31
- static GetItemWiseMODetailsExcelData(MainData, searchValue, HeaderName) {
31
+ static GetItemWiseMODetailsExcelData(MainData, searchValue, HeaderName, EntitySettings) {
32
32
  this.wb = {};
33
33
  this.ws = {};
34
34
  this.Row = 0;
@@ -66,7 +66,7 @@ class ItemWiseMODetailsXlsxFileService {
66
66
  // console.log(`${key}: ${searchValue[key]}`);
67
67
  }
68
68
  this.setHeadingInCell(HeaderName, showSearch);
69
- this.setInvoiceDetailsInCell(MainData);
69
+ this.setInvoiceDetailsInCell(MainData, EntitySettings);
70
70
  this.ws['!ref'] = XLSX.utils.encode_range(this.range);
71
71
  this.ws['!merges'] = this.MergeArray;
72
72
  this.ws["!cols"] = [{ wch: 15 }, { wch: 15 }, { wch: 30 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 20 }];
@@ -209,12 +209,12 @@ class ItemWiseMODetailsXlsxFileService {
209
209
  });
210
210
  this.Row += 2;
211
211
  }
212
- static setInvoiceDetailsInCell(MainData) {
212
+ static setInvoiceDetailsInCell(MainData, DecimalsNumber) {
213
213
  MainData.forEach((InvoiceList) => {
214
- this.SetInvoiceDataInExcel(InvoiceList);
214
+ this.SetInvoiceDataInExcel(InvoiceList, DecimalsNumber);
215
215
  });
216
216
  }
217
- static SetInvoiceDataInExcel(InvoiceInfo) {
217
+ static SetInvoiceDataInExcel(InvoiceInfo, DecimalsNumber) {
218
218
  var _a;
219
219
  InvoiceInfo.Date = my_date_1.MyDate.ConvertUTCDateToReadable(InvoiceInfo.CrDate);
220
220
  let InvoiceData = [
@@ -234,7 +234,7 @@ class ItemWiseMODetailsXlsxFileService {
234
234
  ];
235
235
  let ColStart = 0;
236
236
  InvoiceData.forEach((InvData) => {
237
- InvData.text = this.ConvertToString(InvData.text, InvData.IsString);
237
+ InvData.text = this.ConvertToString(InvData.text, InvData.IsString, DecimalsNumber);
238
238
  this.SetDataInCell(InvData.text, ColStart, this.Row);
239
239
  this.MergeArray.push({
240
240
  s: { r: this.Row, c: ColStart },
@@ -244,7 +244,7 @@ class ItemWiseMODetailsXlsxFileService {
244
244
  });
245
245
  this.Row += 1;
246
246
  }
247
- static ConvertToString(Text, IsString) {
247
+ static ConvertToString(Text, IsString, DecimalsNumber) {
248
248
  if (IsString) {
249
249
  if (Text == null) {
250
250
  Text = '';
@@ -256,7 +256,7 @@ class ItemWiseMODetailsXlsxFileService {
256
256
  }
257
257
  }
258
258
  if (typeof Text === 'number') {
259
- return Number(tr_utils_1.TrUtils.FixedTo(Text));
259
+ return Number(tr_utils_1.TrUtils.FixedTo(Text, DecimalsNumber));
260
260
  }
261
261
  else {
262
262
  return Text;
@@ -13,11 +13,11 @@ export declare class ItemWiseMOSummaryXlsxFileService {
13
13
  };
14
14
  };
15
15
  static ws: any;
16
- static GetItemWiseMOSummaryExcelData(MainData: any, searchValue: any, HeaderName: any): any;
16
+ static GetItemWiseMOSummaryExcelData(MainData: any, searchValue: any, HeaderName: any, EntitySettings: any): any;
17
17
  static setHeadingInCell(HeaderName: any, searchValue: any): void;
18
- static setInvoiceDetailsInCell(MainData: any): void;
19
- static SetInvoiceDataInExcel(InvoiceInfo: any): void;
20
- static ConvertToString(Text: any, IsString: any): any;
18
+ static setInvoiceDetailsInCell(MainData: any, DecimalsNumber: number): void;
19
+ static SetInvoiceDataInExcel(InvoiceInfo: any, DecimalsNumber: number): void;
20
+ static ConvertToString(Text: any, IsString: any, DecimalsNumber: number): any;
21
21
  static SetDataInCell(Data: any, ColRange: number, RowNum: any): void;
22
22
  static getcelltype(cell: any): any;
23
23
  }
@@ -28,7 +28,7 @@ const XLSX = __importStar(require("xlsx"));
28
28
  const my_date_1 = require("../../../../utils/my-date");
29
29
  const tr_utils_1 = require("../../../../utils/tr-utils");
30
30
  class ItemWiseMOSummaryXlsxFileService {
31
- static GetItemWiseMOSummaryExcelData(MainData, searchValue, HeaderName) {
31
+ static GetItemWiseMOSummaryExcelData(MainData, searchValue, HeaderName, EntitySettings) {
32
32
  this.wb = {};
33
33
  this.ws = {};
34
34
  this.Row = 0;
@@ -66,7 +66,7 @@ class ItemWiseMOSummaryXlsxFileService {
66
66
  // console.log(`${key}: ${searchValue[key]}`);
67
67
  }
68
68
  this.setHeadingInCell(HeaderName, showSearch);
69
- this.setInvoiceDetailsInCell(MainData);
69
+ this.setInvoiceDetailsInCell(MainData, EntitySettings.DecimalsNumber);
70
70
  this.ws['!ref'] = XLSX.utils.encode_range(this.range);
71
71
  this.ws['!merges'] = this.MergeArray;
72
72
  this.ws["!cols"] = [{ wch: 30 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 20 }];
@@ -207,12 +207,12 @@ class ItemWiseMOSummaryXlsxFileService {
207
207
  });
208
208
  this.Row += 2;
209
209
  }
210
- static setInvoiceDetailsInCell(MainData) {
210
+ static setInvoiceDetailsInCell(MainData, DecimalsNumber) {
211
211
  MainData.forEach((InvoiceList) => {
212
- this.SetInvoiceDataInExcel(InvoiceList);
212
+ this.SetInvoiceDataInExcel(InvoiceList, DecimalsNumber);
213
213
  });
214
214
  }
215
- static SetInvoiceDataInExcel(InvoiceInfo) {
215
+ static SetInvoiceDataInExcel(InvoiceInfo, DecimalsNumber) {
216
216
  InvoiceInfo.Date = my_date_1.MyDate.ConvertUTCDateToReadable(InvoiceInfo.CrDate);
217
217
  let InvoiceData = [
218
218
  // { text: InvoiceInfo.Code, ColRange: 1, IsString: true },
@@ -228,7 +228,7 @@ class ItemWiseMOSummaryXlsxFileService {
228
228
  ];
229
229
  let ColStart = 0;
230
230
  InvoiceData.forEach((InvData) => {
231
- InvData.text = this.ConvertToString(InvData.text, InvData.IsString);
231
+ InvData.text = this.ConvertToString(InvData.text, InvData.IsString, DecimalsNumber);
232
232
  this.SetDataInCell(InvData.text, ColStart, this.Row);
233
233
  this.MergeArray.push({
234
234
  s: { r: this.Row, c: ColStart },
@@ -238,7 +238,7 @@ class ItemWiseMOSummaryXlsxFileService {
238
238
  });
239
239
  this.Row += 1;
240
240
  }
241
- static ConvertToString(Text, IsString) {
241
+ static ConvertToString(Text, IsString, DecimalsNumber) {
242
242
  if (IsString) {
243
243
  if (Text == null) {
244
244
  Text = '';
@@ -250,7 +250,7 @@ class ItemWiseMOSummaryXlsxFileService {
250
250
  }
251
251
  }
252
252
  if (typeof Text === 'number') {
253
- return Number(tr_utils_1.TrUtils.FixedTo(Text));
253
+ return Number(tr_utils_1.TrUtils.FixedTo(Text, DecimalsNumber));
254
254
  }
255
255
  else {
256
256
  return Text;
@@ -13,13 +13,13 @@ export declare class IssueSparesXlsxFileService {
13
13
  };
14
14
  };
15
15
  static ws: any;
16
- static GetInvoiceWiseExcelData(MainData: any, WOTypes: any): any;
16
+ static GetInvoiceWiseExcelData(MainData: any, WOTypes: any, EntitySettings: any): any;
17
17
  static GetTotals(MainData: any, WOTypes: any): any;
18
18
  static GetWOTypeName(Type: any, WOTypes: any): any;
19
19
  static setHeadingInCell(): void;
20
- static setInvoiceDetailsInCell(MainData: any): void;
21
- static SetInvoiceDataInExcel(InvoiceInfo: any): void;
22
- static ConvertToString(Text: any, IsString: any): any;
20
+ static setInvoiceDetailsInCell(MainData: any, DecimalsNumber: number): void;
21
+ static SetInvoiceDataInExcel(InvoiceInfo: any, DecimalsNumber: number): void;
22
+ static ConvertToString(Text: any, IsString: any, DecimalsNumber: number): any;
23
23
  static SetDataInCell(Data: any, ColRange: number, RowNum: any): void;
24
24
  static getcelltype(cell: any): any;
25
25
  static ConvertDateToReadableFormat(DateObject: any): any;
@@ -27,7 +27,7 @@ exports.IssueSparesXlsxFileService = void 0;
27
27
  const XLSX = __importStar(require("xlsx"));
28
28
  const tr_utils_1 = require("../../../../utils/tr-utils");
29
29
  class IssueSparesXlsxFileService {
30
- static GetInvoiceWiseExcelData(MainData, WOTypes) {
30
+ static GetInvoiceWiseExcelData(MainData, WOTypes, EntitySettings) {
31
31
  this.wb = {};
32
32
  this.ws = {};
33
33
  this.Row = 0;
@@ -40,7 +40,7 @@ class IssueSparesXlsxFileService {
40
40
  this.wb.SheetNames = [];
41
41
  MainData = this.GetTotals(MainData, WOTypes);
42
42
  this.setHeadingInCell();
43
- this.setInvoiceDetailsInCell(MainData);
43
+ this.setInvoiceDetailsInCell(MainData, EntitySettings.DecimalsNumber);
44
44
  this.ws['!ref'] = XLSX.utils.encode_range(this.range);
45
45
  this.ws['!merges'] = this.MergeArray;
46
46
  this.ws["!cols"] = [{ wch: 15 }, { wch: 15 }, { wch: 20 }, { wch: 20 }, { wch: 10 }, { wch: 15 }, { wch: 20 }, { wch: 20 }, { wch: 10 }, { wch: 50 }, { wch: 40 }];
@@ -338,12 +338,12 @@ class IssueSparesXlsxFileService {
338
338
  });
339
339
  this.Row += 2;
340
340
  }
341
- static setInvoiceDetailsInCell(MainData) {
341
+ static setInvoiceDetailsInCell(MainData, DecimalsNumber) {
342
342
  MainData.forEach((InvoiceList) => {
343
- this.SetInvoiceDataInExcel(InvoiceList);
343
+ this.SetInvoiceDataInExcel(InvoiceList, DecimalsNumber);
344
344
  });
345
345
  }
346
- static SetInvoiceDataInExcel(InvoiceInfo) {
346
+ static SetInvoiceDataInExcel(InvoiceInfo, DecimalsNumber) {
347
347
  InvoiceInfo.CrDate = this.ConvertDateToReadableFormat(InvoiceInfo.CrDate);
348
348
  InvoiceInfo.WCrDate = this.ConvertDateToReadableFormat(InvoiceInfo.WCrDate);
349
349
  if (tr_utils_1.TrUtils.IsNull(InvoiceInfo.Prod)) {
@@ -363,16 +363,16 @@ class IssueSparesXlsxFileService {
363
363
  Product = InvoiceInfo.Parts.Desc;
364
364
  }
365
365
  if (!tr_utils_1.TrUtils.IsZero(InvoiceInfo.Parts.AssPr)) {
366
- Price = tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Parts.AssPr);
366
+ Price = tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Parts.AssPr, DecimalsNumber);
367
367
  }
368
368
  else {
369
- Price = tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Parts.UnPr);
369
+ Price = tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Parts.UnPr, DecimalsNumber);
370
370
  }
371
371
  if (!tr_utils_1.TrUtils.IsZero(InvoiceInfo.Parts.AssAmt)) {
372
- UnAmt = tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Parts.AssAmt);
372
+ UnAmt = tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Parts.AssAmt, DecimalsNumber);
373
373
  }
374
374
  else {
375
- UnAmt = tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Parts.UnAmt);
375
+ UnAmt = tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Parts.UnAmt, DecimalsNumber);
376
376
  }
377
377
  ;
378
378
  }
@@ -402,7 +402,7 @@ class IssueSparesXlsxFileService {
402
402
  ];
403
403
  let ColStart = 0;
404
404
  InvoiceData.forEach((InvData) => {
405
- InvData.text = this.ConvertToString(InvData.text, InvData.IsString);
405
+ InvData.text = this.ConvertToString(InvData.text, InvData.IsString, DecimalsNumber);
406
406
  this.SetDataInCell(InvData.text, ColStart, this.Row);
407
407
  this.MergeArray.push({
408
408
  s: { r: this.Row, c: ColStart },
@@ -412,7 +412,7 @@ class IssueSparesXlsxFileService {
412
412
  });
413
413
  this.Row += 1;
414
414
  }
415
- static ConvertToString(Text, IsString) {
415
+ static ConvertToString(Text, IsString, DecimalsNumber) {
416
416
  if (IsString) {
417
417
  if (Text == null) {
418
418
  Text = '';
@@ -424,7 +424,7 @@ class IssueSparesXlsxFileService {
424
424
  }
425
425
  }
426
426
  if (typeof Text === 'number') {
427
- return Number(tr_utils_1.TrUtils.FixedTo(Text));
427
+ return Number(tr_utils_1.TrUtils.FixedTo(Text, DecimalsNumber));
428
428
  }
429
429
  else {
430
430
  return Text;
@@ -13,11 +13,11 @@ export declare class StockXlsxFileService {
13
13
  };
14
14
  };
15
15
  static ws: any;
16
- static GetStockInfoExcelData(MainData: any, isSale: boolean, isHC: any, HeaderName: any): any;
16
+ static GetStockInfoExcelData(MainData: any, isSale: boolean, isHC: any, HeaderName: any, EntitySettings: any): any;
17
17
  static setHeadingInCell(HeaderName: any, isHC: any): void;
18
- static setInvoiceDetailsInCell(MainData: any, isHC: any): void;
19
- static SetInvoiceDataInExcel(InvoiceInfo: any, index: any, isHC: any): void;
20
- static ConvertToString(Text: any, IsString: any): any;
18
+ static setInvoiceDetailsInCell(MainData: any, isHC: any, DecimalsNumber: number): void;
19
+ static SetInvoiceDataInExcel(InvoiceInfo: any, index: any, isHC: any, DecimalsNumber: number): void;
20
+ static ConvertToString(Text: any, IsString: any, DecimalsNumber: any): any;
21
21
  static SetDataInCell(Data: any, ColRange: number, RowNum: any): void;
22
22
  static getcelltype(cell: any): any;
23
23
  }
@@ -27,7 +27,7 @@ exports.StockXlsxFileService = void 0;
27
27
  const XLSX = __importStar(require("xlsx"));
28
28
  const tr_utils_1 = require("../../../../utils/tr-utils");
29
29
  class StockXlsxFileService {
30
- static GetStockInfoExcelData(MainData, isSale, isHC, HeaderName) {
30
+ static GetStockInfoExcelData(MainData, isSale, isHC, HeaderName, EntitySettings) {
31
31
  this.wb = {};
32
32
  this.ws = {};
33
33
  this.Row = 0;
@@ -65,7 +65,7 @@ class StockXlsxFileService {
65
65
  // // console.log(`${key}: ${searchValue[key]}`);
66
66
  // }
67
67
  this.setHeadingInCell(HeaderName, isHC);
68
- this.setInvoiceDetailsInCell(MainData, isHC);
68
+ this.setInvoiceDetailsInCell(MainData, isHC, EntitySettings.DecimalsNumber);
69
69
  this.ws['!ref'] = XLSX.utils.encode_range(this.range);
70
70
  this.ws['!merges'] = this.MergeArray;
71
71
  if (isHC === 'HC') {
@@ -205,12 +205,12 @@ class StockXlsxFileService {
205
205
  });
206
206
  this.Row += 2;
207
207
  }
208
- static setInvoiceDetailsInCell(MainData, isHC) {
208
+ static setInvoiceDetailsInCell(MainData, isHC, DecimalsNumber) {
209
209
  MainData.forEach((InvoiceList, index) => {
210
- this.SetInvoiceDataInExcel(InvoiceList, index, isHC);
210
+ this.SetInvoiceDataInExcel(InvoiceList, index, isHC, DecimalsNumber);
211
211
  });
212
212
  }
213
- static SetInvoiceDataInExcel(InvoiceInfo, index, isHC) {
213
+ static SetInvoiceDataInExcel(InvoiceInfo, index, isHC, DecimalsNumber) {
214
214
  var _a;
215
215
  let InvoiceData = [
216
216
  { text: index + 1, ColRange: 1, IsString: true },
@@ -225,7 +225,7 @@ class StockXlsxFileService {
225
225
  }
226
226
  let ColStart = 0;
227
227
  InvoiceData.forEach((InvData) => {
228
- InvData.text = this.ConvertToString(InvData.text, InvData.IsString);
228
+ InvData.text = this.ConvertToString(InvData.text, InvData.IsString, DecimalsNumber);
229
229
  this.SetDataInCell(InvData.text, ColStart, this.Row);
230
230
  this.MergeArray.push({
231
231
  s: { r: this.Row, c: ColStart },
@@ -235,7 +235,7 @@ class StockXlsxFileService {
235
235
  });
236
236
  this.Row += 1;
237
237
  }
238
- static ConvertToString(Text, IsString) {
238
+ static ConvertToString(Text, IsString, DecimalsNumber) {
239
239
  if (IsString) {
240
240
  if (Text == null) {
241
241
  Text = '';
@@ -247,7 +247,7 @@ class StockXlsxFileService {
247
247
  }
248
248
  }
249
249
  if (typeof Text === 'number') {
250
- return Number(tr_utils_1.TrUtils.FixedTo(Text));
250
+ return Number(tr_utils_1.TrUtils.FixedTo(Text, DecimalsNumber));
251
251
  }
252
252
  else {
253
253
  return Text;
@@ -13,12 +13,12 @@ export declare class PaymentsMadeXlsxFileService {
13
13
  };
14
14
  };
15
15
  static ws: any;
16
- static GetPaymentsMadeDetailsExcelData(MainData: any, isPur: boolean, isSale: boolean, searchValue: any, HeaderName: string, ExtraFields: boolean): any;
16
+ static GetPaymentsMadeDetailsExcelData(MainData: any, isPur: boolean, isSale: boolean, searchValue: any, HeaderName: string, ExtraFields: boolean, EntitySettings: any): any;
17
17
  static GetTotals(MainData: any): any;
18
18
  static setHeadingInCell(isPur: boolean, showSearch: any, HeaderName: any, ExtraFields: boolean): void;
19
- static setInvoiceDetailsInCell(MainData: any, isSale: boolean, isPur: boolean, ExtraFields: boolean): void;
20
- static SetInvoiceDataInExcel(InvoiceInfo: any, index: any, isSale: boolean, isPur: any, ExtraFields: boolean): void;
21
- static ConvertToString(Text: any, IsString: any): any;
19
+ static setInvoiceDetailsInCell(MainData: any, isSale: boolean, isPur: boolean, ExtraFields: boolean, DecimalsNumber: number): void;
20
+ static SetInvoiceDataInExcel(InvoiceInfo: any, index: any, isSale: boolean, isPur: any, ExtraFields: boolean, DecimalsNumber: number): void;
21
+ static ConvertToString(Text: any, IsString: any, DecimalsNumber: number): any;
22
22
  static SetDataInCell(Data: any, ColRange: number, RowNum: any): void;
23
23
  static getcelltype(cell: any): any;
24
24
  static ConvertDateToReadableFormat(DateObject: any): any;