shareneus 1.4.34 → 1.4.35

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 (124) hide show
  1. package/dist/aggregation/aggregation.js +13 -13
  2. package/dist/excel-files/GSTR-RO-excel.service.js +3 -3
  3. package/dist/excel-files/GSTR1-excel.service.js +7 -7
  4. package/dist/excel-files/GSTR2-excel.service.js +6 -6
  5. package/dist/excel-files/analysis-excel.service.js +4 -4
  6. package/dist/excel-files/category-wise-item-excel.service.js +10 -10
  7. package/dist/excel-files/cust-balance-excel.service.js +5 -5
  8. package/dist/excel-files/cust-wise-sales-details.js +5 -5
  9. package/dist/excel-files/cust-wise-sales-summary-excel.service.js +5 -5
  10. package/dist/excel-files/expiring-drugs-excel.service.js +7 -7
  11. package/dist/excel-files/insurance-expire-excel.service.js +4 -4
  12. package/dist/excel-files/invoice-wise-excel.service.js +3 -3
  13. package/dist/excel-files/item-wise-doctor-sale-excel.service.js +7 -7
  14. package/dist/excel-files/item-wise-mout-details.js +4 -4
  15. package/dist/excel-files/item-wise-mout-summary.js +4 -4
  16. package/dist/excel-files/items-wise-sales-excel.service.js +10 -10
  17. package/dist/excel-files/manf-wise-sales-excel.service.js +4 -4
  18. package/dist/excel-files/next-service-date-excel.service.js +5 -5
  19. package/dist/excel-files/operator-wise-details.js +4 -4
  20. package/dist/excel-files/operator-wise-summary.js +4 -4
  21. package/dist/excel-files/payment-receive-excel.service.js +6 -6
  22. package/dist/excel-files/payments-made-excel.service.js +6 -6
  23. package/dist/excel-files/repair-orders-excel.service.js +10 -10
  24. package/dist/excel-files/sa-wise-labor-sales-excel.service.js +6 -6
  25. package/dist/excel-files/sa-wise-part-sales-excel.service.js +6 -6
  26. package/dist/excel-files/sale-summary-excel.service.js +3 -3
  27. package/dist/excel-files/sales-by-service-summary-excel.service.js +14 -14
  28. package/dist/excel-files/scheduled-drug-summary-excel.service.js +8 -8
  29. package/dist/excel-files/scheduled-drugs-excel.service.js +10 -10
  30. package/dist/excel-files/spares-issue-excel.service.js +14 -14
  31. package/dist/excel-files/stock-excel.service.js +3 -3
  32. package/dist/excel-files/tally-sales-import.service.js +3 -3
  33. package/dist/excel-files/ven-balance-excel.service.js +3 -3
  34. package/dist/index.js +9 -9
  35. package/dist/services/analysis-pdf.service.js +8 -8
  36. package/dist/services/appointment-total.service.js +37 -37
  37. package/dist/services/auto-sales-receipt-pdf.service.js +24 -24
  38. package/dist/services/category-wise-item-pdf.service.js +6 -6
  39. package/dist/services/checklist-pdf.js +3 -3
  40. package/dist/services/cn-print.service.js +33 -33
  41. package/dist/services/consultation-fee-receipt.service.js +16 -16
  42. package/dist/services/consultation-full-pdf.service.js +10 -10
  43. package/dist/services/consultation-letterhead-pdf.service.js +15 -15
  44. package/dist/services/consultation-pdf.service.js +15 -15
  45. package/dist/services/credit-note-pdf.service.js +16 -16
  46. package/dist/services/credit-note-totals.service.js +31 -31
  47. package/dist/services/cust-wise-sales-details-pdf.service.js +8 -8
  48. package/dist/services/cust-wise-sales-summary-pdf.service.js +7 -7
  49. package/dist/services/customer-balances-pdf.service.js +7 -7
  50. package/dist/services/dc-landscape-pdf.service.js +28 -28
  51. package/dist/services/dc-landscape-without-price-pdf.service.js +24 -24
  52. package/dist/services/dc-without-price-pdf.service.js +15 -15
  53. package/dist/services/debit-note-pdf.service.js +14 -14
  54. package/dist/services/debit-note-print.service.js +33 -33
  55. package/dist/services/debit-note-totals.service.js +28 -28
  56. package/dist/services/delivery-challan-pdf.service.js +16 -16
  57. package/dist/services/delivery-challan-print.service.js +26 -26
  58. package/dist/services/delivery-challan-totals.js +32 -32
  59. package/dist/services/equipment-design-pdf.service.js +10 -10
  60. package/dist/services/est.print-service.js +150 -150
  61. package/dist/services/expiring-drugs-pdf.service.js +6 -6
  62. package/dist/services/hc-inv-pdf.service.js +42 -42
  63. package/dist/services/insurance-expire-pdf.service.js +1 -1
  64. package/dist/services/inv-pdf.service.js +54 -54
  65. package/dist/services/inv-print.service.js +59 -59
  66. package/dist/services/invoice-landscape-pdf.service.js +29 -29
  67. package/dist/services/invoice-letterhead-pdf.service.js +54 -54
  68. package/dist/services/invoice-portrait-pdf.js +51 -51
  69. package/dist/services/invoice-total.service.js +78 -78
  70. package/dist/services/issue-parts-pdf.service.js +43 -43
  71. package/dist/services/item-bar-code-label-pdf.js +2 -2
  72. package/dist/services/item-price-for-pricelist.js +178 -0
  73. package/dist/services/item-wise-doctor-sale-pdf.service.js +3 -3
  74. package/dist/services/item-wise-mout-details-pdf.js +3 -3
  75. package/dist/services/item-wise-mout-summary-pdf.js +2 -2
  76. package/dist/services/item-wise-sales-pdf.service.js +6 -6
  77. package/dist/services/manf-wise-sales-pdf.service.js +5 -5
  78. package/dist/services/meeting-pdf.js +14 -14
  79. package/dist/services/mout-pdf.service.js +17 -17
  80. package/dist/services/next-service-date-pdf.service.js +1 -1
  81. package/dist/services/operator-wise-details-pdf.service.js +8 -8
  82. package/dist/services/operator-wise-summary-pdf.js +7 -7
  83. package/dist/services/pack-ship-pdf.service.js +3 -3
  84. package/dist/services/pack-ship-print.service.js +26 -26
  85. package/dist/services/payment-pdf.service.js +4 -4
  86. package/dist/services/payment-report-pdf.service.js +3 -3
  87. package/dist/services/po-totals.service.js +28 -28
  88. package/dist/services/pos-receipt-pdf.js +19 -19
  89. package/dist/services/purchase-order-pdf.service.js +40 -40
  90. package/dist/services/purchase-order-print.service.js +43 -43
  91. package/dist/services/purchase-order-totals.service.js +53 -53
  92. package/dist/services/receipt-print.service.js +5 -5
  93. package/dist/services/reorder-point-pdf.service.js +3 -3
  94. package/dist/services/repair-orders-pdf.service.js +3 -3
  95. package/dist/services/ro-pdf.service.js +80 -80
  96. package/dist/services/ro-print-service.js +87 -87
  97. package/dist/services/ro-totals.service.js +123 -123
  98. package/dist/services/sales-by-service-pdf.service.js +6 -6
  99. package/dist/services/sales-pdf.service.js +23 -23
  100. package/dist/services/sales-print.service.js +54 -54
  101. package/dist/services/sales-receipt-pdf.service.js +25 -25
  102. package/dist/services/sales-receipt-print.service.js +62 -62
  103. package/dist/services/sales-totals.service.js +33 -33
  104. package/dist/services/scheduled-drug-pdf.service.js +7 -7
  105. package/dist/services/scheduled-drug-summary-pdf.service.js +4 -4
  106. package/dist/services/separate-wo-print.service.js +9 -9
  107. package/dist/services/shared-inv-pdf.service.js +44 -44
  108. package/dist/services/shared-pdf.service.js +119 -119
  109. package/dist/services/shared-print.service.js +68 -68
  110. package/dist/services/task-pdf.service.js +10 -10
  111. package/dist/services/task-reports-pdf.service.js +9 -9
  112. package/dist/services/technician-pdf.service.js +10 -10
  113. package/dist/services/technician-print.service.js +9 -9
  114. package/dist/services/vendor-balances-pdf.service.js +6 -6
  115. package/dist/services/vendor-credit-note-pdf.service.js +27 -27
  116. package/dist/services/vendor-credit-note-print.service.js +29 -29
  117. package/dist/services/vendor-credit-note-totals.service.js +37 -37
  118. package/dist/services/vendor-debit-note-pdf.service.js +16 -16
  119. package/dist/services/vendor-debit-note-print.service.js +29 -29
  120. package/dist/services/vendor-debit-note-totals.service.js +30 -30
  121. package/dist/{utils → shared}/my-date.js +31 -31
  122. package/package.json +1 -1
  123. package/dist/services/pricelist-item-final-price.service.js +0 -177
  124. /package/dist/{utils/tr-utils.js → shared/utils.js} +0 -0
