shareneus 1.4.49 → 1.4.51

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 (151) hide show
  1. package/dist/accounting/counter-sales/auto-sales-receipt-pdf.service.js +1 -1
  2. package/dist/accounting/counter-sales/sales-receipt-pdf.service.js +1 -1
  3. package/dist/accounting/counter-sales/sales-receipt-print.service.js +1 -1
  4. package/dist/accounting/credit-note/credit-note-pdf.service.js +1 -1
  5. package/dist/accounting/debit-note/debit-note-print.service.js +1 -1
  6. package/dist/accounting/invoice/inv-pdf.service.js +13 -12
  7. package/dist/accounting/invoice/inv-print.service.js +6 -6
  8. package/dist/accounting/invoice/invoice-landscape-pdf.service.d.ts +1 -1
  9. package/dist/accounting/invoice/invoice-landscape-pdf.service.js +7 -6
  10. package/dist/accounting/invoice/invoice-letterhead-pdf.service.js +13 -12
  11. package/dist/accounting/invoice/invoice-portrait-pdf.d.ts +5 -5
  12. package/dist/accounting/invoice/invoice-portrait-pdf.js +31 -30
  13. package/dist/accounting/invoice/invoice-total.service.js +1 -1
  14. package/dist/accounting/invoice/reports/excel/analysis-excel.service.d.ts +3 -3
  15. package/dist/accounting/invoice/reports/excel/analysis-excel.service.js +8 -7
  16. package/dist/accounting/invoice/reports/excel/category-wise-item-excel.service.d.ts +4 -4
  17. package/dist/accounting/invoice/reports/excel/category-wise-item-excel.service.js +14 -14
  18. package/dist/accounting/invoice/reports/excel/cust-wise-sales-details.d.ts +4 -4
  19. package/dist/accounting/invoice/reports/excel/cust-wise-sales-details.js +8 -8
  20. package/dist/accounting/invoice/reports/excel/cust-wise-sales-summary-excel.service.d.ts +4 -4
  21. package/dist/accounting/invoice/reports/excel/cust-wise-sales-summary-excel.service.js +8 -8
  22. package/dist/accounting/invoice/reports/excel/invoice-wise-excel.service.d.ts +4 -4
  23. package/dist/accounting/invoice/reports/excel/invoice-wise-excel.service.js +8 -8
  24. package/dist/accounting/invoice/reports/excel/item-wise-doctor-sale-excel.service.d.ts +4 -4
  25. package/dist/accounting/invoice/reports/excel/item-wise-doctor-sale-excel.service.js +10 -10
  26. package/dist/accounting/invoice/reports/excel/items-wise-sales-excel.service.d.ts +4 -4
  27. package/dist/accounting/invoice/reports/excel/items-wise-sales-excel.service.js +14 -13
  28. package/dist/accounting/invoice/reports/excel/manf-wise-sales-excel.service.d.ts +4 -4
  29. package/dist/accounting/invoice/reports/excel/manf-wise-sales-excel.service.js +8 -8
  30. package/dist/accounting/invoice/reports/excel/operator-wise-details.d.ts +4 -4
  31. package/dist/accounting/invoice/reports/excel/operator-wise-details.js +8 -8
  32. package/dist/accounting/invoice/reports/excel/operator-wise-summary.d.ts +4 -4
  33. package/dist/accounting/invoice/reports/excel/operator-wise-summary.js +8 -8
  34. package/dist/accounting/invoice/reports/excel/sa-wise-labor-sales-excel.service.d.ts +4 -4
  35. package/dist/accounting/invoice/reports/excel/sa-wise-labor-sales-excel.service.js +12 -11
  36. package/dist/accounting/invoice/reports/excel/sa-wise-part-sales-excel.service.d.ts +4 -4
  37. package/dist/accounting/invoice/reports/excel/sa-wise-part-sales-excel.service.js +12 -11
  38. package/dist/accounting/invoice/reports/excel/sale-summary-excel.service.d.ts +4 -4
  39. package/dist/accounting/invoice/reports/excel/sale-summary-excel.service.js +11 -10
  40. package/dist/accounting/invoice/reports/excel/sales-by-service-summary-excel.service.d.ts +4 -4
  41. package/dist/accounting/invoice/reports/excel/sales-by-service-summary-excel.service.js +19 -18
  42. package/dist/accounting/invoice/reports/excel/scheduled-drug-summary-excel.service.d.ts +4 -4
  43. package/dist/accounting/invoice/reports/excel/scheduled-drug-summary-excel.service.js +11 -11
  44. package/dist/accounting/invoice/reports/excel/scheduled-drugs-excel.service.d.ts +4 -4
  45. package/dist/accounting/invoice/reports/excel/scheduled-drugs-excel.service.js +11 -11
  46. package/dist/accounting/invoice/reports/pdf/analysis-pdf.service.d.ts +3 -3
  47. package/dist/accounting/invoice/reports/pdf/analysis-pdf.service.js +13 -12
  48. package/dist/accounting/invoice/reports/pdf/category-wise-item-pdf.service.d.ts +4 -4
  49. package/dist/accounting/invoice/reports/pdf/category-wise-item-pdf.service.js +14 -13
  50. package/dist/accounting/invoice/reports/pdf/cust-wise-sales-details-pdf.service.d.ts +4 -4
  51. package/dist/accounting/invoice/reports/pdf/cust-wise-sales-details-pdf.service.js +15 -14
  52. package/dist/accounting/invoice/reports/pdf/cust-wise-sales-summary-pdf.service.d.ts +4 -4
  53. package/dist/accounting/invoice/reports/pdf/cust-wise-sales-summary-pdf.service.js +15 -14
  54. package/dist/accounting/invoice/reports/pdf/item-wise-doctor-sale-pdf.service.d.ts +4 -4
  55. package/dist/accounting/invoice/reports/pdf/item-wise-doctor-sale-pdf.service.js +10 -10
  56. package/dist/accounting/invoice/reports/pdf/item-wise-sales-pdf.service.d.ts +4 -4
  57. package/dist/accounting/invoice/reports/pdf/item-wise-sales-pdf.service.js +15 -14
  58. package/dist/accounting/invoice/reports/pdf/manf-wise-sales-pdf.service.d.ts +4 -4
  59. package/dist/accounting/invoice/reports/pdf/manf-wise-sales-pdf.service.js +13 -12
  60. package/dist/accounting/invoice/reports/pdf/operator-wise-details-pdf.service.d.ts +4 -4
  61. package/dist/accounting/invoice/reports/pdf/operator-wise-details-pdf.service.js +14 -14
  62. package/dist/accounting/invoice/reports/pdf/operator-wise-summary-pdf.d.ts +4 -4
  63. package/dist/accounting/invoice/reports/pdf/operator-wise-summary-pdf.js +14 -14
  64. package/dist/accounting/invoice/reports/pdf/sales-by-service-pdf.service.d.ts +4 -4
  65. package/dist/accounting/invoice/reports/pdf/sales-by-service-pdf.service.js +14 -13
  66. package/dist/accounting/invoice/reports/pdf/scheduled-drug-pdf.service.d.ts +4 -4
  67. package/dist/accounting/invoice/reports/pdf/scheduled-drug-pdf.service.js +8 -8
  68. package/dist/accounting/invoice/reports/pdf/scheduled-drug-summary-pdf.service.d.ts +4 -4
  69. package/dist/accounting/invoice/reports/pdf/scheduled-drug-summary-pdf.service.js +12 -11
  70. package/dist/accounting/invoice/shared-inv-pdf.service.js +1 -1
  71. package/dist/accounting/payment-receive/reports/excel/cust-balance-excel.service.d.ts +4 -4
  72. package/dist/accounting/payment-receive/reports/excel/cust-balance-excel.service.js +9 -9
  73. package/dist/accounting/payment-receive/reports/excel/payment-receive-excel.service.d.ts +5 -5
  74. package/dist/accounting/payment-receive/reports/excel/payment-receive-excel.service.js +11 -11
  75. package/dist/accounting/payment-receive/reports/pdf/customer-balances-pdf.service.d.ts +3 -3
  76. package/dist/accounting/payment-receive/reports/pdf/customer-balances-pdf.service.js +10 -10
  77. package/dist/accounting/payment-receive/reports/pdf/payment-report-pdf.service.d.ts +3 -3
  78. package/dist/accounting/payment-receive/reports/pdf/payment-report-pdf.service.js +7 -7
  79. package/dist/appointments/consultations/consultation-fee-receipt.service.d.ts +1 -1
  80. package/dist/appointments/consultations/consultation-fee-receipt.service.js +4 -4
  81. package/dist/gst/excel/GSTR-RO-excel.service.d.ts +4 -4
  82. package/dist/gst/excel/GSTR-RO-excel.service.js +8 -8
  83. package/dist/gst/excel/GSTR1-excel.service.d.ts +4 -4
  84. package/dist/gst/excel/GSTR1-excel.service.js +10 -10
  85. package/dist/gst/excel/GSTR2-excel.service.d.ts +4 -4
  86. package/dist/gst/excel/GSTR2-excel.service.js +9 -9
  87. package/dist/gst/excel/tally-sales-import.service.d.ts +4 -4
  88. package/dist/gst/excel/tally-sales-import.service.js +8 -8
  89. package/dist/inventory/items/issue-parts-pdf.service.d.ts +6 -6
  90. package/dist/inventory/items/issue-parts-pdf.service.js +33 -33
  91. package/dist/inventory/items/reports/excel/expiring-drugs-excel.service.d.ts +4 -4
  92. package/dist/inventory/items/reports/excel/expiring-drugs-excel.service.js +11 -10
  93. package/dist/inventory/items/reports/excel/item-wise-mout-details.d.ts +4 -4
  94. package/dist/inventory/items/reports/excel/item-wise-mout-details.js +8 -8
  95. package/dist/inventory/items/reports/excel/item-wise-mout-summary.d.ts +4 -4
  96. package/dist/inventory/items/reports/excel/item-wise-mout-summary.js +8 -8
  97. package/dist/inventory/items/reports/excel/spares-issue-excel.service.d.ts +4 -4
  98. package/dist/inventory/items/reports/excel/spares-issue-excel.service.js +12 -12
  99. package/dist/inventory/items/reports/excel/stock-excel.service.d.ts +4 -4
  100. package/dist/inventory/items/reports/excel/stock-excel.service.js +8 -8
  101. package/dist/inventory/items/reports/pdf/expiring-drugs-pdf.service.d.ts +2 -2
  102. package/dist/inventory/items/reports/pdf/expiring-drugs-pdf.service.js +8 -7
  103. package/dist/inventory/items/reports/pdf/item-wise-mout-details-pdf.d.ts +4 -4
  104. package/dist/inventory/items/reports/pdf/item-wise-mout-details-pdf.js +9 -9
  105. package/dist/inventory/items/reports/pdf/item-wise-mout-summary-pdf.d.ts +4 -4
  106. package/dist/inventory/items/reports/pdf/item-wise-mout-summary-pdf.js +9 -9
  107. package/dist/purchases/payment-made/reports/excel/payments-made-excel.service.d.ts +4 -4
  108. package/dist/purchases/payment-made/reports/excel/payments-made-excel.service.js +9 -9
  109. package/dist/purchases/payment-made/reports/excel/ven-balance-excel.service.d.ts +6 -6
  110. package/dist/purchases/payment-made/reports/excel/ven-balance-excel.service.js +14 -14
  111. package/dist/purchases/payment-made/reports/pdf/vendor-balances-pdf.service.d.ts +3 -3
  112. package/dist/purchases/payment-made/reports/pdf/vendor-balances-pdf.service.js +8 -8
  113. package/dist/purchases/purchase-order/purchase-order-pdf.service.js +5 -5
  114. package/dist/purchases/purchase-order/purchase-order-print.service.d.ts +2 -2
  115. package/dist/purchases/purchase-order/purchase-order-print.service.js +25 -25
  116. package/dist/purchases/vendor-credit-note/vendor-credit-note-pdf.service.js +1 -1
  117. package/dist/purchases/vendor-credit-note/vendor-credit-note-print.service.d.ts +1 -1
  118. package/dist/purchases/vendor-credit-note/vendor-credit-note-print.service.js +20 -20
  119. package/dist/purchases/vendor-credit-note/vendor-credit-note-totals.service.d.ts +8 -8
  120. package/dist/purchases/vendor-credit-note/vendor-credit-note-totals.service.js +31 -32
  121. package/dist/purchases/vendor-debit-note/vendor-debit-note-pdf.service.js +1 -1
  122. package/dist/purchases/vendor-debit-note/vendor-debit-note-totals.service.d.ts +6 -6
  123. package/dist/purchases/vendor-debit-note/vendor-debit-note-totals.service.js +19 -19
  124. package/dist/sales/delivery-challan/dc-landscape-pdf.service.d.ts +1 -1
  125. package/dist/sales/delivery-challan/dc-landscape-pdf.service.js +7 -6
  126. package/dist/sales/delivery-challan/delivery-challan-print.service.js +2 -2
  127. package/dist/sales/delivery-challan/delivery-challan-totals.d.ts +6 -6
  128. package/dist/sales/delivery-challan/delivery-challan-totals.js +20 -20
  129. package/dist/sales/sales/sales-pdf.service.js +1 -1
  130. package/dist/sales/sales/sales-print.service.js +7 -7
  131. package/dist/sales/sales/sales-totals.service.d.ts +6 -6
  132. package/dist/sales/sales/sales-totals.service.js +19 -19
  133. package/dist/services/est.print-service.js +1 -1
  134. package/dist/services/reports/excel/insurance-expire-excel.service.d.ts +4 -4
  135. package/dist/services/reports/excel/insurance-expire-excel.service.js +8 -8
  136. package/dist/services/reports/excel/next-service-date-excel.service.d.ts +4 -4
  137. package/dist/services/reports/excel/next-service-date-excel.service.js +8 -8
  138. package/dist/services/reports/excel/repair-orders-excel.service.d.ts +5 -5
  139. package/dist/services/reports/excel/repair-orders-excel.service.js +11 -11
  140. package/dist/services/reports/pdf/repair-orders-pdf.service.d.ts +4 -4
  141. package/dist/services/reports/pdf/repair-orders-pdf.service.js +9 -9
  142. package/dist/services/ro-pdf.service.js +2 -2
  143. package/dist/services/ro-print-service.js +1 -1
  144. package/dist/services/ro-totals.service.d.ts +11 -11
  145. package/dist/services/ro-totals.service.js +50 -50
  146. package/dist/services/separate-wo-print.service.js +1 -1
  147. package/dist/shared/shared-pdf.service.d.ts +3 -3
  148. package/dist/shared/shared-pdf.service.js +31 -30
  149. package/dist/utils/tr-utils.d.ts +1 -1
  150. package/dist/utils/tr-utils.js +3 -2
  151. package/package.json +1 -1
