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,13 +13,13 @@ export declare class CustBalanceXlsxFileService {
13
13
  };
14
14
  };
15
15
  static ws: any;
16
- static GetInvoiceWiseExcelData(MainData: any, isPhar: boolean, WOTypes: any): any;
16
+ static GetInvoiceWiseExcelData(MainData: any, isPhar: boolean, WOTypes: any, EntitySettings: any): any;
17
17
  static GetTotals(MainData: any, WOTypes: any): any;
18
18
  static GetWOTypeName(Type: any, WOTypes: any): any;
19
19
  static setHeadingInCell(isPhar: boolean): void;
20
- static setInvoiceDetailsInCell(MainData: any, isPhar: boolean): void;
21
- static SetInvoiceDataInExcel(InvoiceInfo: any, index: any, isPhar: boolean): void;
22
- static ConvertToString(Text: any, IsString: any): any;
20
+ static setInvoiceDetailsInCell(MainData: any, isPhar: boolean, DecimalsNumber: number): void;
21
+ static SetInvoiceDataInExcel(InvoiceInfo: any, index: any, isPhar: boolean, DecimalsNumber: number): void;
22
+ static ConvertToString(Text: any, IsString: any, DecimalsNumber: number): any;
23
23
  static SetDataInCell(Data: any, ColRange: number, RowNum: any): void;
24
24
  static getcelltype(cell: any): any;
25
25
  static ConvertDateToReadableFormat(DateObject: any): any;
@@ -27,7 +27,7 @@ exports.CustBalanceXlsxFileService = void 0;
27
27
  const XLSX = __importStar(require("xlsx"));
28
28
  const tr_utils_1 = require("../../../../utils/tr-utils");