@@ -3,13 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ROTotalsService = void 0;
4
4
  const aggregation_1 = require("../aggregation/aggregation");
5
5
  const enums_1 = require("../enums/enums");
6
- const tr_utils_1 = require("../utils/tr-utils");
6
+ const utils_1 = require("../shared/utils");
7
7
  class ROTotalsService {
8
8
  static GetTotalsValue(OriRecordData, TaxCodes, isWorkOrder, detailedInfo, withItems, isRoundable) {
9
- let dupRecordData = tr_utils_1.TrUtils.Stringify(OriRecordData);
9
+ let dupRecordData = utils_1.TrUtils.Stringify(OriRecordData);
10
10
  let argRecordData = {};
11
- dupRecordData.Ops = this.CalculateLaborValues(dupRecordData.Ops, isWorkOrder, tr_utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax));
12
- dupRecordData.Parts = this.CalculatePartValues(dupRecordData.Parts, dupRecordData.Ops, isWorkOrder, tr_utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax));
11
+ dupRecordData.Ops = this.CalculateLaborValues(dupRecordData.Ops, isWorkOrder, utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax));
12
+ dupRecordData.Parts = this.CalculatePartValues(dupRecordData.Parts, dupRecordData.Ops, isWorkOrder, utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax));
13
13
  argRecordData = this.GetROTotalsData(argRecordData, dupRecordData, TaxCodes, withItems, detailedInfo, isWorkOrder, isRoundable);
14
14
  return argRecordData;
15
15
  }
@@ -34,23 +34,23 @@ class ROTotalsService {
34
34
  return opCodesList;
35
35
  }
36
36
  static ResetLaborValueIfInvalid(Operation, isWorkOrder) {
37
- Operation.Perc = tr_utils_1.TrUtils.SetPercToStringIfNull(Operation.Perc);
38
- Operation.Disc = tr_utils_1.TrUtils.SetValueToZeroIfNull(Operation.Disc);
39
- Operation.Pr = tr_utils_1.TrUtils.SetValueToZeroIfNull(Operation.Pr);
40
- Operation.AssPr = tr_utils_1.TrUtils.SetValueToZeroIfNull(Operation.AssPr);
41
- Operation.ACGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(Operation.ACGST);
42
- Operation.ASGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(Operation.ASGST);
43
- Operation.AIGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(Operation.AIGST);
44
- Operation.CCGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(Operation.CCGST);
45
- Operation.CSGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(Operation.CSGST);
46
- Operation.CIGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(Operation.CIGST);
47
- Operation.NetAmt = tr_utils_1.TrUtils.SetValueToZeroIfNull(Operation.NetAmt);
48
- Operation.RecDisc = tr_utils_1.TrUtils.SetValueToZeroIfNull(Operation.RecDisc);
37
+ Operation.Perc = utils_1.TrUtils.SetPercToStringIfNull(Operation.Perc);
38
+ Operation.Disc = utils_1.TrUtils.SetValueToZeroIfNull(Operation.Disc);
39
+ Operation.Pr = utils_1.TrUtils.SetValueToZeroIfNull(Operation.Pr);
40
+ Operation.AssPr = utils_1.TrUtils.SetValueToZeroIfNull(Operation.AssPr);
41
+ Operation.ACGST = utils_1.TrUtils.SetValueToZeroIfNull(Operation.ACGST);
42
+ Operation.ASGST = utils_1.TrUtils.SetValueToZeroIfNull(Operation.ASGST);
43
+ Operation.AIGST = utils_1.TrUtils.SetValueToZeroIfNull(Operation.AIGST);
44
+ Operation.CCGST = utils_1.TrUtils.SetValueToZeroIfNull(Operation.CCGST);
45
+ Operation.CSGST = utils_1.TrUtils.SetValueToZeroIfNull(Operation.CSGST);
46
+ Operation.CIGST = utils_1.TrUtils.SetValueToZeroIfNull(Operation.CIGST);
47
+ Operation.NetAmt = utils_1.TrUtils.SetValueToZeroIfNull(Operation.NetAmt);
48
+ Operation.RecDisc = utils_1.TrUtils.SetValueToZeroIfNull(Operation.RecDisc);
49
49
  if (!isWorkOrder) {
50
- Operation.EstPr = tr_utils_1.TrUtils.SetValueToZeroIfNull(Operation.EstPr);
51
- Operation.ECGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(Operation.ECGST);
52
- Operation.ESGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(Operation.ESGST);
53
- Operation.EIGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(Operation.EIGST);
50
+ Operation.EstPr = utils_1.TrUtils.SetValueToZeroIfNull(Operation.EstPr);
51
+ Operation.ECGST = utils_1.TrUtils.SetValueToZeroIfNull(Operation.ECGST);
52
+ Operation.ESGST = utils_1.TrUtils.SetValueToZeroIfNull(Operation.ESGST);
53
+ Operation.EIGST = utils_1.TrUtils.SetValueToZeroIfNull(Operation.EIGST);
54
54
  }
55
55
  return Operation;
56
56
  }
@@ -159,7 +159,7 @@ class ROTotalsService {
159
159
  }
