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
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.IssuePartsprintService = 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 IssuePartsprintService {
@@ -11,7 +11,7 @@ class IssuePartsprintService {
11
11
  }
12
12
  static GetIssuePartsPrint(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 IssuePartsprintService {
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 IssuePartsprintService {
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 IssuePartsprintService {
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 IssuePartsprintService {
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
  }
@@ -194,14 +194,14 @@ class IssuePartsprintService {
194
194
  let dpartadding1 = {};
195
195
  dpartadding1.SNo = '';
196
196
  dpartadding1.Desc = 'Spare Total';
197
- dpartadding1.QtyAndUoM = utils_1.TrUtils.FixedTo(Qty);
197
+ dpartadding1.QtyAndUoM = tr_utils_1.TrUtils.FixedTo(Qty);
198
198
  dpartadding1.bold = true;
199
- dpartadding1.UnPr = utils_1.TrUtils.FixedTo(Taxable);
200
- dpartadding1.SGSTAmt = utils_1.TrUtils.FixedTo(SGSTAMT);
201
- dpartadding1.IGSTAmt = utils_1.TrUtils.FixedTo(IGSTAMT);
202
- dpartadding1.CGSTAmt = utils_1.TrUtils.FixedTo(CGSTAMT);
199
+ dpartadding1.UnPr = tr_utils_1.TrUtils.FixedTo(Taxable);
200
+ dpartadding1.SGSTAmt = tr_utils_1.TrUtils.FixedTo(SGSTAMT);
201
+ dpartadding1.IGSTAmt = tr_utils_1.TrUtils.FixedTo(IGSTAMT);
202
+ dpartadding1.CGSTAmt = tr_utils_1.TrUtils.FixedTo(CGSTAMT);
203
203
  dpartadding1.TCode = ShowTaxColumn ? 114 : undefined;
204
- dpartadding1.LineTotal = utils_1.TrUtils.FixPriceValue(FinalTotal);
204
+ dpartadding1.LineTotal = tr_utils_1.TrUtils.FixPriceValue(FinalTotal);
205
205
  Parts.push({ SNo: '' });
206
206
  Parts.push(dpartadding1);
207
207
  }
@@ -217,14 +217,14 @@ class IssuePartsprintService {
217
217
  Parts.forEach((part) => {
218
218
  var dataRow = [];
219
219
  columns.forEach((column) => {
220
- if ((!utils_1.TrUtils.IsFixedZero(part[column.Field]) && !utils_1.TrUtils.IsNull(part[column.Field]))
220
+ if ((!tr_utils_1.TrUtils.IsFixedZero(part[column.Field]) && !tr_utils_1.TrUtils.IsNull(part[column.Field]))
221
221
  || (column.text === 'Line Total')) {
222
222
  if (part[column.Field] === 'Spare Parts') {
223
223
  dataRow.push({ text: part[column.Field].toString(), marginLeft: 50, style: 'InlineHeader' });
224
224
  }
225
225
  else {
226
226
  if (((column.Field === 'CGSTAmt' || column.Field === 'SGSTAmt' || column.Field === 'CGSTPerc' || column.Field === 'SGSTPerc' || column.Field === 'IGSTAmt' || column.Field === 'IGSTPerc')
227
- && utils_1.TrUtils.CheckInvalidSelect(part.TCode))) {
227
+ && tr_utils_1.TrUtils.CheckInvalidSelect(part.TCode))) {
228
228
  part[column.Field] = '';
229
229
  dataRow.push({ text: part[column.Field].toString(), alignment: 'center' });
230
230
  }
@@ -234,7 +234,7 @@ class IssuePartsprintService {
234
234
  || column.Field === 'CGSTPerc' || column.Field === 'SGSTPerc' || column.Field === 'IGSTAmt' || column.Field === 'IGSTPerc') {
235
235
  if (column.Field === 'Disc') {
236
236
  if (column.type === 'percentage') {
237
- if (!utils_1.TrUtils.IsEmpty(part[column.Field])) {
237
+ if (!tr_utils_1.TrUtils.IsEmpty(part[column.Field])) {
238
238
  dataRow.push({ text: part[column.Field].toString(), noWrap: true });
239
239
  }
240
240
  else {
@@ -242,7 +242,7 @@ class IssuePartsprintService {
242
242
  }
243
243
  }
244
244
  else {
245
- if (!utils_1.TrUtils.IsNull(part[column.Field])) {
245
+ if (!tr_utils_1.TrUtils.IsNull(part[column.Field])) {
246
246
  dataRow.push({ text: part[column.Field].toString(), noWrap: true });
247
247
  }
248
248
  else {
@@ -251,7 +251,7 @@ class IssuePartsprintService {
251
251
  }
252
252
  }
253
253
  else {
254
- if (!utils_1.TrUtils.IsNull(part[column.Field])) {
254
+ if (!tr_utils_1.TrUtils.IsNull(part[column.Field])) {
255
255
  dataRow.push({ text: part[column.Field].toString(), bold: part.bold, alignment: 'right', nowrap: true });
256
256
  }
257
257
  else {
@@ -264,7 +264,7 @@ class IssuePartsprintService {
264
264
  if (column.Field === 'Desc') {
265
265
  let DescData = [];
266
266
  DescData.push({ text: part[column.Field].toString(), bold: part.bold });
267
- if (!utils_1.TrUtils.IsEmpty(part['EDesc'])) {
267
+ if (!tr_utils_1.TrUtils.IsEmpty(part['EDesc'])) {
268
268
  DescData.push({ text: part['EDesc'].toString(), color: 'grey' });
269
269
  }
270
270
  dataRow.push({ stack: DescData });
@@ -282,7 +282,7 @@ class IssuePartsprintService {
282
282
  SNo = SNo + 1;
283
283
  }
284
284
  else {
285
- if (utils_1.TrUtils.IsNull(part[column.Field])) {
285
+ if (tr_utils_1.TrUtils.IsNull(part[column.Field])) {
286
286
  part[column.Field] = '';
287
287
  }
288
288
  }
@@ -313,13 +313,13 @@ class IssuePartsprintService {
313
313
  dpartadding1.SNo = '';
314
314
  dpartadding1.Desc = 'Labor Total';
315
315
  // dpartadding1.QtyAndUoM = Qty;
316
- dpartadding1.UnPr = utils_1.TrUtils.FixedTo(Taxable);
317
- dpartadding1.SGSTAmt = utils_1.TrUtils.FixedTo(SGSTAMT);
318
- dpartadding1.IGSTAmt = utils_1.TrUtils.FixedTo(IGSTAMT);
319
- dpartadding1.CGSTAmt = utils_1.TrUtils.FixedTo(CGSTAMT);
316
+ dpartadding1.UnPr = tr_utils_1.TrUtils.FixedTo(Taxable);
317
+ dpartadding1.SGSTAmt = tr_utils_1.TrUtils.FixedTo(SGSTAMT);
318
+ dpartadding1.IGSTAmt = tr_utils_1.TrUtils.FixedTo(IGSTAMT);
319
+ dpartadding1.CGSTAmt = tr_utils_1.TrUtils.FixedTo(CGSTAMT);
320
320
  dpartadding1.TCode = ShowTaxColumn ? 114 : undefined;
321
321
  dpartadding1.bold = true;
322
- dpartadding1.LineTotal = utils_1.TrUtils.FixPriceValue(FinalTotal);
322
+ dpartadding1.LineTotal = tr_utils_1.TrUtils.FixPriceValue(FinalTotal);
323
323
  Labor.push({ SNo: '' });
324
324
  Labor.push(dpartadding1);
325
325
  }
@@ -340,14 +340,14 @@ class IssuePartsprintService {
340
340
  Labor.forEach((Ops) => {
341
341
  var dataRow = [];
342
342
  columns.forEach((column) => {
343
- if ((!utils_1.TrUtils.IsFixedZero(Ops[column.Field]) && !utils_1.TrUtils.IsNull(Ops[column.Field]))
343
+ if ((!tr_utils_1.TrUtils.IsFixedZero(Ops[column.Field]) && !tr_utils_1.TrUtils.IsNull(Ops[column.Field]))
344
344
  || (column.text === 'Line Total')) {
345
345
  if (Ops[column.Field] === 'Labor') {
346
346
  dataRow.push({ text: Ops[column.Field].toString(), marginLeft: 50, style: 'InlineHeader' });
347
347
  }
348
348
  else {
349
349
  if (((column.Field === 'CGSTAmt' || column.Field === 'SGSTAmt' || column.Field === 'CGSTPerc' || column.Field === 'SGSTPerc' || column.Field === 'IGSTAmt' || column.Field === 'IGSTPerc')
350
- && utils_1.TrUtils.CheckInvalidSelect(Ops.TCode))) {
350
+ && tr_utils_1.TrUtils.CheckInvalidSelect(Ops.TCode))) {
351
351
  Ops[column.Field] = '';
352
352
  dataRow.push({ text: Ops[column.Field].toString(), alignment: 'center' });
353
353
  }
@@ -357,7 +357,7 @@ class IssuePartsprintService {
357
357
  || column.Field === 'CGSTPerc' || column.Field === 'SGSTPerc' || column.Field === 'IGSTAmt' || column.Field === 'IGSTPerc') {
358
358
  if (column.Field === 'Disc') {
359
359
  if (column.type === 'percentage') {
360
- if (!utils_1.TrUtils.IsEmpty(Ops[column.Field])) {
360
+ if (!tr_utils_1.TrUtils.IsEmpty(Ops[column.Field])) {
361
361
  dataRow.push({ text: Ops[column.Field].toString(), noWrap: true });
362
362
  }
363
363
  else {
@@ -365,7 +365,7 @@ class IssuePartsprintService {
365
365
  }
366
366
  }
367
367
  else {
368
- if (!utils_1.TrUtils.IsNull(Ops[column.Field])) {
368
+ if (!tr_utils_1.TrUtils.IsNull(Ops[column.Field])) {
369
369
  dataRow.push({ text: Ops[column.Field].toString(), noWrap: true });
370
370
  }
371
371
  else {
@@ -374,7 +374,7 @@ class IssuePartsprintService {
374
374
  }
375
375
  }
376
376
  else {
377
- if (!utils_1.TrUtils.IsNull(Ops[column.Field])) {
377
+ if (!tr_utils_1.TrUtils.IsNull(Ops[column.Field])) {
378
378
  dataRow.push({ text: Ops[column.Field].toString(), alignment: 'right', nowrap: true, bold: Ops.bold });
379
379
  }
380
380
  else {
@@ -394,7 +394,7 @@ class IssuePartsprintService {
394
394
  SNo = SNo + 1;
395
395
  }
396
396
  else {
397
- if (utils_1.TrUtils.IsNull(Ops[column.Field])) {
397
+ if (tr_utils_1.TrUtils.IsNull(Ops[column.Field])) {
398
398
  Ops[column.Field] = '';
399
399
  }
400
400
  }
@@ -545,7 +545,7 @@ class IssuePartsprintService {
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 IssuePartsprintService {
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 IssuePartsprintService {
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 IssuePartsprintService {
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 IssuePartsprintService {
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 IssuePartsprintService {
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, null, 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, null, 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 IssuePartsprintService {
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 IssuePartsprintService {
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
  }
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.ItemBarCodeLabelPdf = void 0;
7
7
  const shared_pdf_service_1 = require("./shared-pdf.service");
8
- const utils_1 = require("../shared/utils");
8
+ const tr_utils_1 = require("../utils/tr-utils");
9
9
  const jsbarcode_1 = __importDefault(require("jsbarcode"));
10
10
  class ItemBarCodeLabelPdf {
11
11
  static ItemDetailsPrint(Item, win, custom, txt) {
@@ -89,7 +89,7 @@ class ItemBarCodeLabelPdf {
89
89
  { text: '' + shared_pdf_service_1.SharedPDFService.GetEmail(Entity.Email) + '', style: headerstyle, fontSize: 10 },
90
90
  // { text: 'GSTIN:' + Entity.GSTIN + ', ' + 'PAN: ' + Entity.PAN, style: headerstyle },
91
91
  ];
92
- if (!utils_1.TrUtils.IsEmpty(Entity.Adrs2)) {
92
+ if (!tr_utils_1.TrUtils.IsEmpty(Entity.Adrs2)) {
93
93
  SubHeader.splice(1, 0, { text: '' + Entity.Adrs2 + '', style: [headerstyle], fontSize: 10 });
94
94
  }
95
95
  // if (!TrUtils.IsEmpty(Entity.TLine)) {
@@ -3,32 +3,30 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GetItemPriceForPriceList = GetItemPriceForPriceList;
4
4
  exports.CalculatePriceBasedOnPriceList = CalculatePriceBasedOnPriceList;
5
5
  exports.ApplyRounding = ApplyRounding;
6
- exports.CalcDiscPrice = CalcDiscPrice;
7
- exports.GetMarginValue = GetMarginValue;
8
- const aggregation_1 = require("../aggregation/aggregation");
9
- const utils_1 = require("../shared/utils");
6
+ const math_operations_1 = require("../shared/math-operations");
7
+ const util_1 = require("../shared/util");
10
8
  function GetItemPriceForPriceList(item, priceList, includeMargin) {
11
9
  let salePricesByPriceListId = [];
12
- if ((0, utils_1.IsNotNull)(item.SalePrices) && item.SalePrices.length > 0) {
10
+ if ((0, util_1.IsNotNull)(item.SalePrices) && item.SalePrices.length > 0) {
13
11
  salePricesByPriceListId = item.SalePrices.filter((price) => priceList._id.toString() == price.PrListId.toString());
14
12
  }
15
13
  if (salePricesByPriceListId.length > 0) {
16
14
  item.SalePrices = salePricesByPriceListId;
17
15
  if (item.Track == 'TR' || item.Track == 'SN') {
18
16
  item.Sale["MRP"] = item.Sale.Price;
19
- if ((0, utils_1.IsNotNull)(item.SalePrices[0].Price) && (0, utils_1.IsNotNull)(item.SalePrices[0].Disc)) {
20
- const calculatedPrice = CalcDiscPrice(item.SalePrices[0].Price, item.SalePrices[0].Disc);
17
+ if ((0, util_1.IsNotNull)(item.SalePrices[0].Price) && (0, util_1.IsNotNull)(item.SalePrices[0].Disc)) {
18
+ const calculatedPrice = (0, math_operations_1.CalcDiscPrice)(item.SalePrices[0].Price, item.SalePrices[0].Disc);
21
19
  item.Sale.Price = ApplyRounding(calculatedPrice, priceList);
22
20
  }
23
- else if ((0, utils_1.IsNotNull)(item.SalePrices[0].Price) && (0, utils_1.IsNull)(item.SalePrices[0].Disc)) {
21
+ else if ((0, util_1.IsNotNull)(item.SalePrices[0].Price) && (0, util_1.IsNull)(item.SalePrices[0].Disc)) {
24
22
  item.Sale.Price = ApplyRounding(item.SalePrices[0].Price, priceList);
25
23
  }
26
- else if ((0, utils_1.IsNull)(item.SalePrices[0].Price) && (0, utils_1.IsNotNull)(item.SalePrices[0].Disc)) {
27
- const calculatedPrice = CalcDiscPrice(item.Sale.Price, item.SalePrices[0].Disc);
24
+ else if ((0, util_1.IsNull)(item.SalePrices[0].Price) && (0, util_1.IsNotNull)(item.SalePrices[0].Disc)) {
25
+ const calculatedPrice = (0, math_operations_1.CalcDiscPrice)(item.Sale.Price, item.SalePrices[0].Disc);
28
26
  item.Sale.Price = ApplyRounding(calculatedPrice, priceList);
29
27
  }
30
28
  if (includeMargin) {
31
- item.Margin = GetMarginValue(item.Sale.Price, item.Pur.Cost);
29
+ item.Margin = (0, math_operations_1.GetMarginValue)(item.Sale.Price, item.Pur.Cost);
32
30
  }
33
31
  }
34
32
  else if (item.Track == 'BN') {
@@ -40,20 +38,20 @@ function GetItemPriceForPriceList(item, priceList, includeMargin) {
40
38
  }
41
39
  element.MRP = element.Price;
42
40
  if (batchSalePrice.length > 0) {
43
- if ((0, utils_1.IsNotNull)(batchSalePrice[0].Price) && (0, utils_1.IsNotNull)(batchSalePrice[0].Disc)) {
44
- const calculatedPrice = CalcDiscPrice(batchSalePrice[0].Price, batchSalePrice[0].Disc);
41
+ if ((0, util_1.IsNotNull)(batchSalePrice[0].Price) && (0, util_1.IsNotNull)(batchSalePrice[0].Disc)) {
42
+ const calculatedPrice = (0, math_operations_1.CalcDiscPrice)(batchSalePrice[0].Price, batchSalePrice[0].Disc);
45
43
  element.Price = ApplyRounding(calculatedPrice, priceList);
46
44
  }
47
- else if ((0, utils_1.IsNotNull)(batchSalePrice[0].Price) && (0, utils_1.IsNull)(batchSalePrice[0].Disc)) {
45
+ else if ((0, util_1.IsNotNull)(batchSalePrice[0].Price) && (0, util_1.IsNull)(batchSalePrice[0].Disc)) {
48
46
  element.Price = ApplyRounding(batchSalePrice[0].Price, priceList);
49
47
  }
50
- else if ((0, utils_1.IsNull)(batchSalePrice[0].Price) && (0, utils_1.IsNotNull)(batchSalePrice[0].Disc)) {
51
- const calculatedPrice = CalcDiscPrice(element.Price, batchSalePrice[0].Disc);
48
+ else if ((0, util_1.IsNull)(batchSalePrice[0].Price) && (0, util_1.IsNotNull)(batchSalePrice[0].Disc)) {
49
+ const calculatedPrice = (0, math_operations_1.CalcDiscPrice)(element.Price, batchSalePrice[0].Disc);
52
50
  element.Price = ApplyRounding(calculatedPrice, priceList);
53
51
  }
54
52
  }
55
53
  if (includeMargin) {
56
- element.Margin = GetMarginValue(element.Price, element.Cost);
54
+ element.Margin = (0, math_operations_1.GetMarginValue)(element.Price, element.Cost);
57
55
  }
58
56
  }
59
57
  }
@@ -65,13 +63,13 @@ function CalculatePriceBasedOnPriceList(item, priceList, includeMargin) {
65
63
  var _a, _b;
66
64
  if (priceList != null) {
67
65
  if (priceList.PrCalc == "FIXED") {
68
- if (priceList.Fixed && (0, utils_1.IsNotNull)(priceList.Fixed.Price)) {
66
+ if (priceList.Fixed && (0, util_1.IsNotNull)(priceList.Fixed.Price)) {
69
67
  const fixedPrice = priceList.Fixed.Price;
70
68
  if (item.Track == 'TR' || item.Track == 'SN') {
71
69
  item.Sale["MRP"] = item.Sale.Price;
72
70
  item.Sale.Price = ApplyRounding(fixedPrice, priceList);
73
71
  if (includeMargin) {
74
- item.Margin = GetMarginValue(item.Sale.Price, item.Pur.Cost);
72
+ item.Margin = (0, math_operations_1.GetMarginValue)(item.Sale.Price, item.Pur.Cost);
75
73
  }
76
74
  }
77
75
  else if (item.Track == 'BN') {
@@ -79,7 +77,7 @@ function CalculatePriceBasedOnPriceList(item, priceList, includeMargin) {
79
77
  batch.MRP = batch.Price;
80
78
  batch.Price = ApplyRounding(fixedPrice, priceList);
81
79
  if (includeMargin) {
82
- batch.Margin = GetMarginValue(batch.Price, batch.Cost);
80
+ batch.Margin = (0, math_operations_1.GetMarginValue)(batch.Price, batch.Cost);
83
81
  }
84
82
  }
85
83
  }
@@ -92,19 +90,19 @@ function CalculatePriceBasedOnPriceList(item, priceList, includeMargin) {
92
90
  if (priceList.BasedOn == "SP") {
93
91
  if (item.Track == 'TR' || item.Track == 'SN') {
94
92
  item.Sale["MRP"] = item.Sale.Price;
95
- const calculatedPrice = CalcDiscPrice(item.Sale.Price, discPerc, markUp);
93
+ const calculatedPrice = (0, math_operations_1.CalcDiscPrice)(item.Sale.Price, discPerc, markUp);
96
94
  item.Sale.Price = ApplyRounding(calculatedPrice, priceList);
97
95
  if (includeMargin) {
98
- item.Margin = GetMarginValue(item.Sale.Price, item.Pur.Cost);
96
+ item.Margin = (0, math_operations_1.GetMarginValue)(item.Sale.Price, item.Pur.Cost);
99
97
  }
100
98
  }
101
99
  else if (item.Track == 'BN') {
102
100
  for (let batch of item.Batches) {
103
101
  batch.MRP = batch.Price;
104
- const calculatedPrice = CalcDiscPrice(batch.Price, discPerc, markUp);
102
+ const calculatedPrice = (0, math_operations_1.CalcDiscPrice)(batch.Price, discPerc, markUp);
105
103
  batch.Price = ApplyRounding(calculatedPrice, priceList);
106
104
  if (includeMargin) {
107
- batch.Margin = GetMarginValue(batch.Price, batch.Cost);
105
+ batch.Margin = (0, math_operations_1.GetMarginValue)(batch.Price, batch.Cost);
108
106
  }
109
107
  }
110
108
  }
@@ -112,22 +110,22 @@ function CalculatePriceBasedOnPriceList(item, priceList, includeMargin) {
112
110
  else if (priceList.BasedOn == "PC") {
113
111
  if (item.Track == 'TR' || item.Track == 'SN') {
114
112
  item.Sale["MRP"] = item.Sale.Price;
115
- if ((0, utils_1.IsNotNull)(item.Pur) && (0, utils_1.IsNotNull)(item.Pur.Cost)) {
116
- const calculatedPrice = CalcDiscPrice(item.Pur.Cost, discPerc, markUp);
113
+ if ((0, util_1.IsNotNull)(item.Pur) && (0, util_1.IsNotNull)(item.Pur.Cost)) {
114
+ const calculatedPrice = (0, math_operations_1.CalcDiscPrice)(item.Pur.Cost, discPerc, markUp);
117
115
  item.Sale.Price = ApplyRounding(calculatedPrice, priceList);
118
116
  if (includeMargin) {
119
- item.Margin = GetMarginValue(item.Sale.Price, item.Pur.Cost);
117
+ item.Margin = (0, math_operations_1.GetMarginValue)(item.Sale.Price, item.Pur.Cost);
120
118
  }
121
119
  }
122
120
  }
123
121
  else if (item.Track == 'BN') {
124
122
  for (let batch of item.Batches) {
125
123
  batch.MRP = batch.Price;
126
- if ((0, utils_1.IsNotNull)(batch.Cost)) {
127
- const calculatedPrice = CalcDiscPrice(batch.Cost, discPerc, markUp);
124
+ if ((0, util_1.IsNotNull)(batch.Cost)) {
125
+ const calculatedPrice = (0, math_operations_1.CalcDiscPrice)(batch.Cost, discPerc, markUp);
128
126
  batch.Price = ApplyRounding(calculatedPrice, priceList);
129
127
  if (includeMargin) {
130
- batch.Margin = GetMarginValue(batch.Price, batch.Cost);
128
+ batch.Margin = (0, math_operations_1.GetMarginValue)(batch.Price, batch.Cost);
131
129
  }
132
130
  }
133
131
  }
@@ -152,7 +150,7 @@ function ApplyRounding(price, priceList) {
152
150
  case "0.49":
153
151
  return Math.floor(price) + 0.49;
154
152
  case "Dec":
155
- if ((0, utils_1.IsNotNull)(priceList.Deci)) {
153
+ if ((0, util_1.IsNotNull)(priceList.Deci)) {
156
154
  const factor = Math.pow(10, priceList.Deci);
157
155
  return Math.round(price * factor) / factor;
158
156
  }
@@ -161,18 +159,3 @@ function ApplyRounding(price, priceList) {
161
159
  return price;
162
160
  }
163
161
  }
164
- function CalcDiscPrice(price, disc, markUp = false) {
165
- let PriceValue = 0;
166
- if (markUp) {
167
- PriceValue = (0, aggregation_1.addition)(price, (0, aggregation_1.division)((0, aggregation_1.multiply)(price, disc), 100));
168
- }
169
- else {
170
- PriceValue = (0, aggregation_1.subtraction)(price, (0, aggregation_1.division)((0, aggregation_1.multiply)(price, disc), 100));
171
- }
172
- return PriceValue;
173
- }
174
- function GetMarginValue(price, cost) {
175
- let Margin = 0;
176
- Margin = (0, aggregation_1.multiply)((0, aggregation_1.division)((0, aggregation_1.subtraction)(price, cost), price), 100);
177
- return Margin;
178
- }
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ItemWiseDoctorSalePDFService = 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 ItemWiseDoctorSalePDFService {
7
7
  static GetItemWiseDoctorSalePrint(InvoicesData, CName, searchValue) {
@@ -108,8 +108,8 @@ class ItemWiseDoctorSalePDFService {
108
108
  dataRow.push({ text: invoice.Name });
109
109
  dataRow.push({ text: invoice.Count });
110
110
  // if(!isHC){
111
- dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.Qty), alignment: 'right' });
112
- dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.AvgPr), alignment: 'right' });
111
+ dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.Qty), alignment: 'right' });
112
+ dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.AvgPr), alignment: 'right' });
113
113
  // dataRow.push({ text: TrUtils.FixPriceValue(invoice.Total), alignment: 'right' });
114
114
  // dataRow.push({ text: TrUtils.IsNull(invoice.Prod) ? '' : invoice.Prod?.Model + ' ' + invoice.Prod?.Var });
115
115
  // }
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ItemWiseMODetailsPDF = 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 ItemWiseMODetailsPDF {
8
8
  static GetItemWiseMODetailsPrint(InvoicesData, CName, isPhar, isHC, HeaderName, searchValue) {
@@ -77,7 +77,7 @@ class ItemWiseMODetailsPDF {
77
77
  dataRow.push({ text: invoice.ShipToUser, alignment: 'left' });
78
78
  dataRow.push({ text: invoice.Name, alignment: 'left' });
79
79
  dataRow.push({ text: invoice.MPN, alignment: 'left' });
80
- dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.Qty), alignment: 'right' });
80
+ dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.Qty), alignment: 'right' });
81
81
  dataRow.push({ text: invoice.ReName, alignment: 'left' });
82
82
  dataRow.push({ text: invoice.Sts, alignment: 'left' });
83
83
  dataRow.push({ text: invoice.Notes, alignment: 'left' });
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ItemWiseMOSummaryPDF = 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 ItemWiseMOSummaryPDF {
7
7
  static GetItemWiseMOSummaryPrint(InvoicesData, CName, isPhar, isHC, HeaderName, searchValue) {
@@ -76,7 +76,7 @@ class ItemWiseMOSummaryPDF {
76
76
  // dataRow.push({ text: invoice.OfQty, alignment: 'right' });
77
77
  // dataRow.push({ text: invoice.ShipToUser, alignment: 'left' });
78
78
  dataRow.push({ text: invoice.Name, alignment: 'left' });
79
- dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.Qty), alignment: 'right' });
79
+ dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.Qty), alignment: 'right' });
80
80
  // dataRow.push({ text: invoice.ReName, alignment: 'left' });
81
81
  // dataRow.push({ text: invoice.Sts, alignment: 'left' });
82
82
  // dataRow.push({ text: TrUtils.FixPriceValue(invoice.Total ), alignment: 'right', style: ['headerstyle'], });
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ItemWiseSalesPDFService = void 0;
4
4
  // import { MyDate } from '../utils/my-date';
5
- const utils_1 = require("../shared/utils");
5
+ const tr_utils_1 = require("../utils/tr-utils");
6
6
  const shared_pdf_service_1 = require("./shared-pdf.service");
7
7
  class ItemWiseSalesPDFService {
8
8
  static GetItemWiseSalesPrint(InvoicesData, CName, HeaerName, searchValue) {
@@ -115,11 +115,11 @@ class ItemWiseSalesPDFService {
115
115
  // dataRow.push({ text: invoice.SubTotal, alignment: 'right' });
116
116
  // // if(!isHC){
117
117
  // dataRow.push({ text: invoice.OfQty, alignment: 'right' });
118
- dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.UnAmt), alignment: 'right' });
119
- dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.Disc), alignment: 'right' });
120
- dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.Tax), alignment: 'right' });
121
- dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.NetAmt + invoice.Tax), alignment: 'right' });
122
- dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.AvgPr), alignment: 'right' });
118
+ dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.UnAmt), alignment: 'right' });
119
+ dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.Disc), alignment: 'right' });
120
+ dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.Tax), alignment: 'right' });
121
+ dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.NetAmt + invoice.Tax), alignment: 'right' });
122
+ dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.AvgPr), alignment: 'right' });
123
123
  // dataRow.push({ text: TrUtils.IsNull(invoice.Prod) ? '' : invoice.Prod?.Model + ' ' + invoice.Prod?.Var });
124
124
  // }
125
125
  // dataRow.push({ text: invoice.BFrom.Name, alignment: 'left', style: ['headerstyle'], });
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ManfWiseSalesService = 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 ManfWiseSalesService {
7
7
  static GetManfWiseSalePrint(InvoicesData, CName, isPhar, isHC, isSale, HeaderName, searchValue) {
@@ -113,13 +113,13 @@ class ManfWiseSalesService {
113
113
  dataRow.push({ text: invoice.Qty, alignment: 'right' });
114
114
  // if(!isHC){
115
115
  dataRow.push({ text: invoice.OfQty, alignment: 'right' });
116
- dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.UnAmt), alignment: 'right' });
117
- dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.Disc), alignment: 'right' });
118
- dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.Tax), alignment: 'right' });
116
+ dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.UnAmt), alignment: 'right' });
117
+ dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.Disc), alignment: 'right' });
118
+ dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.Tax), alignment: 'right' });
119
119
  // dataRow.push({ text: TrUtils.IsNull(invoice.Prod) ? '' : invoice.Prod?.Model + ' ' + invoice.Prod?.Var });
120
120
  // }
121
121
  // dataRow.push({ text: invoice.BFrom.Name, alignment: 'left', style: ['headerstyle'], });
122
- dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.UnAmt + invoice.Tax), alignment: 'right', style: ['headerstyle'], });
122
+ dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.UnAmt + invoice.Tax), alignment: 'right', style: ['headerstyle'], });
123
123
  // dataRow.push({ text: TrUtils.FixPriceValue(invoice.Due), alignment: 'right', style: ['headerstyle'], });
124
124
  body.push(dataRow);
125
125
  // if (InvoiceData.Invoices.length === (index + 1)) {