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
@@ -3,37 +3,37 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CNPrintService = void 0;
4
4
  const shared_print_service_1 = require("./shared-print.service");
5
5
  const credit_note_totals_service_1 = require("./credit-note-totals.service");
6
- const utils_1 = require("../shared/utils");
6
+ const tr_utils_1 = require("../utils/tr-utils");
7
7
  const code_enums_1 = require("../enums/code-enums");
8
8
  const enums_1 = require("../enums/enums");
9
- const my_date_1 = require("../shared/my-date");
9
+ const my_date_1 = require("../utils/my-date");
10
10
  const aggregation_1 = require("../aggregation/aggregation");
11
11
  class CNPrintService {
12
12
  static GetCreditNotePrintInfo(OriginalInvoiceData, OriginalEntityData, image, IncludeGST, ConsolidateGST, TaxCodes, IsProforma) {
13
13
  var _a, _b;
14
- let ForInsurance = !utils_1.TrUtils.IsNull(OriginalInvoiceData.BillTo.InsId);
14
+ let ForInsurance = !tr_utils_1.TrUtils.IsNull(OriginalInvoiceData.BillTo.InsId);
15
15
  let InvoicePrintData = {};
16
- let argInvoiceData = utils_1.TrUtils.Stringify(OriginalInvoiceData);
16
+ let argInvoiceData = tr_utils_1.TrUtils.Stringify(OriginalInvoiceData);
17
17
  if (!IncludeGST) {
18
18
  argInvoiceData.Settings.Tax = 'NO';
19
19
  }
20
20
  InvoicePrintData.IsProforma = IsProforma;
21
- InvoicePrintData.Settings = utils_1.TrUtils.Stringify(argInvoiceData.Settings);
21
+ InvoicePrintData.Settings = tr_utils_1.TrUtils.Stringify(argInvoiceData.Settings);
22
22
  let SType;
23
- if (!utils_1.TrUtils.IsNull(argInvoiceData.SType)) {
23
+ if (!tr_utils_1.TrUtils.IsNull(argInvoiceData.SType)) {
24
24
  SType = argInvoiceData.SType;
25
25
  }
26
26
  InvoicePrintData = this.GetPrintConditionsBasedOnInput(InvoicePrintData, IncludeGST, ConsolidateGST, ForInsurance, SType, argInvoiceData, IsProforma);
27
27
  InvoicePrintData.Entity = shared_print_service_1.PrintSharedService.GetFormattedEntityDataForPrint(OriginalEntityData, "Invoice", OriginalInvoiceData);
28
28
  InvoicePrintData = shared_print_service_1.PrintSharedService.GetEntityHeaderStyles(InvoicePrintData, OriginalEntityData, image);
29
29
  InvoicePrintData = this.GetInvoiceOtherDetailsForPrint(InvoicePrintData, argInvoiceData);
30
- let IsTaxable = (IncludeGST && utils_1.TrUtils.isTaxable(argInvoiceData.Settings.Tax)) ? true : false;
30
+ let IsTaxable = (IncludeGST && tr_utils_1.TrUtils.isTaxable(argInvoiceData.Settings.Tax)) ? true : false;
31
31
  let finalTotalsData = credit_note_totals_service_1.CreditNoteTotalsService.GetTotalsValue([], argInvoiceData.Items, IsTaxable, true, argInvoiceData.Disc, argInvoiceData.Perc, TaxCodes, true, argInvoiceData.Settings);
32
32
  if (ConsolidateGST) {
33
33
  finalTotalsData.CustLaborTotalBeforeDisc = finalTotalsData.CustLaborAfterTax;
34
34
  finalTotalsData.CustPartsTotalBeforeDisc = finalTotalsData.CustPartAfterTax;
35
35
  }
36
- InvoicePrintData = utils_1.TrUtils.ConcatObjects(InvoicePrintData, finalTotalsData);
36
+ InvoicePrintData = tr_utils_1.TrUtils.ConcatObjects(InvoicePrintData, finalTotalsData);
37
37
  InvoicePrintData.Items = this.GetItemsPrintInfo(InvoicePrintData.Items, ConsolidateGST, TaxCodes, (_b = (_a = OriginalEntityData.Entity.Settings) === null || _a === void 0 ? void 0 : _a.Acc) === null || _b === void 0 ? void 0 : _b.LTot);
38
38
  argInvoiceData = this.ReverseItemsForInvoicePrint(argInvoiceData);
39
39
  InvoicePrintData.PrintInfo = this.PrepareFormatForInvoicePrint(InvoicePrintData, code_enums_1.ROTypeEnum.Invoice, argInvoiceData.Sts);
@@ -48,11 +48,11 @@ class CNPrintService {
48
48
  InvoicePrintData.IncludeGST = IncludeGST;
49
49
  InvoicePrintData.ConsolidateGST = ConsolidateGST;
50
50
  InvoicePrintData.ShowAccParts = false;
51
- InvoicePrintData.ShowIGST = (utils_1.TrUtils.IsNull(SType) || (SType === 'Intra')) ? false : true;
51
+ InvoicePrintData.ShowIGST = (tr_utils_1.TrUtils.IsNull(SType) || (SType === 'Intra')) ? false : true;
52
52
  InvoicePrintData.ShowTaxColumn = (IncludeGST && !ConsolidateGST) ? true : false;
53
53
  // InvoicePrintData.ShowDiscountColumn = (!ForInsurance && !ConsolidateGST) ? true : false;
54
54
  InvoicePrintData = this.GetInvoiceTypeHeading(InvoicePrintData, OriginalInvoiceData, IncludeGST, ConsolidateGST, IsProforma);
55
- InvoicePrintData.PrDate = utils_1.TrUtils.IsNull(OriginalInvoiceData.PrDate) ? '' : my_date_1.MyDate.ConvertUTCDateToReadable(OriginalInvoiceData.PrDate);
55
+ InvoicePrintData.PrDate = tr_utils_1.TrUtils.IsNull(OriginalInvoiceData.PrDate) ? '' : my_date_1.MyDate.ConvertUTCDateToReadable(OriginalInvoiceData.PrDate);
56
56
  return InvoicePrintData;
57
57
  }
58
58
  static GetInvoiceTypeHeading(InvoicePrintData, OriginalInvoiceData, IncludeGST, ConsolidateGST, IsProforma) {
@@ -73,24 +73,24 @@ class CNPrintService {
73
73
  let CTaxAmtPerItem = (0, aggregation_1.division)(Item.CGST, Item.Qty);
74
74
  let STaxAmtPerItem = (0, aggregation_1.division)(Item.SGST, Item.Qty);
75
75
  let ITaxAmtPerItem = (0, aggregation_1.division)(Item.IGST, Item.Qty);
76
- Item.UnPr = utils_1.TrUtils.FixedTo((0, aggregation_1.addition)(AfterDiscForEach, CTaxAmtPerItem, STaxAmtPerItem, ITaxAmtPerItem));
76
+ Item.UnPr = tr_utils_1.TrUtils.FixedTo((0, aggregation_1.addition)(AfterDiscForEach, CTaxAmtPerItem, STaxAmtPerItem, ITaxAmtPerItem));
77
77
  }
78
78
  else {
79
- Item.UnPr = utils_1.TrUtils.FixPriceValue(Item.UnPr);
79
+ Item.UnPr = tr_utils_1.TrUtils.FixPriceValue(Item.UnPr);
80
80
  }
81
- Item.CGSTAmt = utils_1.TrUtils.FixPriceValue(Item.CGST);
82
- Item.SGSTAmt = utils_1.TrUtils.FixPriceValue(Item.SGST);
83
- Item.IGSTAmt = utils_1.TrUtils.FixPriceValue(Item.IGST);
81
+ Item.CGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Item.CGST);
82
+ Item.SGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Item.SGST);
83
+ Item.IGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Item.IGST);
84
84
  Item.CGSTPerc = shared_print_service_1.PrintSharedService.GetCGSTValueBasedOnTaxCode(Item.TCode, TaxCodes);
85
85
  Item.SGSTPerc = shared_print_service_1.PrintSharedService.GetSGSTValueBasedOnTaxCode(Item.TCode, TaxCodes);
86
86
  Item.IGSTPerc = shared_print_service_1.PrintSharedService.GetIGSTValueBasedOnTaxCode(Item.TCode, TaxCodes);
87
87
  if (LineTotal === 'AT') {
88
- Item.LineTotal = utils_1.TrUtils.FixPriceValue(Item.AfterPartTax);
88
+ Item.LineTotal = tr_utils_1.TrUtils.FixPriceValue(Item.AfterPartTax);
89
89
  }
90
90
  else {
91
- Item.LineTotal = utils_1.TrUtils.FixPriceValue((0, aggregation_1.subtraction)(Item.UnAmt, Item.Disc));
91
+ Item.LineTotal = tr_utils_1.TrUtils.FixPriceValue((0, aggregation_1.subtraction)(Item.UnAmt, Item.Disc));
92
92
  }
93
- if (!utils_1.TrUtils.IsZero(Item.Qty) && !utils_1.TrUtils.CheckInvalidSelect(Item.UoM)) {
93
+ if (!tr_utils_1.TrUtils.IsZero(Item.Qty) && !tr_utils_1.TrUtils.CheckInvalidSelect(Item.UoM)) {
94
94
  Item.QtyAndUoM = Item.Qty + ' ' + Item.UoM;
95
95
  }
96
96
  });