160
160
  static FilterValidPartItems(PartsList) {
161
161
  PartsList = PartsList.filter((Part) => {
162
- if (tr_utils_1.TrUtils.IsNull(Part.CollId)) {
162
+ if (utils_1.TrUtils.IsNull(Part.CollId)) {
163
163
  return Part;
164
164
  }
165
165
  else {
@@ -175,32 +175,32 @@ class ROTotalsService {
175
175
  return PartsList;
176
176
  }
177
177
  static ResetPartValueIfInvalid(Part, isWorkOrder) {
178
- Part.Perc = tr_utils_1.TrUtils.SetPercToStringIfNull(Part.Perc);
179
- Part.Disc = tr_utils_1.TrUtils.SetValueToZeroIfNull(Part.Disc);
180
- Part.UnPr = tr_utils_1.TrUtils.SetValueToZeroIfNull(Part.UnPr);
181
- Part.AssPr = tr_utils_1.TrUtils.SetValueToZeroIfNull(Part.AssPr);
182
- Part.ACGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(Part.ACGST);
183
- Part.ASGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(Part.ASGST);
184
- Part.AIGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(Part.AIGST);
185
- Part.CCGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(Part.CCGST);
186
- Part.CSGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(Part.CSGST);
187
- Part.CIGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(Part.CIGST);
188
- Part.UnAmt = tr_utils_1.TrUtils.SetValueToZeroIfNull(Part.UnAmt);
189
- Part.AssAmt = tr_utils_1.TrUtils.SetValueToZeroIfNull(Part.AssAmt);
190
- Part.NetAmt = tr_utils_1.TrUtils.SetValueToZeroIfNull(Part.NetAmt);
191
- Part.RecDisc = tr_utils_1.TrUtils.SetValueToZeroIfNull(Part.RecDisc);
178
+ Part.Perc = utils_1.TrUtils.SetPercToStringIfNull(Part.Perc);
179
+ Part.Disc = utils_1.TrUtils.SetValueToZeroIfNull(Part.Disc);
180
+ Part.UnPr = utils_1.TrUtils.SetValueToZeroIfNull(Part.UnPr);
181
+ Part.AssPr = utils_1.TrUtils.SetValueToZeroIfNull(Part.AssPr);
182
+ Part.ACGST = utils_1.TrUtils.SetValueToZeroIfNull(Part.ACGST);
183
+ Part.ASGST = utils_1.TrUtils.SetValueToZeroIfNull(Part.ASGST);
184
+ Part.AIGST = utils_1.TrUtils.SetValueToZeroIfNull(Part.AIGST);
185
+ Part.CCGST = utils_1.TrUtils.SetValueToZeroIfNull(Part.CCGST);
186
+ Part.CSGST = utils_1.TrUtils.SetValueToZeroIfNull(Part.CSGST);
187
+ Part.CIGST = utils_1.TrUtils.SetValueToZeroIfNull(Part.CIGST);
188
+ Part.UnAmt = utils_1.TrUtils.SetValueToZeroIfNull(Part.UnAmt);
189
+ Part.AssAmt = utils_1.TrUtils.SetValueToZeroIfNull(Part.AssAmt);
190
+ Part.NetAmt = utils_1.TrUtils.SetValueToZeroIfNull(Part.NetAmt);
191
+ Part.RecDisc = utils_1.TrUtils.SetValueToZeroIfNull(Part.RecDisc);
192
192
  if (!isWorkOrder) {
193
- Part.EstPr = tr_utils_1.TrUtils.SetValueToZeroIfNull(Part.EstPr);
194
- Part.ECGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(Part.ECGST);
195
- Part.ESGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(Part.ESGST);
196
- Part.EIGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(Part.EIGST);
197
- Part.EstAmt = tr_utils_1.TrUtils.SetValueToZeroIfNull(Part.EstAmt);
193
+ Part.EstPr = utils_1.TrUtils.SetValueToZeroIfNull(Part.EstPr);
194
+ Part.ECGST = utils_1.TrUtils.SetValueToZeroIfNull(Part.ECGST);
195
+ Part.ESGST = utils_1.TrUtils.SetValueToZeroIfNull(Part.ESGST);
196
+ Part.EIGST = utils_1.TrUtils.SetValueToZeroIfNull(Part.EIGST);
197
+ Part.EstAmt = utils_1.TrUtils.SetValueToZeroIfNull(Part.EstAmt);
198
198
  }
199
199
  return Part;
200
200
  }
201
201
  static GetPartsDiscountPrice(PartsList, LaborList, isWorkOrder) {
202
202
  PartsList.forEach((Part) => {
203
- if (tr_utils_1.TrUtils.IsNull(Part.CollId)) {
203
+ if (utils_1.TrUtils.IsNull(Part.CollId)) {
204
204
  if (isWorkOrder) {
205
205
  Part.CustDiscountedPrice = (0, aggregation_1.addition)(Part.Disc, Part.RecDisc);
206
206
  }
@@ -231,7 +231,7 @@ class ROTotalsService {
231
231
  return PartsList;
232
232
  }
233
233
  static GetPartParentStatus(Part, LaborList) {
234
- if (!tr_utils_1.TrUtils.IsNull(Part.OpId)) {
234
+ if (!utils_1.TrUtils.IsNull(Part.OpId)) {
235
235
  let index = LaborList.findIndex((Labor) => {
236
236
  return Labor._id === Part.OpId;
237
237
  });
@@ -243,12 +243,12 @@ class ROTotalsService {
243
243
  }
244
244
  static GetPartsAfterDiscount(PartsList, LaborList, isWorkOrder) {
245
245
  PartsList.forEach((Part) => {
246
- if (tr_utils_1.TrUtils.IsNull(Part.CollId)) {
246
+ if (utils_1.TrUtils.IsNull(Part.CollId)) {
247
247
  let CustAfterPartDisc = 0;
248
248
  let InsAfterPartDisc = 0;
249
249
  if (isWorkOrder) {
250
250
  CustAfterPartDisc = Part.NetAmt;
251
- if (tr_utils_1.TrUtils.IsNull(Part.OpId)) {
251
+ if (utils_1.TrUtils.IsNull(Part.OpId)) {
252
252
  InsAfterPartDisc = Part.AssAmt;
253
253
  }
254
254
  }
@@ -259,7 +259,7 @@ class ROTotalsService {
259
259
  }
260
260
  else {
261
261
  CustAfterPartDisc = Part.NetAmt;
262
- if (tr_utils_1.TrUtils.IsNull(Part.OpId)) {
262
+ if (utils_1.TrUtils.IsNull(Part.OpId)) {
263
263
  InsAfterPartDisc = Part.AssAmt;
264
264
  }
265
265
  }
@@ -311,10 +311,10 @@ class ROTotalsService {
311
311
  Part.InsAfterTax = Part.InsAfterPartDisc;
312
312
  }
313
313
  else {
314
- if (tr_utils_1.TrUtils.IsNull(Part.CollId)) {
314
+ if (utils_1.TrUtils.IsNull(Part.CollId)) {
315
315
  if (isWorkOrder) {
316
316
  Part.CustAfterTax = (0, aggregation_1.addition)(Part.CustAfterPartDisc, Part.CCGST, Part.CSGST, Part.CIGST);
317
- if (tr_utils_1.TrUtils.IsNull(Part.OpId)) {
317
+ if (utils_1.TrUtils.IsNull(Part.OpId)) {
318
318
  Part.InsAfterTax = (0, aggregation_1.addition)(Part.InsAfterPartDisc, Part.ACGST, Part.ASGST, Part.AIGST);
319
319
  }
320
320
  }
@@ -325,7 +325,7 @@ class ROTotalsService {
325
325
  }
326
326
  else {
327
327
  Part.CustAfterTax = (0, aggregation_1.addition)(Part.CustAfterPartDisc, Part.CCGST, Part.CSGST, Part.CIGST);
328
- if (tr_utils_1.TrUtils.IsNull(Part.OpId)) {
328
+ if (utils_1.TrUtils.IsNull(Part.OpId)) {
329
329
  Part.InsAfterTax = (0, aggregation_1.addition)(Part.InsAfterPartDisc, Part.ACGST, Part.ASGST, Part.AIGST);
330
330
  }
331
331
  }
@@ -391,12 +391,12 @@ class ROTotalsService {
391
391
  return argRecordData;
392
392
  }
393
393
  static ResetDiscountValuesIfInvalid(dupRecordData) {
394
- dupRecordData.LPerc = tr_utils_1.TrUtils.SetPercToStringIfNull(dupRecordData.LPerc);
395
- dupRecordData.PPerc = tr_utils_1.TrUtils.SetPercToStringIfNull(dupRecordData.PPerc);
396
- dupRecordData.Perc = tr_utils_1.TrUtils.SetPercToStringIfNull(dupRecordData.Perc);
397
- dupRecordData.LDisc = tr_utils_1.TrUtils.SetValueToZeroIfNull(dupRecordData.LDisc);
398
- dupRecordData.PDisc = tr_utils_1.TrUtils.SetValueToZeroIfNull(dupRecordData.PDisc);
399
- dupRecordData.Disc = tr_utils_1.TrUtils.SetValueToZeroIfNull(dupRecordData.Disc);
394
+ dupRecordData.LPerc = utils_1.TrUtils.SetPercToStringIfNull(dupRecordData.LPerc);
395
+ dupRecordData.PPerc = utils_1.TrUtils.SetPercToStringIfNull(dupRecordData.PPerc);
396
+ dupRecordData.Perc = utils_1.TrUtils.SetPercToStringIfNull(dupRecordData.Perc);
397
+ dupRecordData.LDisc = utils_1.TrUtils.SetValueToZeroIfNull(dupRecordData.LDisc);
398
+ dupRecordData.PDisc = utils_1.TrUtils.SetValueToZeroIfNull(dupRecordData.PDisc);
399
+ dupRecordData.Disc = utils_1.TrUtils.SetValueToZeroIfNull(dupRecordData.Disc);
400
400
  return dupRecordData;
401
401
  }
402
402
  static SetMainDiscountValues(argRecordData, dupRecordData, detailedInfo) {
@@ -415,27 +415,27 @@ class ROTotalsService {
415
415
  }
416
416
  static GetFinalCustomerTotalsData(argRecordData, dupRecordData, isWorkOrder, detailedInfo, isRoundable) {
417
417
  let CustomerAfterDiscTotals = this.GetCustSubTotal(dupRecordData.Ops, dupRecordData.Parts);
418
- let CustLaborTaxTotal = this.GetCustLaborTaxTotal(dupRecordData.Ops, tr_utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax), isWorkOrder);
419
- let CustPartTaxTotal = this.GetCustPartsTaxTotal(dupRecordData.Ops, dupRecordData.Parts, tr_utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax), isWorkOrder);
420
- let CustLaborDiscTotal = this.GetCustLaborDiscountedTotal(dupRecordData.Ops, tr_utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax), dupRecordData);
421
- let CustPartsDiscTotal = this.GetCustPartDiscountedTotal(dupRecordData.Parts, tr_utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax), dupRecordData);
418
+ let CustLaborTaxTotal = this.GetCustLaborTaxTotal(dupRecordData.Ops, utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax), isWorkOrder);
419
+ let CustPartTaxTotal = this.GetCustPartsTaxTotal(dupRecordData.Ops, dupRecordData.Parts, utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax), isWorkOrder);
420
+ let CustLaborDiscTotal = this.GetCustLaborDiscountedTotal(dupRecordData.Ops, utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax), dupRecordData);
421
+ let CustPartsDiscTotal = this.GetCustPartDiscountedTotal(dupRecordData.Parts, utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax), dupRecordData);
422
422
  let CustLaborTotalAfterDisc = this.GetCustLaborTotalAfterDiscount(dupRecordData.Ops);
423
423
  let CustPartsTotalAfterDisc = this.GetCustPartsTotalAfterDiscount(dupRecordData.Parts);
424
424
  argRecordData.STotal = (0, aggregation_1.addition)(CustLaborDiscTotal, CustPartsDiscTotal, CustLaborTotalAfterDisc, CustPartsTotalAfterDisc);
425
425
  argRecordData.CustLaborTotalBeforeDisc = (0, aggregation_1.addition)(argRecordData.CustLaborTotalAfterDisc, argRecordData.CustLaborDiscTotal);
426
426
  argRecordData.CustPartsTotalBeforeDisc = (0, aggregation_1.addition)(argRecordData.CustPartsTotalAfterDisc, argRecordData.CustPartsDiscTotal);
427
- argRecordData.SubTotal = tr_utils_1.TrUtils.FixedTo(CustomerAfterDiscTotals);
428
- let CustTotal = this.GetCustomerTotalBasedOnTaxType(dupRecordData, CustLaborTaxTotal, CustPartTaxTotal, dupRecordData.Ops, dupRecordData.Parts, tr_utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax));
427
+ argRecordData.SubTotal = utils_1.TrUtils.FixedTo(CustomerAfterDiscTotals);
428
+ let CustTotal = this.GetCustomerTotalBasedOnTaxType(dupRecordData, CustLaborTaxTotal, CustPartTaxTotal, dupRecordData.Ops, dupRecordData.Parts, utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax));
429
429
  if (detailedInfo) {
430
- argRecordData.FixedSubTotal = tr_utils_1.TrUtils.FixedTo(CustomerAfterDiscTotals);
431
- argRecordData.FixedTotal = tr_utils_1.TrUtils.FixedTo(CustTotal);
430
+ argRecordData.FixedSubTotal = utils_1.TrUtils.FixedTo(CustomerAfterDiscTotals);
431
+ argRecordData.FixedTotal = utils_1.TrUtils.FixedTo(CustTotal);
432
432
  }
433
433
  if (isRoundable) {
434
434
  argRecordData.Round = (0, aggregation_1.subtraction)(Math.round(CustTotal), CustTotal);
435
435
  argRecordData.Total = Math.round(CustTotal);
436
436
  }
437
437
  else {
438
- argRecordData.Total = tr_utils_1.TrUtils.FixedTo(CustTotal);
438
+ argRecordData.Total = utils_1.TrUtils.FixedTo(CustTotal);
439
439
  }
440
440
  return argRecordData;
441
441
  }
@@ -489,7 +489,7 @@ class ROTotalsService {
489
489
  let TotalTaxAmt = 0;
490
490
  if (IsTaxable) {
491
491
  PartsList.forEach((Part) => {
492
- if (!tr_utils_1.TrUtils.IsNull(Part.CollId)) {
492
+ if (!utils_1.TrUtils.IsNull(Part.CollId)) {
493
493
  if (isWorkOrder) {
494
494
  if ((Part.PBy === enums_1.PayTypeEnum.Customer || Part.PBy === enums_1.PayTypeEnum.Shared)) {
495
495
  TotalTaxAmt = (0, aggregation_1.addition)(TotalTaxAmt, Part.CCGST, Part.CSGST, Part.CIGST);
@@ -551,12 +551,12 @@ class ROTotalsService {
551
551
  }
552
552
  static GetFinalInsuranceTotalsData(argRecordData, dupRecordData, detailedInfo, isWorkOrder) {
553
553
  let InsuranceAfterDiscTotals = this.GetInsSubTotal(dupRecordData.Ops, dupRecordData.Parts);
554
- let InsLaborTaxTotal = this.GetInsLaborTaxTotal(dupRecordData.Ops, tr_utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax), isWorkOrder);
555
- let InsPartTaxTotal = this.GetInsPartsTaxTotal(dupRecordData.Parts, tr_utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax), isWorkOrder);
556
- let InsTotal = this.GetInsuranceTotalBasedOnTaxType(InsuranceAfterDiscTotals, InsLaborTaxTotal, InsPartTaxTotal, tr_utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax));
557
- argRecordData.InsTotal = tr_utils_1.TrUtils.FixedTo(InsTotal);
554
+ let InsLaborTaxTotal = this.GetInsLaborTaxTotal(dupRecordData.Ops, utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax), isWorkOrder);
555
+ let InsPartTaxTotal = this.GetInsPartsTaxTotal(dupRecordData.Parts, utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax), isWorkOrder);
556
+ let InsTotal = this.GetInsuranceTotalBasedOnTaxType(InsuranceAfterDiscTotals, InsLaborTaxTotal, InsPartTaxTotal, utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax));
557
+ argRecordData.InsTotal = utils_1.TrUtils.FixedTo(InsTotal);
558
558
  if (detailedInfo) {
559
- argRecordData.FixedInsTotal = tr_utils_1.TrUtils.FixedTo(InsTotal);
559
+ argRecordData.FixedInsTotal = utils_1.TrUtils.FixedTo(InsTotal);
560
560
  }
561
561
  return argRecordData;
562
562
  }
@@ -606,7 +606,7 @@ class ROTotalsService {
606
606
  let TotalTaxAmt = 0;
607
607
  if (IsTaxable) {
608
608
  PartsList.forEach((Part) => {
609
- if (!tr_utils_1.TrUtils.IsNull(Part.CollId) || Part.PBy === enums_1.PayTypeEnum.Insurance || Part.PBy === enums_1.PayTypeEnum.Shared) {
609
+ if (!utils_1.TrUtils.IsNull(Part.CollId) || Part.PBy === enums_1.PayTypeEnum.Insurance || Part.PBy === enums_1.PayTypeEnum.Shared) {
610
610
  if (isWorkOrder) {
611
611
  if ((Part.PBy === enums_1.PayTypeEnum.Insurance || Part.PBy === enums_1.PayTypeEnum.Shared)) {
612
612
  TotalTaxAmt = (0, aggregation_1.addition)(TotalTaxAmt, Part.ACGST, Part.ASGST, Part.AIGST);
@@ -644,30 +644,30 @@ class ROTotalsService {
644
644
  argRecordData.InsPartsTotalAfterDisc = this.GetInsPartsTotalAfterDiscount(dupRecordData.Parts);
645
645
  argRecordData.InsLaborTotalBeforeDisc = (0, aggregation_1.addition)(argRecordData.InsLaborTotalAfterDisc, argRecordData.InsLaborDiscTotal);
646
646
  argRecordData.InsPartsTotalBeforeDisc = (0, aggregation_1.addition)(argRecordData.InsPartsTotalAfterDisc, argRecordData.InsPartsDiscTotal);
647
- argRecordData.InsLaborITax = this.GetInsLaborTaxTotal(dupRecordData.Ops, tr_utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax), isWorkOrder);
648
- argRecordData.InsLaborCGST = this.GetInsLaborCGSTTaxTotal(dupRecordData.Ops, tr_utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax), isWorkOrder);
649
- argRecordData.InsLaborIGST = this.GetInsLaborIGSTTaxTotal(dupRecordData.Ops, tr_utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax), isWorkOrder);
650
- argRecordData.InsLaborSGST = this.GetInsLaborSGSTTaxTotal(dupRecordData.Ops, tr_utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax), isWorkOrder);
651
- argRecordData.InsPartITax = this.GetInsPartsTaxTotal(dupRecordData.Parts, tr_utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax), isWorkOrder);
652
- argRecordData.InsPartCGST = this.GetInsPartCGSTTaxTotal(dupRecordData.Parts, tr_utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax), isWorkOrder);
653
- argRecordData.InsPartIGST = this.GetInsPartIGSTTaxTotal(dupRecordData.Parts, tr_utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax), isWorkOrder);
654
- argRecordData.InsPartSGST = this.GetInsPartSGSTTaxTotal(dupRecordData.Parts, tr_utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax), isWorkOrder);
647
+ argRecordData.InsLaborITax = this.GetInsLaborTaxTotal(dupRecordData.Ops, utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax), isWorkOrder);
648
+ argRecordData.InsLaborCGST = this.GetInsLaborCGSTTaxTotal(dupRecordData.Ops, utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax), isWorkOrder);
649
+ argRecordData.InsLaborIGST = this.GetInsLaborIGSTTaxTotal(dupRecordData.Ops, utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax), isWorkOrder);
650
+ argRecordData.InsLaborSGST = this.GetInsLaborSGSTTaxTotal(dupRecordData.Ops, utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax), isWorkOrder);
651
+ argRecordData.InsPartITax = this.GetInsPartsTaxTotal(dupRecordData.Parts, utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax), isWorkOrder);
652
+ argRecordData.InsPartCGST = this.GetInsPartCGSTTaxTotal(dupRecordData.Parts, utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax), isWorkOrder);
653
+ argRecordData.InsPartIGST = this.GetInsPartIGSTTaxTotal(dupRecordData.Parts, utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax), isWorkOrder);
654
+ argRecordData.InsPartSGST = this.GetInsPartSGSTTaxTotal(dupRecordData.Parts, utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax), isWorkOrder);
655
655
  argRecordData.InsLaborTotalAfterTax = (0, aggregation_1.addition)(argRecordData.InsLaborTotalAfterDisc, argRecordData.InsLaborITax);
656
656
  argRecordData.InsPartsTotalAfterTax = (0, aggregation_1.addition)(argRecordData.InsPartsTotalAfterDisc, argRecordData.InsPartITax);
657
- argRecordData.CustLaborDiscTotal = this.GetCustLaborDiscountedTotal(dupRecordData.Ops, tr_utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax), dupRecordData);
658
- argRecordData.CustPartsDiscTotal = this.GetCustPartDiscountedTotal(dupRecordData.Parts, tr_utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax), dupRecordData);
657
+ argRecordData.CustLaborDiscTotal = this.GetCustLaborDiscountedTotal(dupRecordData.Ops, utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax), dupRecordData);
658
+ argRecordData.CustPartsDiscTotal = this.GetCustPartDiscountedTotal(dupRecordData.Parts, utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax), dupRecordData);
659
659
  argRecordData.CustLaborTotalAfterDisc = this.GetCustLaborTotalAfterDiscount(dupRecordData.Ops);
660
660
  argRecordData.CustPartsTotalAfterDisc = this.GetCustPartsTotalAfterDiscount(dupRecordData.Parts);
661
661
  argRecordData.CustLaborTotalBeforeDisc = (0, aggregation_1.addition)(argRecordData.CustLaborTotalAfterDisc, argRecordData.CustLaborDiscTotal);
662
662
  argRecordData.CustPartsTotalBeforeDisc = (0, aggregation_1.addition)(argRecordData.CustPartsTotalAfterDisc, argRecordData.CustPartsDiscTotal);
663
- argRecordData.CustLaborITax = this.GetCustLaborTaxTotal(dupRecordData.Ops, tr_utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax), isWorkOrder);
664
- argRecordData.CustLaborSGST = this.GetCustLaborSGSTTaxTotal(dupRecordData.Ops, tr_utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax), isWorkOrder);
665
- argRecordData.CustLaborCGST = this.GetCustLaborCGSTTaxTotal(dupRecordData.Ops, tr_utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax), isWorkOrder);
666
- argRecordData.CustLaborIGST = this.GetCustLaborIGSTTaxTotal(dupRecordData.Ops, tr_utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax), isWorkOrder);
667
- argRecordData.CustPartITax = this.GetCustPartsTaxTotal(dupRecordData.Ops, dupRecordData.Parts, tr_utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax), isWorkOrder);
668
- argRecordData.CustPartCGST = this.GetCustPartCGSTTaxTotal(dupRecordData.Ops, dupRecordData.Parts, tr_utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax), isWorkOrder);
669
- argRecordData.CustPartIGST = this.GetCustPartIGSTTaxTotal(dupRecordData.Ops, dupRecordData.Parts, tr_utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax), isWorkOrder);
670
- argRecordData.CustPartSGST = this.GetCustPartSGSTTaxTotal(dupRecordData.Ops, dupRecordData.Parts, tr_utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax), isWorkOrder);
663
+ argRecordData.CustLaborITax = this.GetCustLaborTaxTotal(dupRecordData.Ops, utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax), isWorkOrder);
664
+ argRecordData.CustLaborSGST = this.GetCustLaborSGSTTaxTotal(dupRecordData.Ops, utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax), isWorkOrder);
665
+ argRecordData.CustLaborCGST = this.GetCustLaborCGSTTaxTotal(dupRecordData.Ops, utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax), isWorkOrder);
666
+ argRecordData.CustLaborIGST = this.GetCustLaborIGSTTaxTotal(dupRecordData.Ops, utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax), isWorkOrder);
667
+ argRecordData.CustPartITax = this.GetCustPartsTaxTotal(dupRecordData.Ops, dupRecordData.Parts, utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax), isWorkOrder);
668
+ argRecordData.CustPartCGST = this.GetCustPartCGSTTaxTotal(dupRecordData.Ops, dupRecordData.Parts, utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax), isWorkOrder);
669
+ argRecordData.CustPartIGST = this.GetCustPartIGSTTaxTotal(dupRecordData.Ops, dupRecordData.Parts, utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax), isWorkOrder);
670
+ argRecordData.CustPartSGST = this.GetCustPartSGSTTaxTotal(dupRecordData.Ops, dupRecordData.Parts, utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax), isWorkOrder);
671
671
  argRecordData.CustLaborLDiscAmount = this.GetLaborLDiscAmount(argRecordData.CustLaborTotalAfterDisc, argRecordData.LDisc);
