shareneus 1.4.48 → 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 (109) hide show
  1. package/dist/accounting/counter-sales/sales-receipt-print.service.d.ts +3 -3
  2. package/dist/accounting/counter-sales/sales-receipt-print.service.js +30 -29
  3. package/dist/accounting/credit-note/cn-print.service.d.ts +1 -2
  4. package/dist/accounting/credit-note/cn-print.service.js +10 -32
  5. package/dist/accounting/credit-note/credit-note-totals.service.d.ts +6 -6
  6. package/dist/accounting/credit-note/credit-note-totals.service.js +19 -19
  7. package/dist/accounting/debit-note/debit-note-print.service.d.ts +2 -2
  8. package/dist/accounting/debit-note/debit-note-print.service.js +15 -15
  9. package/dist/accounting/debit-note/debit-note-totals.service.d.ts +6 -6
  10. package/dist/accounting/debit-note/debit-note-totals.service.js +18 -18
  11. package/dist/accounting/invoice/hc-inv-pdf.service.d.ts +7 -7
  12. package/dist/accounting/invoice/hc-inv-pdf.service.js +36 -36
  13. package/dist/accounting/invoice/inv-pdf.service.d.ts +6 -6
  14. package/dist/accounting/invoice/inv-pdf.service.js +43 -43
  15. package/dist/accounting/invoice/inv-print.service.d.ts +3 -3
  16. package/dist/accounting/invoice/inv-print.service.js +24 -24
  17. package/dist/accounting/invoice/invoice-letterhead-pdf.service.d.ts +6 -6
  18. package/dist/accounting/invoice/invoice-letterhead-pdf.service.js +43 -43
  19. package/dist/accounting/invoice/invoice-total.service.d.ts +11 -11
  20. package/dist/accounting/invoice/invoice-total.service.js +54 -54
  21. package/dist/accounting/invoice/reports/excel/analysis-excel.service.d.ts +3 -3
  22. package/dist/accounting/invoice/reports/excel/analysis-excel.service.js +8 -7
  23. package/dist/accounting/invoice/reports/excel/category-wise-item-excel.service.d.ts +4 -4
  24. package/dist/accounting/invoice/reports/excel/category-wise-item-excel.service.js +14 -14
  25. package/dist/accounting/invoice/reports/excel/cust-wise-sales-details.d.ts +4 -4
  26. package/dist/accounting/invoice/reports/excel/cust-wise-sales-details.js +8 -8
  27. package/dist/accounting/invoice/reports/excel/cust-wise-sales-summary-excel.service.d.ts +4 -4
  28. package/dist/accounting/invoice/reports/excel/cust-wise-sales-summary-excel.service.js +8 -8
  29. package/dist/accounting/invoice/reports/excel/invoice-wise-excel.service.d.ts +4 -4
  30. package/dist/accounting/invoice/reports/excel/invoice-wise-excel.service.js +8 -8
  31. package/dist/accounting/invoice/reports/excel/item-wise-doctor-sale-excel.service.d.ts +4 -4
  32. package/dist/accounting/invoice/reports/excel/item-wise-doctor-sale-excel.service.js +10 -10
  33. package/dist/accounting/invoice/reports/excel/items-wise-sales-excel.service.d.ts +4 -4
  34. package/dist/accounting/invoice/reports/excel/items-wise-sales-excel.service.js +14 -13
  35. package/dist/accounting/invoice/reports/excel/manf-wise-sales-excel.service.d.ts +4 -4
  36. package/dist/accounting/invoice/reports/excel/manf-wise-sales-excel.service.js +8 -8
  37. package/dist/accounting/invoice/reports/excel/operator-wise-details.d.ts +4 -4
  38. package/dist/accounting/invoice/reports/excel/operator-wise-details.js +8 -8
  39. package/dist/accounting/invoice/reports/excel/operator-wise-summary.d.ts +4 -4
  40. package/dist/accounting/invoice/reports/excel/operator-wise-summary.js +8 -8
  41. package/dist/accounting/invoice/shared-inv-pdf.service.d.ts +6 -6
  42. package/dist/accounting/invoice/shared-inv-pdf.service.js +29 -29
  43. package/dist/appointments/appointments/appointment-total.service.d.ts +6 -6
  44. package/dist/appointments/appointments/appointment-total.service.js +28 -29
  45. package/dist/gst/excel/GSTR-RO-excel.service.d.ts +4 -4
  46. package/dist/gst/excel/GSTR-RO-excel.service.js +8 -8
  47. package/dist/gst/excel/GSTR1-excel.service.d.ts +4 -4
  48. package/dist/gst/excel/GSTR1-excel.service.js +10 -10
  49. package/dist/gst/excel/GSTR2-excel.service.d.ts +4 -4
  50. package/dist/gst/excel/GSTR2-excel.service.js +9 -9
  51. package/dist/gst/excel/tally-sales-import.service.d.ts +4 -4
  52. package/dist/gst/excel/tally-sales-import.service.js +8 -8
  53. package/dist/inventory/items/issue-parts-pdf.service.d.ts +6 -6
  54. package/dist/inventory/items/issue-parts-pdf.service.js +32 -32
  55. package/dist/inventory/items/reports/excel/expiring-drugs-excel.service.d.ts +4 -4
  56. package/dist/inventory/items/reports/excel/expiring-drugs-excel.service.js +11 -10
  57. package/dist/inventory/items/reports/excel/item-wise-mout-details.d.ts +4 -4
  58. package/dist/inventory/items/reports/excel/item-wise-mout-details.js +8 -8
  59. package/dist/inventory/items/reports/excel/item-wise-mout-summary.d.ts +4 -4
  60. package/dist/inventory/items/reports/excel/item-wise-mout-summary.js +8 -8
  61. package/dist/inventory/items/reports/excel/spares-issue-excel.service.d.ts +4 -4
  62. package/dist/inventory/items/reports/excel/spares-issue-excel.service.js +12 -12
  63. package/dist/inventory/items/reports/excel/stock-excel.service.d.ts +4 -4
  64. package/dist/inventory/items/reports/excel/stock-excel.service.js +8 -8
  65. package/dist/purchases/payment-made/reports/excel/payments-made-excel.service.d.ts +4 -4
  66. package/dist/purchases/payment-made/reports/excel/payments-made-excel.service.js +9 -9
  67. package/dist/purchases/payment-made/reports/excel/ven-balance-excel.service.d.ts +6 -6
  68. package/dist/purchases/payment-made/reports/excel/ven-balance-excel.service.js +14 -14
  69. package/dist/purchases/purchase-order/po-totals.service.d.ts +7 -7
  70. package/dist/purchases/purchase-order/po-totals.service.js +24 -25
  71. package/dist/purchases/purchase-order/purchase-order-print.service.js +3 -3
  72. package/dist/purchases/purchase-order/purchase-order-totals.service.d.ts +10 -10
  73. package/dist/purchases/purchase-order/purchase-order-totals.service.js +27 -27
  74. package/dist/purchases/vendor-credit-note/vendor-credit-note-print.service.d.ts +1 -1
  75. package/dist/purchases/vendor-credit-note/vendor-credit-note-print.service.js +20 -20
  76. package/dist/purchases/vendor-credit-note/vendor-credit-note-totals.service.d.ts +8 -8
  77. package/dist/purchases/vendor-credit-note/vendor-credit-note-totals.service.js +31 -32
  78. package/dist/purchases/vendor-debit-note/vendor-debit-note-print.service.d.ts +1 -2
  79. package/dist/purchases/vendor-debit-note/vendor-debit-note-print.service.js +10 -32
  80. package/dist/purchases/vendor-debit-note/vendor-debit-note-totals.service.d.ts +6 -6
  81. package/dist/purchases/vendor-debit-note/vendor-debit-note-totals.service.js +19 -19
  82. package/dist/sales/delivery-challan/delivery-challan-print.service.d.ts +1 -2
  83. package/dist/sales/delivery-challan/delivery-challan-print.service.js +10 -33
  84. package/dist/sales/delivery-challan/delivery-challan-totals.d.ts +6 -6
  85. package/dist/sales/delivery-challan/delivery-challan-totals.js +20 -20
  86. package/dist/sales/sales/sales-print.service.d.ts +2 -2
  87. package/dist/sales/sales/sales-print.service.js +18 -18
  88. package/dist/sales/sales/sales-totals.service.d.ts +6 -6
  89. package/dist/sales/sales/sales-totals.service.js +19 -19
  90. package/dist/services/est.print-service.d.ts +18 -18
  91. package/dist/services/est.print-service.js +133 -133
  92. package/dist/services/reports/excel/insurance-expire-excel.service.d.ts +4 -4
  93. package/dist/services/reports/excel/insurance-expire-excel.service.js +8 -8
  94. package/dist/services/reports/excel/next-service-date-excel.service.d.ts +4 -4
  95. package/dist/services/reports/excel/next-service-date-excel.service.js +8 -8
  96. package/dist/services/reports/excel/repair-orders-excel.service.d.ts +5 -5
  97. package/dist/services/reports/excel/repair-orders-excel.service.js +11 -11
  98. package/dist/services/ro-print-service.d.ts +6 -6
  99. package/dist/services/ro-print-service.js +40 -40
  100. package/dist/services/ro-totals.service.d.ts +11 -11
  101. package/dist/services/ro-totals.service.js +50 -50
  102. package/dist/shared/shared-pdf.service.d.ts +0 -16
  103. package/dist/shared/shared-pdf.service.js +36 -34
  104. package/dist/shared/shared-print.service.js +1 -0
  105. package/dist/utils/tr-utils.d.ts +2 -3
  106. package/dist/utils/tr-utils.js +7 -6
  107. package/package.json +1 -1
  108. package/dist/shared/shared-pdfs/shared-pdf.service.d.ts +0 -926
  109. package/dist/shared/shared-pdfs/shared-pdf.service.js +0 -2608