29
29
  class CustBalanceXlsxFileService {
30
- static GetInvoiceWiseExcelData(MainData, isPhar, WOTypes) {
30
+ static GetInvoiceWiseExcelData(MainData, isPhar, WOTypes, EntitySettings) {
31
31
  this.wb = {};
32
32
  this.ws = {};
33
33
  this.Row = 0;
@@ -42,7 +42,7 @@ class CustBalanceXlsxFileService {
42
42
  MainData = this.GetTotals(MainData, WOTypes);
43
43
  }
44
44
  this.setHeadingInCell(isPhar);
45
- this.setInvoiceDetailsInCell(MainData, isPhar);
45
+ this.setInvoiceDetailsInCell(MainData, isPhar, EntitySettings.DecimalsNumber);
46
46
  this.ws['!ref'] = XLSX.utils.encode_range(this.range);
47
47
  this.ws['!merges'] = this.MergeArray;
48
48
  this.ws["!cols"] = [{ wch: 10 }, { wch: 15 }, { wch: 15 }, { wch: 35 }, { wch: 15 }, { wch: 15 }, { wch: 20 }, { wch: 15 }, { wch: 15 }, { wch: 20 }];
@@ -166,11 +166,11 @@ class CustBalanceXlsxFileService {
166
166
  });
167
167
  this.Row += 1;
168
168
  }
169
- static setInvoiceDetailsInCell(MainData, isPhar) {
169
+ static setInvoiceDetailsInCell(MainData, isPhar, DecimalsNumber) {
170
170
  MainData.forEach((Record, index) => {
171
171
  // this.setHeading1InCell(Record.Name);
172
172
  // this.setHeadingInCell();
173
- this.SetInvoiceDataInExcel(Record, index, isPhar);
173
+ this.SetInvoiceDataInExcel(Record, index, isPhar, DecimalsNumber);
174
174
  // Record.Invoices.forEach((Invoice:any, index:any)=>{
175
175
  // this.SetInvoiceDataInExcel(Invoice, index);
176
176
  // if (Record.Invoices.length === (index + 1)) {
@@ -180,7 +180,7 @@ class CustBalanceXlsxFileService {
180
180
  // this.Row += 1;
181
181
  });
182
182
  }
183
- static SetInvoiceDataInExcel(InvoiceInfo, index, isPhar) {
183
+ static SetInvoiceDataInExcel(InvoiceInfo, index, isPhar, DecimalsNumber) {
184
184
  var _a, _b, _c;
185
185
  // InvoiceInfo.CrDate = this.ConvertDateToReadableFormat(InvoiceInfo.CrDate);
186
186
  InvoiceInfo.CrDate = this.ConvertDateToReadableFormat(InvoiceInfo.CrDate);
@@ -189,7 +189,7 @@ class CustBalanceXlsxFileService {
189
189
  { text: InvoiceInfo.CrDate, ColRange: 1, IsString: true },
190
190
  { text: InvoiceInfo.Code, ColRange: 1, IsString: true },
191
191
  { text: (_a = InvoiceInfo.BillTo) === null || _a === void 0 ? void 0 : _a.Name, ColRange: 1, IsString: true },
192
- { text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Total), ColRange: 1, IsString: false },
192
+ { text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Total, DecimalsNumber), ColRange: 1, IsString: false },
193
193
  // { text: InvoiceInfo.Due, ColRange: 1, IsString: false },
194
194
  ];
195
195
  if (!isPhar) {
@@ -197,7 +197,7 @@ class CustBalanceXlsxFileService {
197
197
  }
198
198
  let ColStart = 0;
199
199
  InvoiceData.forEach((InvData) => {
200
- InvData.text = this.ConvertToString(InvData.text, InvData.IsString);
200
+ InvData.text = this.ConvertToString(InvData.text, InvData.IsString, DecimalsNumber);
201
201
  this.SetDataInCell(InvData.text, ColStart, this.Row);
202
202
  this.MergeArray.push({
203
203
  s: { r: this.Row, c: ColStart },
@@ -207,7 +207,7 @@ class CustBalanceXlsxFileService {
207
207
  });
208
208
  this.Row += 1;
209
209
  }
210
- static ConvertToString(Text, IsString) {
210
+ static ConvertToString(Text, IsString, DecimalsNumber) {
211
211
  if (IsString) {
212
212
  if (Text == null) {
213
213
  Text = '';
@@ -219,7 +219,7 @@ class CustBalanceXlsxFileService {
219
219
  }
220
220
  }
221
221
  if (typeof Text === 'number') {
222
- return Number(tr_utils_1.TrUtils.FixedTo(Text));
222
+ return Number(tr_utils_1.TrUtils.FixedTo(Text, DecimalsNumber));
223
223
  }
224
224
  else {
225
225
  return Text;
@@ -13,13 +13,13 @@ export declare class PaymentReceiveXlsxFileService {
13
13
  };
14
14
  };
15
15
  static ws: any;
16
- static GetRepairOrdersExcelData(MainData: any): any;
17
- static GetTotals(MainData: any): any;
16
+ static GetRepairOrdersExcelData(MainData: any, EntitySettings: any): any;
17
+ static GetTotals(MainData: any, DecimalsNumber: number): any;
18
18
  static setHeadingInCell(): void;
19
- static setWorkOrderDetailsInCell(MainData: any): void;
20
- static SetWorkOrderDataInExcel(WorkOrder: any, index: any): void;
19
+ static setWorkOrderDetailsInCell(MainData: any, DecimalsNumber: number): void;
20
+ static SetWorkOrderDataInExcel(WorkOrder: any, index: any, DecimalsNumber: number): void;
21
21
  static GetInvoiceCodes(PaymentData: any): string;
22
- static ConvertToString(Text: any, IsString: any): any;
22
+ static ConvertToString(Text: any, IsString: any, DecimalsNumber: number): any;
23
23
  static SetDataInCell(Data: any, ColRange: number, RowNum: any): void;
24
24
  static getcelltype(cell: any): any;
25
25
  }
@@ -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 PaymentReceiveXlsxFileService {
31
- static GetRepairOrdersExcelData(MainData) {
31
+ static GetRepairOrdersExcelData(MainData, EntitySettings) {
32
32
  this.wb = {};
33
33
  this.ws = {};
34
34
  this.Row = 0;
@@ -39,16 +39,16 @@ class PaymentReceiveXlsxFileService {
39
39
  this.wb.Props = {};
40
40
  this.wb.SSF = {};
41
41
  this.wb.SheetNames = [];
42
- MainData = this.GetTotals(MainData);
42
+ MainData = this.GetTotals(MainData, EntitySettings.DecimalsNumber);
43
43
  this.setHeadingInCell();
44
- this.setWorkOrderDetailsInCell(MainData);
44
+ this.setWorkOrderDetailsInCell(MainData, EntitySettings.DecimalsNumber);
45
45
  this.ws['!ref'] = XLSX.utils.encode_range(this.range);
46
46
  this.ws['!merges'] = this.MergeArray;
47
47
  this.wb.SheetNames.push(ws_name);
48
48
  this.wb.Sheets[ws_name] = this.ws;
49
49
  return this.wb;
50
50
  }
51
- static GetTotals(MainData) {
51
+ static GetTotals(MainData, DecimalsNumber) {
52
52
  MainData.forEach((WorkOrder) => {
53
53
  // if (TrUtils.IsNull(WorkOrder.Prod?.VIN)) {
54
54
  // WorkOrder.Prod.VIN = '';
@@ -65,7 +65,7 @@ class PaymentReceiveXlsxFileService {
65
65
  // WorkOrder.TypeName = WorkOrder.WOType.Name;
66
66
  // }
67
67
  if (!tr_utils_1.TrUtils.IsNull(WorkOrder.Amt)) {
68
- WorkOrder.Total = tr_utils_1.TrUtils.FixPriceValue(WorkOrder.Amt);
68
+ WorkOrder.Total = tr_utils_1.TrUtils.FixPriceValue(WorkOrder.Amt, DecimalsNumber);
69
69
  }
70
70
  else {
71
71
  WorkOrder.Total = '0.00';
@@ -127,12 +127,12 @@ class PaymentReceiveXlsxFileService {
127
127
  });
128
128
  this.Row += 2;
129
129
  }
130
- static setWorkOrderDetailsInCell(MainData) {
130
+ static setWorkOrderDetailsInCell(MainData, DecimalsNumber) {
131
131
  MainData.forEach((InvoiceList, index) => {
132
- this.SetWorkOrderDataInExcel(InvoiceList, index);
132
+ this.SetWorkOrderDataInExcel(InvoiceList, index, DecimalsNumber);
133
133
  });
134
134
  }
135
- static SetWorkOrderDataInExcel(WorkOrder, index) {
135
+ static SetWorkOrderDataInExcel(WorkOrder, index, DecimalsNumber) {
136
136
  WorkOrder.Date = my_date_1.MyDate.ConvertUTCDateToReadable(WorkOrder.Date);
137
137
  WorkOrder.InvCodes = this.GetInvoiceCodes(WorkOrder);
138
138
  let InvoiceData = [
@@ -155,7 +155,7 @@ class PaymentReceiveXlsxFileService {
155
155
  ];
156
156
  let ColStart = 0;
157
157
  InvoiceData.forEach((InvData) => {
158
- InvData.text = this.ConvertToString(InvData.text, InvData.IsString);
158
+ InvData.text = this.ConvertToString(InvData.text, InvData.IsString, DecimalsNumber);
159
159
  this.SetDataInCell(InvData.text, ColStart, this.Row);
160
160
  this.MergeArray.push({
161
161
  s: { r: this.Row, c: ColStart },
@@ -177,7 +177,7 @@ class PaymentReceiveXlsxFileService {
177
177
  }
178
178
  return InvoiceCodes;
179
179
  }
180
- static ConvertToString(Text, IsString) {
180
+ static ConvertToString(Text, IsString, DecimalsNumber) {
181
181
  if (IsString) {
182
182
  if (Text == null) {
183
183
  Text = '';
@@ -189,7 +189,7 @@ class PaymentReceiveXlsxFileService {
189
189
  }
190
190
  }
191
191
  if (typeof Text === 'number') {
192
- return Number(tr_utils_1.TrUtils.FixedTo(Text));
192
+ return Number(tr_utils_1.TrUtils.FixedTo(Text, DecimalsNumber));
193
193
  }
194
194
  else {
195
195
  return Text;
@@ -205,9 +205,9 @@ export declare class CustomerBalancesService {
205
205
  };
206
206
  };
207
207
  };
208
- static GetInvoiceDataTable(InvoicesData: any, isPhar: boolean, isHC: boolean): any;
208
+ static GetInvoiceDataTable(InvoicesData: any, isPhar: boolean, isHC: boolean, DecimalsNumber: number): any;
209
209
  static getTableWidths(isHC: any): (string | number)[];
210
- static GetItemsTable(InvoiceData: any, isPhar: boolean, isHC: boolean): {
210
+ static GetItemsTable(InvoiceData: any, isPhar: boolean, isHC: boolean, DecimalsNumber: number): {
211
211
  style: string;
212
212
  marginTop: number;
213
213
  marginBottom: number;
@@ -223,6 +223,6 @@ export declare class CustomerBalancesService {
223
223
  vLineColor: (i: any, node: any) => string;
224
224
  };
225
225
  };
226
- static BuildTableBodyForLaborAndParts(InvoiceData: any, isPhar: boolean, isHC: boolean): any;
226
+ static BuildTableBodyForLaborAndParts(InvoiceData: any, isPhar: boolean, isHC: boolean, DecimalsNumber: number): any;
227
227
  static GetHeaderNames(isPhar: boolean, isHC: boolean): any;
228
228
  }
@@ -19,16 +19,16 @@ class CustomerBalancesService {
19
19
  { text: 'Customer Balances', alignment: 'center', fontSize: 15, bold: true },
20
20
  { text: 'As of ' + my_date_1.MyDate.ConvertUTCDateToReadable(my_date_1.MyDate.GetDateTimeNowInUTC(EntityData.User.TZ)), alignment: 'center', fontSize: 10 },
21
21
  // SharedPDFService.HeaderAfterLine(),
22
- this.GetInvoiceDataTable(InvoicesData, isPhar, isHC),
22
+ this.GetInvoiceDataTable(InvoicesData, isPhar, isHC, EntityData.Entity.Settings.DecimalsNumber),
23
23
  ],
24
24
  styles: shared_pdf_service_1.SharedPDFService.GetStyles()
25
25
  };
26
26
  return dd;
27
27
  }
28
- static GetInvoiceDataTable(InvoicesData, isPhar, isHC) {
28
+ static GetInvoiceDataTable(InvoicesData, isPhar, isHC, DecimalsNumber) {
29
29
  let Data = [];
30
30
  InvoicesData.forEach((invoice) => {
31
- Data.push(this.GetItemsTable(invoice, isPhar, isHC));
31
+ Data.push(this.GetItemsTable(invoice, isPhar, isHC, DecimalsNumber));
32
32
  });
33
33
  return Data;
34
34
  }
@@ -40,7 +40,7 @@ class CustomerBalancesService {
40
40
  return [25, 60, 70, '*', 70, 80, 50, 50];
41
41
  }
42
42
  }
43
- static GetItemsTable(InvoiceData, isPhar, isHC) {
43
+ static GetItemsTable(InvoiceData, isPhar, isHC, DecimalsNumber) {
44
44
  // InvoicesData.forEach((InvoiceData: any) => {
45
45
  return {
46
46
  style: 'tableExample',
@@ -49,7 +49,7 @@ class CustomerBalancesService {
49
49
  table: {
50
50
  widths: this.getTableWidths(isHC),
51
51
  headerRows: 2,
52
- body: this.BuildTableBodyForLaborAndParts(InvoiceData, isPhar, isHC)
52
+ body: this.BuildTableBodyForLaborAndParts(InvoiceData, isPhar, isHC, DecimalsNumber)
53
53
  // body:[['fsdfsdf','asfafdas','asdasdas','asdasdasd','asddass']]
54
54
  },
55
55
  layout: {
@@ -72,7 +72,7 @@ class CustomerBalancesService {
72
72
  };
73
73
  // });
74
74
  }
75
- static BuildTableBodyForLaborAndParts(InvoiceData, isPhar, isHC) {
75
+ static BuildTableBodyForLaborAndParts(InvoiceData, isPhar, isHC, DecimalsNumber) {
76
76
  let body = this.GetHeaderNames(isPhar, isHC);
77
77
  let Row = [{ text: InvoiceData.Name, alignment: 'left', colSpan: isHC ? 5 : 8, bold: true, fontSize: 12 }, {}, {}, {}, {}];
78
78
  if (!isHC) {
@@ -94,11 +94,11 @@ class CustomerBalancesService {
94
94
  }
95
95
  // dataRow.push({ text: invoice.BFrom.Name, alignment: 'left', style: ['headerstyle'], });
96
96
  dataRow.push({ text: my_date_1.MyDate.ConvertUTCDateToReadable(invoice.CrDate), alignment: 'center', style: ['headerstyle'], });
97
- dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.Total), alignment: 'right', style: ['headerstyle'], });
98
- dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.Due), alignment: 'right', style: ['headerstyle'], });
97
+ dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.Total, DecimalsNumber), alignment: 'right', style: ['headerstyle'], });
98
+ dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.Due, DecimalsNumber), alignment: 'right', style: ['headerstyle'], });
99
99
  body.push(dataRow);
100
100
  if (InvoiceData.Invoices.length === (index + 1)) {
101
- let Row = [{ text: 'Total Due ', alignment: 'right', colSpan: isHC ? 4 : 6, bold: true, fontSize: 9 }, {}, {}, {}, { text: tr_utils_1.TrUtils.FixPriceValue(InvoiceData.Balance), fontSize: 9, alignment: 'right', bold: true }];
101
+ let Row = [{ text: 'Total Due ', alignment: 'right', colSpan: isHC ? 4 : 6, bold: true, fontSize: 9 }, {}, {}, {}, { text: tr_utils_1.TrUtils.FixPriceValue(InvoiceData.Balance, DecimalsNumber), fontSize: 9, alignment: 'right', bold: true }];
102
102
  if (!isHC) {
103
103
  Row.splice(2, 0, {}, {});
104
104
  // Row.push({});
@@ -118,7 +118,7 @@ class CustomerBalancesService {
118
118
  // dataRow.push({ text: TrUtils.IsNull(invoice.Prod) ? '' : invoice.Prod?.Model + ' ' + invoice.Prod?.Var });
119
119
  // }
120
120
  // dataRow.push({ text: invoice.BFrom.Name, alignment: 'left', style: ['headerstyle'], });
121
- dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.Total), alignment: 'right', style: ['headerstyle'], });
121
+ dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.Total, DecimalsNumber), alignment: 'right', style: ['headerstyle'], });
122
122
  // dataRow.push({ text: TrUtils.FixPriceValue(invoice.Due), alignment: 'right', style: ['headerstyle'], });
123
123
  body.push(dataRow);
124
124
  // if (InvoiceData.Invoices.length === (index + 1)) {
@@ -205,9 +205,9 @@ export declare class PaymentsReportPDFService {
205
205
  };
206
206
  };
207
207
  };
208
- static GetInvoiceDataTable(InvoicesData: any, ispur: boolean, isSale: boolean, UserTimeZone: any): any;
208
+ static GetInvoiceDataTable(InvoicesData: any, ispur: boolean, isSale: boolean, UserTimeZone: any, DecimalsNumber: number): any;
209
209
  static getTableWidths(): (string | number)[];
210
- static GetItemsTable(InvoiceData: any, ispur: boolean, isSale: boolean, UserTimeZone: any): {
210
+ static GetItemsTable(InvoiceData: any, ispur: boolean, isSale: boolean, UserTimeZone: any, DecimalsNumber: number): {
211
211
  style: string;
212
212
  marginTop: number;
213
213
  marginBottom: number;
@@ -223,6 +223,6 @@ export declare class PaymentsReportPDFService {
223
223
  vLineColor: (i: any, node: any) => string;
224
224
  };
225
225
  };
226
- static BuildTableBodyForLaborAndParts(InvoiceData: any, ispur: boolean, isSale: boolean, UserTimeZone: any): any;
226
+ static BuildTableBodyForLaborAndParts(InvoiceData: any, ispur: boolean, isSale: boolean, UserTimeZone: any, DecimalsNumber: number): any;
227
227
  static GetHeaderNames(ispur: boolean): any;
228
228
  }
@@ -18,16 +18,16 @@ class PaymentsReportPDFService {
18
18
  { text: '' + EntityData.Entity.DName + '', style: ['header'] },
19
19
  { text: HeaerName, alignment: 'center', fontSize: 15, bold: true },
20
20
  shared_pdf_service_1.SharedPDFService.GetSearchValueDetails(searchValue),
21
- this.GetInvoiceDataTable(InvoicesData, ispur, isSale, EntityData.User.TZ),
21
+ this.GetInvoiceDataTable(InvoicesData, ispur, isSale, EntityData.User.TZ, EntityData.Entity.Settings.DecimalsNumber),
22
22
  ],
23
23
  styles: shared_pdf_service_1.SharedPDFService.GetStyles()
24
24
  };
25
25
  return dd;
26
26
  }
27
- static GetInvoiceDataTable(InvoicesData, ispur, isSale, UserTimeZone) {
27
+ static GetInvoiceDataTable(InvoicesData, ispur, isSale, UserTimeZone, DecimalsNumber) {
28
28
  let Data = [];
29
29
  // InvoicesData.forEach((invoice: any) => {
30
- Data.push(this.GetItemsTable(InvoicesData, ispur, isSale, UserTimeZone));
30
+ Data.push(this.GetItemsTable(InvoicesData, ispur, isSale, UserTimeZone, DecimalsNumber));
31
31
  // });
32
32
  return Data;
33
33
  }
@@ -38,7 +38,7 @@ class PaymentsReportPDFService {
38
38
  // return [25, '*', 40, 40, 80];
39
39
  // }
40
40
  }
41
- static GetItemsTable(InvoiceData, ispur, isSale, UserTimeZone) {
41
+ static GetItemsTable(InvoiceData, ispur, isSale, UserTimeZone, DecimalsNumber) {
42
42
  // InvoicesData.forEach((InvoiceData: any) => {
43
43
  return {
44
44
  style: 'tableExample',
@@ -47,7 +47,7 @@ class PaymentsReportPDFService {
47
47
  table: {
48
48
  widths: this.getTableWidths(),
49
49
  headerRows: 1,
50
- body: this.BuildTableBodyForLaborAndParts(InvoiceData, ispur, isSale, UserTimeZone)
50
+ body: this.BuildTableBodyForLaborAndParts(InvoiceData, ispur, isSale, UserTimeZone, DecimalsNumber)
51
51
  // body:[['fsdfsdf','asfafdas','asdasdas','asdasdasd','asddass']]
52
52
  },
53
53
  layout: {
@@ -70,7 +70,7 @@ class PaymentsReportPDFService {
70
70
  };
71
71
  // });
72
72
  }
73
- static BuildTableBodyForLaborAndParts(InvoiceData, ispur, isSale, UserTimeZone) {
73
+ static BuildTableBodyForLaborAndParts(InvoiceData, ispur, isSale, UserTimeZone, DecimalsNumber) {
74
74
  let body = this.GetHeaderNames(ispur);
75
75
  InvoiceData.forEach((invoice, index) => {
76
76
  var _a;
@@ -80,7 +80,7 @@ class PaymentsReportPDFService {
80
80
  dataRow.push({ text: isSale ? invoice.CustName : invoice.Name });
81
81
  dataRow.push({ text: isSale ? my_date_1.MyDate.ConvertUTCDateTimeToReadable(invoice.Pay.Dt, UserTimeZone) : my_date_1.MyDate.ConvertUTCDateTimeToReadable(invoice.Date, UserTimeZone) });
82
82
  dataRow.push({ text: isSale ? invoice.Pay.Type : invoice.PType });
83
- dataRow.push({ text: isSale ? tr_utils_1.TrUtils.FixPriceValue((_a = invoice.Pay) === null || _a === void 0 ? void 0 : _a.Amt) : tr_utils_1.TrUtils.FixPriceValue(invoice.Amt), alignment: 'right' });
83
+ dataRow.push({ text: isSale ? tr_utils_1.TrUtils.FixPriceValue((_a = invoice.Pay) === null || _a === void 0 ? void 0 : _a.Amt, DecimalsNumber) : tr_utils_1.TrUtils.FixPriceValue(invoice.Amt, DecimalsNumber), alignment: 'right' });
84
84
  body.push(dataRow);
85
85
  });
86
86
  return body;
@@ -244,7 +244,7 @@ export declare class ConsultationFeeReceiptPrintService {
244
244
  fontSize: number;
245
245
  width: string;
246
246
  };
247
- static GetDiscountOverall(consultationData: any): string;
247
+ static GetDiscountOverall(consultationData: any, DecimalsNumber: number): string;
248
248
  static CustomerAndVehicleDetailsAfterLine(size: any): {
249
249
  canvas: {
250
250
  type: string;
@@ -5,6 +5,7 @@ const date_fns_1 = require("date-fns");
5
5
  const tr_utils_1 = require("../../utils/tr-utils");
6
6
  const shared_pdf_service_1 = require("../../shared/shared-pdf.service");
7
7
  const my_date_1 = require("../../utils/my-date");
8
+ const aggregation_1 = require("../../aggregation/aggregation");
8
9
  class ConsultationFeeReceiptPrintService {
9
10
  static GetPrint(consultationData) {
10
11
  if (tr_utils_1.TrUtils.IsNull(consultationData.Name)) {
@@ -225,10 +226,9 @@ class ConsultationFeeReceiptPrintService {
225
226
  static GetBillofSupplyName(Settings) {
226
227
  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
228
  }
228
- static GetDiscountOverall(consultationData) {
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);
229
+ static GetDiscountOverall(consultationData, DecimalsNumber) {
230
+ let OveralDisc = (0, aggregation_1.addition)(tr_utils_1.TrUtils.SetValueToZeroIfNull(Number(consultationData.Disc)), tr_utils_1.TrUtils.SetValueToZeroIfNull(Number(consultationData.CustPartsDiscTotal)));
231
+ return tr_utils_1.TrUtils.FixPriceValue(OveralDisc, DecimalsNumber);
232
232
  }
233
233
  static CustomerAndVehicleDetailsAfterLine(size) {
234
234
  let length = 575;
@@ -14,13 +14,13 @@ export declare class GSTROXlsxFileService {
14
14
  };
15
15
  static ws: any;
16
16
  static MainHeadings: any[];
17
- static GetGSTROExcelData(MainData: any, WOTypes: any): any;
17
+ static GetGSTROExcelData(MainData: any, WOTypes: any, EntitySettings: any): any;
18
18
  static GetTotals(MainData: any, WOTypes: any): any;
19
19
  static GetWOTypeName(Type: any, WOTypes: any): any;
20
20
  static setHeadingInCell(MainData: any): void;
21
- static setInvoiceDetailsInCell(MainData: any): void;
22
- static SetInvoiceDataInExcel(InvoiceInfo: any, Index: any): void;
23
- static ConvertToString(Text: any, IsString: any): any;
21
+ static setInvoiceDetailsInCell(MainData: any, DecimalsNumber: number): void;
22
+ static SetInvoiceDataInExcel(InvoiceInfo: any, Index: any, DecimalsNumber: number): void;
23
+ static ConvertToString(Text: any, IsString: any, DecimalsNumber: number): any;
24
24
  static SetDataInCell(Data: any, ColRange: number, RowNum: any): void;
25
25
  static getcelltype(cell: any): any;
26
26
  static ConvertDateToReadableFormat(DateObject: any): any;
@@ -27,7 +27,7 @@ exports.GSTROXlsxFileService = void 0;
27
27
  const XLSX = __importStar(require("xlsx"));
28
28
  const tr_utils_1 = require("../../utils/tr-utils");
29
29
  class GSTROXlsxFileService {
30
- static GetGSTROExcelData(MainData, WOTypes) {
30
+ static GetGSTROExcelData(MainData, WOTypes, EntitySettings) {
31
31
  this.wb = {};
32
32
  this.ws = {};
33
33
  this.Row = 0;
@@ -40,7 +40,7 @@ class GSTROXlsxFileService {
40
40
  this.wb.SheetNames = [];
41
41
  MainData = this.GetTotals(MainData, WOTypes);
42
42
  this.setHeadingInCell(MainData);
43
- this.setInvoiceDetailsInCell(MainData);
43
+ this.setInvoiceDetailsInCell(MainData, EntitySettings);
44
44
  this.ws['!ref'] = XLSX.utils.encode_range(this.range);
45
45
  this.ws['!merges'] = this.MergeArray;
46
46
  this.ws["!cols"] = [{ wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 50 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 },
@@ -767,16 +767,16 @@ class GSTROXlsxFileService {
767
767
  });
768
768
  this.Row += 2;
769
769
  }
770
- static setInvoiceDetailsInCell(MainData) {
770
+ static setInvoiceDetailsInCell(MainData, DecimalsNumber) {
771
771
  let SNO = 0;
772
772
  MainData.forEach((InvoiceList) => {
773
773
  InvoiceList.Invoices.forEach((invoice, Index) => {
774
774
  SNO = SNO + 1;
775
- this.SetInvoiceDataInExcel(invoice, SNO);
775
+ this.SetInvoiceDataInExcel(invoice, SNO, DecimalsNumber);
776
776
  });
777
777
  });
778
778
  }
779
- static SetInvoiceDataInExcel(InvoiceInfo, Index) {
779
+ static SetInvoiceDataInExcel(InvoiceInfo, Index, DecimalsNumber) {
780
780
  // console.log(InvoiceInfo);
781
781
  InvoiceInfo.CrDate = this.ConvertDateToReadableFormat(InvoiceInfo.CrDate);
782
782
  let InvoiceData = [];
@@ -844,7 +844,7 @@ class GSTROXlsxFileService {
844
844
  });
845
845
  let ColStart = 0;
846
846
  InvoiceData.forEach((InvData) => {
847
- InvData.text = this.ConvertToString(InvData.text, InvData.IsString);
847
+ InvData.text = this.ConvertToString(InvData.text, InvData.IsString, DecimalsNumber);
848
848
  this.SetDataInCell(InvData.text, ColStart, this.Row);
849
849
  this.MergeArray.push({
850
850
  s: { r: this.Row, c: ColStart },
@@ -854,7 +854,7 @@ class GSTROXlsxFileService {
854
854
  });
855
855
  this.Row += 1;
856
856
  }
857
- static ConvertToString(Text, IsString) {
857
+ static ConvertToString(Text, IsString, DecimalsNumber) {
858
858
  if (IsString) {
859
859
  if (Text == null) {
860
860
  Text = '';
@@ -866,7 +866,7 @@ class GSTROXlsxFileService {
866
866
  }
867
867
  }
868
868
  if (typeof Text === 'number') {
869
- return Number(tr_utils_1.TrUtils.FixedTo(Text));
869
+ return Number(tr_utils_1.TrUtils.FixedTo(Text, DecimalsNumber));
870
870
  }
871
871
  else {
872
872
  return Text;
@@ -4,12 +4,12 @@ export declare class GSTR1ExcelService {
4
4
  static MergeArray: any[];
5
5
  static range: any;
6
6
  static ws: any;
7
- static GetGSTR1ExcelData(MainData: any): any;
7
+ static GetGSTR1ExcelData(MainData: any, EntitySettings: any): any;
8
8
  static GetTotals(MainData: any): any;
9
9
  static setHeadingInCell(): void;
10
- static setInvoiceDetailsInCell(MainData: any): void;
11
- static SetInvoiceDataInExcel(InvoiceList: any): void;
12
- static ConvertToString(Text: any, IsString: any): any;
10
+ static setInvoiceDetailsInCell(MainData: any, DecimalsNumber: number): void;
11
+ static SetInvoiceDataInExcel(InvoiceList: any, DecimalsNumber: number): void;
12
+ static ConvertToString(Text: any, IsString: any, DecimalsNumber: number): any;
13
13
  static SetDataInCell(Data: any, ColRange: number, RowNum: any): void;
14
14
  static getcelltype(cell: any): any;
15
15
  static ConvertDateToReadableFormat(DateObject: any): any;
@@ -27,7 +27,7 @@ exports.GSTR1ExcelService = void 0;
27
27
  const XLSX = __importStar(require("xlsx"));
28
28
  const tr_utils_1 = require("../../utils/tr-utils");
29
29
  class GSTR1ExcelService {
30
- static GetGSTR1ExcelData(MainData) {
30
+ static GetGSTR1ExcelData(MainData, EntitySettings) {
31
31
  this.wb = {};
32
32
  this.ws = {};
33
33
  this.Row = 0;
@@ -40,7 +40,7 @@ class GSTR1ExcelService {
40
40
  this.wb.SheetNames = [];
41
41
  MainData = this.GetTotals(MainData);
42
42
  this.setHeadingInCell();
43
- this.setInvoiceDetailsInCell(MainData);
43
+ this.setInvoiceDetailsInCell(MainData, EntitySettings.DecimalsNumber);
44
44
  this.ws['!ref'] = XLSX.utils.encode_range(this.range);
45
45
  this.ws['!merges'] = this.MergeArray;
46
46
  this.wb.SheetNames.push(ws_name);
@@ -124,12 +124,12 @@ class GSTR1ExcelService {
124
124
  });
125
125
  this.Row += 2;
126
126
  }
127
- static setInvoiceDetailsInCell(MainData) {
127
+ static setInvoiceDetailsInCell(MainData, DecimalsNumber) {
128
128
  MainData.forEach((InvoiceList) => {
129
- this.SetInvoiceDataInExcel(InvoiceList);
129
+ this.SetInvoiceDataInExcel(InvoiceList, DecimalsNumber);
130
130
  });
131
131
  }
132
- static SetInvoiceDataInExcel(InvoiceList) {
132
+ static SetInvoiceDataInExcel(InvoiceList, DecimalsNumber) {
133
133
  InvoiceList.Invoices.forEach((InvoiceInfo, index) => {
134
134
  // let InvoiceInfo = InvoiceInfoData.Inv;
135
135
  InvoiceInfo.CrDate = this.ConvertDateToReadableFormat(InvoiceInfo.CrDate);
@@ -160,7 +160,7 @@ class GSTR1ExcelService {
160
160
  ];
161
161
  let ColStart = 0;
162
162
  InvoiceData.forEach((InvData) => {
163
- InvData.text = this.ConvertToString(InvData.text, InvData.IsString);
163
+ InvData.text = this.ConvertToString(InvData.text, InvData.IsString, DecimalsNumber);
164
164
  this.SetDataInCell(InvData.text, ColStart, this.Row);
165
165
  this.MergeArray.push({ s: { r: this.Row, c: ColStart }, e: { r: this.Row, c: ColStart + InvData.ColRange - 1 } });
166
166
  ColStart += InvData.ColRange;
@@ -180,7 +180,7 @@ class GSTR1ExcelService {
180
180
  ];
181
181
  let PartColStart = TotalsColStart + 1;
182
182
  PartData.forEach((PartInfo) => {
183
- PartInfo.text = this.ConvertToString(PartInfo.text, PartInfo.IsString);
183
+ PartInfo.text = this.ConvertToString(PartInfo.text, PartInfo.IsString, DecimalsNumber);
184
184
  this.SetDataInCell(PartInfo.text, PartColStart, this.Row);
185
185
  this.MergeArray.push({ s: { r: this.Row, c: PartColStart }, e: { r: this.Row, c: PartColStart + PartInfo.ColRange - 1 } });
186
186
  PartColStart += PartInfo.ColRange;
@@ -203,7 +203,7 @@ class GSTR1ExcelService {
203
203
  ];
204
204
  let LaborColStart = TotalsColStart + 1;
205
205
  ServiceData.forEach((ServiceInfo) => {
206
- ServiceInfo.text = this.ConvertToString(ServiceInfo.text, ServiceInfo.IsString);
206
+ ServiceInfo.text = this.ConvertToString(ServiceInfo.text, ServiceInfo.IsString, DecimalsNumber);
207
207
  this.SetDataInCell(ServiceInfo.text, LaborColStart, this.Row);
208
208
  this.MergeArray.push({ s: { r: this.Row, c: LaborColStart }, e: { r: this.Row, c: LaborColStart + ServiceInfo.ColRange - 1 } });
209
209
  LaborColStart += ServiceInfo.ColRange;
@@ -215,7 +215,7 @@ class GSTR1ExcelService {
215
215
  this.Row += 1;
216
216
  });
217
217
  }
218
- static ConvertToString(Text, IsString) {
218
+ static ConvertToString(Text, IsString, DecimalsNumber) {
219
219
  if (IsString) {
220
220
  if (tr_utils_1.TrUtils.IsNull(Text)) {
221
221
  Text = '';
@@ -227,7 +227,7 @@ class GSTR1ExcelService {
227
227
  }
228
228
  }
229
229
  if (typeof (Text) === 'number') {
230
- return Number(tr_utils_1.TrUtils.FixedTo(Text));
230
+ return Number(tr_utils_1.TrUtils.FixedTo(Text, DecimalsNumber));
231
231
  }
232
232
  else {
233
233
  return Text;
@@ -4,12 +4,12 @@ export declare class GSTR2ExcelService {
4
4
  static MergeArray: any[];
5
5
  static range: any;
6
6
  static ws: any;
7
- static GetGSTR1ExcelData(MainData: any): any;
7
+ static GetGSTR1ExcelData(MainData: any, EntitySettings: any): any;
8
8
  static GetTotals(MainData: any): any;
9
9
  static setHeadingInCell(): void;
10
- static setInvoiceDetailsInCell(MainData: any): void;
11
- static SetInvoiceDataInExcel(InvoiceList: any): void;
12
- static ConvertToString(Text: any, IsString: any): any;
10
+ static setInvoiceDetailsInCell(MainData: any, DecimalsNumber: number): void;
11
+ static SetInvoiceDataInExcel(InvoiceList: any, DecimalsNumber: number): void;
12
+ static ConvertToString(Text: any, IsString: any, DecimalsNumber: number): any;
13
13
  static SetDataInCell(Data: any, ColRange: number, RowNum: any): void;
14
14
  static getcelltype(cell: any): any;
15
15
  static ConvertDateToReadableFormat(DateObject: any): any;