672
672
  argRecordData.CustPartsPDiscAmount = this.GetPartsPDiscAmount(argRecordData.CustPartsTotalAfterDisc, argRecordData.PDisc);
673
673
  argRecordData.CustLaborAfterLDisc = argRecordData.CustLaborTotalAfterDisc;
@@ -677,7 +677,7 @@ class ROTotalsService {
677
677
  argRecordData.CustTaxGroupData = this.GetCustPartsTaxGrouping(dupRecordData.Parts, TaxCodes, isWorkOrder);
678
678
  argRecordData.InsTaxGroupData = this.GetInsPartsTaxGrouping(dupRecordData.Parts, TaxCodes);
679
679
  argRecordData.CustTotalRoundedBy = argRecordData.Round;
680
- argRecordData.InsTotalRoundedBy = tr_utils_1.TrUtils.FixedTo((0, aggregation_1.subtraction)(Math.round(argRecordData.InsTotal), argRecordData.InsTotal));
680
+ argRecordData.InsTotalRoundedBy = utils_1.TrUtils.FixedTo((0, aggregation_1.subtraction)(Math.round(argRecordData.InsTotal), argRecordData.InsTotal));
681
681
  argRecordData.CustRoundedTotal = argRecordData.Total;
682
682
  argRecordData.InsRoundedTotal = Math.round(argRecordData.InsTotal);
683
683
  for (var key in argRecordData) {
@@ -685,7 +685,7 @@ class ROTotalsService {
685
685
  key !== 'LDisc' && key !== 'LPerc' && key !== 'PDisc' &&
686
686
  key !== 'PPerc' && key !== 'Disc' && key !== 'Perc' && key !== 'Tax'
687
687
  && typeof argRecordData[key] === 'number') {
688
- argRecordData[key] = tr_utils_1.TrUtils.FixPriceValue(argRecordData[key]);
688
+ argRecordData[key] = utils_1.TrUtils.FixPriceValue(argRecordData[key]);
689
689
  }
690
690
  }
691
691
  return argRecordData;
@@ -694,7 +694,7 @@ class ROTotalsService {
694
694
  let LaborDiscountedTotal = 0;
695
695
  let overallLaborDisc = 0;
696
696
  if (!isTaxable) {
697
- overallLaborDisc = tr_utils_1.TrUtils.SetValueToZeroIfNull(finalTotalsData.LDisc);
697
+ overallLaborDisc = utils_1.TrUtils.SetValueToZeroIfNull(finalTotalsData.LDisc);
698
698
  }
699
699
  LaborList.forEach((Labor) => {
700
700
  LaborDiscountedTotal = (0, aggregation_1.addition)(LaborDiscountedTotal, Labor.CustDiscountedPrice);
@@ -705,7 +705,7 @@ class ROTotalsService {
705
705
  let PartsDiscountedTotal = 0;
706
706
  let overallPartDisc = 0;
707
707
  if (!isTaxable) {
708
- overallPartDisc = tr_utils_1.TrUtils.SetValueToZeroIfNull(finalTotalsData.PDisc);
708
+ overallPartDisc = utils_1.TrUtils.SetValueToZeroIfNull(finalTotalsData.PDisc);
709
709
  }
710
710
  PartsList.forEach((Part) => {
711
711
  PartsDiscountedTotal = (0, aggregation_1.addition)(PartsDiscountedTotal, Part.CustDiscountedPrice);
@@ -779,7 +779,7 @@ class ROTotalsService {
779
779
  let TotalTaxAmt = 0;
780
780
  if (IsTaxable) {
781
781
  PartsList.forEach((Part) => {
782
- if (!tr_utils_1.TrUtils.IsNull(Part.CollId)) {
782
+ if (!utils_1.TrUtils.IsNull(Part.CollId)) {
783
783
  if (isWorkOrder) {
784
784
  TotalTaxAmt = (0, aggregation_1.addition)(TotalTaxAmt, Part.CCGST);
785
785
  }
@@ -823,7 +823,7 @@ class ROTotalsService {
823
823
  let TotalTaxAmt = 0;
824
824
  if (IsTaxable) {
825
825
  PartsList.forEach((Part) => {
826
- if (!tr_utils_1.TrUtils.IsNull(Part.CollId)) {
826
+ if (!utils_1.TrUtils.IsNull(Part.CollId)) {
827
827
  if (isWorkOrder) {
828
828
  TotalTaxAmt = (0, aggregation_1.addition)(TotalTaxAmt, Part.CIGST);
829
829
  }
@@ -867,7 +867,7 @@ class ROTotalsService {
867
867
  let TotalTaxAmt = 0;
868
868
  if (IsTaxable) {
869
869
  PartsList.forEach((Part) => {
870
- if (!tr_utils_1.TrUtils.IsNull(Part.CollId)) {
870
+ if (!utils_1.TrUtils.IsNull(Part.CollId)) {
871
871
  if (isWorkOrder) {
872
872
  TotalTaxAmt = (0, aggregation_1.addition)(TotalTaxAmt, Part.CSGST);
873
873
  }
@@ -974,7 +974,7 @@ class ROTotalsService {
974
974
  let TotalTaxAmt = 0;
975
975
  if (IsTaxable) {
976
976
  PartsList.forEach((Part) => {
977
- if (!tr_utils_1.TrUtils.IsNull(Part.CollId) || Part.PBy === enums_1.PayTypeEnum.Insurance || Part.PBy === enums_1.PayTypeEnum.Shared) {
977
+ if (!utils_1.TrUtils.IsNull(Part.CollId) || Part.PBy === enums_1.PayTypeEnum.Insurance || Part.PBy === enums_1.PayTypeEnum.Shared) {
978
978
  if (isWorkOrder) {
979
979
  TotalTaxAmt = (0, aggregation_1.addition)(TotalTaxAmt, Part.ACGST);
980
980
  }
@@ -997,7 +997,7 @@ class ROTotalsService {
997
997
  let TotalTaxAmt = 0;
998
998
  if (IsTaxable) {
999
999
  PartsList.forEach((Part) => {
1000
- if (!tr_utils_1.TrUtils.IsNull(Part.CollId) || Part.PBy === enums_1.PayTypeEnum.Insurance || Part.PBy === enums_1.PayTypeEnum.Shared) {
1000
+ if (!utils_1.TrUtils.IsNull(Part.CollId) || Part.PBy === enums_1.PayTypeEnum.Insurance || Part.PBy === enums_1.PayTypeEnum.Shared) {
1001
1001
  if (isWorkOrder) {
1002
1002
  TotalTaxAmt = (0, aggregation_1.addition)(TotalTaxAmt, Part.AIGST);
1003
1003
  }
@@ -1020,7 +1020,7 @@ class ROTotalsService {
1020
1020
  let TotalTaxAmt = 0;
1021
1021
  if (IsTaxable) {
1022
1022
  PartsList.forEach((Part) => {
1023
- if (!tr_utils_1.TrUtils.IsNull(Part.CollId) || Part.PBy === enums_1.PayTypeEnum.Insurance || Part.PBy === enums_1.PayTypeEnum.Shared) {
1023
+ if (!utils_1.TrUtils.IsNull(Part.CollId) || Part.PBy === enums_1.PayTypeEnum.Insurance || Part.PBy === enums_1.PayTypeEnum.Shared) {
1024
1024
  if (isWorkOrder) {
1025
1025
  TotalTaxAmt = (0, aggregation_1.addition)(TotalTaxAmt, Part.ASGST);
1026
1026
  }
@@ -1041,14 +1041,14 @@ class ROTotalsService {
1041
1041
  }
1042
1042
  static GetLaborLDiscAmount(LaborTotalAfterDisc, LDisc) {
1043
1043
  let LaborLDiscAmt = 0;
1044
- if (!tr_utils_1.TrUtils.IsZero(LaborTotalAfterDisc)) {
1044
+ if (!utils_1.TrUtils.IsZero(LaborTotalAfterDisc)) {
1045
1045
  LaborLDiscAmt = LDisc;
1046
1046
  }
1047
1047
  return LaborLDiscAmt;
1048
1048
  }
1049
1049
  static GetPartsPDiscAmount(PartsTotalAfterDisc, PDisc) {
1050
1050
  let PartsPDiscAmt = 0;
1051
- if (!tr_utils_1.TrUtils.IsZero(PartsTotalAfterDisc)) {
1051
+ if (!utils_1.TrUtils.IsZero(PartsTotalAfterDisc)) {
1052
1052
  PartsPDiscAmt = PDisc;
1053
1053
  }
1054
1054
  return PartsPDiscAmt;
@@ -1078,30 +1078,30 @@ class ROTotalsService {
1078
1078
  let HSN = MatchedPart[0].HSN;
1079
1079
  TaxInfo.CombinedTaxPercentage = MatchedPart[0].CombinedTaxPercentage;
1080
1080
  MatchedPart.forEach((argMatchedGSTPart) => {
1081
- TaxOnAmount = (0, aggregation_1.addition)(TaxOnAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.CustAfterPartDisc));
1081
+ TaxOnAmount = (0, aggregation_1.addition)(TaxOnAmount, utils_1.TrUtils.FixedTo(argMatchedGSTPart.CustAfterPartDisc));
1082
1082
  if (isWorkOrder) {
1083
- TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.CCGST));
1084
- TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.CIGST));
1085
- TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.CSGST));
1083
+ TaxAmount = (0, aggregation_1.addition)(TaxAmount, utils_1.TrUtils.FixedTo(argMatchedGSTPart.CCGST));
1084
+ TaxAmount = (0, aggregation_1.addition)(TaxAmount, utils_1.TrUtils.FixedTo(argMatchedGSTPart.CIGST));
1085
+ TaxAmount = (0, aggregation_1.addition)(TaxAmount, utils_1.TrUtils.FixedTo(argMatchedGSTPart.CSGST));
1086
1086
  }
1087
1087
  else {
1088
1088
  if (argMatchedGSTPart.Sts !== enums_1.LaborStatusEnum.New && argMatchedGSTPart.Sts !== enums_1.LaborStatusEnum.WtngForAppr) {
1089
- TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.CCGST));
1090
- TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.CIGST));
1091
- TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.CSGST));
1089
+ TaxAmount = (0, aggregation_1.addition)(TaxAmount, utils_1.TrUtils.FixedTo(argMatchedGSTPart.CCGST));
1090
+ TaxAmount = (0, aggregation_1.addition)(TaxAmount, utils_1.TrUtils.FixedTo(argMatchedGSTPart.CIGST));
1091
+ TaxAmount = (0, aggregation_1.addition)(TaxAmount, utils_1.TrUtils.FixedTo(argMatchedGSTPart.CSGST));
1092
1092
  }
1093
1093
  else {
1094
1094
  if (argMatchedGSTPart.PBy === enums_1.PayTypeEnum.Customer) {
1095
- TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.ECGST));
1096
- TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.EIGST));
1097
- TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.ESGST));
1095
+ TaxAmount = (0, aggregation_1.addition)(TaxAmount, utils_1.TrUtils.FixedTo(argMatchedGSTPart.ECGST));
1096
+ TaxAmount = (0, aggregation_1.addition)(TaxAmount, utils_1.TrUtils.FixedTo(argMatchedGSTPart.EIGST));
1097
+ TaxAmount = (0, aggregation_1.addition)(TaxAmount, utils_1.TrUtils.FixedTo(argMatchedGSTPart.ESGST));
1098
1098
  }
1099
1099
  }
1100
1100
  }
1101
1101
  });
1102
1102
  TaxInfo.HSN = HSN;
1103
- TaxInfo.TotalTaxableAmount = tr_utils_1.TrUtils.FixPriceValue(TaxOnAmount);
1104
- TaxInfo.TotalTaxAmount = tr_utils_1.TrUtils.FixPriceValue(TaxAmount);
1103
+ TaxInfo.TotalTaxableAmount = utils_1.TrUtils.FixPriceValue(TaxOnAmount);
1104
+ TaxInfo.TotalTaxAmount = utils_1.TrUtils.FixPriceValue(TaxAmount);
1105
1105
  TaxInfo.PartsCount = MatchedPart.length;
1106
1106
  let GSTValues = this.GetGSTValueBasedOnTaxCode(MatchedPart[0].TCode, TaxCodes);
1107
1107
  TaxInfo.CGST = GSTValues[0];
@@ -1138,23 +1138,23 @@ class ROTotalsService {
1138
1138
  let HSN = MatchedPart[0].HSN;
1139
1139
  TaxInfo.CombinedTaxPercentage = MatchedPart[0].CombinedTaxPercentage;
1140
1140
  MatchedPart.forEach((argMatchedGSTPart) => {
1141
- TaxOnAmount = (0, aggregation_1.addition)(TaxOnAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.InsAfterPartDisc));
1141
+ TaxOnAmount = (0, aggregation_1.addition)(TaxOnAmount, utils_1.TrUtils.FixedTo(argMatchedGSTPart.InsAfterPartDisc));
1142
1142
  if (argMatchedGSTPart.PBy === enums_1.PayTypeEnum.Insurance || argMatchedGSTPart.PBy === enums_1.PayTypeEnum.Shared) {
1143
1143
  if (argMatchedGSTPart.Sts !== enums_1.LaborStatusEnum.New && argMatchedGSTPart.Sts !== enums_1.LaborStatusEnum.WtngForAppr) {
1144
- TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.ACGST));
1145
- TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.AIGST));
1146
- TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.ASGST));
1144
+ TaxAmount = (0, aggregation_1.addition)(TaxAmount, utils_1.TrUtils.FixedTo(argMatchedGSTPart.ACGST));
1145
+ TaxAmount = (0, aggregation_1.addition)(TaxAmount, utils_1.TrUtils.FixedTo(argMatchedGSTPart.AIGST));
1146
+ TaxAmount = (0, aggregation_1.addition)(TaxAmount, utils_1.TrUtils.FixedTo(argMatchedGSTPart.ASGST));
1147
1147
  }
1148
1148
  else {
1149
- TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.ECGST));
1150
- TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.EIGST));
1151
- TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.ESGST));
1149
+ TaxAmount = (0, aggregation_1.addition)(TaxAmount, utils_1.TrUtils.FixedTo(argMatchedGSTPart.ECGST));
1150
+ TaxAmount = (0, aggregation_1.addition)(TaxAmount, utils_1.TrUtils.FixedTo(argMatchedGSTPart.EIGST));
1151
+ TaxAmount = (0, aggregation_1.addition)(TaxAmount, utils_1.TrUtils.FixedTo(argMatchedGSTPart.ESGST));
1152
1152
  }
1153
1153
  }
1154
1154
  });
1155
1155
  TaxInfo.HSN = HSN;
1156
- TaxInfo.TotalTaxableAmount = tr_utils_1.TrUtils.FixPriceValue(TaxOnAmount);
1157
- TaxInfo.TotalTaxAmount = tr_utils_1.TrUtils.FixPriceValue(TaxAmount);
1156
+ TaxInfo.TotalTaxableAmount = utils_1.TrUtils.FixPriceValue(TaxOnAmount);
1157
+ TaxInfo.TotalTaxAmount = utils_1.TrUtils.FixPriceValue(TaxAmount);
1158
1158
  TaxInfo.PartsCount = MatchedPart.length;
1159
1159
  let GSTValues = this.GetGSTValueBasedOnTaxCode(MatchedPart[0].TCode, TaxCodes);
1160
1160
  TaxInfo.CGST = GSTValues[0];
@@ -1170,7 +1170,7 @@ class ROTotalsService {
1170
1170
  let CGST = 0;
1171
1171
  let SGST = 0;
1172
1172
  let IGST = 0;
1173
- if (tr_utils_1.TrUtils.IsNull(TCode)) {
1173
+ if (utils_1.TrUtils.IsNull(TCode)) {
1174
1174
  return [CGST, SGST, IGST];
1175
1175
  }
1176
1176
  let TCodeIndex = TaxCodes.findIndex((TaxCode) => {
@@ -1200,7 +1200,7 @@ class ROTotalsService {
1200
1200
  }
1201
1201
  static ResetPartsHSNIfInvalid(Parts) {
1202
1202
  Parts.forEach((Part) => {
1203
- if (tr_utils_1.TrUtils.IsNull(Part.HSN)) {
1203
+ if (utils_1.TrUtils.IsNull(Part.HSN)) {
1204
1204
  Part.HSN = '';
1205
1205
  }
1206
1206
  });
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SalesByServiceSummaryPDF = void 0;
4
- const tr_utils_1 = require("../utils/tr-utils");
4
+ const utils_1 = require("../shared/utils");
5
5
  const shared_pdf_service_1 = require("./shared-pdf.service");
6
6
  class SalesByServiceSummaryPDF {
7
7
  static GetSalesbyServiceSummaryPrint(InvoicesData, CName, HeaderName, searchValue, ForService) {
@@ -78,11 +78,11 @@ class SalesByServiceSummaryPDF {
78
78
  dataRow.push({ text: invoice.Qty, alignment: 'right' });
79
79
  // dataRow.push({ text: invoice.Qty, alignment: 'right' });
80
80
  // dataRow.push({ text: invoice.OfQty, alignment: 'right' });
81
- dataRow.push({ text: ForService ? tr_utils_1.TrUtils.FixPriceValue(invoice.Amt) : tr_utils_1.TrUtils.FixPriceValue(invoice.UnAmt), alignment: 'right' });
82
- dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.Disc), alignment: 'right' });
83
- dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.Tax), alignment: 'right' });
84
- dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.NetAmt + invoice.Tax), alignment: 'right' });
85
- dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.AvgPr), alignment: 'right' });
81
+ dataRow.push({ text: ForService ? utils_1.TrUtils.FixPriceValue(invoice.Amt) : utils_1.TrUtils.FixPriceValue(invoice.UnAmt), alignment: 'right' });
82
+ dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.Disc), alignment: 'right' });
83
+ dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.Tax), alignment: 'right' });
84
+ dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.NetAmt + invoice.Tax), alignment: 'right' });
85
+ dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.AvgPr), alignment: 'right' });
86
86
  body.push(dataRow);
87
87
  });
88
88
  return body;