shareneus 1.4.50 → 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 (87) 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/sa-wise-labor-sales-excel.service.d.ts +4 -4
  15. package/dist/accounting/invoice/reports/excel/sa-wise-labor-sales-excel.service.js +12 -11
  16. package/dist/accounting/invoice/reports/excel/sa-wise-part-sales-excel.service.d.ts +4 -4
  17. package/dist/accounting/invoice/reports/excel/sa-wise-part-sales-excel.service.js +12 -11
  18. package/dist/accounting/invoice/reports/excel/sale-summary-excel.service.d.ts +4 -4
  19. package/dist/accounting/invoice/reports/excel/sale-summary-excel.service.js +11 -10
  20. package/dist/accounting/invoice/reports/excel/sales-by-service-summary-excel.service.d.ts +4 -4
  21. package/dist/accounting/invoice/reports/excel/sales-by-service-summary-excel.service.js +19 -18
  22. package/dist/accounting/invoice/reports/excel/scheduled-drug-summary-excel.service.d.ts +4 -4
  23. package/dist/accounting/invoice/reports/excel/scheduled-drug-summary-excel.service.js +11 -11
  24. package/dist/accounting/invoice/reports/excel/scheduled-drugs-excel.service.d.ts +4 -4
  25. package/dist/accounting/invoice/reports/excel/scheduled-drugs-excel.service.js +11 -11
  26. package/dist/accounting/invoice/reports/pdf/analysis-pdf.service.d.ts +3 -3
  27. package/dist/accounting/invoice/reports/pdf/analysis-pdf.service.js +13 -12
  28. package/dist/accounting/invoice/reports/pdf/category-wise-item-pdf.service.d.ts +4 -4
  29. package/dist/accounting/invoice/reports/pdf/category-wise-item-pdf.service.js +14 -13
  30. package/dist/accounting/invoice/reports/pdf/cust-wise-sales-details-pdf.service.d.ts +4 -4
  31. package/dist/accounting/invoice/reports/pdf/cust-wise-sales-details-pdf.service.js +15 -14
  32. package/dist/accounting/invoice/reports/pdf/cust-wise-sales-summary-pdf.service.d.ts +4 -4
  33. package/dist/accounting/invoice/reports/pdf/cust-wise-sales-summary-pdf.service.js +15 -14
  34. package/dist/accounting/invoice/reports/pdf/item-wise-doctor-sale-pdf.service.d.ts +4 -4
  35. package/dist/accounting/invoice/reports/pdf/item-wise-doctor-sale-pdf.service.js +10 -10
  36. package/dist/accounting/invoice/reports/pdf/item-wise-sales-pdf.service.d.ts +4 -4
  37. package/dist/accounting/invoice/reports/pdf/item-wise-sales-pdf.service.js +15 -14
  38. package/dist/accounting/invoice/reports/pdf/manf-wise-sales-pdf.service.d.ts +4 -4
  39. package/dist/accounting/invoice/reports/pdf/manf-wise-sales-pdf.service.js +13 -12
  40. package/dist/accounting/invoice/reports/pdf/operator-wise-details-pdf.service.d.ts +4 -4
  41. package/dist/accounting/invoice/reports/pdf/operator-wise-details-pdf.service.js +14 -14
  42. package/dist/accounting/invoice/reports/pdf/operator-wise-summary-pdf.d.ts +4 -4
  43. package/dist/accounting/invoice/reports/pdf/operator-wise-summary-pdf.js +14 -14
  44. package/dist/accounting/invoice/reports/pdf/sales-by-service-pdf.service.d.ts +4 -4
  45. package/dist/accounting/invoice/reports/pdf/sales-by-service-pdf.service.js +14 -13
  46. package/dist/accounting/invoice/reports/pdf/scheduled-drug-pdf.service.d.ts +4 -4
  47. package/dist/accounting/invoice/reports/pdf/scheduled-drug-pdf.service.js +8 -8
  48. package/dist/accounting/invoice/reports/pdf/scheduled-drug-summary-pdf.service.d.ts +4 -4
  49. package/dist/accounting/invoice/reports/pdf/scheduled-drug-summary-pdf.service.js +12 -11
  50. package/dist/accounting/invoice/shared-inv-pdf.service.js +1 -1
  51. package/dist/accounting/payment-receive/reports/excel/cust-balance-excel.service.d.ts +4 -4
  52. package/dist/accounting/payment-receive/reports/excel/cust-balance-excel.service.js +9 -9
  53. package/dist/accounting/payment-receive/reports/excel/payment-receive-excel.service.d.ts +5 -5
  54. package/dist/accounting/payment-receive/reports/excel/payment-receive-excel.service.js +11 -11
  55. package/dist/accounting/payment-receive/reports/pdf/customer-balances-pdf.service.d.ts +3 -3
  56. package/dist/accounting/payment-receive/reports/pdf/customer-balances-pdf.service.js +10 -10
  57. package/dist/accounting/payment-receive/reports/pdf/payment-report-pdf.service.d.ts +3 -3
  58. package/dist/accounting/payment-receive/reports/pdf/payment-report-pdf.service.js +7 -7
  59. package/dist/appointments/consultations/consultation-fee-receipt.service.d.ts +1 -1
  60. package/dist/appointments/consultations/consultation-fee-receipt.service.js +4 -4
  61. package/dist/inventory/items/issue-parts-pdf.service.js +1 -1
  62. package/dist/inventory/items/reports/pdf/expiring-drugs-pdf.service.d.ts +2 -2
  63. package/dist/inventory/items/reports/pdf/expiring-drugs-pdf.service.js +8 -7
  64. package/dist/inventory/items/reports/pdf/item-wise-mout-details-pdf.d.ts +4 -4
  65. package/dist/inventory/items/reports/pdf/item-wise-mout-details-pdf.js +9 -9
  66. package/dist/inventory/items/reports/pdf/item-wise-mout-summary-pdf.d.ts +4 -4
  67. package/dist/inventory/items/reports/pdf/item-wise-mout-summary-pdf.js +9 -9
  68. package/dist/purchases/payment-made/reports/pdf/vendor-balances-pdf.service.d.ts +3 -3
  69. package/dist/purchases/payment-made/reports/pdf/vendor-balances-pdf.service.js +8 -8
  70. package/dist/purchases/purchase-order/purchase-order-pdf.service.js +5 -5
  71. package/dist/purchases/purchase-order/purchase-order-print.service.d.ts +2 -2
  72. package/dist/purchases/purchase-order/purchase-order-print.service.js +25 -25
  73. package/dist/purchases/vendor-credit-note/vendor-credit-note-pdf.service.js +1 -1
  74. package/dist/purchases/vendor-debit-note/vendor-debit-note-pdf.service.js +1 -1
  75. package/dist/sales/delivery-challan/dc-landscape-pdf.service.d.ts +1 -1
  76. package/dist/sales/delivery-challan/dc-landscape-pdf.service.js +7 -6
  77. package/dist/sales/sales/sales-pdf.service.js +1 -1
  78. package/dist/sales/sales/sales-print.service.js +6 -6
  79. package/dist/services/reports/pdf/repair-orders-pdf.service.d.ts +4 -4
  80. package/dist/services/reports/pdf/repair-orders-pdf.service.js +9 -9
  81. package/dist/services/ro-pdf.service.js +2 -2
  82. package/dist/services/separate-wo-print.service.js +1 -1
  83. package/dist/shared/shared-pdf.service.d.ts +3 -3
  84. package/dist/shared/shared-pdf.service.js +31 -30
  85. package/dist/utils/tr-utils.d.ts +1 -1
  86. package/dist/utils/tr-utils.js +2 -2
  87. package/package.json +1 -1