@@ -54,23 +54,23 @@ class EstPrintService {
54
54
  ROPrintData.ShowAccParts = this.CheckAndShowItemsAsAR(argROData);
55
55
  }
56
56
  argROData = this.ReverseItemsForROPrint(argROData, isReverse);
57
- let finalTotalsData = ro_totals_service_1.ROTotalsService.GetTotalsValue(argROData, TaxCodes, false, true, true, ROPrintData.Entity.Round);
58
- finalTotalsData = this.CheckAndGetCombinedTotals(AsCustomerAndInsurance, AsInsuranceOrCustomer, finalTotalsData);
57
+ let finalTotalsData = ro_totals_service_1.ROTotalsService.GetTotalsValue(argROData, TaxCodes, false, true, true, ROPrintData.Entity.Round, ROPrintData.Entity);
58
+ finalTotalsData = this.CheckAndGetCombinedTotals(AsCustomerAndInsurance, AsInsuranceOrCustomer, finalTotalsData, ROPrintData.Entity.DecimalsNumber);
59
59
  finalTotalsData.Settings = tr_utils_1.TrUtils.Stringify(argROData.Settings);
60
60
  if (AsCustomerOnly) {
61
61
  if (ROPrintData.ShowAccParts) {
62
- finalTotalsData = this.GetLaborAndPartItemsAfterDisc(finalTotalsData);
62
+ finalTotalsData = this.GetLaborAndPartItemsAfterDisc(finalTotalsData, ROPrintData.Entity.DecimalsNumber);
63
63
  }
64
64
  else {
65
- finalTotalsData = this.GetDetailedInfoForItems(finalTotalsData);
66
- finalTotalsData = this.GetCustTaxInfo(finalTotalsData, IncludeGST, TaxCodes);
65
+ finalTotalsData = this.GetDetailedInfoForItems(finalTotalsData, ROPrintData.Entity.DecimalsNumber);
66
+ finalTotalsData = this.GetCustTaxInfo(finalTotalsData, IncludeGST, TaxCodes, ROPrintData.Entity.DecimalsNumber);
67
67
  }
68
68
  }
69
69
  if (AsCustomerAndInsurance) {
70
- finalTotalsData = this.GetCombinedInfoForItems(finalTotalsData);
70
+ finalTotalsData = this.GetCombinedInfoForItems(finalTotalsData, ROPrintData.Entity.DecimalsNumber);
71
71
  }
72
72
  if (AsInsuranceOrCustomer) {
73
- finalTotalsData.Parts = this.GetSplitInfoForParts(finalTotalsData.Parts);
73
+ finalTotalsData.Parts = this.GetSplitInfoForParts(finalTotalsData.Parts, ROPrintData.Entity.DecimalsNumber);
74
74
  }
75
75
  if (IncludeGST) {
76
76
  finalTotalsData.ShowDetailedLaborTaxInfo = this.CheckLaborTaxItemIndex(finalTotalsData.Ops) !== -1;
@@ -82,10 +82,10 @@ class EstPrintService {
82
82
  }
83
83
  ROPrintData = tr_utils_1.TrUtils.ConcatObjects(ROPrintData, finalTotalsData);
84
84
  if (ROPrintData.ShowAccParts) {
85
- ROPrintData = this.ConvertItemsAsAR(ROPrintData, Consolidate);
85
+ ROPrintData = this.ConvertItemsAsAR(ROPrintData, Consolidate, ROPrintData.Entity.DecimalsNumber);
86
86
  }
87
87
  ROPrintData.Colli = this.EmptyInvalidCollisionRepairItems(ROPrintData.Colli);
88
- ROPrintData = this.GetLineTotals(ROPrintData, IncludeGST, AsCustomerOnly, AsInsuranceOnly, Consolidate);
88
+ ROPrintData = this.GetLineTotals(ROPrintData, IncludeGST, AsCustomerOnly, AsInsuranceOnly, Consolidate, ROPrintData.Entity.DecimalsNumber);
89
89
  ROPrintData.PrintInfo = this.PrepareFormatForEstPrint(ROPrintData, SuppEstIndex, OverallEst, code_enums_1.ROTypeEnum.Estimate, AsEstimated);
90
90
  ROPrintData = this.CheckAndCombineDescMPNForAR(ROPrintData.Entity.MPN, ROPrintData);
91
91
  ROPrintData.Vehicle = shared_print_service_1.PrintSharedService.GetVehicleFromServiceAndFormatData(OriginalVehicleData);
@@ -407,38 +407,38 @@ class EstPrintService {
407
407
  return false;
408
408
  }
409
409
  }