@@ -112,15 +112,15 @@ class CNPrintService {
112
112
  return PrintInfo;
113
113
  }
114
114
  static GetFormattedProductDataForPrint(OriginalInvoiceData, InvoicePrintData) {
115
- if (!utils_1.TrUtils.IsNull(OriginalInvoiceData.Prod)) {
115
+ if (!tr_utils_1.TrUtils.IsNull(OriginalInvoiceData.Prod)) {
116
116
  InvoicePrintData.Product = OriginalInvoiceData.Prod;
117
- if (utils_1.TrUtils.IsNull(InvoicePrintData.Product.VIN)) {
117
+ if (tr_utils_1.TrUtils.IsNull(InvoicePrintData.Product.VIN)) {
118
118
  InvoicePrintData.Product.VIN = '';
119
119
  }
120
- if (utils_1.TrUtils.IsNull(InvoicePrintData.Product.RegNo)) {
120
+ if (tr_utils_1.TrUtils.IsNull(InvoicePrintData.Product.RegNo)) {
121
121
  InvoicePrintData.Product.RegNo = '';
122
122
  }
123
- if (utils_1.TrUtils.IsNull(InvoicePrintData.Product.EngNo)) {
123
+ if (tr_utils_1.TrUtils.IsNull(InvoicePrintData.Product.EngNo)) {
124
124
  InvoicePrintData.Product.EngNo = '';
125
125
  }
126
126
  InvoicePrintData.MIn = OriginalInvoiceData.Prod.MIn;
@@ -133,17 +133,17 @@ class CNPrintService {
133
133
  Customer.Name = OriginalInvoiceData.BillTo.Name;
134
134
  Customer.Adrs = [];
135
135
  Customer.Cons = [];
136
- if (!utils_1.TrUtils.IsNull(OriginalInvoiceData.BillTo.Adrs)) {
136
+ if (!tr_utils_1.TrUtils.IsNull(OriginalInvoiceData.BillTo.Adrs)) {
137
137
  Customer.Adrs.push(OriginalInvoiceData.BillTo.Adrs.A1);
138
- if (!utils_1.TrUtils.IsEmpty(OriginalInvoiceData.BillTo.Adrs.A2)) {
138
+ if (!tr_utils_1.TrUtils.IsEmpty(OriginalInvoiceData.BillTo.Adrs.A2)) {
139
139
  Customer.Adrs.push(OriginalInvoiceData.BillTo.Adrs.A2);
140
140
  }
141
- if (!utils_1.TrUtils.IsEmpty(OriginalInvoiceData.BillTo.Adrs.Ct)) {
141
+ if (!tr_utils_1.TrUtils.IsEmpty(OriginalInvoiceData.BillTo.Adrs.Ct)) {
142
142
  Customer.Adrs.push(OriginalInvoiceData.BillTo.Adrs.Ct);
143
143
  }
144
144
  }
145
145
  Customer.GSTIN = OriginalInvoiceData.BillTo.GSTIN;
146
- if (!utils_1.TrUtils.IsEmpty(OriginalInvoiceData.BillTo.Ph)) {
146
+ if (!tr_utils_1.TrUtils.IsEmpty(OriginalInvoiceData.BillTo.Ph)) {
147
147
  Customer.Cons = [
148
148
  {
149
149
  Type: 'M',
@@ -152,7 +152,7 @@ class CNPrintService {
152
152
  ];
153
153
  }
154
154
  InvoicePrintData.Customer = Customer;
155
- if (!utils_1.TrUtils.IsNull(OriginalInvoiceData.BillTo.InsId)) {
155
+ if (!tr_utils_1.TrUtils.IsNull(OriginalInvoiceData.BillTo.InsId)) {
156
156
  InvoicePrintData.Cust = this.GetCustomerDetails(OriginalInvoiceData);
157
157
  }
158
158
  return InvoicePrintData;
@@ -161,7 +161,7 @@ class CNPrintService {
161
161
  let Customer = {};
162
162
  Customer.Name = this.GetBillToName(OriginalInvoiceData.Cust.Title, OriginalInvoiceData.Cust.Name);
163
163
  Customer.Cons = [];
164
- if (!utils_1.TrUtils.IsEmpty(OriginalInvoiceData.Cust.Ph)) {
164
+ if (!tr_utils_1.TrUtils.IsEmpty(OriginalInvoiceData.Cust.Ph)) {
165
165
  Customer.Cons = [
166
166
  {
167
167
  Type: 'M',
@@ -171,9 +171,9 @@ class CNPrintService {
171
171
  }
172
172
  Customer.GSTIN = OriginalInvoiceData.Cust.GSTIN;
173
173
  Customer.Adrs = [];
174
- if (!utils_1.TrUtils.IsNull(OriginalInvoiceData.Cust.Adrs)) {
174
+ if (!tr_utils_1.TrUtils.IsNull(OriginalInvoiceData.Cust.Adrs)) {
175
175
  Customer.Adrs.push(OriginalInvoiceData.Cust.Adrs.A1);
176
- if (!utils_1.TrUtils.IsEmpty(OriginalInvoiceData.Cust.Adrs.A2)) {
176
+ if (!tr_utils_1.TrUtils.IsEmpty(OriginalInvoiceData.Cust.Adrs.A2)) {
177
177
  Customer.Adrs.push(OriginalInvoiceData.Cust.Adrs.A2);
178
178
  }
179
179
  Customer.Adrs.push(OriginalInvoiceData.Cust.Adrs.Ct);
@@ -183,7 +183,7 @@ class CNPrintService {
183
183
  return Customer;
184
184
  }
185
185
  static GetBillToName(Title, Name) {
186
- return utils_1.TrUtils.IsEmpty(Title) ? Name : Title + ' ' + Name;
186
+ return tr_utils_1.TrUtils.IsEmpty(Title) ? Name : Title + ' ' + Name;
187
187
  }
188
188
  static GetPaymentsTotal(InvoicePayments, Total, InvoiceStatus) {
189
189
  var i = 0;
@@ -196,7 +196,7 @@ class CNPrintService {
196
196
  Data.Due = 0;
197
197
  }
198
198
  else {
199
- Data.Due = utils_1.TrUtils.FixedTo(Total - PaidTotal);
199
+ Data.Due = tr_utils_1.TrUtils.FixedTo(Total - PaidTotal);
200
200
  }
201
201
  if (Data.Due < 0) {
202
202
  Data.Due = 0;
@@ -204,7 +204,7 @@ class CNPrintService {
204
204
  if (Data.Due === 0) {
205
205
  Data.Sts = enums_1.InvoiceStatusEnum.Closed;
206
206
  }
207
- Data.Paid = utils_1.TrUtils.FixedTo(PaidTotal);
207
+ Data.Paid = tr_utils_1.TrUtils.FixedTo(PaidTotal);
208
208
  return Data;
209
209
  }
210
210
  }
@@ -2,12 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ConsultationFeeReceiptPrintService = void 0;
4
4
  const date_fns_1 = require("date-fns");
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
  const shared_pdf_service_1 = require("./shared-pdf.service");
8
8
  class ConsultationFeeReceiptPrintService {
9
9
  static GetPrint(consultationData) {
10
- if (utils_1.TrUtils.IsNull(consultationData.Name)) {
10
+ if (tr_utils_1.TrUtils.IsNull(consultationData.Name)) {
11
11
  consultationData.Name = '';
12
12
  }
13
13
  let dd = {
@@ -126,7 +126,7 @@ class ConsultationFeeReceiptPrintService {
126
126
  }
127
127
  }
128
128
  static GetPhoneNumber(phone) {
129
- if (!utils_1.TrUtils.IsNull(phone)) {
129
+ if (!tr_utils_1.TrUtils.IsNull(phone)) {
130
130
  return ' | ' + phone;
131
131
  }
132
132
  else {
@@ -134,7 +134,7 @@ class ConsultationFeeReceiptPrintService {
134
134
  }
135
135
  }
136
136
  static getDoctorName(DocName) {
137
- if (!utils_1.TrUtils.IsNull(DocName)) {
137
+ if (!tr_utils_1.TrUtils.IsNull(DocName)) {
138
138
  return DocName;
139
139
  }
140
140
  else {
@@ -142,7 +142,7 @@ class ConsultationFeeReceiptPrintService {
142
142
  }
143
143
  }
144
144
  static GetPhone(Phone) {
145
- if (utils_1.TrUtils.IsNull(Phone)) {
145
+ if (tr_utils_1.TrUtils.IsNull(Phone)) {
146
146
  return '';
147
147
  }
148
148
  else {
@@ -150,7 +150,7 @@ class ConsultationFeeReceiptPrintService {
150
150
  }
151
151
  }
152
152
  static DifferenceInYears(DOB) {
153
- if (utils_1.TrUtils.IsNull(DOB)) {
153
+ if (tr_utils_1.TrUtils.IsNull(DOB)) {
154
154
  return 'DOB Not Specified';
155
155
  }
156
156
  const result = (0, date_fns_1.differenceInYears)(my_date_1.MyDate.GetDateTimeNowInUTC(), new Date(DOB));
@@ -174,10 +174,10 @@ class ConsultationFeeReceiptPrintService {
174
174
  }
175
175
  static GetHeaderInfo(consultationData) {
176
176
  let TaxInfo = [];
177
- if (!utils_1.TrUtils.IsEmpty(consultationData.Entity.GSTIN)) {
177
+ if (!tr_utils_1.TrUtils.IsEmpty(consultationData.Entity.GSTIN)) {
178
178
  TaxInfo.push({ text: 'GSTIN : ' + consultationData.Entity.GSTIN, marginTop: 2, marginLeft: 5, alignment: 'left', fontSize: 9, width: 'auto' });
179
179
  }
180
- if (!utils_1.TrUtils.IsEmpty(consultationData.Entity.DLNo)) {
180
+ if (!tr_utils_1.TrUtils.IsEmpty(consultationData.Entity.DLNo)) {
181
181
  TaxInfo.push({ text: 'D.L.NO : ' + consultationData.Entity.DLNo, marginTop: 2, marginLeft: 5, alignment: 'left', fontSize: 9, width: '*' });
182
182
  }
183
183
  TaxInfo.push(this.GetBillofSupplyName(consultationData.Settings));
@@ -207,11 +207,11 @@ class ConsultationFeeReceiptPrintService {
207
207
  static GrandTotalTable(data) {
208
208
  var body = [];
209
209
  data.forEach((row) => {
210
- if (!utils_1.TrUtils.IsFixedZero(row.value) || row.name === 'Total') {
210
+ if (!tr_utils_1.TrUtils.IsFixedZero(row.value) || row.name === 'Total') {
211
211
  var dataRow = [];
212
212
  dataRow.push({ text: (row.name).toString(), noWrap: true, bold: true, style: ['headerstyle'], fontSize: 10 });
213
213
  dataRow.push({ text: ':', style: ['headerstyle'], bold: true, fontSize: 10 });
214
- if (!utils_1.TrUtils.IsNull(row.value)) {
214
+ if (!tr_utils_1.TrUtils.IsNull(row.value)) {
215
215
  dataRow.push({ text: (row.value).toString(), noWrap: true, alignment: 'right', bold: true, style: ['headerstyle'], fontSize: 10, marginRight: 5 });
216
216
  }
217
217
  else {
@@ -226,9 +226,9 @@ class ConsultationFeeReceiptPrintService {
226
226
  return { text: (Settings === null || Settings === void 0 ? void 0 : Settings.Tax) === 'BS' ? 'Bill of Supply' : null, alignment: 'right', marginRight: 5, marginTop: 2, marginBottom: 3, fontSize: 9, width: 'auto' };
227
227
  }
228
228
  static GetDiscountOverall(consultationData) {
229
- let OveralDisc = utils_1.TrUtils.SetValueToZeroIfNull(Number(consultationData.Disc)) +
230
- utils_1.TrUtils.SetValueToZeroIfNull(Number(consultationData.CustPartsDiscTotal));
231
- return utils_1.TrUtils.FixPriceValue(OveralDisc);
229
+ let OveralDisc = tr_utils_1.TrUtils.SetValueToZeroIfNull(Number(consultationData.Disc)) +
230
+ tr_utils_1.TrUtils.SetValueToZeroIfNull(Number(consultationData.CustPartsDiscTotal));
231
+ return tr_utils_1.TrUtils.FixPriceValue(OveralDisc);
232
232
  }
233
233
  static CustomerAndVehicleDetailsAfterLine(size) {
234
234
  let length = 575;
@@ -318,7 +318,7 @@ class ConsultationFeeReceiptPrintService {
318
318
  }
319
319
  static GetAddress(Entity) {
320
320
  let Addres = Entity.Adrs1;
321
- if (!utils_1.TrUtils.IsEmpty(Entity.Adrs2)) {
321
+ if (!tr_utils_1.TrUtils.IsEmpty(Entity.Adrs2)) {
322
322
  Addres = Addres + ',' + Entity.Adrs2;
323
323
  }
324
324
  Addres = Addres + ',' + Entity.City + shared_pdf_service_1.SharedPDFService.getPinCode(Entity.PIN);
@@ -334,7 +334,7 @@ class ConsultationFeeReceiptPrintService {
334
334
  };
335
335
  }
336
336
  static GetPINCode(PIN) {
337
- if (utils_1.TrUtils.IsNull(PIN)) {
337
+ if (tr_utils_1.TrUtils.IsNull(PIN)) {
338
338
  return '';
339
339
  }
340
340
  else {
@@ -2,12 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ConsultationFullPrintService = void 0;
4
4
  const date_fns_1 = require("date-fns");
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
  const shared_pdf_service_1 = require("./shared-pdf.service");
8
8
  class ConsultationFullPrintService {
9
9
  static GetPrint(consultationData) {
10
- if (utils_1.TrUtils.IsNull(consultationData.Name)) {
10
+ if (tr_utils_1.TrUtils.IsNull(consultationData.Name)) {
11
11
  consultationData.Name = '';
12
12
  }
13
13
  let dd = {
@@ -87,7 +87,7 @@ class ConsultationFullPrintService {
87
87
  ];
88
88
  }
89
89
  static GetCnsltDate(CnstData) {
90
- if (!utils_1.TrUtils.IsNull(CnstData.ClDate)) {
90
+ if (!tr_utils_1.TrUtils.IsNull(CnstData.ClDate)) {
91
91
  return my_date_1.MyDate.GetWeekDateAndTime(CnstData.ClDate);
92
92
  }
93
93
  else {
@@ -118,7 +118,7 @@ class ConsultationFullPrintService {
118
118
  }
119
119
  }
120
120
  static GetPhoneNumber(phone) {
121
- if (!utils_1.TrUtils.IsNull(phone)) {
121
+ if (!tr_utils_1.TrUtils.IsNull(phone)) {
122
122
  return ' | ' + phone;
123
123
  }
124
124
  else {
@@ -126,7 +126,7 @@ class ConsultationFullPrintService {
126
126
  }
127
127
  }
128
128
  static getDoctorName(DocName) {
129
- if (!utils_1.TrUtils.IsNull(DocName)) {
129
+ if (!tr_utils_1.TrUtils.IsNull(DocName)) {
130
130
  return DocName;
131
131
  }
132
132
  else {
@@ -134,7 +134,7 @@ class ConsultationFullPrintService {
134
134
  }
135
135
  }
136
136
  static GetPhone(Phone) {
137
- if (utils_1.TrUtils.IsNull(Phone)) {
137
+ if (tr_utils_1.TrUtils.IsNull(Phone)) {
138
138
  return '';
139
139
  }
140
140
  else {
@@ -142,7 +142,7 @@ class ConsultationFullPrintService {
142
142
  }
143
143
  }
144
144
  static DifferenceInYears(DOB) {
145
- if (utils_1.TrUtils.IsNull(DOB)) {
145
+ if (tr_utils_1.TrUtils.IsNull(DOB)) {
146
146
  return 'DOB Not Specified';
147
147
  }
148
148
  const result = (0, date_fns_1.differenceInYears)(my_date_1.MyDate.GetDateTimeNowInUTC(), new Date(DOB));
@@ -169,10 +169,10 @@ class ConsultationFullPrintService {
169
169
  }
170
170
  static GetHeaderInfo(consultationData) {
171
171
  let TaxInfo = [];
172
- if (!utils_1.TrUtils.IsEmpty(consultationData.Entity.GSTIN)) {
172
+ if (!tr_utils_1.TrUtils.IsEmpty(consultationData.Entity.GSTIN)) {
173
173
  TaxInfo.push({ text: 'GSTIN : ' + consultationData.Entity.GSTIN, marginTop: 2, marginLeft: 5, alignment: 'left', fontSize: 9, width: 'auto' });
174
174
  }
175
- if (!utils_1.TrUtils.IsEmpty(consultationData.Entity.DLNo)) {
175
+ if (!tr_utils_1.TrUtils.IsEmpty(consultationData.Entity.DLNo)) {
176
176
  TaxInfo.push({ text: 'D.L.NO : ' + consultationData.Entity.DLNo, marginTop: 2, marginLeft: 5, alignment: 'left', fontSize: 9, width: '*' });
177
177
  }
178
178
  TaxInfo.push(this.GetBillofSupplyName(consultationData.Settings));
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ConsultationLetterHeadPDFService = void 0;
4
4
  const date_fns_1 = require("date-fns");
5
- const utils_1 = require("../shared/utils");
6
- const my_date_1 = require("../shared/my-date");
5
+ const tr_utils_1 = require("../utils/tr-utils");
6
+ const my_date_1 = require("../utils/my-date");
7
7
  const shared_pdf_service_1 = require("./shared-pdf.service");
8
8
  class ConsultationLetterHeadPDFService {
9
9
  static GetConsultationPrint(CnstData, Remarks, LetterHead) {
@@ -81,7 +81,7 @@ class ConsultationLetterHeadPDFService {
81
81
  return dd;
82
82
  }
83
83
  static GetRxTable(Rx, Remarks) {
84
- if (!utils_1.TrUtils.IsNull(Rx) && Rx.length !== 0) {
84
+ if (!tr_utils_1.TrUtils.IsNull(Rx) && Rx.length !== 0) {
85
85
  return {
86
86
  stack: [
87
87
  { text: 'Rx:', bold: true, fontSize: 12 },
@@ -94,7 +94,7 @@ class ConsultationLetterHeadPDFService {
94
94
  }
95
95
  }
96
96
  static GetDiagnosisTable(diagnosis, heading) {
97
- if (!utils_1.TrUtils.IsNull(diagnosis) && diagnosis.length !== 0) {
97
+ if (!tr_utils_1.TrUtils.IsNull(diagnosis) && diagnosis.length !== 0) {
98
98
  return {
99
99
  stack: [
100
100
  { text: heading, bold: true, marginTop: 5, fontSize: 12 },
@@ -107,7 +107,7 @@ class ConsultationLetterHeadPDFService {
107
107
  }
108
108
  }
109
109
  static GetComplaintsTable(complaints, heading) {
110
- if (!utils_1.TrUtils.IsNull(complaints) && complaints.length !== 0) {
110
+ if (!tr_utils_1.TrUtils.IsNull(complaints) && complaints.length !== 0) {
111
111
  return {
112
112
  stack: [
113
113
  { text: heading, bold: true, marginTop: 5, fontSize: 12 },
@@ -164,7 +164,7 @@ class ConsultationLetterHeadPDFService {
164
164
  }
165
165
  static GetWeight(CnstData) {
166
166
  var _a, _b, _c, _d, _e;
167
- if (!utils_1.TrUtils.IsNull((_a = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _a === void 0 ? void 0 : _a.Weight) && !utils_1.TrUtils.IsNull((_c = (_b = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _b === void 0 ? void 0 : _b.Weight) === null || _c === void 0 ? void 0 : _c.V)) {
167
+ if (!tr_utils_1.TrUtils.IsNull((_a = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _a === void 0 ? void 0 : _a.Weight) && !tr_utils_1.TrUtils.IsNull((_c = (_b = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _b === void 0 ? void 0 : _b.Weight) === null || _c === void 0 ? void 0 : _c.V)) {
168
168
  return { text: 'Weight :' + ((_e = (_d = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _d === void 0 ? void 0 : _d.Weight) === null || _e === void 0 ? void 0 : _e.V) + ' kg', Width: 80 };
169
169
  }
170
170
  else {
@@ -173,7 +173,7 @@ class ConsultationLetterHeadPDFService {
173
173
  }
174
174
  static GetTemperature(CnstData) {
175
175
  var _a, _b, _c, _d, _e;
176
- if (!utils_1.TrUtils.IsNull((_a = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _a === void 0 ? void 0 : _a.Temp) && !utils_1.TrUtils.IsNull((_c = (_b = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _b === void 0 ? void 0 : _b.Temp) === null || _c === void 0 ? void 0 : _c.V)) {
176
+ if (!tr_utils_1.TrUtils.IsNull((_a = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _a === void 0 ? void 0 : _a.Temp) && !tr_utils_1.TrUtils.IsNull((_c = (_b = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _b === void 0 ? void 0 : _b.Temp) === null || _c === void 0 ? void 0 : _c.V)) {
177
177
  return { text: 'Temperature :' + ((_e = (_d = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _d === void 0 ? void 0 : _d.Temp) === null || _e === void 0 ? void 0 : _e.V) + ' F', Width: 80 };
178
178
  }
179
179
  else {
@@ -182,7 +182,7 @@ class ConsultationLetterHeadPDFService {
182
182
  }
183
183
  static GetSPO2(CnstData) {
184
184
  var _a, _b, _c, _d, _e;
185
- if (!utils_1.TrUtils.IsNull((_a = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _a === void 0 ? void 0 : _a.SPO2) && !utils_1.TrUtils.IsNull((_c = (_b = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _b === void 0 ? void 0 : _b.SPO2) === null || _c === void 0 ? void 0 : _c.V)) {
185
+ if (!tr_utils_1.TrUtils.IsNull((_a = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _a === void 0 ? void 0 : _a.SPO2) && !tr_utils_1.TrUtils.IsNull((_c = (_b = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _b === void 0 ? void 0 : _b.SPO2) === null || _c === void 0 ? void 0 : _c.V)) {
186
186
  return { text: 'SPO2 :' + ((_e = (_d = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _d === void 0 ? void 0 : _d.SPO2) === null || _e === void 0 ? void 0 : _e.V) + ' mmHg', Width: 80 };
187
187
  }
188
188
  else {
@@ -191,7 +191,7 @@ class ConsultationLetterHeadPDFService {
191
191
  }
192
192
  static GetPulse(CnstData) {
193
193
  var _a, _b, _c, _d, _e;
194
- if (!utils_1.TrUtils.IsNull((_a = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _a === void 0 ? void 0 : _a.Pulse) && !utils_1.TrUtils.IsNull((_c = (_b = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _b === void 0 ? void 0 : _b.Pulse) === null || _c === void 0 ? void 0 : _c.V)) {
194
+ if (!tr_utils_1.TrUtils.IsNull((_a = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _a === void 0 ? void 0 : _a.Pulse) && !tr_utils_1.TrUtils.IsNull((_c = (_b = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _b === void 0 ? void 0 : _b.Pulse) === null || _c === void 0 ? void 0 : _c.V)) {
195
195
  return { text: 'Pulse :' + ((_e = (_d = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _d === void 0 ? void 0 : _d.Pulse) === null || _e === void 0 ? void 0 : _e.V) + ' bpm', Width: 80 };
196
196
  }
197
197
  else {
@@ -200,7 +200,7 @@ class ConsultationLetterHeadPDFService {
200
200
  }
201
201
  static GetHeight(CnstData) {
202
202
  var _a, _b, _c, _d, _e, _f, _g;
203
- if (!utils_1.TrUtils.IsNull((_a = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _a === void 0 ? void 0 : _a.Height) && !utils_1.TrUtils.IsNull((_c = (_b = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _b === void 0 ? void 0 : _b.Height) === null || _c === void 0 ? void 0 : _c.V)) {
203
+ if (!tr_utils_1.TrUtils.IsNull((_a = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _a === void 0 ? void 0 : _a.Height) && !tr_utils_1.TrUtils.IsNull((_c = (_b = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _b === void 0 ? void 0 : _b.Height) === null || _c === void 0 ? void 0 : _c.V)) {
204
204
  return { text: 'Height :' + ((_e = (_d = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _d === void 0 ? void 0 : _d.Height) === null || _e === void 0 ? void 0 : _e.V) + ' ' + ((_g = (_f = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _f === void 0 ? void 0 : _f.Height) === null || _g === void 0 ? void 0 : _g.U), Width: 80 };
205
205
  }
206
206
  else {
@@ -209,7 +209,7 @@ class ConsultationLetterHeadPDFService {
209
209
  }
210
210
  static GetBP(CnstData) {
211
211
  var _a, _b, _c, _d, _e;
212
- if (!utils_1.TrUtils.IsNull((_a = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _a === void 0 ? void 0 : _a.BP) && !utils_1.TrUtils.IsNull((_c = (_b = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _b === void 0 ? void 0 : _b.Height) === null || _c === void 0 ? void 0 : _c.U)) {
212
+ if (!tr_utils_1.TrUtils.IsNull((_a = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _a === void 0 ? void 0 : _a.BP) && !tr_utils_1.TrUtils.IsNull((_c = (_b = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _b === void 0 ? void 0 : _b.Height) === null || _c === void 0 ? void 0 : _c.U)) {
213
213
  return { text: 'BP :' + ((_e = (_d = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _d === void 0 ? void 0 : _d.BP) === null || _e === void 0 ? void 0 : _e.V) + ' mmHg', Width: 80 };
214
214
  }
215
215
  else {
@@ -237,7 +237,7 @@ class ConsultationLetterHeadPDFService {
237
237
  ];
238
238
  }
239
239
  static GetCnsltDate(CnstData) {
240
- if (!utils_1.TrUtils.IsNull(CnstData.ClDate)) {
240
+ if (!tr_utils_1.TrUtils.IsNull(CnstData.ClDate)) {
241
241
  return my_date_1.MyDate.GetWeekDateAndTime(CnstData.ClDate);
242
242
  }
243
243
  else {
@@ -273,7 +273,7 @@ class ConsultationLetterHeadPDFService {
273
273
  }
274
274
  }
275
275
  static GetPhoneNumber(phone) {
276
- if (!utils_1.TrUtils.IsNull(phone)) {
276
+ if (!tr_utils_1.TrUtils.IsNull(phone)) {
277
277
  return ' | ' + phone;
278
278
  }
279
279
  else {
@@ -281,7 +281,7 @@ class ConsultationLetterHeadPDFService {
281
281
  }
282
282
  }
283
283
  static DifferenceInYears(DOB) {
284
- if (utils_1.TrUtils.IsNull(DOB)) {
284
+ if (tr_utils_1.TrUtils.IsNull(DOB)) {
285
285
  return 'DOB Not Specified';
286
286
  }
287
287
  let Datei = my_date_1.MyDate.GetDateTimeNowInUTC();
@@ -347,7 +347,7 @@ class ConsultationLetterHeadPDFService {
347
347
  };
348
348
  }
349
349
  static GetItemsTable(Items, Remarks) {
350
- if (!utils_1.TrUtils.IsNull(Items)) {
350
+ if (!tr_utils_1.TrUtils.IsNull(Items)) {
351
351
  return {
352
352
  style: 'tableExample',
353
353
  marginTop: 3,
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ConsultationPDFService = void 0;
4
4
  const shared_pdf_service_1 = require("./shared-pdf.service");
5
5
  const date_fns_1 = require("date-fns");
6
- const utils_1 = require("../shared/utils");
7
- const my_date_1 = require("../shared/my-date");
6
+ const tr_utils_1 = require("../utils/tr-utils");
7
+ const my_date_1 = require("../utils/my-date");
8
8
  class ConsultationPDFService {
9
9
  static GetConsultationPrint(CnstData, Remarks) {
10
10
  let dd = {
@@ -87,7 +87,7 @@ class ConsultationPDFService {
87
87
  return dd;
88
88
  }
89
89
  static GetRxTable(Rx, Remarks) {
90
- if (!utils_1.TrUtils.IsNull(Rx) && Rx.length !== 0) {
90
+ if (!tr_utils_1.TrUtils.IsNull(Rx) && Rx.length !== 0) {
91
91
  return {
92
92
  stack: [
93
93
  { text: 'Rx:', bold: true, fontSize: 12 },
@@ -100,7 +100,7 @@ class ConsultationPDFService {
100
100
  }
101
101
  }
102
102
  static GetDiagnosisTable(diagnosis, heading) {
103
- if (!utils_1.TrUtils.IsNull(diagnosis) && diagnosis.length !== 0) {
103
+ if (!tr_utils_1.TrUtils.IsNull(diagnosis) && diagnosis.length !== 0) {
104
104
  return {
105
105
  stack: [
106
106
  { text: heading, bold: true, marginTop: 5, fontSize: 12 },
@@ -113,7 +113,7 @@ class ConsultationPDFService {
113
113
  }
114
114
  }
115
115
  static GetComplaintsTable(complaints, heading) {
116
- if (!utils_1.TrUtils.IsNull(complaints) && complaints.length !== 0) {
116
+ if (!tr_utils_1.TrUtils.IsNull(complaints) && complaints.length !== 0) {
117
117
  return {
118
118
  stack: [
119
119
  { text: heading, bold: true, marginTop: 5, fontSize: 12 },
@@ -148,7 +148,7 @@ class ConsultationPDFService {
148
148
  }
149
149
  static GetWeight(CnstData) {
150
150
  var _a, _b, _c, _d, _e;
151
- if (!utils_1.TrUtils.IsNull((_a = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _a === void 0 ? void 0 : _a.Weight) && !utils_1.TrUtils.IsNull((_c = (_b = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _b === void 0 ? void 0 : _b.Weight) === null || _c === void 0 ? void 0 : _c.V)) {
151
+ if (!tr_utils_1.TrUtils.IsNull((_a = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _a === void 0 ? void 0 : _a.Weight) && !tr_utils_1.TrUtils.IsNull((_c = (_b = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _b === void 0 ? void 0 : _b.Weight) === null || _c === void 0 ? void 0 : _c.V)) {
152
152
  return { text: 'Weight :' + ((_e = (_d = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _d === void 0 ? void 0 : _d.Weight) === null || _e === void 0 ? void 0 : _e.V) + ' kg', Width: 80 };
153
153
  }
154
154
  else {
@@ -157,7 +157,7 @@ class ConsultationPDFService {
157
157
  }
158
158
  static GetTemperature(CnstData) {
159
159
  var _a, _b, _c, _d, _e;
160
- if (!utils_1.TrUtils.IsNull((_a = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _a === void 0 ? void 0 : _a.Temp) && !utils_1.TrUtils.IsNull((_c = (_b = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _b === void 0 ? void 0 : _b.Temp) === null || _c === void 0 ? void 0 : _c.V)) {
160
+ if (!tr_utils_1.TrUtils.IsNull((_a = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _a === void 0 ? void 0 : _a.Temp) && !tr_utils_1.TrUtils.IsNull((_c = (_b = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _b === void 0 ? void 0 : _b.Temp) === null || _c === void 0 ? void 0 : _c.V)) {
161
161
  return { text: 'Temperature :' + ((_e = (_d = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _d === void 0 ? void 0 : _d.Temp) === null || _e === void 0 ? void 0 : _e.V) + ' F', Width: 80 };
162
162
  }
163
163
  else {
@@ -166,7 +166,7 @@ class ConsultationPDFService {
166
166
  }
167
167
  static GetSPO2(CnstData) {
168
168
  var _a, _b, _c, _d, _e;
169
- if (!utils_1.TrUtils.IsNull((_a = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _a === void 0 ? void 0 : _a.SPO2) && !utils_1.TrUtils.IsNull((_c = (_b = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _b === void 0 ? void 0 : _b.SPO2) === null || _c === void 0 ? void 0 : _c.V)) {
169
+ if (!tr_utils_1.TrUtils.IsNull((_a = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _a === void 0 ? void 0 : _a.SPO2) && !tr_utils_1.TrUtils.IsNull((_c = (_b = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _b === void 0 ? void 0 : _b.SPO2) === null || _c === void 0 ? void 0 : _c.V)) {
170
170
  return { text: 'SPO2 :' + ((_e = (_d = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _d === void 0 ? void 0 : _d.SPO2) === null || _e === void 0 ? void 0 : _e.V) + ' mmHg', Width: 80 };
171
171
  }
172
172
  else {
@@ -175,7 +175,7 @@ class ConsultationPDFService {
175
175
  }
176
176
  static GetPulse(CnstData) {
177
177
  var _a, _b, _c, _d, _e;
178
- if (!utils_1.TrUtils.IsNull((_a = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _a === void 0 ? void 0 : _a.Pulse) && !utils_1.TrUtils.IsNull((_c = (_b = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _b === void 0 ? void 0 : _b.Pulse) === null || _c === void 0 ? void 0 : _c.V)) {
178
+ if (!tr_utils_1.TrUtils.IsNull((_a = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _a === void 0 ? void 0 : _a.Pulse) && !tr_utils_1.TrUtils.IsNull((_c = (_b = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _b === void 0 ? void 0 : _b.Pulse) === null || _c === void 0 ? void 0 : _c.V)) {
179
179
  return { text: 'Pulse :' + ((_e = (_d = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _d === void 0 ? void 0 : _d.Pulse) === null || _e === void 0 ? void 0 : _e.V) + ' bpm', Width: 80 };
180
180
  }
181
181
  else {
@@ -184,7 +184,7 @@ class ConsultationPDFService {
184
184
  }
185
185
  static GetHeight(CnstData) {
186
186
  var _a, _b, _c, _d, _e, _f, _g;
187
- if (!utils_1.TrUtils.IsNull((_a = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _a === void 0 ? void 0 : _a.Height) && !utils_1.TrUtils.IsNull((_c = (_b = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _b === void 0 ? void 0 : _b.Height) === null || _c === void 0 ? void 0 : _c.V)) {
187
+ if (!tr_utils_1.TrUtils.IsNull((_a = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _a === void 0 ? void 0 : _a.Height) && !tr_utils_1.TrUtils.IsNull((_c = (_b = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _b === void 0 ? void 0 : _b.Height) === null || _c === void 0 ? void 0 : _c.V)) {
188
188
  return { text: 'Height :' + ((_e = (_d = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _d === void 0 ? void 0 : _d.Height) === null || _e === void 0 ? void 0 : _e.V) + ' ' + ((_g = (_f = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _f === void 0 ? void 0 : _f.Height) === null || _g === void 0 ? void 0 : _g.U), Width: 80 };
189
189
  }
190
190
  else {
@@ -193,7 +193,7 @@ class ConsultationPDFService {
193
193
  }
194
194
  static GetBP(CnstData) {
195
195
  var _a, _b, _c, _d, _e;
196
- if (!utils_1.TrUtils.IsNull((_a = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _a === void 0 ? void 0 : _a.BP) && !utils_1.TrUtils.IsNull((_c = (_b = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _b === void 0 ? void 0 : _b.Height) === null || _c === void 0 ? void 0 : _c.U)) {
196
+ if (!tr_utils_1.TrUtils.IsNull((_a = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _a === void 0 ? void 0 : _a.BP) && !tr_utils_1.TrUtils.IsNull((_c = (_b = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _b === void 0 ? void 0 : _b.Height) === null || _c === void 0 ? void 0 : _c.U)) {
197
197
  return { text: 'BP :' + ((_e = (_d = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Vitals) === null || _d === void 0 ? void 0 : _d.BP) === null || _e === void 0 ? void 0 : _e.V) + ' mmHg', Width: 80 };
198
198
  }
199
199
  else {
@@ -221,7 +221,7 @@ class ConsultationPDFService {
221
221
  ];
222
222
  }
223
223
  static GetCnsltDate(CnstData) {
224
- if (!utils_1.TrUtils.IsNull(CnstData.ClDate)) {
224
+ if (!tr_utils_1.TrUtils.IsNull(CnstData.ClDate)) {
225
225
  return my_date_1.MyDate.GetWeekDateAndTime(CnstData.ClDate);
226
226
  }
227
227
  else {
@@ -257,7 +257,7 @@ class ConsultationPDFService {
257
257
  }
258
258
  }
259
259
  static GetPhoneNumber(phone) {
260
- if (!utils_1.TrUtils.IsNull(phone)) {
260
+ if (!tr_utils_1.TrUtils.IsNull(phone)) {
261
261
  return ' | ' + phone;
262
262
  }
263
263
  else {
@@ -265,7 +265,7 @@ class ConsultationPDFService {
265
265
  }
266
266
  }
267
267
  static DifferenceInYears(DOB) {
268
- if (utils_1.TrUtils.IsNull(DOB)) {
268
+ if (tr_utils_1.TrUtils.IsNull(DOB)) {
269
269
  return 'DOB Not Specified';
270
270
  }
271
271
  let Datei = my_date_1.MyDate.GetDateTimeNowInUTC();
@@ -331,7 +331,7 @@ class ConsultationPDFService {
331
331
  };
332
332
  }
333
333
  static GetItemsTable(Items, Remarks) {
334
- if (!utils_1.TrUtils.IsNull(Items)) {
334
+ if (!tr_utils_1.TrUtils.IsNull(Items)) {
335
335
  return {
336
336
  style: 'tableExample',
337
337
  marginTop: 3,