@@ -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;
@@ -671,7 +671,7 @@ class IssuePartsprintService {
671
671
  let CommonDetails = [
672
672
  shared_pdf_service_1.SharedPDFService.GetFinalTotalDetails(ROPrintData, ROPrintData.CustLaborTotalAfterDisc, ROPrintData.CustLaborDiscTotal, ROPrintData.CustLaborCGST, ROPrintData.CustLaborSGST, ROPrintData.CustLaborIGST, ROPrintData.CustPartIGST, ROPrintData.ShowIGST, ROPrintData.ShowTaxColumn, ROPrintData.CustPartsTotalAfterDisc, ROPrintData.CustPartsDiscTotal, ROPrintData.CustPartCGST, ROPrintData.CustPartSGST, ROPrintData.CustTaxGroupData, ROPrintData.ShowAccParts, ROPrintData.CustLaborAfterTax, ROPrintData.CustPartAfterTax, ROPrintData.FixedDisc, ROPrintData.For, ROPrintData.FixedTotal, ROPrintData.CustTotalRoundedBy, ROPrintData.CustRoundedTotal, ROPrintData.ShowTaxColumn, ROPrintData.ShowTaxColumn, tr_utils_1.TrUtils.isTaxable(ROPrintData.Settings.Tax), ROPrintData.CustLaborITax, ROPrintData.CustPartITax, ROPrintData.Consolidate, ROPrintData.From, ROPrintData.Adj, null, moreDiscDetails),
673
673
  this.GetNumberInWords(ROPrintData.CustRoundedTotal),
674
- shared_pdf_service_1.SharedPDFService.InvoiceDueStatus(ROPrintData.Type, ROPrintData.Paid, ROPrintData.Due, ROPrintData.Sts, ROPrintData.isCountersale),
674
+ shared_pdf_service_1.SharedPDFService.InvoiceDueStatus(ROPrintData.Type, ROPrintData.Paid, ROPrintData.Due, ROPrintData.Sts, ROPrintData.isCountersale, ROPrintData.Entity.DecimalsNumber),
675
675
  shared_pdf_service_1.SharedPDFService.GetTemsAndConditions(ROPrintData.Entity.Terms),
676
676
  shared_pdf_service_1.SharedPDFService.GetBankDetials(ROPrintData.Entity.Bank, ROPrintData.Entity.PrBank),
677
677
  shared_pdf_service_1.SharedPDFService.GetUnderLine(),
@@ -28,7 +28,7 @@ export declare class ExpiringDrugPDFService {
28
28
  text: any;
29
29
  })[];
30
30
  };