410
- static ConvertItemsAsAR(ROPrintData, Consolidate) {
410
+ static ConvertItemsAsAR(ROPrintData, Consolidate, DecimalsNumber) {
411
411
  ROPrintData.Colli.forEach((Collision) => {
412
412
  Collision = this.ResetItemsDataById(Collision, ROPrintData.Ops, ROPrintData.Parts);
413
413
  });
414
414
  ROPrintData.Ops.forEach((Labor) => {
415
415
  // console.log('Labor', Labor);
416
- Labor.NetAmt = tr_utils_1.TrUtils.FixPriceValue(Labor.NetAmt);
417
- Labor.CCGST = tr_utils_1.TrUtils.FixPriceValue(Labor.CCGST);
418
- Labor.CSGST = tr_utils_1.TrUtils.FixPriceValue(Labor.CSGST);
419
- Labor.CIGST = tr_utils_1.TrUtils.FixPriceValue(Labor.CIGST);
420
- Labor.Disc = tr_utils_1.TrUtils.FixPriceValue(Labor.Disc);
421
- Labor.AssPr = tr_utils_1.TrUtils.FixPriceValue(Labor.AssPr);
422
- Labor.ACGST = tr_utils_1.TrUtils.FixPriceValue(Labor.ACGST);
423
- Labor.ASGST = tr_utils_1.TrUtils.FixPriceValue(Labor.ASGST);
424
- Labor.AIGST = tr_utils_1.TrUtils.FixPriceValue(Labor.AIGST);
416
+ Labor.NetAmt = tr_utils_1.TrUtils.FixPriceValue(Labor.NetAmt, DecimalsNumber);
417
+ Labor.CCGST = tr_utils_1.TrUtils.FixPriceValue(Labor.CCGST, DecimalsNumber);
418
+ Labor.CSGST = tr_utils_1.TrUtils.FixPriceValue(Labor.CSGST, DecimalsNumber);
419
+ Labor.CIGST = tr_utils_1.TrUtils.FixPriceValue(Labor.CIGST, DecimalsNumber);
420
+ Labor.Disc = tr_utils_1.TrUtils.FixPriceValue(Labor.Disc, DecimalsNumber);
421
+ Labor.AssPr = tr_utils_1.TrUtils.FixPriceValue(Labor.AssPr, DecimalsNumber);
422
+ Labor.ACGST = tr_utils_1.TrUtils.FixPriceValue(Labor.ACGST, DecimalsNumber);
423
+ Labor.ASGST = tr_utils_1.TrUtils.FixPriceValue(Labor.ASGST, DecimalsNumber);
424
+ Labor.AIGST = tr_utils_1.TrUtils.FixPriceValue(Labor.AIGST, DecimalsNumber);
425
425
  if (Consolidate) {
426
426
  if (Labor.PBy === enums_1.PayTypeEnum.Customer) {
427
- Labor.EstPr = tr_utils_1.TrUtils.FixPriceValue(Labor.CustAfterTax);
428
- Labor.Pr = tr_utils_1.TrUtils.FixPriceValue(Labor.CustAfterTax);
427
+ Labor.EstPr = tr_utils_1.TrUtils.FixPriceValue(Labor.CustAfterTax, DecimalsNumber);
428
+ Labor.Pr = tr_utils_1.TrUtils.FixPriceValue(Labor.CustAfterTax, DecimalsNumber);
429
429
  }
430
430
  else {
431
- Labor.EstPr = tr_utils_1.TrUtils.FixPriceValue(Labor.InsAfterTax);
432
- Labor.Pr = tr_utils_1.TrUtils.FixPriceValue(Labor.InsAfterTax);
431
+ Labor.EstPr = tr_utils_1.TrUtils.FixPriceValue(Labor.InsAfterTax, DecimalsNumber);
432
+ Labor.Pr = tr_utils_1.TrUtils.FixPriceValue(Labor.InsAfterTax, DecimalsNumber);
433
433
  }
434
434
  }
435
435
  else {
436
- Labor.EstPr = tr_utils_1.TrUtils.FixPriceValue(Labor.EstPr);
437
- Labor.Pr = tr_utils_1.TrUtils.FixPriceValue(Labor.Pr);
436
+ Labor.EstPr = tr_utils_1.TrUtils.FixPriceValue(Labor.EstPr, DecimalsNumber);
437
+ Labor.Pr = tr_utils_1.TrUtils.FixPriceValue(Labor.Pr, DecimalsNumber);
438
438
  }
439
- Labor.ECGST = tr_utils_1.TrUtils.FixPriceValue(Labor.ECGST);
440
- Labor.ESGST = tr_utils_1.TrUtils.FixPriceValue(Labor.ESGST);
441
- Labor.EIGST = tr_utils_1.TrUtils.FixPriceValue(Labor.EIGST);
439
+ Labor.ECGST = tr_utils_1.TrUtils.FixPriceValue(Labor.ECGST, DecimalsNumber);
440
+ Labor.ESGST = tr_utils_1.TrUtils.FixPriceValue(Labor.ESGST, DecimalsNumber);
441
+ Labor.EIGST = tr_utils_1.TrUtils.FixPriceValue(Labor.EIGST, DecimalsNumber);
442
442
  if (tr_utils_1.TrUtils.IsNull(Labor.CollId)) {
443
443
  let LaborColli = {
444
444
  _id: Labor._id,
@@ -455,36 +455,36 @@ class EstPrintService {
455
455
  });
456
456
  ROPrintData.Parts.forEach((Part) => {
457
457
  // console.log('Part', Part);
458
- Part.NetAmt = tr_utils_1.TrUtils.FixPriceValue(Part.NetAmt);
459
- Part.UnAmt = tr_utils_1.TrUtils.FixPriceValue(Part.UnAmt);
460
- Part.CCGST = tr_utils_1.TrUtils.FixPriceValue(Part.CCGST);
461
- Part.CSGST = tr_utils_1.TrUtils.FixPriceValue(Part.CSGST);
462
- Part.CIGST = tr_utils_1.TrUtils.FixPriceValue(Part.CIGST);
463
- Part.Disc = tr_utils_1.TrUtils.FixPriceValue(Part.Disc);
464
- Part.AssPr = tr_utils_1.TrUtils.FixPriceValue(Part.AssPr);
465
- Part.AssAmt = tr_utils_1.TrUtils.FixPriceValue(Part.AssAmt);
466
- Part.ACGST = tr_utils_1.TrUtils.FixPriceValue(Part.ACGST);
467
- Part.ASGST = tr_utils_1.TrUtils.FixPriceValue(Part.ASGST);
468
- Part.AIGST = tr_utils_1.TrUtils.FixPriceValue(Part.AIGST);
469
- Part.EstPr = tr_utils_1.TrUtils.FixPriceValue(Part.EstPr);
458
+ Part.NetAmt = tr_utils_1.TrUtils.FixPriceValue(Part.NetAmt, DecimalsNumber);
459
+ Part.UnAmt = tr_utils_1.TrUtils.FixPriceValue(Part.UnAmt, DecimalsNumber);
460
+ Part.CCGST = tr_utils_1.TrUtils.FixPriceValue(Part.CCGST, DecimalsNumber);
461
+ Part.CSGST = tr_utils_1.TrUtils.FixPriceValue(Part.CSGST, DecimalsNumber);
462
+ Part.CIGST = tr_utils_1.TrUtils.FixPriceValue(Part.CIGST, DecimalsNumber);
463
+ Part.Disc = tr_utils_1.TrUtils.FixPriceValue(Part.Disc, DecimalsNumber);
464
+ Part.AssPr = tr_utils_1.TrUtils.FixPriceValue(Part.AssPr, DecimalsNumber);
465
+ Part.AssAmt = tr_utils_1.TrUtils.FixPriceValue(Part.AssAmt, DecimalsNumber);
466
+ Part.ACGST = tr_utils_1.TrUtils.FixPriceValue(Part.ACGST, DecimalsNumber);
467
+ Part.ASGST = tr_utils_1.TrUtils.FixPriceValue(Part.ASGST, DecimalsNumber);
468
+ Part.AIGST = tr_utils_1.TrUtils.FixPriceValue(Part.AIGST, DecimalsNumber);
469
+ Part.EstPr = tr_utils_1.TrUtils.FixPriceValue(Part.EstPr, DecimalsNumber);
470
470
  if (Consolidate) {
471
471
  if (Part.PBy === enums_1.PayTypeEnum.Customer) {
472
- Part.EstPr = tr_utils_1.TrUtils.FixPriceValue(Part.CustAfterTax / Part.Qty);
473
- Part.UnPr = tr_utils_1.TrUtils.FixPriceValue(Part.CustAfterTax / Part.Qty);
472
+ Part.EstPr = tr_utils_1.TrUtils.FixPriceValue((Part.CustAfterTax / Part.Qty), DecimalsNumber);
473
+ Part.UnPr = tr_utils_1.TrUtils.FixPriceValue((Part.CustAfterTax / Part.Qty), DecimalsNumber);
474
474
  }
475
475
  else {
476
- Part.EstPr = tr_utils_1.TrUtils.FixPriceValue(Part.InsAfterTax / Part.Qty);
477
- Part.UnPr = tr_utils_1.TrUtils.FixPriceValue(Part.InsAfterTax / Part.Qty);
476
+ Part.EstPr = tr_utils_1.TrUtils.FixPriceValue((Part.InsAfterTax / Part.Qty), DecimalsNumber);
477
+ Part.UnPr = tr_utils_1.TrUtils.FixPriceValue((Part.InsAfterTax / Part.Qty), DecimalsNumber);
478
478
  }
479
479
  }
480
480
  else {
481
- Part.EstPr = tr_utils_1.TrUtils.FixPriceValue(Part.EstPr);
482
- Part.UnPr = tr_utils_1.TrUtils.FixPriceValue(Part.UnPr);
481
+ Part.EstPr = tr_utils_1.TrUtils.FixPriceValue(Part.EstPr, DecimalsNumber);
482
+ Part.UnPr = tr_utils_1.TrUtils.FixPriceValue(Part.UnPr, DecimalsNumber);
483
483
  }
484
- Part.EstAmt = tr_utils_1.TrUtils.FixPriceValue(Part.EstAmt);
485
- Part.ECGST = tr_utils_1.TrUtils.FixPriceValue(Part.ECGST);
486
- Part.ESGST = tr_utils_1.TrUtils.FixPriceValue(Part.ESGST);
487
- Part.EIGST = tr_utils_1.TrUtils.FixPriceValue(Part.EIGST);
484
+ Part.EstAmt = tr_utils_1.TrUtils.FixPriceValue(Part.EstAmt, DecimalsNumber);
485
+ Part.ECGST = tr_utils_1.TrUtils.FixPriceValue(Part.ECGST, DecimalsNumber);
486
+ Part.ESGST = tr_utils_1.TrUtils.FixPriceValue(Part.ESGST, DecimalsNumber);
487
+ Part.EIGST = tr_utils_1.TrUtils.FixPriceValue(Part.EIGST, DecimalsNumber);
488
488
  if (tr_utils_1.TrUtils.IsNull(Part.CollId)) {
489
489
  let LaborIndex = ROPrintData.Ops.findIndex((Labor) => {
490
490
  return Labor._id === Part.OpId;
@@ -561,12 +561,12 @@ class EstPrintService {
561
561
  });
562
562
  return Colli;
563
563
  }
564
- static GetLineTotals(ROPrintData, IncludeGST, AsCustomerOnly, AsInsuranceOnly, Consolidate) {
564
+ static GetLineTotals(ROPrintData, IncludeGST, AsCustomerOnly, AsInsuranceOnly, Consolidate, DecimalsNumber) {
565
565
  ROPrintData.Ops.forEach((Labor) => {
566
- Labor.LineTotal = this.GetLaborLineTotal(Labor, IncludeGST, AsCustomerOnly, AsInsuranceOnly, Consolidate);
566
+ Labor.LineTotal = this.GetLaborLineTotal(Labor, IncludeGST, AsCustomerOnly, AsInsuranceOnly, Consolidate, DecimalsNumber);
567
567
  });
568
568
  ROPrintData.Parts.forEach((Part) => {
569
- Part.LineTotal = this.GetPartLineTotal(Part, IncludeGST, AsCustomerOnly, AsInsuranceOnly, Consolidate);
569
+ Part.LineTotal = this.GetPartLineTotal(Part, IncludeGST, AsCustomerOnly, AsInsuranceOnly, Consolidate, DecimalsNumber);
570
570
  });
571
571
  ROPrintData.Colli.forEach((Collision) => {
572
572
  let LineTotal = 0;
@@ -582,7 +582,7 @@ class EstPrintService {
582
582
  if (!tr_utils_1.TrUtils.IsNull(Collision.DtngData)) {
583
583
  LineTotal += this.GetCollisionLaborLineTotal(Collision.DtngData, AsCustomerOnly, AsInsuranceOnly, Consolidate);
584
584
  }
585
- Collision.LineTotal = tr_utils_1.TrUtils.FixPriceValue(LineTotal);
585
+ Collision.LineTotal = tr_utils_1.TrUtils.FixPriceValue(LineTotal, DecimalsNumber);
586
586
  });
587
587
  return ROPrintData;
588
588
  }
@@ -642,7 +642,7 @@ class EstPrintService {
642
642
  }
643
643
  return LineTotal;
644
644
  }
645
- static GetLaborLineTotal(LaborData, IncludeGST, AsCustomerOnly, AsInsuranceOnly, Consolidate) {
645
+ static GetLaborLineTotal(LaborData, IncludeGST, AsCustomerOnly, AsInsuranceOnly, Consolidate, DecimalsNumber) {
646
646
  let LineTotal = 0;
647
647
  if (AsCustomerOnly) {
648
648
  if (IncludeGST || Consolidate) {
@@ -668,9 +668,9 @@ class EstPrintService {
668
668
  LineTotal = LaborData.InsAfterLaborDisc + LaborData.CustAfterLaborDisc;
669
669
  }
670
670
  }
671
- return tr_utils_1.TrUtils.FixedTo(LineTotal);
671
+ return tr_utils_1.TrUtils.FixedTo(LineTotal, DecimalsNumber);
672
672
  }
673
- static GetPartLineTotal(PartData, IncludeGST, AsCustomerOnly, AsInsuranceOnly, Consolidate) {
673
+ static GetPartLineTotal(PartData, IncludeGST, AsCustomerOnly, AsInsuranceOnly, Consolidate, DecimalsNumber) {
674
674
  let LineTotal = 0;
675
675
  if (AsCustomerOnly) {
676
676
  if (IncludeGST || Consolidate) {
@@ -696,7 +696,7 @@ class EstPrintService {
696
696
  LineTotal = PartData.InsAfterPartDisc + PartData.CustAfterPartDisc;
697
697
  }
698
698
  }
699
- return tr_utils_1.TrUtils.FixedTo(LineTotal);
699
+ return tr_utils_1.TrUtils.FixedTo(LineTotal, DecimalsNumber);
700
700
  }
701
701
  static ReverseItemsForROPrint(argROData, isReverse) {
702
702
  if (isReverse) {
@@ -741,44 +741,44 @@ class EstPrintService {
741
741
  argROData.Parts = ReversedParts;
742
742
  return argROData;
743
743
  }
744
- static CheckAndGetCombinedTotals(AsCustomerAndInsurance, AsInsuranceOrCustomer, finalTotalsData) {
744
+ static CheckAndGetCombinedTotals(AsCustomerAndInsurance, AsInsuranceOrCustomer, finalTotalsData, DecimalsNumber) {
745
745
  if (AsCustomerAndInsurance || AsInsuranceOrCustomer) {
746
- finalTotalsData.InsLaborTotalBeforeDisc = tr_utils_1.TrUtils.FixPriceValue(Number(finalTotalsData.CustLaborTotalBeforeDisc) +
747
- Number(finalTotalsData.InsLaborTotalBeforeDisc));
748
- finalTotalsData.InsLaborDiscTotal = tr_utils_1.TrUtils.FixPriceValue(Number(finalTotalsData.CustLaborDiscTotal) +
749
- Number(finalTotalsData.InsLaborDiscTotal));
750
- finalTotalsData.InsLaborCGST = tr_utils_1.TrUtils.FixPriceValue(Number(finalTotalsData.CustLaborCGST) +
751
- Number(finalTotalsData.InsLaborCGST));
752
- finalTotalsData.InsLaborSGST = tr_utils_1.TrUtils.FixPriceValue(Number(finalTotalsData.CustLaborSGST) +
753
- Number(finalTotalsData.InsLaborSGST));
754
- finalTotalsData.InsLaborIGST = tr_utils_1.TrUtils.FixPriceValue(Number(finalTotalsData.CustLaborIGST) +
755
- Number(finalTotalsData.InsLaborIGST));
756
- finalTotalsData.InsPartIGST = tr_utils_1.TrUtils.FixPriceValue(Number(finalTotalsData.CustPartIGST) +
757
- Number(finalTotalsData.InsPartIGST));
758
- finalTotalsData.InsPartsTotalBeforeDisc = tr_utils_1.TrUtils.FixPriceValue(Number(finalTotalsData.CustPartsTotalBeforeDisc) +
759
- Number(finalTotalsData.InsPartsTotalBeforeDisc));
760
- finalTotalsData.InsPartsDiscTotal = tr_utils_1.TrUtils.FixPriceValue(Number(finalTotalsData.CustPartsDiscTotal) +
761
- Number(finalTotalsData.InsPartsDiscTotal));
762
- finalTotalsData.InsPartCGST = tr_utils_1.TrUtils.FixPriceValue(Number(finalTotalsData.CustPartCGST) +
763
- Number(finalTotalsData.InsPartCGST));
764
- finalTotalsData.InsPartSGST = tr_utils_1.TrUtils.FixPriceValue(Number(finalTotalsData.CustPartSGST) +
765
- Number(finalTotalsData.InsPartSGST));
766
- finalTotalsData.InsLaborTotalAfterTax = tr_utils_1.TrUtils.FixPriceValue(Number(finalTotalsData.CustLaborAfterTax) +
767
- Number(finalTotalsData.InsLaborTotalAfterTax));
768
- finalTotalsData.InsPartsTotalAfterTax = tr_utils_1.TrUtils.FixPriceValue(Number(finalTotalsData.CustPartAfterTax) +
769
- Number(finalTotalsData.InsPartsTotalAfterTax));
770
- finalTotalsData.FixedInsTotal = tr_utils_1.TrUtils.FixPriceValue(Number(finalTotalsData.FixedTotal) +
771
- Number(finalTotalsData.FixedInsTotal));
772
- finalTotalsData.InsTotalRoundedBy = tr_utils_1.TrUtils.FixPriceValue(Math.round(Number(finalTotalsData.FixedInsTotal)) - Number(finalTotalsData.FixedInsTotal));
773
- finalTotalsData.InsRoundedTotal = tr_utils_1.TrUtils.FixPriceValue(Math.round(Number(finalTotalsData.FixedInsTotal)));
746
+ finalTotalsData.InsLaborTotalBeforeDisc = tr_utils_1.TrUtils.FixPriceValue((Number(finalTotalsData.CustLaborTotalBeforeDisc) +
747
+ Number(finalTotalsData.InsLaborTotalBeforeDisc)), DecimalsNumber);
748
+ finalTotalsData.InsLaborDiscTotal = tr_utils_1.TrUtils.FixPriceValue((Number(finalTotalsData.CustLaborDiscTotal) +
749
+ Number(finalTotalsData.InsLaborDiscTotal)), DecimalsNumber);
750
+ finalTotalsData.InsLaborCGST = tr_utils_1.TrUtils.FixPriceValue((Number(finalTotalsData.CustLaborCGST) +
751
+ Number(finalTotalsData.InsLaborCGST)), DecimalsNumber);
752
+ finalTotalsData.InsLaborSGST = tr_utils_1.TrUtils.FixPriceValue((Number(finalTotalsData.CustLaborSGST) +
753
+ Number(finalTotalsData.InsLaborSGST)), DecimalsNumber);
754
+ finalTotalsData.InsLaborIGST = tr_utils_1.TrUtils.FixPriceValue((Number(finalTotalsData.CustLaborIGST) +
755
+ Number(finalTotalsData.InsLaborIGST)), DecimalsNumber);
756
+ finalTotalsData.InsPartIGST = tr_utils_1.TrUtils.FixPriceValue((Number(finalTotalsData.CustPartIGST) +
757
+ Number(finalTotalsData.InsPartIGST)), DecimalsNumber);
758
+ finalTotalsData.InsPartsTotalBeforeDisc = tr_utils_1.TrUtils.FixPriceValue((Number(finalTotalsData.CustPartsTotalBeforeDisc) +
759
+ Number(finalTotalsData.InsPartsTotalBeforeDisc)), DecimalsNumber);
760
+ finalTotalsData.InsPartsDiscTotal = tr_utils_1.TrUtils.FixPriceValue((Number(finalTotalsData.CustPartsDiscTotal) +
761
+ Number(finalTotalsData.InsPartsDiscTotal)), DecimalsNumber);
762
+ finalTotalsData.InsPartCGST = tr_utils_1.TrUtils.FixPriceValue((Number(finalTotalsData.CustPartCGST) +
763
+ Number(finalTotalsData.InsPartCGST)), DecimalsNumber);
764
+ finalTotalsData.InsPartSGST = tr_utils_1.TrUtils.FixPriceValue((Number(finalTotalsData.CustPartSGST) +
765
+ Number(finalTotalsData.InsPartSGST)), DecimalsNumber);
766
+ finalTotalsData.InsLaborTotalAfterTax = tr_utils_1.TrUtils.FixPriceValue((Number(finalTotalsData.CustLaborAfterTax) +
767
+ Number(finalTotalsData.InsLaborTotalAfterTax)), DecimalsNumber);
768
+ finalTotalsData.InsPartsTotalAfterTax = tr_utils_1.TrUtils.FixPriceValue((Number(finalTotalsData.CustPartAfterTax) +
769
+ Number(finalTotalsData.InsPartsTotalAfterTax)), DecimalsNumber);
770
+ finalTotalsData.FixedInsTotal = tr_utils_1.TrUtils.FixPriceValue((Number(finalTotalsData.FixedTotal) +
771
+ Number(finalTotalsData.FixedInsTotal)), DecimalsNumber);
772
+ finalTotalsData.InsTotalRoundedBy = tr_utils_1.TrUtils.FixPriceValue((Math.round(Number(finalTotalsData.FixedInsTotal)) - Number(finalTotalsData.FixedInsTotal)), DecimalsNumber);
773
+ finalTotalsData.InsRoundedTotal = tr_utils_1.TrUtils.FixPriceValue(Math.round(Number(finalTotalsData.FixedInsTotal)), DecimalsNumber);
774
774
  let InsTaxGroupData = [];
775
775
  finalTotalsData.InsTaxGroupData.forEach((InsTaxGroup) => {
776
776
  let index = finalTotalsData.CustTaxGroupData.findIndex((CustTaxGroup) => {
777
777
  return CustTaxGroup.HSN === InsTaxGroup.HSN;
778
778
  });
779
779
  if (index !== -1) {
780
- InsTaxGroup.TotalTaxAmount = tr_utils_1.TrUtils.FixPriceValue(Number(InsTaxGroup.TotalTaxAmount) + Number(finalTotalsData.CustTaxGroupData[index].TotalTaxAmount));
781
- InsTaxGroup.TotalTaxableAmount = tr_utils_1.TrUtils.FixPriceValue(Number(InsTaxGroup.TotalTaxableAmount) + Number(finalTotalsData.CustTaxGroupData[index].TotalTaxableAmount));
780
+ InsTaxGroup.TotalTaxAmount = tr_utils_1.TrUtils.FixPriceValue((Number(InsTaxGroup.TotalTaxAmount) + Number(finalTotalsData.CustTaxGroupData[index].TotalTaxAmount)), DecimalsNumber);
781
+ InsTaxGroup.TotalTaxableAmount = tr_utils_1.TrUtils.FixPriceValue((Number(InsTaxGroup.TotalTaxableAmount) + Number(finalTotalsData.CustTaxGroupData[index].TotalTaxableAmount)), DecimalsNumber);
782
782
  }
783
783
  InsTaxGroupData.push(InsTaxGroup);
784
784
  });
@@ -786,51 +786,51 @@ class EstPrintService {
786
786
  }
787
787
  return finalTotalsData;
788
788
  }
789
- static GetDetailedInfoForItems(ROTotalsData) {
790
- ROTotalsData.Ops = this.GetCustLaborPrintInfo(ROTotalsData.Ops);
791
- ROTotalsData.Parts = this.GetCustItemsPrintInfo(ROTotalsData.Parts, ROTotalsData.Ops);
789
+ static GetDetailedInfoForItems(ROTotalsData, DecimalsNumber) {
790
+ ROTotalsData.Ops = this.GetCustLaborPrintInfo(ROTotalsData.Ops, DecimalsNumber);
791
+ ROTotalsData.Parts = this.GetCustItemsPrintInfo(ROTotalsData.Parts, ROTotalsData.Ops, DecimalsNumber);
792
792
  return ROTotalsData;
793
793
  }
794
- static GetCustLaborPrintInfo(LaborList) {
794
+ static GetCustLaborPrintInfo(LaborList, DecimalsNumber) {
795
795
  LaborList.forEach((Labor) => {
796
796
  Labor.HSN = Labor.SAC;
797
797
  if (Labor.Sts === enums_1.LaborStatusEnum.New || Labor.Sts === enums_1.LaborStatusEnum.WtngForAppr) {
798
- Labor.UnPr = tr_utils_1.TrUtils.FixPriceValue(Labor.EstPr);
798
+ Labor.UnPr = tr_utils_1.TrUtils.FixPriceValue(Labor.EstPr, DecimalsNumber);
799
799
  Labor.Disc = 0;
800
800
  Labor.Perc = '';
801
801
  }
802
802
  else {
803
- Labor.UnPr = tr_utils_1.TrUtils.FixPriceValue(Labor.Pr);
803
+ Labor.UnPr = tr_utils_1.TrUtils.FixPriceValue(Labor.Pr, DecimalsNumber);
804
804
  }
805
805
  });
806
806
  return LaborList;
807
807
  }
808
- static GetCustItemsPrintInfo(Items, LaborList) {
808
+ static GetCustItemsPrintInfo(Items, LaborList, DecimalsNumber) {
809
809
  Items.forEach((Item) => {
810
810
  let LaborStatus = tr_utils_1.TrUtils.IsNull(Item.CollId) ? this.GetPartParentStatus(Item.OpId, LaborList) : Item.Sts;
811
811
  if (LaborStatus === enums_1.LaborStatusEnum.New || LaborStatus === enums_1.LaborStatusEnum.WtngForAppr) {
812
- Item.UnPr = tr_utils_1.TrUtils.FixPriceValue(Item.EstPr);
812
+ Item.UnPr = tr_utils_1.TrUtils.FixPriceValue(Item.EstPr, DecimalsNumber);
813
813
  Item.Disc = 0;
814
814
  Item.Perc = '';
815
815
  }
816
816
  else {
817
- Item.UnPr = tr_utils_1.TrUtils.FixPriceValue(Item.UnPr);
817
+ Item.UnPr = tr_utils_1.TrUtils.FixPriceValue(Item.UnPr, DecimalsNumber);
818
818
  }
819
819
  });
820
820
  return Items;
821
821
  }
822
- static GetCustTaxInfo(ROTotalsData, IncludeGST, TaxCodes) {
823
- ROTotalsData.Ops = this.GetCustLaborTaxInfo(ROTotalsData.Ops, IncludeGST, TaxCodes);
824
- ROTotalsData.Parts = this.GetCustPartTaxInfo(ROTotalsData.Parts, ROTotalsData.Ops, IncludeGST, TaxCodes);
822
+ static GetCustTaxInfo(ROTotalsData, IncludeGST, TaxCodes, DecimalsNumber) {
823
+ ROTotalsData.Ops = this.GetCustLaborTaxInfo(ROTotalsData.Ops, IncludeGST, TaxCodes, DecimalsNumber);
824
+ ROTotalsData.Parts = this.GetCustPartTaxInfo(ROTotalsData.Parts, ROTotalsData.Ops, IncludeGST, TaxCodes, DecimalsNumber);
825
825
  return ROTotalsData;
826
826
  }
827
- static GetCustLaborTaxInfo(LaborList, IncludeGST, TaxCodes) {
827
+ static GetCustLaborTaxInfo(LaborList, IncludeGST, TaxCodes, DecimalsNumber) {
828
828
  LaborList.forEach((Labor) => {
829
829
  if (Labor.Sts === enums_1.LaborStatusEnum.New || Labor.Sts === enums_1.LaborStatusEnum.WtngForAppr) {
830
830
  if (IncludeGST) {
831
- Labor.CGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Labor.ECGST);
832
- Labor.SGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Labor.ESGST);
833
- Labor.IGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Labor.EIGST);
831
+ Labor.CGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Labor.ECGST, DecimalsNumber);
832
+ Labor.SGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Labor.ESGST, DecimalsNumber);
833
+ Labor.IGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Labor.EIGST, DecimalsNumber);
834
834
  }
835
835
  else {
836
836
  Labor.CGSTAmt = 0;
@@ -840,9 +840,9 @@ class EstPrintService {
840
840
  }
841
841
  else {
842
842
  if (IncludeGST) {
843
- Labor.CGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Labor.CCGST);
844
- Labor.SGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Labor.CSGST);
845
- Labor.IGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Labor.CIGST);
843
+ Labor.CGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Labor.CCGST, DecimalsNumber);
844
+ Labor.SGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Labor.CSGST, DecimalsNumber);
845
+ Labor.IGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Labor.CIGST, DecimalsNumber);
846
846
  }
847
847
  else {
848
848
  Labor.CGSTAmt = 0;
@@ -856,14 +856,14 @@ class EstPrintService {
856
856
  });
857
857
  return LaborList;
858
858
  }
859
- static GetCustPartTaxInfo(Items, LaborList, IncludeGST, TaxCodes) {
859
+ static GetCustPartTaxInfo(Items, LaborList, IncludeGST, TaxCodes, DecimalsNumber) {
860
860
  Items.forEach((Item) => {
861
861
  let LaborStatus = tr_utils_1.TrUtils.IsNull(Item.CollId) ? this.GetPartParentStatus(Item.OpId, LaborList) : Item.Sts;
862
862
  if (LaborStatus === enums_1.LaborStatusEnum.New || LaborStatus === enums_1.LaborStatusEnum.WtngForAppr) {
863
863
  if (IncludeGST) {
864
- Item.CGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Item.ECGST);
865
- Item.SGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Item.ESGST);
866
- Item.IGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Item.EIGST);
864
+ Item.CGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Item.ECGST, DecimalsNumber);
865
+ Item.SGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Item.ESGST, DecimalsNumber);
866
+ Item.IGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Item.EIGST, DecimalsNumber);
867
867
  }
868
868
  else {
869
869
  Item.CGSTAmt = 0;
@@ -873,9 +873,9 @@ class EstPrintService {
873
873
  }
874
874
  else {
875
875
  if (IncludeGST) {
876
- Item.CGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Item.CCGST);
877
- Item.SGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Item.CSGST);
878
- Item.IGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Item.CIGST);
876
+ Item.CGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Item.CCGST, DecimalsNumber);
877
+ Item.SGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Item.CSGST, DecimalsNumber);
878
+ Item.IGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Item.CIGST, DecimalsNumber);
879
879
  }
880
880
  else {
881
881
  Item.CGSTAmt = 0;
@@ -889,31 +889,31 @@ class EstPrintService {
889
889
  });
890
890
  return Items;
891
891
  }
892
- static GetLaborAndPartItemsAfterDisc(ROTotalsData) {
893
- ROTotalsData.Ops = this.GetCustLaborAfterDiscPrintInfo(ROTotalsData.Ops);
894
- ROTotalsData.Parts = this.GetCustItemsAfterDiscPrintInfo(ROTotalsData.Parts, ROTotalsData.Ops);
892
+ static GetLaborAndPartItemsAfterDisc(ROTotalsData, DecimalsNumber) {
893
+ ROTotalsData.Ops = this.GetCustLaborAfterDiscPrintInfo(ROTotalsData.Ops, DecimalsNumber);
894
+ ROTotalsData.Parts = this.GetCustItemsAfterDiscPrintInfo(ROTotalsData.Parts, ROTotalsData.Ops, DecimalsNumber);
895
895
  return ROTotalsData;
896
896
  }
897
- static GetCustLaborAfterDiscPrintInfo(LaborList) {
897
+ static GetCustLaborAfterDiscPrintInfo(LaborList, DecimalsNumber) {
898
898
  LaborList.forEach((Labor) => {
899
899
  Labor.HSN = Labor.SAC;
900
900
  if (Labor.Sts === enums_1.LaborStatusEnum.New || Labor.Sts === enums_1.LaborStatusEnum.WtngForAppr) {
901
- Labor.UnPr = tr_utils_1.TrUtils.FixPriceValue(Labor.EstPr);
901
+ Labor.UnPr = tr_utils_1.TrUtils.FixPriceValue(Labor.EstPr, DecimalsNumber);
902
902
  }
903
903
  else {
904
- Labor.UnPr = tr_utils_1.TrUtils.FixPriceValue(Labor.NetAmt);
904
+ Labor.UnPr = tr_utils_1.TrUtils.FixPriceValue(Labor.NetAmt, DecimalsNumber);
905
905
  }
906
906
  });
907
907
  return LaborList;
908
908
  }
909
- static GetCustItemsAfterDiscPrintInfo(Items, LaborList) {
909
+ static GetCustItemsAfterDiscPrintInfo(Items, LaborList, DecimalsNumber) {
910
910
  Items.forEach((Item) => {
911
911
  let LaborStatus = tr_utils_1.TrUtils.IsNull(Item.CollId) ? this.GetPartParentStatus(Item.OpId, LaborList) : Item.Sts;
912
912
  if (LaborStatus === enums_1.LaborStatusEnum.New || LaborStatus === enums_1.LaborStatusEnum.WtngForAppr) {
913
- Item.UnPr = tr_utils_1.TrUtils.FixPriceValue(Item.EstPr);
913
+ Item.UnPr = tr_utils_1.TrUtils.FixPriceValue(Item.EstPr, DecimalsNumber);
914
914
  }
915
915
  else {
916
- Item.UnPr = tr_utils_1.TrUtils.FixedTo((0, aggregation_1.division)(Item.NetAmt, Item.Qty));
916
+ Item.UnPr = tr_utils_1.TrUtils.FixedTo((0, aggregation_1.division)(Item.NetAmt, Item.Qty), DecimalsNumber);
917
917
  }
918
918
  });
919
919
  return Items;
@@ -924,26 +924,26 @@ class EstPrintService {
924
924
  });
925
925
  return LaborList[index].Sts;
926
926
  }
927
- static GetCombinedInfoForItems(ROTotalsData) {
928
- ROTotalsData.Ops = this.GetLaborCombinedPrintInfo(ROTotalsData.Ops);
929
- ROTotalsData.Parts = this.GetItemsCombinedPrintInfo(ROTotalsData.Parts);
927
+ static GetCombinedInfoForItems(ROTotalsData, DecimalsNumber) {
928
+ ROTotalsData.Ops = this.GetLaborCombinedPrintInfo(ROTotalsData.Ops, DecimalsNumber);
929
+ ROTotalsData.Parts = this.GetItemsCombinedPrintInfo(ROTotalsData.Parts, DecimalsNumber);
930
930
  return ROTotalsData;
931
931
  }
932
- static GetLaborCombinedPrintInfo(LaborList) {
932
+ static GetLaborCombinedPrintInfo(LaborList, DecimalsNumber) {
933
933
  LaborList.forEach((Labor) => {
934
- Labor.AssPr = tr_utils_1.TrUtils.FixedTo((0, aggregation_1.addition)(Labor.AssPr, Labor.NetAmt));
934
+ Labor.AssPr = tr_utils_1.TrUtils.FixedTo((0, aggregation_1.addition)(Labor.AssPr, Labor.NetAmt), DecimalsNumber);
935
935
  });
936
936
  return LaborList;
937
937
  }
938
- static GetItemsCombinedPrintInfo(Items) {
938
+ static GetItemsCombinedPrintInfo(Items, DecimalsNumber) {
939
939
  Items.forEach((Item) => {
940
- Item.AssPr = tr_utils_1.TrUtils.FixedTo((0, aggregation_1.division)((0, aggregation_1.addition)(Item.AssAmt, Item.NetAmt), Item.Qty));
940
+ Item.AssPr = tr_utils_1.TrUtils.FixedTo((0, aggregation_1.division)((0, aggregation_1.addition)(Item.AssAmt, Item.NetAmt), Item.Qty), DecimalsNumber);
941
941
  });
942
942
  return Items;
943
943
  }
944
- static GetSplitInfoForParts(Items) {
944
+ static GetSplitInfoForParts(Items, DecimalsNumber) {
945
945
  Items.forEach((Item) => {
946
- Item.UnPr = tr_utils_1.TrUtils.FixedTo((0, aggregation_1.division)(Item.NetAmt, Item.Qty));
946
+ Item.UnPr = tr_utils_1.TrUtils.FixedTo((0, aggregation_1.division)(Item.NetAmt, Item.Qty), DecimalsNumber);
947
947
  });
948
948
  return Items;
949
949
  }
@@ -13,11 +13,11 @@ export declare class InsuranceExpireXlsxFileService {
13
13
  };
14
14
  };
15
15
  static ws: any;
16
- static GetInsuranceExpireExcelData(MainData: any, searchValue: any, HeaderName: any): any;
16
+ static GetInsuranceExpireExcelData(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 InsuranceExpireXlsxFileService {
31
- static GetInsuranceExpireExcelData(MainData, searchValue, HeaderName) {
31
+ static GetInsuranceExpireExcelData(MainData, searchValue, HeaderName, EntitySettings) {
32
32
  this.wb = {};
33
33
  this.ws = {};
34
34
  this.Row = 0;
@@ -66,7 +66,7 @@ class InsuranceExpireXlsxFileService {
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: 15 }, { wch: 15 }, { wch: 30 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 20 }];
@@ -217,12 +217,12 @@ class InsuranceExpireXlsxFileService {
217
217
  });
218
218
  this.Row += 2;
219
219
  }
220
- static setInvoiceDetailsInCell(MainData) {
220
+ static setInvoiceDetailsInCell(MainData, DecimalsNumber) {
221
221
  MainData.forEach((InvoiceList) => {
222
- this.SetInvoiceDataInExcel(InvoiceList);
222
+ this.SetInvoiceDataInExcel(InvoiceList, DecimalsNumber);
223
223
  });
224
224
  }
225
- static SetInvoiceDataInExcel(InvoiceInfo) {
225
+ static SetInvoiceDataInExcel(InvoiceInfo, DecimalsNumber) {
226
226
  var _a, _b, _c, _d, _e, _f;
227
227
  // InvoiceInfo.Date = TrUtils.ConvertDateToReadableFormat(InvoiceInfo.CrDate);
228
228
  let Vehicle = InvoiceInfo.Make + ' ' + InvoiceInfo.Model + ' ' + InvoiceInfo.Var + ' ' + InvoiceInfo.Year;
@@ -243,7 +243,7 @@ class InsuranceExpireXlsxFileService {
243
243
  ];
244
244
  let ColStart = 0;
245
245
  InvoiceData.forEach((InvData) => {
246
- InvData.text = this.ConvertToString(InvData.text, InvData.IsString);
246
+ InvData.text = this.ConvertToString(InvData.text, InvData.IsString, DecimalsNumber);
247
247
  this.SetDataInCell(InvData.text, ColStart, this.Row);
248
248
  this.MergeArray.push({
249
249
  s: { r: this.Row, c: ColStart },
@@ -253,7 +253,7 @@ class InsuranceExpireXlsxFileService {
253
253
  });
254
254
  this.Row += 1;
255
255
  }
256
- static ConvertToString(Text, IsString) {
256
+ static ConvertToString(Text, IsString, DecimalsNumber) {
257
257
  if (IsString) {
258
258
  if (Text == null) {
259
259
  Text = '';
@@ -265,7 +265,7 @@ class InsuranceExpireXlsxFileService {
265
265
  }
266
266
  }
267
267
  if (typeof Text === 'number') {
268
- return Number(tr_utils_1.TrUtils.FixedTo(Text));
268
+ return Number(tr_utils_1.TrUtils.FixedTo(Text, DecimalsNumber));
269
269
  }
270
270
  else {
271
271
  return Text;
@@ -13,13 +13,13 @@ export declare class NextServiceDateXlsxFileService {
13
13
  };
14
14
  };
15
15
  static ws: any;
16
- static GetNextServiceDateExcelData(MainData: any, searchValue: any, HeaderName: any, isDetails: boolean): any;
16
+ static GetNextServiceDateExcelData(MainData: any, searchValue: any, HeaderName: any, isDetails: boolean, EntitySettings: any): any;
17
17
  static GetTotals(MainData: any): any;
18
18
  static setHeadingInCell(HeaderName: any, showSearch: any, isDetails: boolean): void;
19
- static setInvoiceDetailsInCell(MainData: any, isDetails: boolean): void;
20
- static SetInvoiceDataInExcel(InvoiceInfo: any, isDetails: boolean): void;
19
+ static setInvoiceDetailsInCell(MainData: any, isDetails: boolean, DecimalsNumber: number): void;
20
+ static SetInvoiceDataInExcel(InvoiceInfo: any, isDetails: boolean, DecimalsNumber: number): void;
21
21
  static ConvertDateToReadableFormat(DateObject: any): any;
22
- static ConvertToString(Text: any, IsString: any): any;
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
  }
@@ -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 NextServiceDateXlsxFileService {
31
- static GetNextServiceDateExcelData(MainData, searchValue, HeaderName, isDetails) {
31
+ static GetNextServiceDateExcelData(MainData, searchValue, HeaderName, isDetails, EntitySettings) {
32
32
  this.wb = {};
33
33
  this.ws = {};
34
34
  this.Row = 0;
@@ -66,7 +66,7 @@ class NextServiceDateXlsxFileService {
66
66
  }
67
67
  MainData = this.GetTotals(MainData);
68
68
  this.setHeadingInCell(HeaderName, showSearch, isDetails);
69
- this.setInvoiceDetailsInCell(MainData, isDetails);
69
+ this.setInvoiceDetailsInCell(MainData, isDetails, 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: 50 }, { wch: 10 }, { wch: 10 }, { wch: 10 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 20 }];
@@ -189,12 +189,12 @@ class NextServiceDateXlsxFileService {
189
189
  });
190
190
  this.Row += 2;
191
191
  }
192
- static setInvoiceDetailsInCell(MainData, isDetails) {
192
+ static setInvoiceDetailsInCell(MainData, isDetails, DecimalsNumber) {
193
193
  MainData.forEach((InvoiceList) => {
194
- this.SetInvoiceDataInExcel(InvoiceList, isDetails);
194
+ this.SetInvoiceDataInExcel(InvoiceList, isDetails, DecimalsNumber);
195
195
  });
196
196
  }
197
- static SetInvoiceDataInExcel(InvoiceInfo, isDetails) {
197
+ static SetInvoiceDataInExcel(InvoiceInfo, isDetails, DecimalsNumber) {
198
198
  var _a;
199
199
  InvoiceInfo.LSDate = this.ConvertDateToReadableFormat(InvoiceInfo.LSDate);
200
200
  InvoiceInfo.NSDate = this.ConvertDateToReadableFormat(InvoiceInfo.NSDate);
@@ -210,7 +210,7 @@ class NextServiceDateXlsxFileService {
210
210
  ];
211
211
  let ColStart = 0;
212
212
  InvoiceData.forEach((InvData) => {
213
- InvData.text = this.ConvertToString(InvData.text, InvData.IsString);
213
+ InvData.text = this.ConvertToString(InvData.text, InvData.IsString, DecimalsNumber);
214
214
  this.SetDataInCell(InvData.text, ColStart, this.Row);
215
215
  this.MergeArray.push({
216
216
  s: { r: this.Row, c: ColStart },
@@ -252,7 +252,7 @@ class NextServiceDateXlsxFileService {
252
252
  return null;
253
253
  }
254
254
  }
255
- static ConvertToString(Text, IsString) {
255
+ static ConvertToString(Text, IsString, DecimalsNumber) {
256
256
  if (IsString) {
257
257
  if (Text == null) {
258
258
  Text = '';
@@ -264,7 +264,7 @@ class NextServiceDateXlsxFileService {
264
264
  }
265
265
  }
266
266
  if (typeof Text === 'number') {
267
- return Number(tr_utils_1.TrUtils.FixedTo(Text));
267
+ return Number(tr_utils_1.TrUtils.FixedTo(Text, DecimalsNumber));
268
268
  }
269
269
  else {
270
270
  return Text;