@@ -13,11 +13,11 @@ export declare class OperatorWiseSummaryXlsxFileService {
13
13
  };
14
14
  };
15
15
  static ws: any;
16
- static GetOperatorWiseSummaryExcelData(MainData: any, searchValue: any, HeaderName: any): any;
16
+ static GetOperatorWiseSummaryExcelData(MainData: any, searchValue: any, HeaderName: any, EntitySettings: any): any;
17
17
  static setHeadingInCell(HeaderName: any, searchValue: any): void;
18
- static setInvoiceDetailsInCell(MainData: any): void;
19
- static SetInvoiceDataInExcel(InvoiceInfo: any): void;
20
- static ConvertToString(Text: any, IsString: any): any;
18
+ static setInvoiceDetailsInCell(MainData: any, DecimalsNumber: number): void;
19
+ static SetInvoiceDataInExcel(InvoiceInfo: any, DecimalsNumber: number): void;
20
+ static ConvertToString(Text: any, IsString: any, DecimalsNumber: number): any;
21
21
  static SetDataInCell(Data: any, ColRange: number, RowNum: any): void;
22
22
  static getcelltype(cell: any): any;
23
23
  }
@@ -28,7 +28,7 @@ const XLSX = __importStar(require("xlsx"));
28
28
  const my_date_1 = require("../../../../utils/my-date");