31
- static GetItemsTable(Items: any): {
31
+ static GetItemsTable(Items: any, DecimalsNumber: number): {
32
32
  style: string;
33
33
  marginTop: number;
34
34
  marginBottom: number;
@@ -44,6 +44,6 @@ export declare class ExpiringDrugPDFService {
44
44
  vLineColor: (i: any, node: any) => string;
45
45
  };
46
46
  };
47
- static BuildTableBodyForLaborAndParts(Items: any): any;
47
+ static BuildTableBodyForLaborAndParts(Items: any, DecimalsNumber: number): any;
48
48
  static GetHeaderNames(): any;
49
49
  }
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ExpiringDrugPDFService = void 0;
4
+ const aggregation_1 = require("../../../../aggregation/aggregation");
4
5
  const my_date_1 = require("../../../../utils/my-date");
5
6
  const tr_utils_1 = require("../../../../utils/tr-utils");
6
7
  class ExpiringDrugPDFService {
@@ -21,7 +22,7 @@ class ExpiringDrugPDFService {
21
22
  content: [
22
23
  { text: ReOrderPointData.Entity.CName, style: ['headerstyle'], alignment: 'center', fontSize: 20 },
23
24
  { text: 'Expiring Drugs (' + this.GetDate(DatesDetails, ReOrderPointData.Entity.User.TZ) + ')', style: ['headerstyle'], alignment: 'center', fontSize: 12 },
24
- this.GetItemsTable(ReOrderPointData.Items),
25
+ this.GetItemsTable(ReOrderPointData.Items, ReOrderPointData.Entity.DecimalsNumber),
25
26
  this.GetSignatures(ReOrderPointData.Entity.CName, ReOrderPointData.Type, ReOrderPointData.For),
26
27
  ],
27
28
  styles: {
@@ -97,7 +98,7 @@ class ExpiringDrugPDFService {
97
98
  text: ['For ', { text: CName, }],
98
99
  };
99
100
  }
100
- static GetItemsTable(Items) {
101
+ static GetItemsTable(Items, DecimalsNumber) {
101
102
  return {
102
103
  style: 'tableExample',
103
104
  marginTop: 3,
@@ -105,7 +106,7 @@ class ExpiringDrugPDFService {
105
106
  table: {
106
107
  widths: ['*', 80, 50, 40, 50, 70],
107
108
  headerRows: 1,
108
- body: this.BuildTableBodyForLaborAndParts(Items)
109
+ body: this.BuildTableBodyForLaborAndParts(Items, DecimalsNumber)
109
110
  },
110
111
  layout: {
111
112
  hLineWidth: function (i, node) {
@@ -123,7 +124,7 @@ class ExpiringDrugPDFService {
123
124
  }
124
125
  };
125
126
  }
126
- static BuildTableBodyForLaborAndParts(Items) {
127
+ static BuildTableBodyForLaborAndParts(Items, DecimalsNumber) {
127
128
  let body = this.GetHeaderNames();
128
129
  let Total = 0;
129
130
  Items.forEach((item, index) => {
@@ -133,11 +134,11 @@ class ExpiringDrugPDFService {
133
134
  dataRow.push({ text: item.Batch.BN, alignment: 'left', style: ['headerstyle'], });
134
135
  dataRow.push({ text: my_date_1.MyDate.ConvertUTCDateToReadableExDateTxt(item.Batch.ExDt), alignment: 'center', style: ['headerstyle'], });
135
136
  dataRow.push({ text: item.Batch.Qty, alignment: 'right', style: ['headerstyle'], });
136
- dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(item.Batch.Cost), alignment: 'right', style: ['headerstyle'], });
137
- dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(item.Batch.Qty * item.Batch.Cost), alignment: 'right', style: ['headerstyle'], });
137
+ dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(item.Batch.Cost, DecimalsNumber), alignment: 'right', style: ['headerstyle'], });
138
+ dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue((0, aggregation_1.multiply)(item.Batch.Qty, item.Batch.Cost), DecimalsNumber), alignment: 'right', style: ['headerstyle'], });
138
139
  body.push(dataRow);
139
140
  });
140
- let Row = [{ text: 'Total', alignment: 'right', colSpan: 5, bold: true, fontSize: 12 }, {}, {}, {}, {}, { text: tr_utils_1.TrUtils.FixPriceValue(Total), fontSize: 12, alignment: 'right', bold: true }];
141
+ let Row = [{ text: 'Total', alignment: 'right', colSpan: 5, bold: true, fontSize: 12 }, {}, {}, {}, {}, { text: tr_utils_1.TrUtils.FixPriceValue(Total, DecimalsNumber), fontSize: 12, alignment: 'right', bold: true }];
141
142
  body.push(Row);
142
143
  return body;
143
144
  }
