shareneus 1.4.35 → 1.4.36

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 (125) 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 +6 -6
  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 +29 -46
  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/shared/math-operations.js +184 -0
  122. package/dist/shared/util.js +15 -0
  123. package/dist/{shared → utils}/my-date.js +31 -31
  124. package/dist/{shared/utils.js → utils/tr-utils.js} +0 -8
  125. package/package.json +2 -1
@@ -2,15 +2,15 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SalesTotalsService = void 0;
4
4
  const aggregation_1 = require("../aggregation/aggregation");
5
- const utils_1 = require("../shared/utils");
5
+ const tr_utils_1 = require("../utils/tr-utils");
6
6
  class SalesTotalsService {
7
7
  static GetTotalsValue(ItemsList, IsIndependentTax, DetailedInfo, PDisc, PPerc, Disc, Perc, TaxCodes, WithItems, Settings, isRoundable) {
8
8
  // LPerc = TrUtils.SetPercToStringIfNull(LPerc);
9
- PPerc = utils_1.TrUtils.SetPercToStringIfNull(PPerc);
10
- Perc = utils_1.TrUtils.SetPercToStringIfNull(Perc);
9
+ PPerc = tr_utils_1.TrUtils.SetPercToStringIfNull(PPerc);
10
+ Perc = tr_utils_1.TrUtils.SetPercToStringIfNull(Perc);
11
11
  // LDisc = TrUtils.SetValueToZeroIfNull(LDisc);
12
- PDisc = utils_1.TrUtils.SetValueToZeroIfNull(PDisc);
13
- Disc = utils_1.TrUtils.SetValueToZeroIfNull(Disc);
12
+ PDisc = tr_utils_1.TrUtils.SetValueToZeroIfNull(PDisc);
13
+ Disc = tr_utils_1.TrUtils.SetValueToZeroIfNull(Disc);
14
14
  // opCodesList = this.CalculateLaborValues(opCodesList, IsIndependentTax);
15
15
  ItemsList = this.CalculateLaborItemValues(ItemsList, IsIndependentTax);
16
16
  let finalTotalsData = this.GetFinalRODataForSave(ItemsList, IsIndependentTax, PDisc, PPerc, Disc, Perc, DetailedInfo, Settings, isRoundable);
@@ -34,7 +34,7 @@ class SalesTotalsService {
34
34
  Item = this.ResetLaborItemValueIfInvalid(Item);
35
35
  Item.DiscountedPrice = (0, aggregation_1.addition)(Item.Disc, Item.RecDisc);
36
36
  let NetAmt = (0, aggregation_1.subtraction)(Item.UnAmt, Item.Disc, Item.RecDisc);
37
- Item.AfterItemDisc = utils_1.TrUtils.SetValueToZeroIfNull(NetAmt);
37
+ Item.AfterItemDisc = tr_utils_1.TrUtils.SetValueToZeroIfNull(NetAmt);
38
38
  if (IsIndependentTax) {
39
39
  Item.AfterItemTax = (0, aggregation_1.addition)(Item.AfterItemDisc, Item.CGST, Item.SGST, Item.IGST);
40
40
  }
@@ -45,12 +45,12 @@ class SalesTotalsService {
45
45
  return ItemsList;
46
46
  }
47
47
  static ResetLaborItemValueIfInvalid(Item) {
48
- Item.UnPr = utils_1.TrUtils.SetValueToZeroIfNull(Item.UnPr);
49
- Item.Disc = utils_1.TrUtils.SetValueToZeroIfNull(Item.Disc);
50
- Item.RecDisc = utils_1.TrUtils.SetValueToZeroIfNull(Item.RecDisc);
51
- Item.CGST = utils_1.TrUtils.SetValueToZeroIfNull(Item.CGST);
52
- Item.SGST = utils_1.TrUtils.SetValueToZeroIfNull(Item.SGST);
53
- Item.IGST = utils_1.TrUtils.SetValueToZeroIfNull(Item.IGST);
48
+ Item.UnPr = tr_utils_1.TrUtils.SetValueToZeroIfNull(Item.UnPr);
49
+ Item.Disc = tr_utils_1.TrUtils.SetValueToZeroIfNull(Item.Disc);
50
+ Item.RecDisc = tr_utils_1.TrUtils.SetValueToZeroIfNull(Item.RecDisc);
51
+ Item.CGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(Item.CGST);
52
+ Item.SGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(Item.SGST);
53
+ Item.IGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(Item.IGST);
54
54
  return Item;
55
55
  }
56
56
  static GetFinalRODataForSave(ItemsList, IsIndependentTax, PDisc, PPerc, Disc, Perc, DetailedInfo, Settings, isRoundable) {
@@ -83,11 +83,11 @@ class SalesTotalsService {
83
83
  finalTotalsData.Total = Math.round(CustTotal);
84
84
  }
85
85
  else {
86
- finalTotalsData.Total = utils_1.TrUtils.FixedTo(CustTotal);
86
+ finalTotalsData.Total = tr_utils_1.TrUtils.FixedTo(CustTotal);
87
87
  }
88
88
  if (DetailedInfo) {
89
- finalTotalsData.FixedSubTotal = utils_1.TrUtils.FixedTo(CustomerAfterDiscTotals);
90
- finalTotalsData.FixedTotal = utils_1.TrUtils.FixedTo(CustTotal);
89
+ finalTotalsData.FixedSubTotal = tr_utils_1.TrUtils.FixedTo(CustomerAfterDiscTotals);
90
+ finalTotalsData.FixedTotal = tr_utils_1.TrUtils.FixedTo(CustTotal);
91
91
  }
92
92
  return finalTotalsData;
93
93
  }
@@ -115,21 +115,21 @@ class SalesTotalsService {
115
115
  // finalTotalsData.CustLaborCGST = this.GetLaborCGSTTaxTotal(opCodesList, IsIndependentTax);
116
116
  // finalTotalsData.CustLaborIGST = this.GetLaborIGSTTaxTotal(opCodesList, IsIndependentTax);
117
117
  let TaxInfo = this.GetItemGSTTaxTotal(ItemsList, IsIndependentTax);
118
- finalTotalsData.CustItemITax = utils_1.TrUtils.SetValueToZeroIfNull(TaxInfo[3]);
119
- finalTotalsData.CustItemCGST = utils_1.TrUtils.SetValueToZeroIfNull(TaxInfo[0]);
120
- finalTotalsData.CustItemIGST = utils_1.TrUtils.SetValueToZeroIfNull(TaxInfo[2]);
121
- finalTotalsData.CustItemSGST = utils_1.TrUtils.SetValueToZeroIfNull(TaxInfo[1]);
118
+ finalTotalsData.CustItemITax = tr_utils_1.TrUtils.SetValueToZeroIfNull(TaxInfo[3]);
119
+ finalTotalsData.CustItemCGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(TaxInfo[0]);
120
+ finalTotalsData.CustItemIGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(TaxInfo[2]);
121
+ finalTotalsData.CustItemSGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(TaxInfo[1]);
122
122
  // finalTotalsData.CustLaborAfterTax = TrUtils.FixedTo(finalTotalsData.CustLaborITax + finalTotalsData.CustLaborTotalAfterDisc);
123
123
  finalTotalsData.CustItemAfterTax = (0, aggregation_1.addition)(finalTotalsData.CustItemITax, finalTotalsData.CustItemsTotalAfterDisc);
124
124
  finalTotalsData.CustTaxGroupData = this.GetTaxGroupingForItemsByHSN(ItemsList, TaxCodes);
125
- finalTotalsData.CustTotalRoundedBy = utils_1.TrUtils.FixedTo(finalTotalsData.Round);
126
- finalTotalsData.CustRoundedTotal = utils_1.TrUtils.FixedTo(finalTotalsData.Total);
125
+ finalTotalsData.CustTotalRoundedBy = tr_utils_1.TrUtils.FixedTo(finalTotalsData.Round);
126
+ finalTotalsData.CustRoundedTotal = tr_utils_1.TrUtils.FixedTo(finalTotalsData.Total);
127
127
  for (var key in finalTotalsData) {
128
128
  if (key !== 'Total' && key !== 'SubTotal' &&
129
129
  key !== 'LDisc' && key !== 'LPerc' && key !== 'PDisc' &&
130
130
  key !== 'PPerc' && key !== 'Disc' && key !== 'Perc' && key !== 'Tax'
131
131
  && typeof finalTotalsData[key] === 'number') {
132
- finalTotalsData[key] = utils_1.TrUtils.FixPriceValue(finalTotalsData[key]);
132
+ finalTotalsData[key] = tr_utils_1.TrUtils.FixPriceValue(finalTotalsData[key]);
133
133
  }
134
134
  }
135
135
  return finalTotalsData;
@@ -169,8 +169,8 @@ class SalesTotalsService {
169
169
  }
170
170
  static LaborTotalAfterDiscount(LaborTotalAfterDisc, LaborTaxAmount, MainLDisc, LDiscInPerc) {
171
171
  let LaborTotal = (0, aggregation_1.addition)(LaborTotalAfterDisc, LaborTaxAmount);
172
- if (!utils_1.TrUtils.IsZero(MainLDisc)) {
173
- if (!utils_1.TrUtils.IsEmpty(LDiscInPerc)) {
172
+ if (!tr_utils_1.TrUtils.IsZero(MainLDisc)) {
173
+ if (!tr_utils_1.TrUtils.IsEmpty(LDiscInPerc)) {
174
174
  LaborTotal = (0, aggregation_1.subtraction)(LaborTotal, (0, aggregation_1.division)((0, aggregation_1.multiply)(LaborTotal, Number(LDiscInPerc)), 100));
175
175
  }
176
176
  else {
@@ -181,8 +181,8 @@ class SalesTotalsService {
181
181
  }
182
182
  static ItemsTotalAfterDiscount(ItemsTotalAfterDisc, ItemsTaxAmount, MainPDisc, PDiscInPerc) {
183
183
  let ItemsTotal = (0, aggregation_1.addition)(ItemsTotalAfterDisc, ItemsTaxAmount);
184
- if (!utils_1.TrUtils.IsZero(MainPDisc)) {
185
- if (!utils_1.TrUtils.IsEmpty(PDiscInPerc)) {
184
+ if (!tr_utils_1.TrUtils.IsZero(MainPDisc)) {
185
+ if (!tr_utils_1.TrUtils.IsEmpty(PDiscInPerc)) {
186
186
  ItemsTotal = (0, aggregation_1.subtraction)(ItemsTotal, (0, aggregation_1.division)((0, aggregation_1.multiply)(ItemsTotal, Number(PDiscInPerc)), 100));
187
187
  }
188
188
  else {
@@ -241,13 +241,13 @@ class SalesTotalsService {
241
241
  }
242
242
  static GetCombinedTaxPercentage(Items, TaxCodes) {
243
243
  Items.forEach((Item) => {
244
- if (utils_1.TrUtils.IsNull(Item.HSN)) {
244
+ if (tr_utils_1.TrUtils.IsNull(Item.HSN)) {
245
245
  Item.HSN = '';
246
246
  }
247
247
  let TaxInfo = this.GetGSTValueBasedOnTaxCode(Item.TCode, TaxCodes);
248
- Item.CGSTAmt = utils_1.TrUtils.SetValueToZeroIfNull(TaxInfo[0]);
249
- Item.SGSTAmt = utils_1.TrUtils.SetValueToZeroIfNull(TaxInfo[1]);
250
- Item.IGSTAmt = utils_1.TrUtils.SetValueToZeroIfNull(TaxInfo[2]);
248
+ Item.CGSTAmt = tr_utils_1.TrUtils.SetValueToZeroIfNull(TaxInfo[0]);
249
+ Item.SGSTAmt = tr_utils_1.TrUtils.SetValueToZeroIfNull(TaxInfo[1]);
250
+ Item.IGSTAmt = tr_utils_1.TrUtils.SetValueToZeroIfNull(TaxInfo[2]);
251
251
  Item.CombinedTaxPercentage = (0, aggregation_1.addition)(Item.CGSTAmt, Item.SGSTAmt, Item.IGSTAmt);
252
252
  });
253
253
  return Items;
@@ -298,8 +298,8 @@ class SalesTotalsService {
298
298
  TaxAmount = (0, aggregation_1.addition)(TaxAmount, argMatchedGSTItem.SGST);
299
299
  });
300
300
  TaxInfo.HSN = HSN;
301
- TaxInfo.TotalTaxableAmount = utils_1.TrUtils.FixPriceValue(TaxOnAmount);
302
- TaxInfo.TotalTaxAmount = utils_1.TrUtils.FixPriceValue(TaxAmount);
301
+ TaxInfo.TotalTaxableAmount = tr_utils_1.TrUtils.FixPriceValue(TaxOnAmount);
302
+ TaxInfo.TotalTaxAmount = tr_utils_1.TrUtils.FixPriceValue(TaxAmount);
303
303
  TaxInfo.ItemsCount = MatchedItem.length;
304
304
  // let GSTValues: any[] = this.GetGSTValueBasedOnTaxCode(MatchedItem[0].TCode, TaxCodes);
305
305
  // TaxInfo.CGST = GSTValues[0];
@@ -318,7 +318,7 @@ class SalesTotalsService {
318
318
  let CGST = 0;
319
319
  let SGST = 0;
320
320
  let IGST = 0;
321
- if (utils_1.TrUtils.IsNull(TCode)) {
321
+ if (tr_utils_1.TrUtils.IsNull(TCode)) {
322
322
  return [CGST, SGST, IGST];
323
323
  }
324
324
  let TCodeIndex = TaxCodes.findIndex((TaxCode) => {
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ScheduledDrugPDFService = void 0;
4
- const my_date_1 = require("../shared/my-date");
5
- const utils_1 = require("../shared/utils");
4
+ const my_date_1 = require("../utils/my-date");
5
+ const tr_utils_1 = require("../utils/tr-utils");
6
6
  const shared_pdf_service_1 = require("./shared-pdf.service");
7
7
  class ScheduledDrugPDFService {
8
8
  static GetScheduledDrugPrint(InvoicesData, CName, searchValue) {
@@ -113,7 +113,7 @@ class ScheduledDrugPDFService {
113
113
  dataRow.push({ text: invoice.ItemName });
114
114
  let batchdata;
115
115
  // invoice?.Items?.Batches?.forEach((batch: any) => {
116
- if (!utils_1.TrUtils.IsNull(invoice.Batch)) {
116
+ if (!tr_utils_1.TrUtils.IsNull(invoice.Batch)) {
117
117
  batchdata = invoice.Batch.BN;
118
118
  }
119
119
  // else {
@@ -123,7 +123,7 @@ class ScheduledDrugPDFService {
123
123
  // });
124
124
  let batchExdate;
125
125
  // invoice.Items?.Batches?.forEach((batch: any) => {
126
- if (!utils_1.TrUtils.IsNull(invoice.Batch)) {
126
+ if (!tr_utils_1.TrUtils.IsNull(invoice.Batch)) {
127
127
  batchExdate = batchExdate + ',' + my_date_1.MyDate.ConvertUTCDateToReadableExDate(invoice.Batch.ExDt);
128
128
  }
129
129
  // else {
@@ -133,9 +133,9 @@ class ScheduledDrugPDFService {
133
133
  // if(!isHC){
134
134
  dataRow.push({ text: batchdata });
135
135
  dataRow.push({ text: batchExdate });
136
- dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.Qty), alignment: 'right' });
137
- dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.NetAmt), alignment: 'right' });
138
- dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.Tax), alignment: 'right' });
136
+ dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.Qty), alignment: 'right' });
137
+ dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.NetAmt), alignment: 'right' });
138
+ dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.Tax), alignment: 'right' });
139
139
  // dataRow.push({ text: TrUtils.FixPriceValue(invoice.Total), alignment: 'right' });
140
140
  // dataRow.push({ text: TrUtils.IsNull(invoice.Prod) ? '' : invoice.Prod?.Model + ' ' + invoice.Prod?.Var });
141
141
  // }
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ScheduledDrugSummaryPDFService = void 0;
4
- const utils_1 = require("../shared/utils");
4
+ const tr_utils_1 = require("../utils/tr-utils");
5
5
  const shared_pdf_service_1 = require("./shared-pdf.service");
6
6
  class ScheduledDrugSummaryPDFService {
7
7
  static GetScheduledDrugPrint(InvoicesData, CName, searchValue) {
@@ -126,9 +126,9 @@ class ScheduledDrugSummaryPDFService {
126
126
  // if(!isHC){
127
127
  // dataRow.push({ text: batchdata });
128
128
  // dataRow.push({ text: batchExdate });
129
- dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.Qty), alignment: 'right' });
130
- dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.NetAmt), alignment: 'right' });
131
- dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.Tax), alignment: 'right' });
129
+ dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.Qty), alignment: 'right' });
130
+ dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.NetAmt), alignment: 'right' });
131
+ dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.Tax), alignment: 'right' });
132
132
  // dataRow.push({ text: TrUtils.FixPriceValue(invoice.Total), alignment: 'right' });