29
29
  const tr_utils_1 = require("../../../../utils/tr-utils");
30
30
  class OperatorWiseSummaryXlsxFileService {
31
- static GetOperatorWiseSummaryExcelData(MainData, searchValue, HeaderName) {
31
+ static GetOperatorWiseSummaryExcelData(MainData, searchValue, HeaderName, EntitySettings) {
32
32
  this.wb = {};
33
33
  this.ws = {};
34
34
  this.Row = 0;
@@ -66,7 +66,7 @@ class OperatorWiseSummaryXlsxFileService {
66
66
  // console.log(`${key}: ${searchValue[key]}`);
67
67
  }
68
68
  this.setHeadingInCell(HeaderName, showSearch);
69
- this.setInvoiceDetailsInCell(MainData);
69
+ this.setInvoiceDetailsInCell(MainData, EntitySettings.DecimalsNumber);
70
70
  this.ws['!ref'] = XLSX.utils.encode_range(this.range);
71
71
  this.ws['!merges'] = this.MergeArray;
72
72
  this.ws["!cols"] = [{ wch: 50 }, { wch: 10 }, { wch: 10 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 20 }];
@@ -187,12 +187,12 @@ class OperatorWiseSummaryXlsxFileService {
187
187
  });
188
188
  this.Row += 2;
189
189
  }
190
- static setInvoiceDetailsInCell(MainData) {
190
+ static setInvoiceDetailsInCell(MainData, DecimalsNumber) {
191
191
  MainData.forEach((InvoiceList) => {
192
- this.SetInvoiceDataInExcel(InvoiceList);
192
+ this.SetInvoiceDataInExcel(InvoiceList, DecimalsNumber);
193
193
  });
194
194
  }
195
- static SetInvoiceDataInExcel(InvoiceInfo) {
195
+ static SetInvoiceDataInExcel(InvoiceInfo, DecimalsNumber) {
196
196
  // InvoiceInfo.Date = TrUtils.ConvertDateToReadableFormat(InvoiceInfo.CrDate);
197
197
  let InvoiceData = [
198
198
  // { text: InvoiceInfo.Code, ColRange: 1, IsString: true },
@@ -208,7 +208,7 @@ class OperatorWiseSummaryXlsxFileService {
208
208
  ];
209
209
  let ColStart = 0;
210
210
  InvoiceData.forEach((InvData) => {
211
- InvData.text = this.ConvertToString(InvData.text, InvData.IsString);
211
+ InvData.text = this.ConvertToString(InvData.text, InvData.IsString, DecimalsNumber);
212
212
  this.SetDataInCell(InvData.text, ColStart, this.Row);
213
213
  this.MergeArray.push({
214
214
  s: { r: this.Row, c: ColStart },
@@ -218,7 +218,7 @@ class OperatorWiseSummaryXlsxFileService {
218
218
  });
219
219
  this.Row += 1;
220
220
  }
221
- static ConvertToString(Text, IsString) {
221
+ static ConvertToString(Text, IsString, DecimalsNumber) {
222
222
  if (IsString) {
223
223
  if (Text == null) {
224
224
  Text = '';
@@ -230,7 +230,7 @@ class OperatorWiseSummaryXlsxFileService {
230
230
  }
231
231
  }
232
232
  if (typeof Text === 'number') {
233
- return Number(tr_utils_1.TrUtils.FixedTo(Text));
233
+ return Number(tr_utils_1.TrUtils.FixedTo(Text, DecimalsNumber));
234
234
  }
235
235
  else {
236
236
  return Text;
@@ -13,11 +13,11 @@ export declare class ServiceAdvisorWiseLaborXlsxFileService {
13
13
  };
14
14
  };
15
15
  static ws: any;
16
- static GetServiceAdvisorLaborsExcelData(MainData: any): any;
16
+ static GetServiceAdvisorLaborsExcelData(MainData: any, EntitySettings: any): any;
17
17
  static setHeadingInCell(): void;
18
- static setWorkOrderDetailsInCell(MainData: any): void;
19
- static SetWorkOrderDataInExcel(WorkOrder: any, index: any): void;
20
- static ConvertToString(Text: any, IsString: any): any;
18
+ static setWorkOrderDetailsInCell(MainData: any, DecimalsNumber: number): void;
19
+ static SetWorkOrderDataInExcel(WorkOrder: any, index: any, DecimalsNumber: number): void;
20
+ static ConvertToString(Text: any, IsString: any, DecimalsNumber: number): any;
21
21
  static SetDataInCell(Data: any, ColRange: number, RowNum: any): void;
22
22
  static getcelltype(cell: any): any;
23
23
  }
@@ -27,8 +27,9 @@ exports.ServiceAdvisorWiseLaborXlsxFileService = void 0;
27
27
  const XLSX = __importStar(require("xlsx"));
28
28
  const my_date_1 = require("../../../../utils/my-date");
29
29
  const tr_utils_1 = require("../../../../utils/tr-utils");
30
+ const aggregation_1 = require("../../../../aggregation/aggregation");
30
31
  class ServiceAdvisorWiseLaborXlsxFileService {
31
- static GetServiceAdvisorLaborsExcelData(MainData) {
32
+ static GetServiceAdvisorLaborsExcelData(MainData, EntitySettings) {
32
33
  this.wb = {};
33
34
  this.ws = {};
34
35
  this.Row = 0;
@@ -41,7 +42,7 @@ class ServiceAdvisorWiseLaborXlsxFileService {
41
42
  this.wb.SheetNames = [];
42
43
  // MainData = this.GetTotals(MainData);
43
44
  this.setHeadingInCell();
44
- this.setWorkOrderDetailsInCell(MainData);
45
+ this.setWorkOrderDetailsInCell(MainData, EntitySettings.DecimalsNumber);
45
46
  this.ws['!ref'] = XLSX.utils.encode_range(this.range);
46
47
  this.ws['!merges'] = this.MergeArray;
47
48
  this.ws["!cols"] = [{ wch: 15 }, { wch: 15 }, { wch: 30 }, { wch: 40 }, { wch: 15 }, { wch: 15 }, { wch: 40 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }];
@@ -139,17 +140,17 @@ class ServiceAdvisorWiseLaborXlsxFileService {
139
140
  });
140
141
  this.Row += 2;
141
142
  }
142
- static setWorkOrderDetailsInCell(MainData) {
143
+ static setWorkOrderDetailsInCell(MainData, DecimalsNumber) {
143
144
  MainData.forEach((InvoiceList, index) => {
144
- this.SetWorkOrderDataInExcel(InvoiceList, index);
145
+ this.SetWorkOrderDataInExcel(InvoiceList, index, DecimalsNumber);
145
146
  });
146
147
  }
147
- static SetWorkOrderDataInExcel(WorkOrder, index) {
148
+ static SetWorkOrderDataInExcel(WorkOrder, index, DecimalsNumber) {
148
149
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
149
150
  WorkOrder.CrDate = my_date_1.MyDate.ConvertUTCDateToReadable(WorkOrder.CrDate);
150
- WorkOrder.Discount = tr_utils_1.TrUtils.FixPriceValue(tr_utils_1.TrUtils.SetValueToZeroIfNull((_a = WorkOrder.Ops) === null || _a === void 0 ? void 0 : _a.Disc) + tr_utils_1.TrUtils.SetValueToZeroIfNull((_b = WorkOrder.Ops) === null || _b === void 0 ? void 0 : _b.RecDisc));
151
- WorkOrder.Tax = tr_utils_1.TrUtils.FixPriceValue(((_c = WorkOrder.Ops) === null || _c === void 0 ? void 0 : _c.CGST) + ((_d = WorkOrder.Ops) === null || _d === void 0 ? void 0 : _d.SGST) + ((_e = WorkOrder.Ops) === null || _e === void 0 ? void 0 : _e.IGST));
152
- WorkOrder.Total = tr_utils_1.TrUtils.FixPriceValue(((_f = WorkOrder.Ops) === null || _f === void 0 ? void 0 : _f.NetAmt) + Number(WorkOrder.Tax));
151
+ WorkOrder.Discount = tr_utils_1.TrUtils.FixPriceValue((0, aggregation_1.addition)(tr_utils_1.TrUtils.SetValueToZeroIfNull((_a = WorkOrder.Ops) === null || _a === void 0 ? void 0 : _a.Disc), tr_utils_1.TrUtils.SetValueToZeroIfNull((_b = WorkOrder.Ops) === null || _b === void 0 ? void 0 : _b.RecDisc)), DecimalsNumber);
152
+ WorkOrder.Tax = tr_utils_1.TrUtils.FixPriceValue((0, aggregation_1.addition)((_c = WorkOrder.Ops) === null || _c === void 0 ? void 0 : _c.CGST, (_d = WorkOrder.Ops) === null || _d === void 0 ? void 0 : _d.SGST, (_e = WorkOrder.Ops) === null || _e === void 0 ? void 0 : _e.IGST), DecimalsNumber);
153
+ WorkOrder.Total = tr_utils_1.TrUtils.FixPriceValue((0, aggregation_1.addition)((_f = WorkOrder.Ops) === null || _f === void 0 ? void 0 : _f.NetAmt, Number(WorkOrder.Tax)), DecimalsNumber);
153
154
  // if(!TrUtils.IsNull(WorkOrder.Prod) && !TrUtils.IsNull(WorkOrder.Prod.DDate)){
154
155
  // WorkOrder.Prod.DDate= TrUtils.ConvertDateToReadableFormat(WorkOrder.Prod.DDate);
155
156
  // }else{
@@ -174,7 +175,7 @@ class ServiceAdvisorWiseLaborXlsxFileService {
174
175
  ];
175
176
  let ColStart = 0;
176
177
  InvoiceData.forEach((InvData) => {
177
- InvData.text = this.ConvertToString(InvData.text, InvData.IsString);
178
+ InvData.text = this.ConvertToString(InvData.text, InvData.IsString, DecimalsNumber);
178
179
  this.SetDataInCell(InvData.text, ColStart, this.Row);
179
180
  this.MergeArray.push({
180
181
  s: { r: this.Row, c: ColStart },
@@ -184,7 +185,7 @@ class ServiceAdvisorWiseLaborXlsxFileService {
184
185
  });
185
186
  this.Row += 1;
186
187
  }
187
- static ConvertToString(Text, IsString) {
188
+ static ConvertToString(Text, IsString, DecimalsNumber) {
188
189
  if (IsString) {
189
190
  if (Text == null) {
190
191
  Text = '';
@@ -196,7 +197,7 @@ class ServiceAdvisorWiseLaborXlsxFileService {
196
197
  }
197
198
  }
198
199
  if (typeof Text === 'number') {
199
- return Number(tr_utils_1.TrUtils.FixedTo(Text));
200
+ return Number(tr_utils_1.TrUtils.FixedTo(Text, DecimalsNumber));
200
201
  }
201
202
  else {
202
203
  return Text;
@@ -13,11 +13,11 @@ export declare class ServiceAdvisorWisePartXlsxFileService {
13
13
  };
14
14
  };
15
15
  static ws: any;
16
- static GetServiceAdvisorPartsExcelData(MainData: any): any;
16
+ static GetServiceAdvisorPartsExcelData(MainData: any, EntitySettings: any): any;
17
17
  static setHeadingInCell(): void;
18
- static setWorkOrderDetailsInCell(MainData: any): void;
19
- static SetWorkOrderDataInExcel(WorkOrder: any, index: any): void;
20
- static ConvertToString(Text: any, IsString: any): any;
18
+ static setWorkOrderDetailsInCell(MainData: any, DecimalsNumber: number): void;
19
+ static SetWorkOrderDataInExcel(WorkOrder: any, index: any, DecimalsNumber: number): void;
20
+ static ConvertToString(Text: any, IsString: any, DecimalsNumber: number): any;
21
21
  static SetDataInCell(Data: any, ColRange: number, RowNum: any): void;
22
22
  static getcelltype(cell: any): any;
23
23
  }
@@ -27,8 +27,9 @@ exports.ServiceAdvisorWisePartXlsxFileService = void 0;
27
27
  const XLSX = __importStar(require("xlsx"));
28
28
  const my_date_1 = require("../../../../utils/my-date");
29
29
  const tr_utils_1 = require("../../../../utils/tr-utils");
30
+ const aggregation_1 = require("../../../../aggregation/aggregation");
30
31
  class ServiceAdvisorWisePartXlsxFileService {
31
- static GetServiceAdvisorPartsExcelData(MainData) {
32
+ static GetServiceAdvisorPartsExcelData(MainData, EntitySettings) {
32
33
  this.wb = {};
33
34
  this.ws = {};
34
35
  this.Row = 0;
@@ -41,7 +42,7 @@ class ServiceAdvisorWisePartXlsxFileService {
41
42
  this.wb.SheetNames = [];
42
43
  // MainData = this.GetTotals(MainData);
43
44
  this.setHeadingInCell();
44
- this.setWorkOrderDetailsInCell(MainData);
45
+ this.setWorkOrderDetailsInCell(MainData, EntitySettings.DecimalsNumber);
45
46
  this.ws['!ref'] = XLSX.utils.encode_range(this.range);
46
47
  this.ws['!merges'] = this.MergeArray;
47
48
  this.ws["!cols"] = [{ wch: 15 }, { wch: 15 }, { wch: 30 }, { wch: 40 }, { wch: 15 }, { wch: 15 }, { wch: 40 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }];
@@ -139,17 +140,17 @@ class ServiceAdvisorWisePartXlsxFileService {
139
140
  });
140
141
  this.Row += 2;
141
142
  }
142
- static setWorkOrderDetailsInCell(MainData) {
143
+ static setWorkOrderDetailsInCell(MainData, DecimalsNumber) {
143
144
  MainData.forEach((InvoiceList, index) => {
144
- this.SetWorkOrderDataInExcel(InvoiceList, index);
145
+ this.SetWorkOrderDataInExcel(InvoiceList, index, DecimalsNumber);
145
146
  });
146
147
  }
147
- static SetWorkOrderDataInExcel(WorkOrder, index) {
148
+ static SetWorkOrderDataInExcel(WorkOrder, index, DecimalsNumber) {
148
149
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
149
150
  WorkOrder.CrDate = my_date_1.MyDate.ConvertUTCDateToReadable(WorkOrder.CrDate);
150
- WorkOrder.Discount = tr_utils_1.TrUtils.FixPriceValue(tr_utils_1.TrUtils.SetValueToZeroIfNull((_a = WorkOrder.Items) === null || _a === void 0 ? void 0 : _a.Disc) + tr_utils_1.TrUtils.SetValueToZeroIfNull((_b = WorkOrder.Items) === null || _b === void 0 ? void 0 : _b.RecDisc));
151
- WorkOrder.Tax = tr_utils_1.TrUtils.FixPriceValue(((_c = WorkOrder.Items) === null || _c === void 0 ? void 0 : _c.CGST) + ((_d = WorkOrder.Items) === null || _d === void 0 ? void 0 : _d.SGST) + ((_e = WorkOrder.Items) === null || _e === void 0 ? void 0 : _e.IGST));
152
- WorkOrder.Total = tr_utils_1.TrUtils.FixPriceValue(((_f = WorkOrder.Items) === null || _f === void 0 ? void 0 : _f.NetAmt) + Number(WorkOrder.Tax));
151
+ WorkOrder.Discount = tr_utils_1.TrUtils.FixPriceValue((0, aggregation_1.addition)(tr_utils_1.TrUtils.SetValueToZeroIfNull((_a = WorkOrder.Items) === null || _a === void 0 ? void 0 : _a.Disc), tr_utils_1.TrUtils.SetValueToZeroIfNull((_b = WorkOrder.Items) === null || _b === void 0 ? void 0 : _b.RecDisc)), DecimalsNumber);
152
+ WorkOrder.Tax = tr_utils_1.TrUtils.FixPriceValue((0, aggregation_1.addition)((_c = WorkOrder.Items) === null || _c === void 0 ? void 0 : _c.CGST, (_d = WorkOrder.Items) === null || _d === void 0 ? void 0 : _d.SGST, (_e = WorkOrder.Items) === null || _e === void 0 ? void 0 : _e.IGST), DecimalsNumber);
153
+ WorkOrder.Total = tr_utils_1.TrUtils.FixPriceValue((0, aggregation_1.addition)((_f = WorkOrder.Items) === null || _f === void 0 ? void 0 : _f.NetAmt, Number(WorkOrder.Tax)), DecimalsNumber);
153
154
  // if(!TrUtils.IsNull(WorkOrder.Prod) && !TrUtils.IsNull(WorkOrder.Prod.DDate)){
154
155
  // WorkOrder.Prod.DDate= TrUtils.ConvertDateToReadableFormat(WorkOrder.Prod.DDate);
155
156
  // }else{
@@ -174,7 +175,7 @@ class ServiceAdvisorWisePartXlsxFileService {
174
175
  ];
175
176
  let ColStart = 0;
176
177
  InvoiceData.forEach((InvData) => {
177
- InvData.text = this.ConvertToString(InvData.text, InvData.IsString);
178
+ InvData.text = this.ConvertToString(InvData.text, InvData.IsString, DecimalsNumber);
178
179
  this.SetDataInCell(InvData.text, ColStart, this.Row);
179
180
  this.MergeArray.push({
180
181
  s: { r: this.Row, c: ColStart },
@@ -184,7 +185,7 @@ class ServiceAdvisorWisePartXlsxFileService {
184
185
  });
185
186
  this.Row += 1;
186
187
  }
187
- static ConvertToString(Text, IsString) {
188
+ static ConvertToString(Text, IsString, DecimalsNumber) {
188
189
  if (IsString) {
189
190
  if (Text == null) {
190
191
  Text = '';
@@ -196,7 +197,7 @@ class ServiceAdvisorWisePartXlsxFileService {
196
197
  }
197
198
  }
198
199
  if (typeof Text === 'number') {
199
- return Number(tr_utils_1.TrUtils.FixedTo(Text));
200
+ return Number(tr_utils_1.TrUtils.FixedTo(Text, DecimalsNumber));
200
201
  }
201
202
  else {
202
203
  return Text;
@@ -13,12 +13,12 @@ export declare class SummaryXlsxFileService {
13
13
  };
14
14
  };
15
15
  static ws: any;
16
- static GetInvoiceWiseExcelData(MainData: any, WOTypes: any): any;
16
+ static GetInvoiceWiseExcelData(MainData: any, WOTypes: any, EntitySettings: any): any;
17
17
  static GetTotals(MainData: any, WOTypes: any): any;
18
18
  static setHeadingInCell(): void;
19
- static setInvoiceDetailsInCell(MainData: any): void;
20
- static SetInvoiceDataInExcel(InvoiceInfo: any): void;
21
- static ConvertToString(Text: any, IsString: any): any;
19
+ static setInvoiceDetailsInCell(MainData: any, DecimalsNumber: number): void;
20
+ static SetInvoiceDataInExcel(InvoiceInfo: any, DecimalsNumber: number): void;
21
+ static ConvertToString(Text: any, IsString: any, DecimalsNumber: number): any;
22
22
  static SetDataInCell(Data: any, ColRange: number, RowNum: any): void;
23
23
  static getcelltype(cell: any): any;
24
24
  static ConvertDateToReadableFormat(DateObject: any): any;
@@ -26,8 +26,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.SummaryXlsxFileService = void 0;
27
27
  const XLSX = __importStar(require("xlsx"));
28
28
  const tr_utils_1 = require("../../../../utils/tr-utils");
29
+ const aggregation_1 = require("../../../../aggregation/aggregation");
29
30
  class SummaryXlsxFileService {
30
- static GetInvoiceWiseExcelData(MainData, WOTypes) {
31
+ static GetInvoiceWiseExcelData(MainData, WOTypes, EntitySettings) {
31
32
  this.wb = {};
32
33
  this.ws = {};
33
34
  this.Row = 0;
@@ -40,7 +41,7 @@ class SummaryXlsxFileService {
40
41
  this.wb.SheetNames = [];
41
42
  MainData = this.GetTotals(MainData, WOTypes);
42
43
  this.setHeadingInCell();
43
- this.setInvoiceDetailsInCell(MainData);
44
+ this.setInvoiceDetailsInCell(MainData, EntitySettings.DecimalsNumber);
44
45
  this.ws['!ref'] = XLSX.utils.encode_range(this.range);
45
46
  this.ws['!merges'] = this.MergeArray;
46
47
  this.wb.SheetNames.push(ws_name);
@@ -50,8 +51,8 @@ class SummaryXlsxFileService {
50
51
  static GetTotals(MainData, WOTypes) {
51
52
  MainData.forEach((InvoiceInfo) => {
52
53
  InvoiceInfo.GSTAmount =
53
- InvoiceInfo.ItemsCGST + InvoiceInfo.ItemsSGST + InvoiceInfo.ItemsIGST;
54
- InvoiceInfo.TotalAmount = InvoiceInfo.GSTAmount + InvoiceInfo.ItemsNetAmt;
54
+ (0, aggregation_1.addition)(InvoiceInfo.ItemsCGST, InvoiceInfo.ItemsSGST, InvoiceInfo.ItemsIGST);
55
+ InvoiceInfo.TotalAmount = (0, aggregation_1.addition)(InvoiceInfo.GSTAmount, InvoiceInfo.ItemsNetAmt);
55
56
  });
56
57
  return MainData;
57
58
  }
@@ -211,12 +212,12 @@ class SummaryXlsxFileService {
211
212
  });
212
213
  this.Row += 2;
213
214
  }
214
- static setInvoiceDetailsInCell(MainData) {
215
+ static setInvoiceDetailsInCell(MainData, DecimalsNumber) {
215
216
  MainData.forEach((InvoiceList) => {
216
- this.SetInvoiceDataInExcel(InvoiceList);
217
+ this.SetInvoiceDataInExcel(InvoiceList, DecimalsNumber);
217
218
  });
218
219
  }
219
- static SetInvoiceDataInExcel(InvoiceInfo) {
220
+ static SetInvoiceDataInExcel(InvoiceInfo, DecimalsNumber) {
220
221
  InvoiceInfo.CrDate = this.ConvertDateToReadableFormat(InvoiceInfo.CrDate);
221
222
  let InvoiceData = [
222
223
  { text: InvoiceInfo.CrDate, ColRange: 1, IsString: true },
@@ -236,7 +237,7 @@ class SummaryXlsxFileService {
236
237
  ];
237
238
  let ColStart = 0;
238
239
  InvoiceData.forEach((InvData) => {
239
- InvData.text = this.ConvertToString(InvData.text, InvData.IsString);
240
+ InvData.text = this.ConvertToString(InvData.text, InvData.IsString, DecimalsNumber);
240
241
  this.SetDataInCell(InvData.text, ColStart, this.Row);
241
242
  this.MergeArray.push({
242
243
  s: { r: this.Row, c: ColStart },
@@ -246,7 +247,7 @@ class SummaryXlsxFileService {
246
247
  });
247
248
  this.Row += 1;
248
249
  }
249
- static ConvertToString(Text, IsString) {
250
+ static ConvertToString(Text, IsString, DecimalsNumber) {
250
251
  if (IsString) {
251
252
  if (Text == null) {
252
253
  Text = '';
@@ -258,7 +259,7 @@ class SummaryXlsxFileService {
258
259
  }
259
260
  }
260
261
  if (typeof Text === 'number') {
261
- return Number(tr_utils_1.TrUtils.FixedTo(Text));
262
+ return Number(tr_utils_1.TrUtils.FixedTo(Text, DecimalsNumber));
262
263
  }
263
264
  else {
264
265
  return Text;
@@ -13,12 +13,12 @@ export declare class SalesByServiceSummaryXlsxFileService {
13
13
  };
14
14
  };
15
15
  static ws: any;
16
- static GetSalesByServiceSummaryExcelData(MainData: any, searchValue: any, HeaderName: any, ForService: boolean): any;
16
+ static GetSalesByServiceSummaryExcelData(MainData: any, searchValue: any, HeaderName: any, ForService: boolean, EntitySettings: any): any;
17
17
  static setServiceHeadingInCell(HeaderName: any, searchValue: any): void;
18
18
  static setItemHeadingInCell(HeaderName: any, searchValue: any): void;
19
- static setInvoiceDetailsInCell(MainData: any, ForService: boolean): void;
20
- static SetInvoiceDataInExcel(InvoiceInfo: any, ForService: boolean): void;
21
- static ConvertToString(Text: any, IsString: any): any;
19
+ static setInvoiceDetailsInCell(MainData: any, ForService: boolean, DecimalsNumber: number): void;
20
+ static SetInvoiceDataInExcel(InvoiceInfo: any, ForService: boolean, DecimalsNumber: number): void;
21
+ static ConvertToString(Text: any, IsString: any, DecimalsNumber: number): any;
22
22
  static SetDataInCell(Data: any, ColRange: number, RowNum: any): void;
23
23
  static getcelltype(cell: any): any;
24
24
  }
@@ -27,8 +27,9 @@ exports.SalesByServiceSummaryXlsxFileService = void 0;
27
27
  const XLSX = __importStar(require("xlsx"));
28
28
  const my_date_1 = require("../../../../utils/my-date");
29
29
  const tr_utils_1 = require("../../../../utils/tr-utils");
30
+ const aggregation_1 = require("../../../../aggregation/aggregation");
30
31
  class SalesByServiceSummaryXlsxFileService {
31
- static GetSalesByServiceSummaryExcelData(MainData, searchValue, HeaderName, ForService) {
32
+ static GetSalesByServiceSummaryExcelData(MainData, searchValue, HeaderName, ForService, EntitySettings) {
32
33
  this.wb = {};
33
34
  this.ws = {};
34
35
  this.Row = 0;
@@ -71,7 +72,7 @@ class SalesByServiceSummaryXlsxFileService {
71
72
  else {
72
73
  this.setItemHeadingInCell(HeaderName, showSearch);
73
74
  }
74
- this.setInvoiceDetailsInCell(MainData, ForService);
75
+ this.setInvoiceDetailsInCell(MainData, ForService, EntitySettings.DecimalsNumber);
75
76
  this.ws['!ref'] = XLSX.utils.encode_range(this.range);
76
77
  this.ws['!merges'] = this.MergeArray;
77
78
  this.ws["!cols"] = [{ wch: 50 }, { wch: 10 }, { wch: 10 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 20 }];
@@ -319,12 +320,12 @@ class SalesByServiceSummaryXlsxFileService {
319
320
  });
320
321
  this.Row += 2;
321
322
  }
322
- static setInvoiceDetailsInCell(MainData, ForService) {
323
+ static setInvoiceDetailsInCell(MainData, ForService, DecimalsNumber) {
323
324
  MainData.forEach((InvoiceList) => {
324
- this.SetInvoiceDataInExcel(InvoiceList, ForService);
325
+ this.SetInvoiceDataInExcel(InvoiceList, ForService, DecimalsNumber);
325
326
  });
326
327
  }
327
- static SetInvoiceDataInExcel(InvoiceInfo, ForService) {
328
+ static SetInvoiceDataInExcel(InvoiceInfo, ForService, DecimalsNumber) {
328
329
  // InvoiceInfo.Date = TrUtils.ConvertDateToReadableFormat(InvoiceInfo.CrDate);
329
330
  let InvoiceData;
330
331
  if (ForService) {
@@ -334,11 +335,11 @@ class SalesByServiceSummaryXlsxFileService {
334
335
  { text: InvoiceInfo.Name, ColRange: 1, IsString: true },
335
336
  // { text: InvoiceInfo.Count, ColRange: 1, IsString: true },
336
337
  { text: InvoiceInfo.Qty, ColRange: 1, IsString: false },
337
- { text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Amt), ColRange: 1, IsString: false },
338
- { text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Disc), ColRange: 1, IsString: false },
339
- { text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Tax), ColRange: 1, IsString: false },
340
- { text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.NetAmt + InvoiceInfo.Tax), ColRange: 1, IsString: false },
341
- { text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.AvgPr), ColRange: 1, IsString: false },
338
+ { text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Amt, DecimalsNumber), ColRange: 1, IsString: false },
339
+ { text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Disc, DecimalsNumber), ColRange: 1, IsString: false },
340
+ { text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Tax, DecimalsNumber), ColRange: 1, IsString: false },
341
+ { text: tr_utils_1.TrUtils.FixPriceValue((0, aggregation_1.addition)(InvoiceInfo.NetAmt, InvoiceInfo.Tax), DecimalsNumber), ColRange: 1, IsString: false },
342
+ { text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.AvgPr, DecimalsNumber), ColRange: 1, IsString: false },
342
343
  // { text: InvoiceInfo.Adjust, ColRange: 1, IsString: false },
343
344
  // { text: InvoiceInfo.Round, ColRange: 1, IsString: false },
344
345
  // { text: InvoiceInfo.Total, ColRange: 1, IsString: false }
@@ -352,11 +353,11 @@ class SalesByServiceSummaryXlsxFileService {
352
353
  // { text: InvoiceInfo.Count, ColRange: 1, IsString: true },
353
354
  { text: InvoiceInfo.OfQty, ColRange: 1, IsString: false },
354
355
  { text: InvoiceInfo.Qty, ColRange: 1, IsString: false },
355
- { text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.UnAmt), ColRange: 1, IsString: false },
356
- { text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Disc), ColRange: 1, IsString: false },
357
- { text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Tax), ColRange: 1, IsString: false },
358
- { text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.NetAmt + InvoiceInfo.Tax), ColRange: 1, IsString: false },
359
- { text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.AvgPr), ColRange: 1, IsString: false },
356
+ { text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.UnAmt, DecimalsNumber), ColRange: 1, IsString: false },
357
+ { text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Disc, DecimalsNumber), ColRange: 1, IsString: false },
358
+ { text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Tax, DecimalsNumber), ColRange: 1, IsString: false },
359
+ { text: tr_utils_1.TrUtils.FixPriceValue((0, aggregation_1.addition)(InvoiceInfo.NetAmt, InvoiceInfo.Tax), DecimalsNumber), ColRange: 1, IsString: false },
360
+ { text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.AvgPr, DecimalsNumber), ColRange: 1, IsString: false },
360
361
  // { text: InvoiceInfo.Adjust, ColRange: 1, IsString: false },
361
362
  // { text: InvoiceInfo.Round, ColRange: 1, IsString: false },
362
363
  // { text: InvoiceInfo.Total, ColRange: 1, IsString: false }
@@ -364,7 +365,7 @@ class SalesByServiceSummaryXlsxFileService {
364
365
  }
365
366
  let ColStart = 0;
366
367
  InvoiceData.forEach((InvData) => {
367
- InvData.text = this.ConvertToString(InvData.text, InvData.IsString);
368
+ InvData.text = this.ConvertToString(InvData.text, InvData.IsString, DecimalsNumber);
368
369
  this.SetDataInCell(InvData.text, ColStart, this.Row);
369
370
  this.MergeArray.push({
370
371
  s: { r: this.Row, c: ColStart },
@@ -374,7 +375,7 @@ class SalesByServiceSummaryXlsxFileService {
374
375
  });
375
376
  this.Row += 1;
376
377
  }
377
- static ConvertToString(Text, IsString) {
378
+ static ConvertToString(Text, IsString, DecimalsNumber) {
378
379
  if (IsString) {
379
380
  if (Text == null) {
380
381
  Text = '';
@@ -386,7 +387,7 @@ class SalesByServiceSummaryXlsxFileService {
386
387
  }
387
388
  }
388
389
  if (typeof Text === 'number') {
389
- return Number(tr_utils_1.TrUtils.FixedTo(Text));
390
+ return Number(tr_utils_1.TrUtils.FixedTo(Text, DecimalsNumber));
390
391
  }
391
392
  else {
392
393
  return Text;
@@ -13,11 +13,11 @@ export declare class ScheduledDrugSummaryXlsxFileService {
13
13
  };
14
14
  };
15
15
  static ws: any;
16
- static GetScheduledDrugExcelData(MainData: any, searchValue: any, HeaderName: any): any;
16
+ static GetScheduledDrugExcelData(MainData: any, searchValue: any, HeaderName: any, EntitySettings: any): any;
17
17
  static setHeadingInCell(HeaderName: any, showSearch: any): void;
18
- static setInvoiceDetailsInCell(MainData: any): void;
19
- static SetInvoiceDataInExcel(InvoiceInfo: any): void;
20
- static ConvertToString(Text: any, IsString: any): any;
18
+ static setInvoiceDetailsInCell(MainData: any, DecimalsNumber: number): void;
19
+ static SetInvoiceDataInExcel(InvoiceInfo: any, DecimalsNumber: number): void;
20
+ static ConvertToString(Text: any, IsString: any, DecimalsNumber: number): any;
21
21
  static SetDataInCell(Data: any, ColRange: number, RowNum: any): void;
22
22
  static getcelltype(cell: any): any;
23
23
  static ConvertDateToReadableFormat(DateObject: any): any;
@@ -28,7 +28,7 @@ const XLSX = __importStar(require("xlsx"));
28
28
  const my_date_1 = require("../../../../utils/my-date");
29
29
  const tr_utils_1 = require("../../../../utils/tr-utils");
30
30
  class ScheduledDrugSummaryXlsxFileService {
31
- static GetScheduledDrugExcelData(MainData, searchValue, HeaderName) {
31
+ static GetScheduledDrugExcelData(MainData, searchValue, HeaderName, EntitySettings) {
32
32
  this.wb = {};
33
33
  this.ws = {};
34
34
  this.Row = 0;
@@ -66,7 +66,7 @@ class ScheduledDrugSummaryXlsxFileService {
66
66
  // console.log(`${key}: ${searchValue[key]}`);
67
67
  }
68
68
  this.setHeadingInCell(HeaderName, showSearch);
69
- this.setInvoiceDetailsInCell(MainData);
69
+ this.setInvoiceDetailsInCell(MainData, EntitySettings.DecimalsNumber);
70
70
  this.ws['!ref'] = XLSX.utils.encode_range(this.range);
71
71
  this.ws['!merges'] = this.MergeArray;
72
72
  this.ws["!cols"] = [{ wch: 20 }, { wch: 20 }, { wch: 20 }, { wch: 15 }];
@@ -230,12 +230,12 @@ class ScheduledDrugSummaryXlsxFileService {
230
230
  });
231
231
  this.Row += 2;
232
232
  }
233
- static setInvoiceDetailsInCell(MainData) {
233
+ static setInvoiceDetailsInCell(MainData, DecimalsNumber) {
234
234
  MainData.forEach((InvoiceList) => {
235
- this.SetInvoiceDataInExcel(InvoiceList);
235
+ this.SetInvoiceDataInExcel(InvoiceList, DecimalsNumber);
236
236
  });
237
237
  }
238
- static SetInvoiceDataInExcel(InvoiceInfo) {
238
+ static SetInvoiceDataInExcel(InvoiceInfo, DecimalsNumber) {
239
239
  // InvoiceInfo.CrDate = this.ConvertDateToReadableFormat(InvoiceInfo.CrDate);
240
240
  // let batchdata: any;
241
241
  // InvoiceInfo?.Items?.Batches?.forEach((batch: any) => {
@@ -270,13 +270,13 @@ class ScheduledDrugSummaryXlsxFileService {
270
270
  // { text: InvoiceInfo.Items.Desc, ColRange: 1, IsString: true },
271
271
  // { text: batchdata, ColRange: 1, IsString: true },
272
272
  // { text: batchExdate, ColRange: 1, IsString: true },
273
- { text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Qty), ColRange: 1, IsString: false },
274
- { text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.NetAmt), ColRange: 1, IsString: false },
275
- { text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Tax), ColRange: 1, IsString: false }
273
+ { text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Qty, DecimalsNumber), ColRange: 1, IsString: false },
274
+ { text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.NetAmt, DecimalsNumber), ColRange: 1, IsString: false },
275
+ { text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Tax, DecimalsNumber), ColRange: 1, IsString: false }
276
276
  ];
277
277
  let ColStart = 0;
278
278
  InvoiceData.forEach((InvData) => {
279
- InvData.text = this.ConvertToString(InvData.text, InvData.IsString);
279
+ InvData.text = this.ConvertToString(InvData.text, InvData.IsString, DecimalsNumber);
280
280
  this.SetDataInCell(InvData.text, ColStart, this.Row);
281
281
  this.MergeArray.push({
282
282
  s: { r: this.Row, c: ColStart },
@@ -286,7 +286,7 @@ class ScheduledDrugSummaryXlsxFileService {
286
286
  });
287
287
  this.Row += 1;
288
288
  }
289
- static ConvertToString(Text, IsString) {
289
+ static ConvertToString(Text, IsString, DecimalsNumber) {
290
290
  if (IsString) {
291
291
  if (Text == null) {
292
292
  Text = '';
@@ -298,7 +298,7 @@ class ScheduledDrugSummaryXlsxFileService {
298
298
  }
299
299
  }
300
300
  if (typeof Text === 'number') {
301
- return Number(tr_utils_1.TrUtils.FixedTo(Text));
301
+ return Number(tr_utils_1.TrUtils.FixedTo(Text, DecimalsNumber));
302
302
  }
303
303
  else {
304
304
  return Text;
@@ -13,11 +13,11 @@ export declare class ScheduledDrugXlsxFileService {
13
13
  };
14
14
  };
15
15
  static ws: any;
16
- static GetScheduledDrugExcelData(MainData: any, searchValue: any, HeaderName: any): any;
16
+ static GetScheduledDrugExcelData(MainData: any, searchValue: any, HeaderName: any, EntitySettings: any): any;
17
17
  static setHeadingInCell(HeaderName: any, showSearch: any): void;
18
- static setInvoiceDetailsInCell(MainData: any): void;
19
- static SetInvoiceDataInExcel(InvoiceInfo: any): void;
20
- static ConvertToString(Text: any, IsString: any): any;
18
+ static setInvoiceDetailsInCell(MainData: any, DecimalsNumber: number): void;
19
+ static SetInvoiceDataInExcel(InvoiceInfo: any, DecimalsNumber: number): void;
20
+ static ConvertToString(Text: any, IsString: any, DecimalsNumber: number): any;
21
21
  static SetDataInCell(Data: any, ColRange: number, RowNum: any): void;
22
22
  static getcelltype(cell: any): any;
23
23
  static ConvertDateToReadableFormat(DateObject: any): any;
@@ -28,7 +28,7 @@ const XLSX = __importStar(require("xlsx"));
28
28
  const my_date_1 = require("../../../../utils/my-date");
29
29
  const tr_utils_1 = require("../../../../utils/tr-utils");
30
30
  class ScheduledDrugXlsxFileService {
31
- static GetScheduledDrugExcelData(MainData, searchValue, HeaderName) {
31
+ static GetScheduledDrugExcelData(MainData, searchValue, HeaderName, EntitySettings) {
32
32
  this.wb = {};
33
33
  this.ws = {};
34
34
  this.Row = 0;
@@ -66,7 +66,7 @@ class ScheduledDrugXlsxFileService {
66
66
  // console.log(`${key}: ${searchValue[key]}`);
67
67
  }
68
68
  this.setHeadingInCell(HeaderName, showSearch);
69
- this.setInvoiceDetailsInCell(MainData);
69
+ this.setInvoiceDetailsInCell(MainData, EntitySettings.DecimalsNumber);
70
70
  this.ws['!ref'] = XLSX.utils.encode_range(this.range);
71
71
  this.ws['!merges'] = this.MergeArray;
72
72
  this.ws["!cols"] = [{ wch: 15 }, { wch: 15 }, { wch: 20 }, { wch: 20 }, { wch: 20 }, { wch: 15 }, { wch: 15 }, { wch: 15 }];
@@ -230,12 +230,12 @@ class ScheduledDrugXlsxFileService {
230
230
  });
231
231
  this.Row += 2;
232
232
  }
233
- static setInvoiceDetailsInCell(MainData) {
233
+ static setInvoiceDetailsInCell(MainData, DecimalsNumber) {
234
234
  MainData.forEach((InvoiceList) => {
235
- this.SetInvoiceDataInExcel(InvoiceList);
235
+ this.SetInvoiceDataInExcel(InvoiceList, DecimalsNumber);
236
236
  });
237
237
  }
238
- static SetInvoiceDataInExcel(InvoiceInfo) {
238
+ static SetInvoiceDataInExcel(InvoiceInfo, DecimalsNumber) {
239
239
  InvoiceInfo.CrDate = this.ConvertDateToReadableFormat(InvoiceInfo.CrDate);
240
240
  let batchdata;
241
241
  // InvoiceInfo?.Items?.Batches?.forEach((batch: any) => {
@@ -269,13 +269,13 @@ class ScheduledDrugXlsxFileService {
269
269
  { text: InvoiceInfo.ItemName, ColRange: 1, IsString: true },
270
270
  { text: batchdata, ColRange: 1, IsString: true },
271
271
  { text: batchExdate, ColRange: 1, IsString: true },
272
- { text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Qty), ColRange: 1, IsString: false },
273
- { text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.NetAmt), ColRange: 1, IsString: false },
274
- { text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Tax), ColRange: 1, IsString: false }
272
+ { text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Qty, DecimalsNumber), ColRange: 1, IsString: false },
273
+ { text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.NetAmt, DecimalsNumber), ColRange: 1, IsString: false },
274
+ { text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Tax, DecimalsNumber), ColRange: 1, IsString: false }
275
275
  ];
276
276
  let ColStart = 0;
277
277
  InvoiceData.forEach((InvData) => {
278
- InvData.text = this.ConvertToString(InvData.text, InvData.IsString);
278
+ InvData.text = this.ConvertToString(InvData.text, InvData.IsString, DecimalsNumber);
279
279
  this.SetDataInCell(InvData.text, ColStart, this.Row);
280
280
  this.MergeArray.push({
281
281
  s: { r: this.Row, c: ColStart },
@@ -285,7 +285,7 @@ class ScheduledDrugXlsxFileService {
285
285
  });
286
286
  this.Row += 1;
287
287
  }
288
- static ConvertToString(Text, IsString) {
288
+ static ConvertToString(Text, IsString, DecimalsNumber) {
289
289
  if (IsString) {
290
290
  if (Text == null) {
291
291
  Text = '';
@@ -297,7 +297,7 @@ class ScheduledDrugXlsxFileService {
297
297
  }
298
298
  }
299
299
  if (typeof Text === 'number') {
300
- return Number(tr_utils_1.TrUtils.FixedTo(Text));
300
+ return Number(tr_utils_1.TrUtils.FixedTo(Text, DecimalsNumber));
301
301
  }
302
302
  else {
303
303
  return Text;