@@ -1,5 +1,5 @@
1
1
  export declare class ItemWiseMODetailsPDF {
2
- static GetItemWiseMODetailsPrint(InvoicesData: any, CName: any, isPhar: boolean, isHC: boolean, HeaderName: any, searchValue: any): {
2
+ static GetItemWiseMODetailsPrint(InvoicesData: any, EntityData: any, isPhar: boolean, isHC: boolean, HeaderName: any, searchValue: any): {
3
3
  info: {
4
4
  title: string;
5
5
  };
@@ -206,9 +206,9 @@ export declare class ItemWiseMODetailsPDF {
206
206
  };
207
207
  };
208
208
  };
209
- static GetInvoiceDataTable(InvoicesData: any, isPhar: boolean, isHC: boolean): any;
209
+ static GetInvoiceDataTable(InvoicesData: any, isPhar: boolean, isHC: boolean, DecimalsNumber: number): any;
210
210
  static getTableWidths(isHC: any): (string | number)[];
211
- static GetItemsTable(InvoiceData: any, isPhar: boolean, isHC: boolean): {
211
+ static GetItemsTable(InvoiceData: any, isPhar: boolean, isHC: boolean, DecimalsNumber: number): {
212
212
  style: string;
213
213
  marginTop: number;
214
214
  marginBottom: number;
@@ -224,6 +224,6 @@ export declare class ItemWiseMODetailsPDF {
224
224
  vLineColor: (i: any, node: any) => string;
225
225
  };
226
226
  };
227
- static BuildTableBodyForLaborAndParts(InvoiceData: any, isPhar: boolean, isHC: boolean): any;
227
+ static BuildTableBodyForLaborAndParts(InvoiceData: any, isPhar: boolean, isHC: boolean, DecimalsNumber: number): any;
228
228
  static GetHeaderNames(isPhar: boolean, isHC: boolean): any;
229
229
  }
@@ -5,7 +5,7 @@ const shared_pdf_service_1 = require("../../../../shared/shared-pdf.service");
5
5
  const my_date_1 = require("../../../../utils/my-date");
6
6
  const tr_utils_1 = require("../../../../utils/tr-utils");
7
7
  class ItemWiseMODetailsPDF {
8
- static GetItemWiseMODetailsPrint(InvoicesData, CName, isPhar, isHC, HeaderName, searchValue) {
8
+ static GetItemWiseMODetailsPrint(InvoicesData, EntityData, isPhar, isHC, HeaderName, searchValue) {
9
9
  var dd = {
10
10
  info: {
11
11
  title: 'ItemWiseMO',
@@ -16,26 +16,26 @@ class ItemWiseMODetailsPDF {
16
16
  pageMargins: [10, 15, 10, 15],
17
17
  pageOrientation: 'landscape',
18
18
  content: [
19
- { text: '' + CName + '', style: ['header'] },
19
+ { text: '' + EntityData.DName + '', style: ['header'] },
20
20
  { text: HeaderName, alignment: 'center', fontSize: 15, bold: true },
21
21
  shared_pdf_service_1.SharedPDFService.GetSearchValueDetails(searchValue),
22
- this.GetInvoiceDataTable(InvoicesData, isPhar, isHC),
22
+ this.GetInvoiceDataTable(InvoicesData, isPhar, isHC, EntityData.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: any) => {
31
- Data.push(this.GetItemsTable(InvoicesData, isPhar, isHC));
31
+ Data.push(this.GetItemsTable(InvoicesData, isPhar, isHC, DecimalsNumber));
32
32
  // });
33
33
  return Data;
34
34
  }
35
35
  static getTableWidths(isHC) {
36
36
  return [25, 50, 50, 50, 100, '*', 100, 40, 50, 40, 100];
37
37
  }
38
- static GetItemsTable(InvoiceData, isPhar, isHC) {
38
+ static GetItemsTable(InvoiceData, isPhar, isHC, DecimalsNumber) {
39
39
  return {
40
40
  style: 'tableExample',
41
41
  marginTop: 3,
@@ -43,7 +43,7 @@ class ItemWiseMODetailsPDF {
43
43
  table: {
44
44
  widths: this.getTableWidths(isHC),
45
45
  headerRows: 1,
46
- body: this.BuildTableBodyForLaborAndParts(InvoiceData, isPhar, isHC)
46
+ body: this.BuildTableBodyForLaborAndParts(InvoiceData, isPhar, isHC, DecimalsNumber)
47
47
  },
48
48
  layout: {
49
49
  hLineWidth: function (i, node) {
@@ -61,7 +61,7 @@ class ItemWiseMODetailsPDF {
61
61
  }
62
62
  };
63
63
  }
64
- static BuildTableBodyForLaborAndParts(InvoiceData, isPhar, isHC) {
64
+ static BuildTableBodyForLaborAndParts(InvoiceData, isPhar, isHC, DecimalsNumber) {
65
65
  let body = this.GetHeaderNames(isPhar, isHC);
66
66
  InvoiceData.forEach((invoice, index) => {
67
67
  var _a;
@@ -75,7 +75,7 @@ class ItemWiseMODetailsPDF {
75
75
  dataRow.push({ text: invoice.ShipToUser, alignment: 'left' });
76
76
  dataRow.push({ text: invoice.Name, alignment: 'left' });
77
77
  dataRow.push({ text: invoice.MPN, alignment: 'left' });
78
- dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.Qty), alignment: 'right' });
78
+ dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.Qty, DecimalsNumber), alignment: 'right' });
79
79
  dataRow.push({ text: invoice.ReName, alignment: 'left' });
80
80
  dataRow.push({ text: invoice.Sts, alignment: 'left' });
81
81
  dataRow.push({ text: invoice.Notes, alignment: 'left' });
@@ -1,5 +1,5 @@
1
1
  export declare class ItemWiseMOSummaryPDF {
2
- static GetItemWiseMOSummaryPrint(InvoicesData: any, CName: any, isPhar: boolean, isHC: boolean, HeaderName: any, searchValue: any): {
2
+ static GetItemWiseMOSummaryPrint(InvoicesData: any, EntityData: any, isPhar: boolean, isHC: boolean, HeaderName: any, searchValue: any): {
3
3
  info: {
4
4
  title: string;
5
5
  };
@@ -205,9 +205,9 @@ export declare class ItemWiseMOSummaryPDF {
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 ItemWiseMOSummaryPDF {
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
  }
@@ -4,7 +4,7 @@ exports.ItemWiseMOSummaryPDF = void 0;
4
4
  const shared_pdf_service_1 = require("../../../../shared/shared-pdf.service");
5
5
  const tr_utils_1 = require("../../../../utils/tr-utils");
6
6
  class ItemWiseMOSummaryPDF {
7
- static GetItemWiseMOSummaryPrint(InvoicesData, CName, isPhar, isHC, HeaderName, searchValue) {
7
+ static GetItemWiseMOSummaryPrint(InvoicesData, EntityData, isPhar, isHC, HeaderName, searchValue) {
8
8
  var dd = {
9
9
  info: {
10
10
  title: 'ItemWiseMOSummary',
@@ -14,19 +14,19 @@ class ItemWiseMOSummaryPDF {
14
14
  },
15
15
  pageMargins: [10, 15, 10, 15],
16
16
  content: [
17
- { text: '' + CName + '', style: ['header'] },
17
+ { text: '' + EntityData.DName + '', style: ['header'] },
18
18
  { text: HeaderName, alignment: 'center', fontSize: 15, bold: true },
19
19
  shared_pdf_service_1.SharedPDFService.GetSearchValueDetails(searchValue),
20
- this.GetInvoiceDataTable(InvoicesData, isPhar, isHC),
20
+ this.GetInvoiceDataTable(InvoicesData, isPhar, isHC, EntityData.Settings.DecimalsNumber),
21
21
  ],
22
22
  styles: shared_pdf_service_1.SharedPDFService.GetStyles()
23
23
  };
24
24
  return dd;
25
25
  }
26
- static GetInvoiceDataTable(InvoicesData, isPhar, isHC) {
26
+ static GetInvoiceDataTable(InvoicesData, isPhar, isHC, DecimalsNumber) {
27
27
  let Data = [];
28
28
  // InvoicesData.forEach((invoice: any) => {
29
- Data.push(this.GetItemsTable(InvoicesData, isPhar, isHC));
29
+ Data.push(this.GetItemsTable(InvoicesData, isPhar, isHC, DecimalsNumber));
30
30
  // });
31
31
  return Data;
32
32
  }
@@ -37,7 +37,7 @@ class ItemWiseMOSummaryPDF {
37
37
  return [25, '*', '*'];
38
38
  // }
39
39
  }
40
- static GetItemsTable(InvoiceData, isPhar, isHC) {
40
+ static GetItemsTable(InvoiceData, isPhar, isHC, DecimalsNumber) {
41
41
  return {
42
42
  style: 'tableExample',
43
43
  marginTop: 3,
@@ -45,7 +45,7 @@ class ItemWiseMOSummaryPDF {
45
45
  table: {
46
46
  widths: this.getTableWidths(isHC),
47
47
  headerRows: 1,
48
- body: this.BuildTableBodyForLaborAndParts(InvoiceData, isPhar, isHC)
48
+ body: this.BuildTableBodyForLaborAndParts(InvoiceData, isPhar, isHC, DecimalsNumber)
49
49
  },
50
50
  layout: {
51
51
  hLineWidth: function (i, node) {
@@ -63,7 +63,7 @@ class ItemWiseMOSummaryPDF {
63
63
  }
64
64
  };
65
65
  }
66
- static BuildTableBodyForLaborAndParts(InvoiceData, isPhar, isHC) {
66
+ static BuildTableBodyForLaborAndParts(InvoiceData, isPhar, isHC, DecimalsNumber) {
67
67
  let body = this.GetHeaderNames(isPhar, isHC);
68
68
  InvoiceData.forEach((invoice, index) => {
69
69
  let dataRow = [];
@@ -74,7 +74,7 @@ class ItemWiseMOSummaryPDF {
74
74
  // dataRow.push({ text: invoice.OfQty, alignment: 'right' });
75
75
  // dataRow.push({ text: invoice.ShipToUser, alignment: 'left' });
76
76
  dataRow.push({ text: invoice.Name, alignment: 'left' });
77
- dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.Qty), alignment: 'right' });
77
+ dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.Qty, DecimalsNumber), alignment: 'right' });
78
78
  // dataRow.push({ text: invoice.ReName, alignment: 'left' });
79
79
  // dataRow.push({ text: invoice.Sts, alignment: 'left' });
80
80
  // dataRow.push({ text: TrUtils.FixPriceValue(invoice.Total ), alignment: 'right', style: ['headerstyle'], });
@@ -205,8 +205,8 @@ export declare class VendorBalancesService {
205
205
  };
206
206
  };
207
207
  };
208
- static GetBillDataTable(BillData: any): any;
209
- static GetItemsTable(billData: any): {
208
+ static GetBillDataTable(BillData: any, DecimalsNumber: number): any;
209
+ static GetItemsTable(billData: any, DecimalsNumber: number): {
210
210
  style: string;
211
211
  marginTop: number;
212
212
  marginBottom: number;
@@ -222,6 +222,6 @@ export declare class VendorBalancesService {
222
222
  vLineColor: (i: any, node: any) => string;
223
223
  };
224
224
  };
225
- static BuildTableBodyForLaborAndParts(billData: any): any;
225
+ static BuildTableBodyForLaborAndParts(billData: any, DecimalsNumber: number): any;
226
226
  static GetHeaderNames(): any;
227
227
  }
@@ -20,18 +20,18 @@ class VendorBalancesService {
20
20
  { text: 'As of ' + my_date_1.MyDate.ConvertUTCDateToReadable(my_date_1.MyDate.GetDateTimeNowInUTC(EntityData.Entity.User.TZ)),
21
21
  alignment: 'center', fontSize: 10 },
22
22
  // SharedPDFService.HeaderAfterLine(),
23
- this.GetBillDataTable(BillData),
23
+ this.GetBillDataTable(BillData, EntityData.Entity.Settings.DecimalsNumber),
24
24
  ],
25
25
  styles: shared_pdf_service_1.SharedPDFService.GetStyles()
26
26
  };
27
27
  return dd;
28
28
  }
29
- static GetBillDataTable(BillData) {
29
+ static GetBillDataTable(BillData, DecimalsNumber) {
30
30
  let Data = [];
31
31
  let OveralDue = 0;
32
32
  BillData.forEach((bill) => {
33
33
  OveralDue = OveralDue + bill.Balance;
34
- Data.push(this.GetItemsTable(bill));
34
+ Data.push(this.GetItemsTable(bill, DecimalsNumber));
35
35
  });
36
36
  Data.push({
37
37
  style: 'tableExample',
@@ -43,7 +43,7 @@ class VendorBalancesService {
43
43
  });
44
44
  return Data;
45
45
  }
46
- static GetItemsTable(billData) {
46
+ static GetItemsTable(billData, DecimalsNumber) {
47
47
  return {
48
48
  style: 'tableExample',
49
49
  marginTop: 3,
@@ -51,7 +51,7 @@ class VendorBalancesService {
51
51
  table: {
52
52
  widths: [50, '*', 150, 100, 100],
53
53
  headerRows: 2,
54
- body: this.BuildTableBodyForLaborAndParts(billData)
54
+ body: this.BuildTableBodyForLaborAndParts(billData, DecimalsNumber)
55
55
  },
56
56
  layout: {
57
57
  hLineWidth: function (i, node) {
@@ -69,7 +69,7 @@ class VendorBalancesService {
69
69
  }
70
70
  };
71
71
  }
72
- static BuildTableBodyForLaborAndParts(billData) {
72
+ static BuildTableBodyForLaborAndParts(billData, DecimalsNumber) {
73
73
  let body = this.GetHeaderNames();
74
74
  let Row = [{ text: billData.Name, alignment: 'left', colSpan: 5, bold: true, fontSize: 12 }, {}, {}, {}, {}];
75
75
  body.unshift(Row);
@@ -78,8 +78,8 @@ class VendorBalancesService {
78
78
  dataRow.push({ text: index + 1 });
79
79
  dataRow.push({ text: bill.BNo });
80
80
  dataRow.push({ text: my_date_1.MyDate.ConvertUTCDateToReadable(bill.CrDate), alignment: 'center', style: ['headerstyle'], });
81
- dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(bill.Total), alignment: 'right', style: ['headerstyle'], });
82
- dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(bill.Due), alignment: 'right', style: ['headerstyle'], });
81
+ dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(bill.Total, DecimalsNumber), alignment: 'right', style: ['headerstyle'], });
82
+ dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(bill.Due, DecimalsNumber), alignment: 'right', style: ['headerstyle'], });
83
83
  body.push(dataRow);
84
84
  if (billData.Bills.length === (index + 1)) {
85
85
  let Row = [{ text: 'Total Due ', alignment: 'right', colSpan: 4, bold: true, fontSize: 12 }, {}, {}, {}, { text: tr_utils_1.TrUtils.FixPriceValue(billData.Balance), fontSize: 12, alignment: 'right', bold: true }];