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,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SharedPDFService = void 0;
4
4
  const enums_1 = require("../enums/enums");
5
- const my_date_1 = require("../shared/my-date");
6
- const utils_1 = require("../shared/utils");
5
+ const my_date_1 = require("../utils/my-date");
6
+ const tr_utils_1 = require("../utils/tr-utils");
7
7
  class SharedPDFService {
8
8
  static MainHeading(CName, Entity, Image, HColor, CopyName) {
9
9
  let headerstyle;
@@ -19,7 +19,7 @@ class SharedPDFService {
19
19
  static HeaderAlignmentBasedOnCondition(CName, Image, HColor, headerstyle, MainHeaderStyle, Entity, CopyName) {
20
20
  let HeaderDetails = [];
21
21
  // HeaderDetails.push({ text: 'Original', color: 'grey', alignment: 'right' });
22
- if (!utils_1.TrUtils.IsNull(Image) && Entity.PrLogo) {
22
+ if (!tr_utils_1.TrUtils.IsNull(Image) && Entity.PrLogo) {
23
23
  if (Entity.Header === 1) {
24
24
  HeaderDetails.push({ text: '' + CName + '', style: [headerstyle, MainHeaderStyle], color: HColor, alignment: this.GetLeftMArgin(CName) });
25
25
  }
@@ -76,7 +76,7 @@ class SharedPDFService {
76
76
  static ConsultHeaderAlignmentBasedOnCondition(CName, Image, HColor, headerstyle, MainHeaderStyle, Entity, CopyName) {
77
77
  let HeaderDetails = [];
78
78
  // HeaderDetails.push({ text: 'Original', color: 'grey', alignment: 'right' });
79
- if (!utils_1.TrUtils.IsNull(Image) && Entity.PrLogo) {
79
+ if (!tr_utils_1.TrUtils.IsNull(Image) && Entity.PrLogo) {
80
80
  // if (Entity.Header === 1) {
81
81
  // HeaderDetails.push({ text: '' + CName + '', style: [headerstyle, MainHeaderStyle], color: HColor, alignment: this.GetLeftMArgin(CName) })
82
82
  // } else {
@@ -103,7 +103,7 @@ class SharedPDFService {
103
103
  ]
104
104
  }
105
105
  ];
106
- if (!utils_1.TrUtils.IsNull(Image) && Entity.PrLogo) {
106
+ if (!tr_utils_1.TrUtils.IsNull(Image) && Entity.PrLogo) {
107
107
  Details[0].stack[1].columns.unshift({
108
108
  width: 290,
109
109
  margin: [10, 0, 0, 5],
@@ -111,7 +111,7 @@ class SharedPDFService {
111
111
  color: AColor,
112
112
  style: 'temp2header'
113
113
  });
114
- if (!utils_1.TrUtils.IsNull(text)) {
114
+ if (!tr_utils_1.TrUtils.IsNull(text)) {
115
115
  Details[0].stack.unshift({ text: text, color: 'grey', alignment: 'right', width: 100, marginBottom: -15, fontSize: 10 });
116
116
  }
117
117
  Details.unshift({ image: Image, width: 120, height: 80 });
@@ -124,14 +124,14 @@ class SharedPDFService {
124
124
  color: AColor,
125
125
  style: 'temp2header'
126
126
  });
127
- if (!utils_1.TrUtils.IsNull(text)) {
127
+ if (!tr_utils_1.TrUtils.IsNull(text)) {
128
128
  Details[0].stack.unshift({ text: text, color: 'grey', alignment: 'right', width: 100, marginBottom: -15, fontSize: 10 });
129
129
  }
130
130
  }
131
131
  return Details;
132
132
  }
133
133
  static GetWatermarkImage(Image, pageSize, Wmark) {
134
- if (!utils_1.TrUtils.IsNull(Image) && Wmark) {
134
+ if (!tr_utils_1.TrUtils.IsNull(Image) && Wmark) {
135
135
  return {
136
136
  margun: [10, 15, 10, 15],
137
137
  image: Image,
@@ -157,7 +157,7 @@ class SharedPDFService {
157
157
  ]
158
158
  }
159
159
  ];
160
- if (!utils_1.TrUtils.IsNull(Image) && Entity.PrLogo) {
160
+ if (!tr_utils_1.TrUtils.IsNull(Image) && Entity.PrLogo) {
161
161
  Details[0].stack[1].columns.unshift({
162
162
  width: 290,
163
163
  margin: [10, 0, 0, 5],
@@ -165,7 +165,7 @@ class SharedPDFService {
165
165
  color: AColor,
166
166
  style: 'temp2header'
167
167
  });
168
- if (!utils_1.TrUtils.IsNull(text)) {
168
+ if (!tr_utils_1.TrUtils.IsNull(text)) {
169
169
  Details[0].stack.unshift({ text: text, color: 'grey', alignment: 'right', width: 100, marginBottom: -15, fontSize: 10 });
170
170
  }
171
171
  Details.unshift({ image: Image, width: 120, height: 80 });
@@ -178,7 +178,7 @@ class SharedPDFService {
178
178
  color: AColor,
179
179
  style: 'temp2header'
180
180
  });
181
- if (!utils_1.TrUtils.IsNull(text)) {
181
+ if (!tr_utils_1.TrUtils.IsNull(text)) {
182
182
  Details[0].stack.unshift({ text: text, color: 'grey', alignment: 'right', width: 100, marginBottom: -15, fontSize: 10 });
183
183
  }
184
184
  }
@@ -202,19 +202,19 @@ class SharedPDFService {
202
202
  ]
203
203
  }
204
204
  ];
205
- if (!utils_1.TrUtils.IsNull(Image) && Entity.PrLogo) {
205
+ if (!tr_utils_1.TrUtils.IsNull(Image) && Entity.PrLogo) {
206
206
  // Details.unshift({ text: '', width: 120 });
207
207
  if (Entity.CName.length < 28) {
208
208
  Details[0].stack[0].columns.push({ text: '', width: 150 });
209
209
  }
210
- if (!utils_1.TrUtils.IsNull(text)) {
210
+ if (!tr_utils_1.TrUtils.IsNull(text)) {
211
211
  Details[0].stack.unshift({ text: text, color: 'grey', alignment: 'right', width: 100, marginBottom: -15, fontSize: 7 });
212
212
  }
213
213
  Details.unshift({ image: Image, width: 120, height: 80 });
214
214
  }
215
215
  else {
216
216
  Details[0].stack[1].columns.unshift({ text: '', width: 130 });
217
- if (!utils_1.TrUtils.IsNull(text)) {
217
+ if (!tr_utils_1.TrUtils.IsNull(text)) {
218
218
  Details[0].stack.unshift({ text: text, color: 'grey', alignment: 'right', width: 100, marginBottom: -15, fontSize: 7 });
219
219
  }
220
220
  }
@@ -234,21 +234,21 @@ class SharedPDFService {
234
234
  { text: '' + this.GetEmail(Entity.Email) + '', style: headerstyle },
235
235
  // { text: 'GSTIN:' + Entity.GSTIN + ', ' + 'PAN: ' + Entity.PAN, style: headerstyle },
236
236
  ];
237
- if (!utils_1.TrUtils.IsEmpty(Entity.Adrs2)) {
237
+ if (!tr_utils_1.TrUtils.IsEmpty(Entity.Adrs2)) {
238
238
  SubHeader.splice(1, 0, { text: '' + Entity.Adrs2 + '', style: [headerstyle] });
239
239
  }
240
- if (!utils_1.TrUtils.IsEmpty(Entity.TLine)) {
240
+ if (!tr_utils_1.TrUtils.IsEmpty(Entity.TLine)) {
241
241
  SubHeader.unshift({ text: this.GetTagLine(Entity.TLine), fontSize: 10, bold: true, color: HColor, margin: [0, 0, 0, 2] });
242
242
  }
243
- if (!utils_1.TrUtils.IsEmpty(Entity.GSTIN) || !utils_1.TrUtils.IsEmpty(Entity.PAN)) {
243
+ if (!tr_utils_1.TrUtils.IsEmpty(Entity.GSTIN) || !tr_utils_1.TrUtils.IsEmpty(Entity.PAN)) {
244
244
  let Data = '';
245
- if (!utils_1.TrUtils.IsEmpty(Entity.GSTIN)) {
245
+ if (!tr_utils_1.TrUtils.IsEmpty(Entity.GSTIN)) {
246
246
  Data = 'GSTIN:' + Entity.GSTIN;
247
247
  }
248
- if (!utils_1.TrUtils.IsEmpty(Entity.GSTIN) && !utils_1.TrUtils.IsEmpty(Entity.PAN)) {
248
+ if (!tr_utils_1.TrUtils.IsEmpty(Entity.GSTIN) && !tr_utils_1.TrUtils.IsEmpty(Entity.PAN)) {
249
249
  Data = Data + ', ';
250
250
  }
251
- if (!utils_1.TrUtils.IsEmpty(Entity.PAN)) {
251
+ if (!tr_utils_1.TrUtils.IsEmpty(Entity.PAN)) {
252
252
  Data = Data + 'PAN:' + Entity.PAN;
253
253
  }
254
254
  SubHeader.push({ text: Data, style: headerstyle, fontSize: this.TermsandCond });
@@ -260,7 +260,7 @@ class SharedPDFService {
260
260
  }
261
261
  static GetMainHeaderStyleForLeftAlignHeader(WorkShopName) {
262
262
  var wsname_fontSize;
263
- if (utils_1.TrUtils.IsNull(WorkShopName)) {
263
+ if (tr_utils_1.TrUtils.IsNull(WorkShopName)) {
264
264
  WorkShopName = '';
265
265
  }
266
266
  switch (true) {
@@ -296,10 +296,10 @@ class SharedPDFService {
296
296
  }
297
297
  static GetEntityTax(Entity) {
298
298
  let EntityData = [];
299
- if (!utils_1.TrUtils.IsEmpty(Entity.GSTIN)) {
299
+ if (!tr_utils_1.TrUtils.IsEmpty(Entity.GSTIN)) {
300
300
  EntityData.push({ name: 'GSTIN', value: Entity.GSTIN });
301
301
  }
302
- if (!utils_1.TrUtils.IsEmpty(Entity.PAN)) {
302
+ if (!tr_utils_1.TrUtils.IsEmpty(Entity.PAN)) {
303
303
  EntityData.push({ name: 'PAN No', value: Entity.PAN });
304
304
  }
305
305
  if (EntityData.length !== 0) {
@@ -334,7 +334,7 @@ class SharedPDFService {
334
334
  static EntityTableDataDetails(EntityFields, Entity) {
335
335
  var body = [];
336
336
  EntityFields.forEach((row) => {
337
- if (!utils_1.TrUtils.IsFixedZero(row.value) && !utils_1.TrUtils.IsEmpty(row.value)) {
337
+ if (!tr_utils_1.TrUtils.IsFixedZero(row.value) && !tr_utils_1.TrUtils.IsEmpty(row.value)) {
338
338
  var dataRow = [];
339
339
  dataRow.push({ text: (row.name).toString(), noWrap: true, fontSize: 8 });
340
340
  dataRow.push(':');
@@ -357,7 +357,7 @@ class SharedPDFService {
357
357
  return body;
358
358
  }
359
359
  static GetTagLine(TLine) {
360
- if (!utils_1.TrUtils.IsEmpty(TLine)) {
360
+ if (!tr_utils_1.TrUtils.IsEmpty(TLine)) {
361
361
  return TLine;
362
362
  }
363
363
  else {
@@ -367,7 +367,7 @@ class SharedPDFService {
367
367
  }
368
368
  static GetEmail(email) {
369
369
  let Email = '';
370
- if (!utils_1.TrUtils.IsNull(email)) {
370
+ if (!tr_utils_1.TrUtils.IsNull(email)) {
371
371
  return 'Email: ' + email;
372
372
  }
373
373
  else {
@@ -376,7 +376,7 @@ class SharedPDFService {
376
376
  }
377
377
  static getPinCode(pin) {
378
378
  let code = '';
379
- if (!utils_1.TrUtils.IsNull(pin)) {
379
+ if (!tr_utils_1.TrUtils.IsNull(pin)) {
380
380
  return ' - ' + pin;
381
381
  }
382
382
  else {
@@ -529,7 +529,7 @@ class SharedPDFService {
529
529
  }
530
530
  }
531
531
  static GetTemsAndConditions(Terms) {
532
- if (!utils_1.TrUtils.IsNull(Terms)) {
532
+ if (!tr_utils_1.TrUtils.IsNull(Terms)) {
533
533
  return {
534
534
  text: '' + Terms + '', marginTop: 5, marginBottom: 5,
535
535
  fontSize: this.TermsandCond, alignment: 'justify'
@@ -542,7 +542,7 @@ class SharedPDFService {
542
542
  static GetSearchValueDetails(searchValue) {
543
543
  let showSearch = [];
544
544
  for (const key in searchValue) {
545
- if (!utils_1.TrUtils.IsNull(searchValue[key]) && !utils_1.TrUtils.CheckInvalidSelect(searchValue[key]) && key !== 'Date' && key !== 'CustCntrlId' && key !== 'DescCntrlId' && key !== 'ManfCntrlId' && key !== 'VenCntrlId') {
545
+ if (!tr_utils_1.TrUtils.IsNull(searchValue[key]) && !tr_utils_1.TrUtils.CheckInvalidSelect(searchValue[key]) && key !== 'Date' && key !== 'CustCntrlId' && key !== 'DescCntrlId' && key !== 'ManfCntrlId' && key !== 'VenCntrlId') {
546
546
  showSearch.push({
547
547
  name: (key === 'StDate') ? 'Start Date' : (key === 'EnDate') ? 'End Date' : (key === 'CustCntrl') ? 'Customer' : (key === 'DescCntrl') ? 'Item' : (key === 'ManfCntrl') ? 'Manufacturer' : (key === 'VenCntrl') ? 'Vendor' : key,
548
548
  value: (key === 'StDate') ? my_date_1.MyDate.ConvertUTCDateToReadable(searchValue[key]) : (key === 'EnDate') ? my_date_1.MyDate.ConvertUTCDateToReadable(searchValue[key]) : searchValue[key],
@@ -563,12 +563,12 @@ class SharedPDFService {
563
563
  };
564
564
  }
565
565
  static GetBankDetials(Bankinfo, isPrint) {
566
- if (isPrint && !utils_1.TrUtils.IsNull(Bankinfo)) {
566
+ if (isPrint && !tr_utils_1.TrUtils.IsNull(Bankinfo)) {
567
567
  let AccountFields = [];
568
568
  let BANK = { name: 'BANK', value: Bankinfo.Name };
569
569
  let Acc = { name: 'A/C NO', value: Bankinfo.ACNo };
570
570
  let AccHolderName = { name: 'Account Holder Name', value: Bankinfo.ACName };
571
- let Branch = { name: 'Branch', value: utils_1.TrUtils.IsNull(Bankinfo.Bran) ? '' : Bankinfo.Bran };
571
+ let Branch = { name: 'Branch', value: tr_utils_1.TrUtils.IsNull(Bankinfo.Bran) ? '' : Bankinfo.Bran };
572
572
  let IFSC = { name: 'IFSC NO', value: Bankinfo.IFSC };
573
573
  // let TotalPartsAmount = { name: 'Final Labor Amount', value: this.LabourtotalAmount(ROPrintData.LaborInsTotal) };
574
574
  AccountFields.push(BANK);
@@ -694,7 +694,7 @@ class SharedPDFService {
694
694
  var body = [];
695
695
  data.forEach((row) => {
696
696
  // if ((!TrUtils.IsFixedZero(row.value) && !TrUtils.IsNull(row.value)) || row.name === 'Total') {
697
- if (utils_1.TrUtils.IsNull(row.value)) {
697
+ if (tr_utils_1.TrUtils.IsNull(row.value)) {
698
698
  row.value = '';
699
699
  }
700
700
  var dataRow = [];
@@ -797,7 +797,7 @@ class SharedPDFService {
797
797
  return { stack: [this.GetReceiptCustomerDetails(Customer, Type, Vehicle, Settings, Headding)], width: 170, marginLeft: 2 };
798
798
  }
799
799
  static GetReceiptCustomerDetails(Customer, Type, Vehicle, Settings, CustHeader) {
800
- if (utils_1.TrUtils.IsNull(Customer)) {
800
+ if (tr_utils_1.TrUtils.IsNull(Customer)) {
801
801
  return this.emptyObject();
802
802
  }
803
803
  return {
@@ -885,7 +885,7 @@ class SharedPDFService {
885
885
  }
886
886
  static GetInsuranceDetailsTable(InsuranceFields, SurName, SurPhone, SurEmail, InsComp, PolNo, PolType) {
887
887
  var List = [];
888
- if (utils_1.TrUtils.CheckInvalidSelect(PolType)) {
888
+ if (tr_utils_1.TrUtils.CheckInvalidSelect(PolType)) {
889
889
  PolType = null;
890
890
  }
891
891
  List.push(this.InsCompany(InsComp), { text: InsComp, marginTop: 5 }, this.GetPolicyInfo(PolNo, PolType), this.GetSurveyor(SurName, SurPhone, SurEmail), this.GetInsuranceDetails(InsuranceFields));
@@ -898,7 +898,7 @@ class SharedPDFService {
898
898
  { name: 'Policy Type', value: PolType },
899
899
  ];
900
900
  for (let i = 0; i < InsuranceFields.length; i++) {
901
- if (!utils_1.TrUtils.IsEmpty(InsuranceFields[i].value)) {
901
+ if (!tr_utils_1.TrUtils.IsEmpty(InsuranceFields[i].value)) {
902
902
  isFieldThere = true;
903
903
  }
904
904
  }
@@ -950,7 +950,7 @@ class SharedPDFService {
950
950
  static GetInsuranceTable(data) {
951
951
  var body = [];
952
952
  data.forEach((row) => {
953
- if (!utils_1.TrUtils.IsEmpty(row.value)) {
953
+ if (!tr_utils_1.TrUtils.IsEmpty(row.value)) {
954
954
  var dataRow = [];
955
955
  dataRow.push({ text: (row.name).toString(), noWrap: true });
956
956
  dataRow.push(':');
@@ -968,7 +968,7 @@ class SharedPDFService {
968
968
  return body;
969
969
  }
970
970
  static GetCustomerDetails(Customer, Type, Vehicle, Settings, CustHeader) {
971
- if (utils_1.TrUtils.IsNull(Customer)) {
971
+ if (tr_utils_1.TrUtils.IsNull(Customer)) {
972
972
  return this.emptyObject();
973
973
  }
974
974
  let Data = [{ text: CustHeader + ':', style: 'hed' },
@@ -1005,7 +1005,7 @@ class SharedPDFService {
1005
1005
  }
1006
1006
  }
1007
1007
  static GetCustomerName(Customer) {
1008
- if (!utils_1.TrUtils.IsEmpty(Customer)) {
1008
+ if (!tr_utils_1.TrUtils.IsEmpty(Customer)) {
1009
1009
  let GSTIN = { columns: [{ text: 'Customer Name :', width: 65, bold: true }, { text: Customer }] };
1010
1010
  return GSTIN;
1011
1011
  }
@@ -1014,7 +1014,7 @@ class SharedPDFService {
1014
1014
  }
1015
1015
  }
1016
1016
  static GetCustomerGSTIN(Customer) {
1017
- if (!utils_1.TrUtils.IsEmpty(Customer.GSTIN)) {
1017
+ if (!tr_utils_1.TrUtils.IsEmpty(Customer.GSTIN)) {
1018
1018
  let GSTIN = { columns: [{ text: 'GSTIN :', width: 33, style: 'hed' }, { text: Customer.GSTIN, marginTop: 1.5 }] };
1019
1019
  return GSTIN;
1020
1020
  }
@@ -1023,7 +1023,7 @@ class SharedPDFService {
1023
1023
  }
1024
1024
  }
1025
1025
  static GetCustomerDLNo(Customer) {
1026
- if (!utils_1.TrUtils.IsEmpty(Customer.DLNo)) {
1026
+ if (!tr_utils_1.TrUtils.IsEmpty(Customer.DLNo)) {
1027
1027
  let GSTIN = { columns: [{ text: 'DL No :', width: 33, style: 'hed' }, { text: Customer.DLNo, marginTop: 1.5 }] };
1028
1028
  return GSTIN;
1029
1029
  }
@@ -1091,15 +1091,15 @@ class SharedPDFService {
1091
1091
  else {
1092
1092
  id = 'Estimate#';
1093
1093
  }
1094
- if (PrintType === 'Parts Order' || utils_1.TrUtils.IsNull(Vehicle)) {
1094
+ if (PrintType === 'Parts Order' || tr_utils_1.TrUtils.IsNull(Vehicle)) {
1095
1095
  vehicleData = [
1096
1096
  { name: id, value: this.CheckAndSetString(Id), bold: true },
1097
1097
  { name: 'Date', value: this.CheckAndSetString(CrDate) }
1098
1098
  ];
1099
- if (!utils_1.TrUtils.IsNull(AdmNo)) {
1099
+ if (!tr_utils_1.TrUtils.IsNull(AdmNo)) {
1100
1100
  vehicleData.push({ name: 'Admission No', value: AdmNo });
1101
1101
  }
1102
- if (!utils_1.TrUtils.IsNull(Settings) && Settings.Tax === 'TI' && !utils_1.TrUtils.IsNull(DoS) && !utils_1.TrUtils.IsEmpty(DoS.Name)) {
1102
+ if (!tr_utils_1.TrUtils.IsNull(Settings) && Settings.Tax === 'TI' && !tr_utils_1.TrUtils.IsNull(DoS) && !tr_utils_1.TrUtils.IsEmpty(DoS.Name)) {
1103
1103
  vehicleData.push({ name: 'Place Of Supply', value: this.GetStateName(DoS) });
1104
1104
  }
1105
1105
  if (Type === 'Delivery Challan' || isOtherIndustry) {
@@ -1120,7 +1120,7 @@ class SharedPDFService {
1120
1120
  { name: id, value: this.CheckAndSetString(Id) },
1121
1121
  { name: 'Date', value: this.CheckAndSetString(CrDate) }
1122
1122
  ];
1123
- if (!utils_1.TrUtils.IsNull(PrDate) && Type !== 'Invoice' && Type !== 'Estimate' && Type !== 'Supplementary Estimate' && Type !== 'Tax Invoice') {
1123
+ if (!tr_utils_1.TrUtils.IsNull(PrDate) && Type !== 'Invoice' && Type !== 'Estimate' && Type !== 'Supplementary Estimate' && Type !== 'Tax Invoice') {
1124
1124
  vehicleData.push({ name: 'Delivery Date', value: this.CheckAndSetString(PrDate) });
1125
1125
  }
1126
1126
  // if (!TrUtils.IsNull(Settings) && Settings.Tax === 'TI' && !TrUtils.IsNull(Settings.PoS) && !TrUtils.IsEmpty(Settings.PoS.Name)) {
@@ -1137,10 +1137,10 @@ class SharedPDFService {
1137
1137
  else {
1138
1138
  vehicleData.push({ name: 'Mileage', value: this.CheckAndSetString(MIn) });
1139
1139
  }
1140
- if (Type === 'Invoice' && !utils_1.TrUtils.IsNull(TypeName)) {
1140
+ if (Type === 'Invoice' && !tr_utils_1.TrUtils.IsNull(TypeName)) {
1141
1141
  vehicleData.push({ name: 'RO Type', value: TypeName });
1142
1142
  }
1143
- if (Type === 'Invoice' && !utils_1.TrUtils.IsNull(ROCode)) {
1143
+ if (Type === 'Invoice' && !tr_utils_1.TrUtils.IsNull(ROCode)) {
1144
1144
  vehicleData.push({ name: 'RO#', value: ROCode });
1145
1145
  }
1146
1146
  }
@@ -1155,10 +1155,10 @@ class SharedPDFService {
1155
1155
  { name: ProdType, value: Product },
1156
1156
  ];
1157
1157
  if (!isOtherIndustry) {
1158
- if (!utils_1.TrUtils.IsEmpty(Vehicle.VIN)) {
1158
+ if (!tr_utils_1.TrUtils.IsEmpty(Vehicle.VIN)) {
1159
1159
  a.push({ name: 'Chassis No', value: this.CheckAndSetString(Vehicle.VIN) });
1160
1160
  }
1161
- if (!utils_1.TrUtils.IsEmpty(Vehicle.EngNo)) {
1161
+ if (!tr_utils_1.TrUtils.IsEmpty(Vehicle.EngNo)) {
1162
1162
  a.push({ name: 'Engine No', value: this.CheckAndSetString(Vehicle.EngNo) });
1163
1163
  }
1164
1164
  }
@@ -1169,7 +1169,7 @@ class SharedPDFService {
1169
1169
  return this.GetVehicleDataTable(vehicleData);
1170
1170
  }
1171
1171
  static GetStateName(PlaceofSupply) {
1172
- if (utils_1.TrUtils.IsNull(PlaceofSupply)) {
1172
+ if (tr_utils_1.TrUtils.IsNull(PlaceofSupply)) {
1173
1173
  return '';
1174
1174
  }
1175
1175
  let supplyName = PlaceofSupply.Name + ' (' + PlaceofSupply.GCode + ')';
@@ -1195,25 +1195,25 @@ class SharedPDFService {
1195
1195
  { name: id, value: this.CheckAndSetString(Id) },
1196
1196
  { name: 'Date', value: this.CheckAndSetString(CrDate) }
1197
1197
  ];
1198
- if (!utils_1.TrUtils.IsNull(Settings) && Settings.Tax === 'TI' && !utils_1.TrUtils.IsNull(Settings.PoS) && !utils_1.TrUtils.IsEmpty(Settings.PoS.Name)) {
1198
+ if (!tr_utils_1.TrUtils.IsNull(Settings) && Settings.Tax === 'TI' && !tr_utils_1.TrUtils.IsNull(Settings.PoS) && !tr_utils_1.TrUtils.IsEmpty(Settings.PoS.Name)) {
1199
1199
  vehicleData.push({ name: 'Place Of Supply', value: this.GetStateName(Settings.PoS) });
1200
1200
  }
1201
- if (!utils_1.TrUtils.IsNull(RefNo)) {
1201
+ if (!tr_utils_1.TrUtils.IsNull(RefNo)) {
1202
1202
  vehicleData.push({ name: 'Reference#', value: RefNo });
1203
1203
  }
1204
1204
  if (IsPackage) {
1205
- if (!utils_1.TrUtils.IsNull(PackId)) {
1205
+ if (!tr_utils_1.TrUtils.IsNull(PackId)) {
1206
1206
  vehicleData.push({ name: 'Package#', value: PackId });
1207
1207
  }
1208
- if (!utils_1.TrUtils.IsNull(PackedDate)) {
1208
+ if (!tr_utils_1.TrUtils.IsNull(PackedDate)) {
1209
1209
  vehicleData.push({ name: 'Packed Date', value: this.CheckAndSetString(PackedDate) });
1210
1210
  }
1211
1211
  }
1212
1212
  else {
1213
- if (!utils_1.TrUtils.IsNull(ShipId)) {
1213
+ if (!tr_utils_1.TrUtils.IsNull(ShipId)) {
1214
1214
  vehicleData.push({ name: 'Shipment#', value: ShipId });
1215
1215
  }
1216
- if (!utils_1.TrUtils.IsNull(ShippedDate)) {
1216
+ if (!tr_utils_1.TrUtils.IsNull(ShippedDate)) {
1217
1217
  vehicleData.push({ name: 'Shipped Date', value: this.CheckAndSetString(ShippedDate) });
1218
1218
  }
1219
1219
  }
@@ -1224,7 +1224,7 @@ class SharedPDFService {
1224
1224
  return this.GetVehicleDataTable(vehicleData);
1225
1225
  }
1226
1226
  static CheckAndSetString(Value) {
1227
- if (utils_1.TrUtils.IsNull(Value)) {
1227
+ if (tr_utils_1.TrUtils.IsNull(Value)) {
1228
1228
  Value = '';
1229
1229
  }
1230
1230
  return Value;
@@ -1241,7 +1241,7 @@ class SharedPDFService {
1241
1241
  }
1242
1242
  static GetFormatContact(CustomerObj) {
1243
1243
  var contactnew = '';
1244
- if (!utils_1.TrUtils.IsNull(CustomerObj.Cons)) {
1244
+ if (!tr_utils_1.TrUtils.IsNull(CustomerObj.Cons)) {
1245
1245
  CustomerObj.Cons.forEach((Contact) => {
1246
1246
  contactnew = contactnew + '(' + Contact.Type + '):' + Contact.No + '\n';
1247
1247
  });
@@ -1250,7 +1250,7 @@ class SharedPDFService {
1250
1250
  }
1251
1251
  static GetFormatAddress(CustomerObj) {
1252
1252
  var Addressnew = '';
1253
- if (!utils_1.TrUtils.IsNull(CustomerObj.Adrs)) {
1253
+ if (!tr_utils_1.TrUtils.IsNull(CustomerObj.Adrs)) {
1254
1254
  CustomerObj.Adrs.forEach((Adrs) => {
1255
1255
  Addressnew = Addressnew + Adrs + '\n';
1256
1256
  });
@@ -1409,14 +1409,14 @@ class SharedPDFService {
1409
1409
  return HeaderNames;
1410
1410
  }
1411
1411
  static ALLPartsCGSTTaxListTable(PartsTaxInfo, ShowAccParts, ShowTaxColumn) {
1412
- if (!utils_1.TrUtils.IsNull(PartsTaxInfo) && PartsTaxInfo.length !== 0 && ShowAccParts && ShowTaxColumn) {
1412
+ if (!tr_utils_1.TrUtils.IsNull(PartsTaxInfo) && PartsTaxInfo.length !== 0 && ShowAccParts && ShowTaxColumn) {
1413
1413
  var body = [];
1414
1414
  let columns = this.CreateHeadingAllPartCGSTTaxList();
1415
1415
  body.push(columns);
1416
1416
  PartsTaxInfo.forEach((part) => {
1417
1417
  var dataRow = [];
1418
1418
  columns.forEach((column) => {
1419
- if (!utils_1.TrUtils.IsNull(part[column.Field]) && !utils_1.TrUtils.IsNull(part[column.Field])) {
1419
+ if (!tr_utils_1.TrUtils.IsNull(part[column.Field]) && !tr_utils_1.TrUtils.IsNull(part[column.Field])) {
1420
1420
  if (column.Field === 'TotalTaxAmount' || column.Field === 'TotalTaxableAmount') {
1421
1421
  dataRow.push({ text: part[column.Field].toString(), alignment: 'right', nowrap: true });
1422
1422
  }
@@ -1475,15 +1475,15 @@ class SharedPDFService {
1475
1475
  return HeaderNames;
1476
1476
  }
1477
1477
  static CreateHSNTaxTable1(PartsTaxInfo, ShowAccParts, ShowIGST, ShowTaxColumn) {
1478
- if (!utils_1.TrUtils.IsNull(PartsTaxInfo) && PartsTaxInfo.length !== 0 && ShowAccParts && ShowTaxColumn) {
1478
+ if (!tr_utils_1.TrUtils.IsNull(PartsTaxInfo) && PartsTaxInfo.length !== 0 && ShowAccParts && ShowTaxColumn) {
1479
1479
  var body = [];
1480
1480
  let columns = this.CreateHeadingAllTaxList(ShowIGST);
1481
1481
  body.push(columns);
1482
1482
  PartsTaxInfo.forEach((part) => {
1483
1483
  var dataRow = [];
1484
1484
  columns.forEach((column) => {
1485
- if (!utils_1.TrUtils.IsFixedZero(part[column.Field]) &&
1486
- !utils_1.TrUtils.IsNull(part[column.Field]) || column.Field === 'SGST' || column.Field === 'CGST' || column.Field === 'SGSTAmt' || column.Field === 'CGSTAmt'
1485
+ if (!tr_utils_1.TrUtils.IsFixedZero(part[column.Field]) &&
1486
+ !tr_utils_1.TrUtils.IsNull(part[column.Field]) || column.Field === 'SGST' || column.Field === 'CGST' || column.Field === 'SGSTAmt' || column.Field === 'CGSTAmt'
1487
1487
  || column.Field === 'TotalTaxAmount') {
1488
1488
  if (column.Field === 'SGSTLaborAmt') {
1489
1489
  dataRow.push({ text: part[column.Field].toString(), alignment: 'right', opacity: 0.7, nowrap: true, fontSize: 6 });
@@ -1506,15 +1506,15 @@ class SharedPDFService {
1506
1506
  }
1507
1507
  }
1508
1508
  static CreateHSNTaxTable(PartsTaxInfo, ShowAccParts, ShowIGST, ShowTaxColumn) {
1509
- if (!utils_1.TrUtils.IsNull(PartsTaxInfo) && PartsTaxInfo.length !== 0 && ShowAccParts && ShowTaxColumn) {
1509
+ if (!tr_utils_1.TrUtils.IsNull(PartsTaxInfo) && PartsTaxInfo.length !== 0 && ShowAccParts && ShowTaxColumn) {
1510
1510
  var body = [];
1511
1511
  let columns = this.CreateHeadingAllHSNTaxList(ShowIGST);
1512
1512
  body.push(columns);
1513
1513
  PartsTaxInfo.forEach((part) => {
1514
1514
  var dataRow = [];
1515
1515
  columns.forEach((column) => {
1516
- if (!utils_1.TrUtils.IsFixedZero(part[column.Field]) &&
1517
- !utils_1.TrUtils.IsNull(part[column.Field]) || column.Field === 'SGST' || column.Field === 'CGST'
1516
+ if (!tr_utils_1.TrUtils.IsFixedZero(part[column.Field]) &&
1517
+ !tr_utils_1.TrUtils.IsNull(part[column.Field]) || column.Field === 'SGST' || column.Field === 'CGST'
1518
1518
  || column.Field === 'TotalTaxAmount') {
1519
1519
  if (column.Field === 'SGSTLaborAmt') {
1520
1520
  dataRow.push({ text: part[column.Field].toString(), alignment: 'right', nowrap: true });
@@ -1540,12 +1540,12 @@ class SharedPDFService {
1540
1540
  let totalDisc;
1541
1541
  let totalTax;
1542
1542
  if (!Consolidate) {
1543
- totalTax = utils_1.TrUtils.FixPriceValue(Number(LaborTotalTax) + Number(PartTotalTax));
1543
+ totalTax = tr_utils_1.TrUtils.FixPriceValue(Number(LaborTotalTax) + Number(PartTotalTax));
1544
1544
  if (istaxable) {
1545
- totalDisc = utils_1.TrUtils.FixPriceValue(Number(OverAllMainLaborDiscount) + Number(OverAllMainPartsDiscount));
1545
+ totalDisc = tr_utils_1.TrUtils.FixPriceValue(Number(OverAllMainLaborDiscount) + Number(OverAllMainPartsDiscount));
1546
1546
  }
1547
1547
  else {
1548
- totalDisc = utils_1.TrUtils.FixPriceValue(Number(OverAllMainLaborDiscount) + Number(OverAllMainPartsDiscount) + Number(OverAllRecordDiscount));
1548
+ totalDisc = tr_utils_1.TrUtils.FixPriceValue(Number(OverAllMainLaborDiscount) + Number(OverAllMainPartsDiscount) + Number(OverAllRecordDiscount));
1549
1549
  }
1550
1550
  }
1551
1551
  return {
@@ -1574,12 +1574,12 @@ class SharedPDFService {
1574
1574
  let totalDisc;
1575
1575
  let totalTax;
1576
1576
  if (!Consolidate) {
1577
- totalTax = utils_1.TrUtils.FixPriceValue(Number(LaborTotalTax) + Number(PartTotalTax));
1577
+ totalTax = tr_utils_1.TrUtils.FixPriceValue(Number(LaborTotalTax) + Number(PartTotalTax));
1578
1578
  if (istaxable) {
1579
- totalDisc = utils_1.TrUtils.FixPriceValue(Number(OverAllMainLaborDiscount) + Number(OverAllMainPartsDiscount));
1579
+ totalDisc = tr_utils_1.TrUtils.FixPriceValue(Number(OverAllMainLaborDiscount) + Number(OverAllMainPartsDiscount));
1580
1580
  }
1581
1581
  else {
1582
- totalDisc = utils_1.TrUtils.FixPriceValue(Number(OverAllMainLaborDiscount) + Number(OverAllMainPartsDiscount));
1582
+ totalDisc = tr_utils_1.TrUtils.FixPriceValue(Number(OverAllMainLaborDiscount) + Number(OverAllMainPartsDiscount));
1583
1583
  }
1584
1584
  }
1585
1585
  let serviceName;
@@ -1623,28 +1623,28 @@ class SharedPDFService {
1623
1623
  // { name: 'Total Disc.', value: OverAllRecordDiscount },
1624
1624
  ];
1625
1625
  if (moreDiscDetails) {
1626
- if (!utils_1.TrUtils.IsZero(RecordData.PDisc)) {
1627
- AccountFields.push({ name: 'Items Discount', value: utils_1.TrUtils.FixPriceValue(RecordData.PDisc) });
1626
+ if (!tr_utils_1.TrUtils.IsZero(RecordData.PDisc)) {
1627
+ AccountFields.push({ name: 'Items Discount', value: tr_utils_1.TrUtils.FixPriceValue(RecordData.PDisc) });
1628
1628
  }
1629
- if (!utils_1.TrUtils.IsZero(RecordData.LDisc)) {
1630
- AccountFields.push({ name: 'Services Discount', value: utils_1.TrUtils.FixPriceValue(RecordData.LDisc) });
1629
+ if (!tr_utils_1.TrUtils.IsZero(RecordData.LDisc)) {
1630
+ AccountFields.push({ name: 'Services Discount', value: tr_utils_1.TrUtils.FixPriceValue(RecordData.LDisc) });
1631
1631
  }
1632
- if (!utils_1.TrUtils.IsZero(RecordData.Disc)) {
1633
- AccountFields.push({ name: 'Overall Discount', value: utils_1.TrUtils.FixPriceValue(RecordData.Disc) });
1632
+ if (!tr_utils_1.TrUtils.IsZero(RecordData.Disc)) {
1633
+ AccountFields.push({ name: 'Overall Discount', value: tr_utils_1.TrUtils.FixPriceValue(RecordData.Disc) });
1634
1634
  }
1635
1635
  }
1636
1636
  else {
1637
1637
  AccountFields.push({ name: 'Discount', value: OverAllRecordDiscount });
1638
1638
  }
1639
1639
  if (!Consolidate) {
1640
- AccountFields.unshift({ name: 'SubTotal', value: utils_1.TrUtils.FixPriceValue(STotal) });
1640
+ AccountFields.unshift({ name: 'SubTotal', value: tr_utils_1.TrUtils.FixPriceValue(STotal) });
1641
1641
  }
1642
- if (!utils_1.TrUtils.IsEmpty(totalTax)) {
1642
+ if (!tr_utils_1.TrUtils.IsEmpty(totalTax)) {
1643
1643
  AccountFields.push({ name: 'Total Tax', value: totalTax });
1644
1644
  }
1645
- if (!utils_1.TrUtils.IsEmpty(Adj)) {
1645
+ if (!tr_utils_1.TrUtils.IsEmpty(Adj)) {
1646
1646
  if (Adj > 0) {
1647
- Adj = '+' + utils_1.TrUtils.FixPriceValue(Adj);
1647
+ Adj = '+' + tr_utils_1.TrUtils.FixPriceValue(Adj);
1648
1648
  }
1649
1649
  AccountFields.push({ name: 'Adjust', value: Adj });
1650
1650
  }
@@ -1660,7 +1660,7 @@ class SharedPDFService {
1660
1660
  let FinalTotal = { name: 'Final Total', value: GrandTotal };
1661
1661
  AccountFields.push(total);
1662
1662
  AccountFields.push(Rounding);
1663
- if (!utils_1.TrUtils.IsFixedZero(Rounded)) {
1663
+ if (!tr_utils_1.TrUtils.IsFixedZero(Rounded)) {
1664
1664
  AccountFields.push(FinalTotal);
1665
1665
  }
1666
1666
  }
@@ -1676,7 +1676,7 @@ class SharedPDFService {
1676
1676
  }
1677
1677
  AccountFields.push(total);
1678
1678
  AccountFields.push(Rounding);
1679
- if (!utils_1.TrUtils.IsFixedZero(Rounded)) {
1679
+ if (!tr_utils_1.TrUtils.IsFixedZero(Rounded)) {
1680
1680
  AccountFields.push(FinalTotal);
1681
1681
  }
1682
1682
  }
@@ -1703,12 +1703,12 @@ class SharedPDFService {
1703
1703
  let totalDisc;
1704
1704
  let totalTax;
1705
1705
  if (!Consolidate) {
1706
- totalTax = utils_1.TrUtils.FixPriceValue(Number(LaborTotalTax) + Number(PartTotalTax));
1706
+ totalTax = tr_utils_1.TrUtils.FixPriceValue(Number(LaborTotalTax) + Number(PartTotalTax));
1707
1707
  if (istaxable) {
1708
- totalDisc = utils_1.TrUtils.FixPriceValue(Number(OverAllMainLaborDiscount) + Number(OverAllMainPartsDiscount));
1708
+ totalDisc = tr_utils_1.TrUtils.FixPriceValue(Number(OverAllMainLaborDiscount) + Number(OverAllMainPartsDiscount));
1709
1709
  }
1710
1710
  else {
1711
- totalDisc = utils_1.TrUtils.FixPriceValue(Number(OverAllMainLaborDiscount) + Number(OverAllMainPartsDiscount));
1711
+ totalDisc = tr_utils_1.TrUtils.FixPriceValue(Number(OverAllMainLaborDiscount) + Number(OverAllMainPartsDiscount));
1712
1712
  }
1713
1713
  }
1714
1714
  return {
@@ -1734,12 +1734,12 @@ class SharedPDFService {
1734
1734
  let totalDisc;
1735
1735
  let totalTax;
1736
1736
  if (!Consolidate) {
1737
- totalTax = utils_1.TrUtils.FixPriceValue(Number(PartTotalTax));
1737
+ totalTax = tr_utils_1.TrUtils.FixPriceValue(Number(PartTotalTax));
1738
1738
  if (istaxable) {
1739
- totalDisc = utils_1.TrUtils.FixPriceValue(Number(OverAllMainPartsDiscount));
1739
+ totalDisc = tr_utils_1.TrUtils.FixPriceValue(Number(OverAllMainPartsDiscount));
1740
1740
  }
1741
1741
  else {
1742
- totalDisc = utils_1.TrUtils.FixPriceValue(Number(OverAllMainPartsDiscount));
1742
+ totalDisc = tr_utils_1.TrUtils.FixPriceValue(Number(OverAllMainPartsDiscount));
1743
1743
  }
1744
1744
  }
1745
1745
  return {
@@ -1766,15 +1766,15 @@ class SharedPDFService {
1766
1766
  let AccountFields = [
1767
1767
  // { name: 'Labor Total', value: LaborAfterGST },
1768
1768
  // { name: 'Part Total', value: PartsAfterGST },
1769
- { name: 'SubTotal', value: utils_1.TrUtils.FixPriceValue(utils_1.TrUtils.SetValueToZeroIfNull(Number(PartsAfterGST))) },
1769
+ { name: 'SubTotal', value: tr_utils_1.TrUtils.FixPriceValue(tr_utils_1.TrUtils.SetValueToZeroIfNull(Number(PartsAfterGST))) },
1770
1770
  ];
1771
1771
  if (moreDiscDetails) {
1772
- AccountFields.push({ name: 'Overall Discount', value: utils_1.TrUtils.FixPriceValue(RecordData.Disc) });
1772
+ AccountFields.push({ name: 'Overall Discount', value: tr_utils_1.TrUtils.FixPriceValue(RecordData.Disc) });
1773
1773
  }
1774
1774
  else {
1775
1775
  AccountFields.push({ name: 'Discount', value: OverAllRecordDiscount });
1776
1776
  }
1777
- if (!utils_1.TrUtils.IsEmpty(totalTax)) {
1777
+ if (!tr_utils_1.TrUtils.IsEmpty(totalTax)) {
1778
1778
  AccountFields.push({ name: 'Total Tax', value: totalTax });
1779
1779
  }
1780
1780
  if (For === enums_1.PayTypeEnum.Insurance) {
@@ -1789,7 +1789,7 @@ class SharedPDFService {
1789
1789
  let FinalTotal = { name: 'Final Total', value: GrandTotal };
1790
1790
  AccountFields.push(total);
1791
1791
  AccountFields.push(Rounding);
1792
- if (!utils_1.TrUtils.IsFixedZero(Rounded)) {
1792
+ if (!tr_utils_1.TrUtils.IsFixedZero(Rounded)) {
1793
1793
  AccountFields.push(FinalTotal);
1794
1794
  }
1795
1795
  }
@@ -1805,7 +1805,7 @@ class SharedPDFService {
1805
1805
  }
1806
1806
  AccountFields.push(total);
1807
1807
  AccountFields.push(Rounding);
1808
- if (!utils_1.TrUtils.IsFixedZero(Rounded)) {
1808
+ if (!tr_utils_1.TrUtils.IsFixedZero(Rounded)) {
1809
1809
  AccountFields.push(FinalTotal);
1810
1810
  }
1811
1811
  }
@@ -1850,7 +1850,7 @@ class SharedPDFService {
1850
1850
  // PartsTotal.push({ name: 'Discount On Parts', value: OverAllMainPartsDiscount });
1851
1851
  // }
1852
1852
  if (!Consolidate) {
1853
- if (!utils_1.TrUtils.IsFixedZero(BasicPartsTotal) && (From !== 'Countersale')) {
1853
+ if (!tr_utils_1.TrUtils.IsFixedZero(BasicPartsTotal) && (From !== 'Countersale')) {
1854
1854
  PartsTotal.unshift({ name: 'Parts Total', value: BasicPartsTotal });
1855
1855
  }
1856
1856
  }
@@ -1898,12 +1898,12 @@ class SharedPDFService {
1898
1898
  // }
1899
1899
  //consolidate and no-tax i want show labor discount
1900
1900
  if (!Consolidate) {
1901
- if (!utils_1.TrUtils.IsFixedZero(BasicLaborTotal)) {
1901
+ if (!tr_utils_1.TrUtils.IsFixedZero(BasicLaborTotal)) {
1902
1902
  LaborTotal.unshift({ name: 'Labor Total', value: BasicLaborTotal });
1903
1903
  }
1904
1904
  }
1905
1905
  if (ShowTaxColumn && ShowDetailedLaborTaxInfo
1906
- && (!utils_1.TrUtils.IsFixedZero(LIGST) || (!utils_1.TrUtils.IsFixedZero(LCGST) || !utils_1.TrUtils.IsFixedZero(LSGST)))) {
1906
+ && (!tr_utils_1.TrUtils.IsFixedZero(LIGST) || (!tr_utils_1.TrUtils.IsFixedZero(LCGST) || !tr_utils_1.TrUtils.IsFixedZero(LSGST)))) {
1907
1907
  if (ShowIGST) {
1908
1908
  LaborTotal.push({ name: 'IGST On Labor', value: LIGST });
1909
1909
  }
@@ -1934,33 +1934,33 @@ class SharedPDFService {
1934
1934
  // { name: 'Part Total', value: PartsAfterGST },
1935
1935
  ];
1936
1936
  if (moreDiscDetails) {
1937
- if (!utils_1.TrUtils.IsZero(RecordData.PDisc)) {
1938
- AccountFields.push({ name: 'Items Discount', value: utils_1.TrUtils.FixPriceValue(RecordData.PDisc) });
1937
+ if (!tr_utils_1.TrUtils.IsZero(RecordData.PDisc)) {
1938
+ AccountFields.push({ name: 'Items Discount', value: tr_utils_1.TrUtils.FixPriceValue(RecordData.PDisc) });
1939
1939
  }
1940
- if (!utils_1.TrUtils.IsZero(RecordData.LDisc)) {
1941
- AccountFields.push({ name: 'Services Discount', value: utils_1.TrUtils.FixPriceValue(RecordData.LDisc) });
1940
+ if (!tr_utils_1.TrUtils.IsZero(RecordData.LDisc)) {
1941
+ AccountFields.push({ name: 'Services Discount', value: tr_utils_1.TrUtils.FixPriceValue(RecordData.LDisc) });
1942
1942
  }
1943
- if (!utils_1.TrUtils.IsZero(RecordData.Disc)) {
1944
- AccountFields.push({ name: 'Overall Discount', value: utils_1.TrUtils.FixPriceValue(RecordData.Disc) });
1943
+ if (!tr_utils_1.TrUtils.IsZero(RecordData.Disc)) {
1944
+ AccountFields.push({ name: 'Overall Discount', value: tr_utils_1.TrUtils.FixPriceValue(RecordData.Disc) });
1945
1945
  }
1946
1946
  }
1947
1947
  else {
1948
1948
  AccountFields.push({ name: 'Discount', value: OverAllRecordDiscount });
1949
1949
  }
1950
- if (!Consolidate && !utils_1.TrUtils.IsNull(subTotal)) {
1951
- AccountFields.unshift({ name: 'SubTotal', value: utils_1.TrUtils.FixPriceValue(utils_1.TrUtils.SetValueToZeroIfNull(Number(subTotal))) });
1950
+ if (!Consolidate && !tr_utils_1.TrUtils.IsNull(subTotal)) {
1951
+ AccountFields.unshift({ name: 'SubTotal', value: tr_utils_1.TrUtils.FixPriceValue(tr_utils_1.TrUtils.SetValueToZeroIfNull(Number(subTotal))) });
1952
1952
  }
1953
1953
  else {
1954
1954
  if (!Consolidate) {
1955
- AccountFields.unshift({ name: 'SubTotal', value: utils_1.TrUtils.FixPriceValue(utils_1.TrUtils.SetValueToZeroIfNull(Number(LaborAfterGST)) + utils_1.TrUtils.SetValueToZeroIfNull(Number(PartsAfterGST))) });
1955
+ AccountFields.unshift({ name: 'SubTotal', value: tr_utils_1.TrUtils.FixPriceValue(tr_utils_1.TrUtils.SetValueToZeroIfNull(Number(LaborAfterGST)) + tr_utils_1.TrUtils.SetValueToZeroIfNull(Number(PartsAfterGST))) });
1956
1956
  }
1957
1957
  }
1958
- if (!utils_1.TrUtils.IsEmpty(totalTax)) {
1958
+ if (!tr_utils_1.TrUtils.IsEmpty(totalTax)) {
1959
1959
  AccountFields.push({ name: 'Total Tax', value: totalTax });
1960
1960
  }
1961
- if (!utils_1.TrUtils.IsEmpty(Adj)) {
1961
+ if (!tr_utils_1.TrUtils.IsEmpty(Adj)) {
1962
1962
  if (Adj > 0) {
1963
- Adj = '+' + utils_1.TrUtils.FixPriceValue(Adj);
1963
+ Adj = '+' + tr_utils_1.TrUtils.FixPriceValue(Adj);
1964
1964
  }
1965
1965
  AccountFields.push({ name: 'Adjust', value: Adj });
1966
1966
  }
@@ -1976,7 +1976,7 @@ class SharedPDFService {
1976
1976
  let FinalTotal = { name: 'Final Total', value: GrandTotal };
1977
1977
  AccountFields.push(total);
1978
1978
  AccountFields.push(Rounding);
1979
- if (!utils_1.TrUtils.IsFixedZero(Rounded)) {
1979
+ if (!tr_utils_1.TrUtils.IsFixedZero(Rounded)) {
1980
1980
  AccountFields.push(FinalTotal);
1981
1981
  }
1982
1982
  }
@@ -1992,7 +1992,7 @@ class SharedPDFService {
1992
1992
  }
1993
1993
  AccountFields.push(total);
1994
1994
  AccountFields.push(Rounding);
1995
- if (!utils_1.TrUtils.IsFixedZero(Rounded)) {
1995
+ if (!tr_utils_1.TrUtils.IsFixedZero(Rounded)) {
1996
1996
  AccountFields.push(FinalTotal);
1997
1997
  }
1998
1998
  }
@@ -2033,7 +2033,7 @@ class SharedPDFService {
2033
2033
  let FinalTotal = { name: 'Final Total', value: GrandTotal };
2034
2034
  AccountFields.push(total);
2035
2035
  AccountFields.push(Rounding);
2036
- if (!utils_1.TrUtils.IsFixedZero(Rounded)) {
2036
+ if (!tr_utils_1.TrUtils.IsFixedZero(Rounded)) {
2037
2037
  AccountFields.push(FinalTotal);
2038
2038
  }
2039
2039
  }
@@ -2049,7 +2049,7 @@ class SharedPDFService {
2049
2049
  }
2050
2050
  AccountFields.push(total);
2051
2051
  AccountFields.push(Rounding);
2052
- if (!utils_1.TrUtils.IsFixedZero(Rounded)) {
2052
+ if (!tr_utils_1.TrUtils.IsFixedZero(Rounded)) {
2053
2053
  AccountFields.push(FinalTotal);
2054
2054
  }
2055
2055
  }
@@ -2066,11 +2066,11 @@ class SharedPDFService {
2066
2066
  static GrandTotalTable(data) {
2067
2067
  var body = [];
2068
2068
  data.forEach((row) => {
2069
- if (!utils_1.TrUtils.IsFixedZero(row.value) || row.name === 'Total') {
2069
+ if (!tr_utils_1.TrUtils.IsFixedZero(row.value) || row.name === 'Total') {
2070
2070
  var dataRow = [];
2071
2071
  dataRow.push({ text: (row.name).toString(), noWrap: true });
2072
2072
  dataRow.push(':');
2073
- if (!utils_1.TrUtils.IsNull(row.value)) {
2073
+ if (!tr_utils_1.TrUtils.IsNull(row.value)) {
2074
2074
  dataRow.push({ text: (row.value).toString(), noWrap: true, alignment: 'right' });
2075
2075
  }
2076
2076
  else {
@@ -2142,7 +2142,7 @@ class SharedPDFService {
2142
2142
  };
2143
2143
  }
2144
2144
  static GetImage(Image, PrLogo) {
2145
- if (!utils_1.TrUtils.IsNull(Image) && PrLogo) {
2145
+ if (!tr_utils_1.TrUtils.IsNull(Image) && PrLogo) {
2146
2146
  return { image: Image, width: 120, height: 80 };
2147
2147
  }
2148
2148
  else {
@@ -2152,7 +2152,7 @@ class SharedPDFService {
2152
2152
  static FooterContent(CnstData) {
2153
2153
  var _a, _b;
2154
2154
  if (CnstData.Entity.Header === 2) {
2155
- if (!utils_1.TrUtils.IsEmpty(CnstData.Entity.FootText)) {
2155
+ if (!tr_utils_1.TrUtils.IsEmpty(CnstData.Entity.FootText)) {
2156
2156
  return {
2157
2157
  table: {
2158
2158
  widths: ['auto'],
@@ -2178,7 +2178,7 @@ class SharedPDFService {
2178
2178
  }
2179
2179
  static GetEntityAddress(Entity) {
2180
2180
  let Addres = Entity.CName + ', ' + Entity.Adrs1;
2181
- if (!utils_1.TrUtils.IsEmpty(Entity.Adrs2)) {
2181
+ if (!tr_utils_1.TrUtils.IsEmpty(Entity.Adrs2)) {
2182
2182
  Addres = Addres + ',' + Entity.Adrs2;
2183
2183
  }
2184
2184
  Addres = Addres + ',' + Entity.City + SharedPDFService.getPinCode(Entity.PIN);