133
133
  // dataRow.push({ text: TrUtils.IsNull(invoice.Prod) ? '' : invoice.Prod?.Model + ' ' + invoice.Prod?.Var });
134
134
  // }
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.WOPrintService = void 0;
4
- const my_date_1 = require("../shared/my-date");
5
- const utils_1 = require("../shared/utils");
4
+ const my_date_1 = require("../utils/my-date");
5
+ const tr_utils_1 = require("../utils/tr-utils");
6
6
  const shared_pdf_service_1 = require("./shared-pdf.service");
7
7
  class WOPrintService {
8
8
  static GetCustomerPrint(ROPrintData, numberofCopies, isOtherIndustry) {
9
9
  var contents = [];
10
- if (utils_1.TrUtils.IsNull(numberofCopies) || numberofCopies.length === 0) {
10
+ if (tr_utils_1.TrUtils.IsNull(numberofCopies) || numberofCopies.length === 0) {
11
11
  contents.push(this.CommonHeaderDetails(ROPrintData, null, isOtherIndustry));
12
12
  }
13
13
  else {
@@ -33,7 +33,7 @@ class WOPrintService {
33
33
  }
34
34
  static GetFileName(ROPrintData) {
35
35
  let fileName = ROPrintData.HeaderName;
36
- if (!utils_1.TrUtils.IsEmpty(ROPrintData.Vehicle.RegNo)) {
36
+ if (!tr_utils_1.TrUtils.IsEmpty(ROPrintData.Vehicle.RegNo)) {
37
37
  fileName = fileName + '-' + ROPrintData.Vehicle.RegNo;
38
38
  }
39
39
  return fileName;
@@ -165,12 +165,12 @@ class WOPrintService {
165
165
  };
166
166
  }
167
167
  static CheckValueAndReturn(info) {
168
- if ((utils_1.TrUtils.IsEmpty(info)) || (info === 'F')) {
168
+ if ((tr_utils_1.TrUtils.IsEmpty(info)) || (info === 'F')) {
169
169
  return '';
170
170
  }
171
171
  info = info.split(',');
172
172
  let details;
173
- if (!utils_1.TrUtils.IsEmpty(info[1])) {
173
+ if (!tr_utils_1.TrUtils.IsEmpty(info[1])) {
174
174
  details = 'Yes' + ', ' + info[1];
175
175
  }
176
176
  else {
@@ -315,7 +315,7 @@ class WOPrintService {
315
315
  };
316
316
  }
317
317
  static GetPhone(Phone1, Phone2) {
318
- if (!utils_1.TrUtils.IsEmpty(Phone2)) {
318
+ if (!tr_utils_1.TrUtils.IsEmpty(Phone2)) {
319
319
  return Phone1 + ' / ' + Phone2;
320
320
  }
321
321
  else {
@@ -332,7 +332,7 @@ class WOPrintService {
332
332
  }
333
333
  static CommonTotalDetails(ROPrintData, index, numberofCopies) {
334
334
  let CommonDetails = [
335
- shared_pdf_service_1.SharedPDFService.GetFinalTotalDetails(ROPrintData, ROPrintData.CustLaborTotalBeforeDisc, ROPrintData.CustLaborDiscTotal, ROPrintData.CustLaborCGST, ROPrintData.CustLaborSGST, ROPrintData.CustLaborIGST, ROPrintData.CustPartIGST, ROPrintData.ShowIGST, ROPrintData.ShowTaxColumn, ROPrintData.CustPartsTotalBeforeDisc, ROPrintData.CustPartsDiscTotal, ROPrintData.CustPartCGST, ROPrintData.CustPartSGST, ROPrintData.CustTaxGroupData, ROPrintData.ShowAccParts, ROPrintData.CustLaborAfterTax, ROPrintData.CustPartAfterTax, ROPrintData.FixedDisc, ROPrintData.Payee, ROPrintData.FixedTotal, ROPrintData.CustTotalRoundedBy, ROPrintData.CustRoundedTotal, ROPrintData.ShowDetailedLaborTaxInfo, ROPrintData.ShowDetailedPartTaxInfo, utils_1.TrUtils.isTaxable(ROPrintData.Settings.Tax), ROPrintData.CustLaborITax, ROPrintData.CustPartITax, ROPrintData.Consolidate, ROPrintData.From, null, null, false),
335
+ shared_pdf_service_1.SharedPDFService.GetFinalTotalDetails(ROPrintData, ROPrintData.CustLaborTotalBeforeDisc, ROPrintData.CustLaborDiscTotal, ROPrintData.CustLaborCGST, ROPrintData.CustLaborSGST, ROPrintData.CustLaborIGST, ROPrintData.CustPartIGST, ROPrintData.ShowIGST, ROPrintData.ShowTaxColumn, ROPrintData.CustPartsTotalBeforeDisc, ROPrintData.CustPartsDiscTotal, ROPrintData.CustPartCGST, ROPrintData.CustPartSGST, ROPrintData.CustTaxGroupData, ROPrintData.ShowAccParts, ROPrintData.CustLaborAfterTax, ROPrintData.CustPartAfterTax, ROPrintData.FixedDisc, ROPrintData.Payee, ROPrintData.FixedTotal, ROPrintData.CustTotalRoundedBy, ROPrintData.CustRoundedTotal, ROPrintData.ShowDetailedLaborTaxInfo, ROPrintData.ShowDetailedPartTaxInfo, tr_utils_1.TrUtils.isTaxable(ROPrintData.Settings.Tax), ROPrintData.CustLaborITax, ROPrintData.CustPartITax, ROPrintData.Consolidate, ROPrintData.From, null, null, false),
336
336
  shared_pdf_service_1.SharedPDFService.InvoiceDueStatus(ROPrintData.Type, ROPrintData.Paid, ROPrintData.Due, ROPrintData.Sts, false),
337
337
  shared_pdf_service_1.SharedPDFService.GetTemsAndConditions(ROPrintData.Entity.Terms),
338
338
  shared_pdf_service_1.SharedPDFService.GetUnderLine(),
@@ -341,7 +341,7 @@ class WOPrintService {
341
341
  if (ROPrintData.Type !== 'Invoice') {
342
342
  CommonDetails.splice(2, 0, shared_pdf_service_1.SharedPDFService.GetUnderLine());
343
343
  }
344
- if (!utils_1.TrUtils.IsNull(numberofCopies) && numberofCopies.length !== 0 && (index !== (numberofCopies.length - 1))) {
344
+ if (!tr_utils_1.TrUtils.IsNull(numberofCopies) && numberofCopies.length !== 0 && (index !== (numberofCopies.length - 1))) {
345
345
  CommonDetails.push({ text: '', pageBreak: 'after' });
346
346
  }
347
347
  return CommonDetails;
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SharedInvoiceprintService = void 0;
4
- const my_date_1 = require("../shared/my-date");
5
- const utils_1 = require("../shared/utils");
4
+ const my_date_1 = require("../utils/my-date");
5
+ const tr_utils_1 = require("../utils/tr-utils");
6
6
  const shared_pdf_service_1 = require("./shared-pdf.service");
7
7
  const shared_print_service_1 = require("./shared-print.service");
8
8
  class SharedInvoiceprintService {
@@ -11,7 +11,7 @@ class SharedInvoiceprintService {
11
11
  }
12
12
  static GetInvoicePrint(ROPrintData, numberofCopies, isotherIndustry, withPass, isAuto, moreDiscDetails) {
13
13
  var contents = [];
14
- if (utils_1.TrUtils.IsNull(numberofCopies) || numberofCopies.length === 0) {
14
+ if (tr_utils_1.TrUtils.IsNull(numberofCopies) || numberofCopies.length === 0) {
15
15
  contents.push(this.CommonHeaderDetails(ROPrintData, null, isotherIndustry), this.PreparesparePartsTable(ROPrintData, isAuto), this.CommonTotalDetails(ROPrintData, null, numberofCopies, withPass, moreDiscDetails));
16
16
  }
17
17
  else {
@@ -30,7 +30,7 @@ class SharedInvoiceprintService {
30
30
  return { text: currentPage.toString() + ' of ' + pageCount, alignment: 'right', marginRight: 7, fontSize: 8, marginTop: 2 };
31
31
  },
32
32
  pageBreakBefore: function (currentNode, followingNodesOnPage, nodesOnNextPage, previousNodesOnPage) {
33
- return currentNode.startPosition.top >= 700 && !utils_1.TrUtils.IsNull(currentNode === null || currentNode === void 0 ? void 0 : currentNode.id) && (currentNode === null || currentNode === void 0 ? void 0 : currentNode.id) === '567';
33
+ return currentNode.startPosition.top >= 700 && !tr_utils_1.TrUtils.IsNull(currentNode === null || currentNode === void 0 ? void 0 : currentNode.id) && (currentNode === null || currentNode === void 0 ? void 0 : currentNode.id) === '567';
34
34
  },
35
35
  pageMargins: [10, 15, 10, 15],
36
36
  content: contents,
@@ -40,7 +40,7 @@ class SharedInvoiceprintService {
40
40
  }
41
41
  static GetFileName(ROPrintData) {
42
42
  let fileName = ROPrintData.HeaderName;
43
- if (!utils_1.TrUtils.IsNull(ROPrintData.Product) && !utils_1.TrUtils.IsEmpty(ROPrintData.Product.RegNo)) {
43
+ if (!tr_utils_1.TrUtils.IsNull(ROPrintData.Product) && !tr_utils_1.TrUtils.IsEmpty(ROPrintData.Product.RegNo)) {
44
44
  fileName = fileName + '-' + ROPrintData.Product.RegNo;
45
45
  }
46
46
  return fileName;
@@ -66,19 +66,19 @@ class SharedInvoiceprintService {
66
66
  let List = [];
67
67
  if (ROPrintData.Entity.Body === 1) {
68
68
  for (let i = 0; i < ROPrintData.PrintInfo.length; i++) {
69
- if (utils_1.TrUtils.IsNull(ROPrintData.PrintInfo[i].Text)) {
69
+ if (tr_utils_1.TrUtils.IsNull(ROPrintData.PrintInfo[i].Text)) {
70
70
  ROPrintData.PrintInfo[i].Text = '';
71
71
  }
72
- List.push(ROPrintData.PrintInfo[i].Text, this.GetLaborPartsTableForView(utils_1.TrUtils.Stringify(ROPrintData.PrintInfo[i].Items), utils_1.TrUtils.Stringify(ROPrintData.PrintInfo[i].Ops), ROPrintData.Entity.MPN));
72
+ List.push(ROPrintData.PrintInfo[i].Text, this.GetLaborPartsTableForView(tr_utils_1.TrUtils.Stringify(ROPrintData.PrintInfo[i].Items), tr_utils_1.TrUtils.Stringify(ROPrintData.PrintInfo[i].Ops), ROPrintData.Entity.MPN));
73
73
  }
74
74
  }
75
75
  else {
76
76
  if (ROPrintData.Entity.Body === 2) {
77
77
  for (let i = 0; i < ROPrintData.PrintInfo.length; i++) {
78
- if (utils_1.TrUtils.IsNull(ROPrintData.PrintInfo[i].Text)) {
78
+ if (tr_utils_1.TrUtils.IsNull(ROPrintData.PrintInfo[i].Text)) {
79
79
  ROPrintData.PrintInfo[i].Text = '';
80
80
  }
81
- List.push(ROPrintData.PrintInfo[i].Text, this.WithOutDiscountFieldTable(utils_1.TrUtils.Stringify(ROPrintData.PrintInfo[i].Items), utils_1.TrUtils.Stringify(ROPrintData.PrintInfo[i].Ops), ROPrintData.ShowTaxColumn, ROPrintData.Entity.MPN, ROPrintData.Entity.Body, ROPrintData.ShowIGST, ROPrintData.ConsolidateGST, ROPrintData.ShowDiscountColumn, isAuto));
81
+ List.push(ROPrintData.PrintInfo[i].Text, this.WithOutDiscountFieldTable(tr_utils_1.TrUtils.Stringify(ROPrintData.PrintInfo[i].Items), tr_utils_1.TrUtils.Stringify(ROPrintData.PrintInfo[i].Ops), ROPrintData.ShowTaxColumn, ROPrintData.Entity.MPN, ROPrintData.Entity.Body, ROPrintData.ShowIGST, ROPrintData.ConsolidateGST, ROPrintData.ShowDiscountColumn, isAuto));
82
82
  }
83
83
  }
84
84
  else {
@@ -87,10 +87,10 @@ class SharedInvoiceprintService {
87
87
  }
88
88
  else {
89
89
  for (let i = 0; i < ROPrintData.PrintInfo.length; i++) {
90
- if (utils_1.TrUtils.IsNull(ROPrintData.PrintInfo[i].Text)) {
90
+ if (tr_utils_1.TrUtils.IsNull(ROPrintData.PrintInfo[i].Text)) {
91
91
  ROPrintData.PrintInfo[i].Text = '';
92
92
  }
93
- List.push(ROPrintData.PrintInfo[i].Text, this.GetWithOutDiscAndTaxFieldHeader(utils_1.TrUtils.Stringify(ROPrintData.PrintInfo[i].Items), utils_1.TrUtils.Stringify(ROPrintData.PrintInfo[i].Ops), ROPrintData.ShowTaxColumn, ROPrintData.Entity.MPN, ROPrintData.Entity.Body, ROPrintData.ShowIGST, ROPrintData.ConsolidateGST, ROPrintData.ShowDiscountColumn, isAuto));
93
+ List.push(ROPrintData.PrintInfo[i].Text, this.GetWithOutDiscAndTaxFieldHeader(tr_utils_1.TrUtils.Stringify(ROPrintData.PrintInfo[i].Items), tr_utils_1.TrUtils.Stringify(ROPrintData.PrintInfo[i].Ops), ROPrintData.ShowTaxColumn, ROPrintData.Entity.MPN, ROPrintData.Entity.Body, ROPrintData.ShowIGST, ROPrintData.ConsolidateGST, ROPrintData.ShowDiscountColumn, isAuto));
94
94
  }
95
95
  }
96
96
  }
@@ -186,14 +186,14 @@ class SharedInvoiceprintService {
186
186
  let dpartadding1 = {};
187
187
  dpartadding1.SNo = '';
188
188
  dpartadding1.Desc = 'Spare Total';
189
- dpartadding1.QtyAndUoM = utils_1.TrUtils.FixedTo(Qty);
189
+ dpartadding1.QtyAndUoM = tr_utils_1.TrUtils.FixedTo(Qty);
190
190
  dpartadding1.bold = true;
191
- dpartadding1.UnPr = utils_1.TrUtils.FixedTo(Taxable);
192
- dpartadding1.SGSTAmt = utils_1.TrUtils.FixedTo(SGSTAMT);
193
- dpartadding1.IGSTAmt = utils_1.TrUtils.FixedTo(IGSTAMT);
194
- dpartadding1.CGSTAmt = utils_1.TrUtils.FixedTo(CGSTAMT);
191
+ dpartadding1.UnPr = tr_utils_1.TrUtils.FixedTo(Taxable);
192
+ dpartadding1.SGSTAmt = tr_utils_1.TrUtils.FixedTo(SGSTAMT);
193
+ dpartadding1.IGSTAmt = tr_utils_1.TrUtils.FixedTo(IGSTAMT);
194
+ dpartadding1.CGSTAmt = tr_utils_1.TrUtils.FixedTo(CGSTAMT);
195
195
  dpartadding1.TCode = ShowTaxColumn ? 114 : undefined;
196
- dpartadding1.LineTotal = utils_1.TrUtils.FixPriceValue(FinalTotal);
196
+ dpartadding1.LineTotal = tr_utils_1.TrUtils.FixPriceValue(FinalTotal);
197
197
  Parts.push({ SNo: '' });
198
198
  Parts.push(dpartadding1);
199
199
  }
@@ -209,14 +209,14 @@ class SharedInvoiceprintService {
209
209
  Parts.forEach((part) => {
210
210
  var dataRow = [];
211
211
  columns[0].forEach((column) => {
212
- if ((!utils_1.TrUtils.IsFixedZero(part[column.Field]) && !utils_1.TrUtils.IsNull(part[column.Field]))
212
+ if ((!tr_utils_1.TrUtils.IsFixedZero(part[column.Field]) && !tr_utils_1.TrUtils.IsNull(part[column.Field]))
213
213
  || (column.text === 'Line Total')) {
214
214
  if (part[column.Field] === 'Spare Parts') {
215
215
  dataRow.push({ text: part[column.Field].toString(), marginLeft: 50, style: 'InlineHeader' });
216
216
  }
217
217
  else {
218
218
  if (((column.Field === 'CGSTAmt' || column.Field === 'SGSTAmt' || column.Field === 'CGSTPerc' || column.Field === 'SGSTPerc' || column.Field === 'IGSTAmt' || column.Field === 'IGSTPerc')
219
- && utils_1.TrUtils.CheckInvalidSelect(part.TCode))) {
219
+ && tr_utils_1.TrUtils.CheckInvalidSelect(part.TCode))) {
220
220
  part[column.Field] = '';
221
221
  dataRow.push({ text: part[column.Field].toString(), alignment: 'center' });
222
222
  }
@@ -226,7 +226,7 @@ class SharedInvoiceprintService {
226
226
  || column.Field === 'CGSTPerc' || column.Field === 'SGSTPerc' || column.Field === 'IGSTAmt' || column.Field === 'IGSTPerc') {
227
227
  if (column.Field === 'Disc') {
228
228
  if (column.type === 'percentage') {
229
- if (!utils_1.TrUtils.IsEmpty(part[column.Field])) {
229
+ if (!tr_utils_1.TrUtils.IsEmpty(part[column.Field])) {
230
230
  dataRow.push({ text: part[column.Field].toString(), noWrap: true });
231
231
  }
232
232
  else {
@@ -234,7 +234,7 @@ class SharedInvoiceprintService {
234
234
  }
235
235
  }
236
236
  else {
237
- if (!utils_1.TrUtils.IsNull(part[column.Field])) {
237
+ if (!tr_utils_1.TrUtils.IsNull(part[column.Field])) {
238
238
  dataRow.push({ text: part[column.Field].toString(), noWrap: true });
239
239
  }
240
240
  else {
@@ -243,7 +243,7 @@ class SharedInvoiceprintService {
243
243
  }
244
244
  }
245
245
  else {
246
- if (!utils_1.TrUtils.IsNull(part[column.Field])) {
246
+ if (!tr_utils_1.TrUtils.IsNull(part[column.Field])) {
247
247
  dataRow.push({ text: part[column.Field].toString(), bold: part.bold, alignment: 'right', nowrap: true });
248
248
  }
249
249
  else {
@@ -256,7 +256,7 @@ class SharedInvoiceprintService {
256
256
  if (column.Field === 'Desc') {
257
257
  let DescData = [];
258
258
  DescData.push({ text: part[column.Field].toString(), bold: part.bold });
259
- if (!utils_1.TrUtils.IsEmpty(part['EDesc'])) {
259
+ if (!tr_utils_1.TrUtils.IsEmpty(part['EDesc'])) {
260
260
  DescData.push({ text: part['EDesc'].toString(), color: 'grey' });
261
261
  }
262
262
  dataRow.push({ stack: DescData });
@@ -274,7 +274,7 @@ class SharedInvoiceprintService {
274
274
  SNo = SNo + 1;
275
275
  }
276
276
  else {
277
- if (utils_1.TrUtils.IsNull(part[column.Field])) {
277
+ if (tr_utils_1.TrUtils.IsNull(part[column.Field])) {
278
278
  part[column.Field] = '';
279
279
  }
280
280
  }
@@ -305,13 +305,13 @@ class SharedInvoiceprintService {
305
305
  dpartadding1.SNo = '';
306
306
  dpartadding1.Desc = 'Labor Total';
307
307
  // dpartadding1.QtyAndUoM = Qty;
308
- dpartadding1.UnPr = utils_1.TrUtils.FixedTo(Taxable);
309
- dpartadding1.SGSTAmt = utils_1.TrUtils.FixedTo(SGSTAMT);
310
- dpartadding1.IGSTAmt = utils_1.TrUtils.FixedTo(IGSTAMT);
311
- dpartadding1.CGSTAmt = utils_1.TrUtils.FixedTo(CGSTAMT);
308
+ dpartadding1.UnPr = tr_utils_1.TrUtils.FixedTo(Taxable);
309
+ dpartadding1.SGSTAmt = tr_utils_1.TrUtils.FixedTo(SGSTAMT);
310
+ dpartadding1.IGSTAmt = tr_utils_1.TrUtils.FixedTo(IGSTAMT);
311
+ dpartadding1.CGSTAmt = tr_utils_1.TrUtils.FixedTo(CGSTAMT);
312
312
  dpartadding1.TCode = ShowTaxColumn ? 114 : undefined;
313
313
  dpartadding1.bold = true;
314
- dpartadding1.LineTotal = utils_1.TrUtils.FixPriceValue(FinalTotal);
314
+ dpartadding1.LineTotal = tr_utils_1.TrUtils.FixPriceValue(FinalTotal);
315
315
  Labor.push({ SNo: '' });
316
316
  Labor.push(dpartadding1);
317
317
  }
@@ -332,14 +332,14 @@ class SharedInvoiceprintService {
332
332
  Labor.forEach((Ops) => {
333
333
  var dataRow = [];
334
334
  columns[0].forEach((column) => {
335
- if ((!utils_1.TrUtils.IsFixedZero(Ops[column.Field]) && !utils_1.TrUtils.IsNull(Ops[column.Field]))
335
+ if ((!tr_utils_1.TrUtils.IsFixedZero(Ops[column.Field]) && !tr_utils_1.TrUtils.IsNull(Ops[column.Field]))
336
336
  || (column.text === 'Line Total')) {
337
337
  if (Ops[column.Field] === 'Labor') {
338
338
  dataRow.push({ text: Ops[column.Field].toString(), marginLeft: 50, style: 'InlineHeader' });
339
339
  }
340
340
  else {
341
341
  if (((column.Field === 'CGSTAmt' || column.Field === 'SGSTAmt' || column.Field === 'CGSTPerc' || column.Field === 'SGSTPerc' || column.Field === 'IGSTAmt' || column.Field === 'IGSTPerc')
342
- && utils_1.TrUtils.CheckInvalidSelect(Ops.TCode))) {
342
+ && tr_utils_1.TrUtils.CheckInvalidSelect(Ops.TCode))) {
343
343
  Ops[column.Field] = '';
344
344
  dataRow.push({ text: Ops[column.Field].toString(), alignment: 'center' });
345
345
  }
@@ -349,7 +349,7 @@ class SharedInvoiceprintService {
349
349
  || column.Field === 'CGSTPerc' || column.Field === 'SGSTPerc' || column.Field === 'IGSTAmt' || column.Field === 'IGSTPerc') {
350
350
  if (column.Field === 'Disc') {
351
351
  if (column.type === 'percentage') {
352
- if (!utils_1.TrUtils.IsEmpty(Ops[column.Field])) {
352
+ if (!tr_utils_1.TrUtils.IsEmpty(Ops[column.Field])) {
353
353
  dataRow.push({ text: Ops[column.Field].toString(), noWrap: true });
354
354
  }
355
355
  else {
@@ -357,7 +357,7 @@ class SharedInvoiceprintService {
357
357
  }
358
358
  }
359
359
  else {
360
- if (!utils_1.TrUtils.IsNull(Ops[column.Field])) {
360
+ if (!tr_utils_1.TrUtils.IsNull(Ops[column.Field])) {
361
361
  dataRow.push({ text: Ops[column.Field].toString(), noWrap: true });
362
362
  }
363
363
  else {
@@ -366,7 +366,7 @@ class SharedInvoiceprintService {
366
366
  }
367
367
  }
368
368
  else {
369
- if (!utils_1.TrUtils.IsNull(Ops[column.Field])) {
369
+ if (!tr_utils_1.TrUtils.IsNull(Ops[column.Field])) {
370
370
  dataRow.push({ text: Ops[column.Field].toString(), alignment: 'right', nowrap: true, bold: Ops.bold });
371
371
  }
372
372
  else {
@@ -378,7 +378,7 @@ class SharedInvoiceprintService {
378
378
  if (column.Field === 'Desc') {
379
379
  let DescData = [];
380
380
  DescData.push({ text: Ops[column.Field].toString(), bold: Ops.bold });
381
- if (!utils_1.TrUtils.IsEmpty(Ops['EDesc'])) {
381
+ if (!tr_utils_1.TrUtils.IsEmpty(Ops['EDesc'])) {
382
382
  DescData.push({ text: Ops['EDesc'].toString(), color: 'grey' });
383
383
  }
384
384
  dataRow.push({ stack: DescData });
@@ -396,7 +396,7 @@ class SharedInvoiceprintService {
396
396
  SNo = SNo + 1;
397
397
  }
398
398
  else {
399
- if (utils_1.TrUtils.IsNull(Ops[column.Field])) {
399
+ if (tr_utils_1.TrUtils.IsNull(Ops[column.Field])) {
400
400
  Ops[column.Field] = '';
401
401
  }
402
402
  }
@@ -545,7 +545,7 @@ class SharedInvoiceprintService {
545
545
  Parts.forEach((part) => {
546
546
  var dataRow = [];
547
547
  columns.forEach((column) => {
548
- if (!utils_1.TrUtils.IsFixedZero(part[column.Field]) && !utils_1.TrUtils.IsNull(part[column.Field])
548
+ if (!tr_utils_1.TrUtils.IsFixedZero(part[column.Field]) && !tr_utils_1.TrUtils.IsNull(part[column.Field])
549
549
  || column.text === 'Line Total') {
550
550
  if (part[column.Field] === 'Spare Parts') {
551
551
  dataRow.push({ text: part[column.Field].toString(), marginLeft: 50, style: 'InlineHeader' });
@@ -565,7 +565,7 @@ class SharedInvoiceprintService {
565
565
  if (column.Field === 'Desc') {
566
566
  let DescData = [];
567
567
  DescData.push(part[column.Field].toString());
568
- if (!utils_1.TrUtils.IsEmpty(part['EDesc'])) {
568
+ if (!tr_utils_1.TrUtils.IsEmpty(part['EDesc'])) {
569
569
  DescData.push({ text: part['EDesc'].toString(), color: 'grey' });
570
570
  }
571
571
  dataRow.push({ stack: DescData });
@@ -582,7 +582,7 @@ class SharedInvoiceprintService {
582
582
  SNo = SNo + 1;
583
583
  }
584
584
  else {
585
- if (utils_1.TrUtils.IsNull(part[column.Field])) {
585
+ if (tr_utils_1.TrUtils.IsNull(part[column.Field])) {
586
586
  part[column.Field] = '';
587
587
  }
588
588
  }
@@ -608,7 +608,7 @@ class SharedInvoiceprintService {
608
608
  Ops.forEach((labor) => {
609
609
  var dataRow = [];
610
610
  columns.forEach((column) => {
611
- if (!utils_1.TrUtils.IsFixedZero(labor[column.Field]) && !utils_1.TrUtils.IsNull(labor[column.Field])
611
+ if (!tr_utils_1.TrUtils.IsFixedZero(labor[column.Field]) && !tr_utils_1.TrUtils.IsNull(labor[column.Field])
612
612
  || column.text === 'Line Total') {
613
613
  if (labor[column.Field] === 'Labor') {
614
614
  dataRow.push({ text: labor[column.Field].toString(), marginLeft: 50, style: 'InlineHeader' });
@@ -634,7 +634,7 @@ class SharedInvoiceprintService {
634
634
  SNo = SNo + 1;
635
635
  }
636
636
  else {
637
- if (utils_1.TrUtils.IsNull(labor[column.Field])) {
637
+ if (tr_utils_1.TrUtils.IsNull(labor[column.Field])) {
638
638
  labor[column.Field] = '';
639
639
  }
640
640
  }
@@ -669,7 +669,7 @@ class SharedInvoiceprintService {
669
669
  static CommonTotalDetails(ROPrintData, index, numberofCopies, withPass, moreDiscDetails) {
670
670
  // console.log('ROPrintData', ROPrintData);
671
671
  let CommonDetails = [
672
- shared_pdf_service_1.SharedPDFService.GetFinalTotalDetails(ROPrintData, ROPrintData.CustLaborTotalAfterDisc, ROPrintData.CustLaborDiscTotal, ROPrintData.CustLaborCGST, ROPrintData.CustLaborSGST, ROPrintData.CustLaborIGST, ROPrintData.CustPartIGST, ROPrintData.ShowIGST, ROPrintData.ShowTaxColumn, ROPrintData.CustPartsTotalAfterDisc, ROPrintData.CustPartsDiscTotal, ROPrintData.CustPartCGST, ROPrintData.CustPartSGST, ROPrintData.CustTaxGroupData, ROPrintData.ShowAccParts, ROPrintData.CustLaborAfterTax, ROPrintData.CustPartAfterTax, ROPrintData.FixedDisc, ROPrintData.For, ROPrintData.FixedTotal, ROPrintData.CustTotalRoundedBy, ROPrintData.CustRoundedTotal, ROPrintData.ShowTaxColumn, ROPrintData.ShowTaxColumn, utils_1.TrUtils.isTaxable(ROPrintData.Settings.Tax), ROPrintData.CustLaborITax, ROPrintData.CustPartITax, ROPrintData.Consolidate, ROPrintData.From, ROPrintData.Adj, ROPrintData.STotal, moreDiscDetails),
672
+ shared_pdf_service_1.SharedPDFService.GetFinalTotalDetails(ROPrintData, ROPrintData.CustLaborTotalAfterDisc, ROPrintData.CustLaborDiscTotal, ROPrintData.CustLaborCGST, ROPrintData.CustLaborSGST, ROPrintData.CustLaborIGST, ROPrintData.CustPartIGST, ROPrintData.ShowIGST, ROPrintData.ShowTaxColumn, ROPrintData.CustPartsTotalAfterDisc, ROPrintData.CustPartsDiscTotal, ROPrintData.CustPartCGST, ROPrintData.CustPartSGST, ROPrintData.CustTaxGroupData, ROPrintData.ShowAccParts, ROPrintData.CustLaborAfterTax, ROPrintData.CustPartAfterTax, ROPrintData.FixedDisc, ROPrintData.For, ROPrintData.FixedTotal, ROPrintData.CustTotalRoundedBy, ROPrintData.CustRoundedTotal, ROPrintData.ShowTaxColumn, ROPrintData.ShowTaxColumn, tr_utils_1.TrUtils.isTaxable(ROPrintData.Settings.Tax), ROPrintData.CustLaborITax, ROPrintData.CustPartITax, ROPrintData.Consolidate, ROPrintData.From, ROPrintData.Adj, ROPrintData.STotal, moreDiscDetails),
673
673
  this.GetNumberInWords(ROPrintData.CustRoundedTotal),
674
674
  shared_pdf_service_1.SharedPDFService.InvoiceDueStatus(ROPrintData.Type, ROPrintData.Paid, ROPrintData.Due, ROPrintData.Sts, ROPrintData.isCountersale),
675
675
  shared_pdf_service_1.SharedPDFService.GetTemsAndConditions(ROPrintData.Entity.Terms),
@@ -683,7 +683,7 @@ class SharedInvoiceprintService {
683
683
  if (ROPrintData.Type !== 'Invoice') {
684
684
  CommonDetails.splice(2, 0, shared_pdf_service_1.SharedPDFService.GetUnderLine());
685
685
  }
686
- if (!utils_1.TrUtils.IsNull(numberofCopies) && numberofCopies.length !== 0 && (index !== (numberofCopies.length - 1))) {
686
+ if (!tr_utils_1.TrUtils.IsNull(numberofCopies) && numberofCopies.length !== 0 && (index !== (numberofCopies.length - 1))) {
687
687
  CommonDetails.push({ text: '', pageBreak: 'after' });
688
688
  }
689
689
  return CommonDetails;
@@ -750,7 +750,7 @@ class SharedInvoiceprintService {
750
750
  ];
751
751
  if (!isOtherIndustry) {
752
752
  a.unshift({ name: 'Regn. No', value: shared_pdf_service_1.SharedPDFService.CheckAndSetString(Vehicle.RegNo) });
753
- if (!utils_1.TrUtils.IsEmpty(Vehicle.VIN)) {
753
+ if (!tr_utils_1.TrUtils.IsEmpty(Vehicle.VIN)) {
754
754
  a.unshift({ name: 'Chassis No', value: shared_pdf_service_1.SharedPDFService.CheckAndSetString(Vehicle.VIN) });
755
755
  }
756
756
  }