shareneus 1.4.34 → 1.4.35

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 (124) hide show
  1. package/dist/aggregation/aggregation.js +13 -13
  2. package/dist/excel-files/GSTR-RO-excel.service.js +3 -3
  3. package/dist/excel-files/GSTR1-excel.service.js +7 -7
  4. package/dist/excel-files/GSTR2-excel.service.js +6 -6
  5. package/dist/excel-files/analysis-excel.service.js +4 -4
  6. package/dist/excel-files/category-wise-item-excel.service.js +10 -10
  7. package/dist/excel-files/cust-balance-excel.service.js +5 -5
  8. package/dist/excel-files/cust-wise-sales-details.js +5 -5
  9. package/dist/excel-files/cust-wise-sales-summary-excel.service.js +5 -5
  10. package/dist/excel-files/expiring-drugs-excel.service.js +7 -7
  11. package/dist/excel-files/insurance-expire-excel.service.js +4 -4
  12. package/dist/excel-files/invoice-wise-excel.service.js +3 -3
  13. package/dist/excel-files/item-wise-doctor-sale-excel.service.js +7 -7
  14. package/dist/excel-files/item-wise-mout-details.js +4 -4
  15. package/dist/excel-files/item-wise-mout-summary.js +4 -4
  16. package/dist/excel-files/items-wise-sales-excel.service.js +10 -10
  17. package/dist/excel-files/manf-wise-sales-excel.service.js +4 -4
  18. package/dist/excel-files/next-service-date-excel.service.js +5 -5
  19. package/dist/excel-files/operator-wise-details.js +4 -4
  20. package/dist/excel-files/operator-wise-summary.js +4 -4
  21. package/dist/excel-files/payment-receive-excel.service.js +6 -6
  22. package/dist/excel-files/payments-made-excel.service.js +6 -6
  23. package/dist/excel-files/repair-orders-excel.service.js +10 -10
  24. package/dist/excel-files/sa-wise-labor-sales-excel.service.js +6 -6
  25. package/dist/excel-files/sa-wise-part-sales-excel.service.js +6 -6
  26. package/dist/excel-files/sale-summary-excel.service.js +3 -3
  27. package/dist/excel-files/sales-by-service-summary-excel.service.js +14 -14
  28. package/dist/excel-files/scheduled-drug-summary-excel.service.js +8 -8
  29. package/dist/excel-files/scheduled-drugs-excel.service.js +10 -10
  30. package/dist/excel-files/spares-issue-excel.service.js +14 -14
  31. package/dist/excel-files/stock-excel.service.js +3 -3
  32. package/dist/excel-files/tally-sales-import.service.js +3 -3
  33. package/dist/excel-files/ven-balance-excel.service.js +3 -3
  34. package/dist/index.js +9 -9
  35. package/dist/services/analysis-pdf.service.js +8 -8
  36. package/dist/services/appointment-total.service.js +37 -37
  37. package/dist/services/auto-sales-receipt-pdf.service.js +24 -24
  38. package/dist/services/category-wise-item-pdf.service.js +6 -6
  39. package/dist/services/checklist-pdf.js +3 -3
  40. package/dist/services/cn-print.service.js +33 -33
  41. package/dist/services/consultation-fee-receipt.service.js +16 -16
  42. package/dist/services/consultation-full-pdf.service.js +10 -10
  43. package/dist/services/consultation-letterhead-pdf.service.js +15 -15
  44. package/dist/services/consultation-pdf.service.js +15 -15
  45. package/dist/services/credit-note-pdf.service.js +16 -16
  46. package/dist/services/credit-note-totals.service.js +31 -31
  47. package/dist/services/cust-wise-sales-details-pdf.service.js +8 -8
  48. package/dist/services/cust-wise-sales-summary-pdf.service.js +7 -7
  49. package/dist/services/customer-balances-pdf.service.js +7 -7
  50. package/dist/services/dc-landscape-pdf.service.js +28 -28
  51. package/dist/services/dc-landscape-without-price-pdf.service.js +24 -24
  52. package/dist/services/dc-without-price-pdf.service.js +15 -15
  53. package/dist/services/debit-note-pdf.service.js +14 -14
  54. package/dist/services/debit-note-print.service.js +33 -33
  55. package/dist/services/debit-note-totals.service.js +28 -28
  56. package/dist/services/delivery-challan-pdf.service.js +16 -16
  57. package/dist/services/delivery-challan-print.service.js +26 -26
  58. package/dist/services/delivery-challan-totals.js +32 -32
  59. package/dist/services/equipment-design-pdf.service.js +10 -10
  60. package/dist/services/est.print-service.js +150 -150
  61. package/dist/services/expiring-drugs-pdf.service.js +6 -6
  62. package/dist/services/hc-inv-pdf.service.js +42 -42
  63. package/dist/services/insurance-expire-pdf.service.js +1 -1
  64. package/dist/services/inv-pdf.service.js +54 -54
  65. package/dist/services/inv-print.service.js +59 -59
  66. package/dist/services/invoice-landscape-pdf.service.js +29 -29
  67. package/dist/services/invoice-letterhead-pdf.service.js +54 -54
  68. package/dist/services/invoice-portrait-pdf.js +51 -51
  69. package/dist/services/invoice-total.service.js +78 -78
  70. package/dist/services/issue-parts-pdf.service.js +43 -43
  71. package/dist/services/item-bar-code-label-pdf.js +2 -2
  72. package/dist/services/item-price-for-pricelist.js +178 -0
  73. package/dist/services/item-wise-doctor-sale-pdf.service.js +3 -3
  74. package/dist/services/item-wise-mout-details-pdf.js +3 -3
  75. package/dist/services/item-wise-mout-summary-pdf.js +2 -2
  76. package/dist/services/item-wise-sales-pdf.service.js +6 -6
  77. package/dist/services/manf-wise-sales-pdf.service.js +5 -5
  78. package/dist/services/meeting-pdf.js +14 -14
  79. package/dist/services/mout-pdf.service.js +17 -17
  80. package/dist/services/next-service-date-pdf.service.js +1 -1
  81. package/dist/services/operator-wise-details-pdf.service.js +8 -8
  82. package/dist/services/operator-wise-summary-pdf.js +7 -7
  83. package/dist/services/pack-ship-pdf.service.js +3 -3
  84. package/dist/services/pack-ship-print.service.js +26 -26
  85. package/dist/services/payment-pdf.service.js +4 -4
  86. package/dist/services/payment-report-pdf.service.js +3 -3
  87. package/dist/services/po-totals.service.js +28 -28
  88. package/dist/services/pos-receipt-pdf.js +19 -19
  89. package/dist/services/purchase-order-pdf.service.js +40 -40
  90. package/dist/services/purchase-order-print.service.js +43 -43
  91. package/dist/services/purchase-order-totals.service.js +53 -53
  92. package/dist/services/receipt-print.service.js +5 -5
  93. package/dist/services/reorder-point-pdf.service.js +3 -3
  94. package/dist/services/repair-orders-pdf.service.js +3 -3
  95. package/dist/services/ro-pdf.service.js +80 -80
  96. package/dist/services/ro-print-service.js +87 -87
  97. package/dist/services/ro-totals.service.js +123 -123
  98. package/dist/services/sales-by-service-pdf.service.js +6 -6
  99. package/dist/services/sales-pdf.service.js +23 -23
  100. package/dist/services/sales-print.service.js +54 -54
  101. package/dist/services/sales-receipt-pdf.service.js +25 -25
  102. package/dist/services/sales-receipt-print.service.js +62 -62
  103. package/dist/services/sales-totals.service.js +33 -33
  104. package/dist/services/scheduled-drug-pdf.service.js +7 -7
  105. package/dist/services/scheduled-drug-summary-pdf.service.js +4 -4
  106. package/dist/services/separate-wo-print.service.js +9 -9
  107. package/dist/services/shared-inv-pdf.service.js +44 -44
  108. package/dist/services/shared-pdf.service.js +119 -119
  109. package/dist/services/shared-print.service.js +68 -68
  110. package/dist/services/task-pdf.service.js +10 -10
  111. package/dist/services/task-reports-pdf.service.js +9 -9
  112. package/dist/services/technician-pdf.service.js +10 -10
  113. package/dist/services/technician-print.service.js +9 -9
  114. package/dist/services/vendor-balances-pdf.service.js +6 -6
  115. package/dist/services/vendor-credit-note-pdf.service.js +27 -27
  116. package/dist/services/vendor-credit-note-print.service.js +29 -29
  117. package/dist/services/vendor-credit-note-totals.service.js +37 -37
  118. package/dist/services/vendor-debit-note-pdf.service.js +16 -16
  119. package/dist/services/vendor-debit-note-print.service.js +29 -29
  120. package/dist/services/vendor-debit-note-totals.service.js +30 -30
  121. package/dist/{utils → shared}/my-date.js +31 -31
  122. package/package.json +1 -1
  123. package/dist/services/pricelist-item-final-price.service.js +0 -177
  124. /package/dist/{utils/tr-utils.js → shared/utils.js} +0 -0
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MeetingPdfService = void 0;
4
- const my_date_1 = require("../utils/my-date");
5
- const tr_utils_1 = require("../utils/tr-utils");
4
+ const my_date_1 = require("../shared/my-date");
5
+ const utils_1 = require("../shared/utils");
6
6
  const shared_pdf_service_1 = require("./shared-pdf.service");
7
7
  class MeetingPdfService {
8
8
  static MeetingPrintData(meetingData, isAgendata) {
@@ -45,7 +45,7 @@ class MeetingPdfService {
45
45
  }
46
46
  }
47
47
  static HeaderContent(meetingData, isAgendata, Images) {
48
- if (tr_utils_1.TrUtils.IsNull(Images)) {
48
+ if (utils_1.TrUtils.IsNull(Images)) {
49
49
  return { columns: [this.Header(meetingData, isAgendata)], width: '*', marginBottom: 5 };
50
50
  }
51
51
  else {
@@ -191,7 +191,7 @@ class MeetingPdfService {
191
191
  static GetDetailsTable(data) {
192
192
  var body = [];
193
193
  data.forEach((row) => {
194
- if (!tr_utils_1.TrUtils.IsEmpty(row.value)) {
194
+ if (!utils_1.TrUtils.IsEmpty(row.value)) {
195
195
  var dataRow = [];
196
196
  dataRow.push({ text: (row.name).toString(), noWrap: true, bold: true });
197
197
  dataRow.push(':');
@@ -212,7 +212,7 @@ class MeetingPdfService {
212
212
  let tpcs = [];
213
213
  meetingData.Topics.forEach((tpc, index) => {
214
214
  let a;
215
- if (tr_utils_1.TrUtils.IsNull(tpc.Prt)) {
215
+ if (utils_1.TrUtils.IsNull(tpc.Prt)) {
216
216
  a = { columns: [{ text: (index + 1) + ' . ', width: 20, marginTop: 5, marginBottom: 5, bold: true, fontSize: 12 }, { text: tpc.Desc, marginTop: 5, marginBottom: 5, bold: true, fontSize: 12 }] };
217
217
  tpcs.push(a);
218
218
  // tpcs.push({ stack: [this.SharedPrint.GetLightUnderLine(558, 'black')], marginLeft: 18 });
@@ -264,26 +264,26 @@ class MeetingPdfService {
264
264
  ], marginTop: 6,
265
265
  }], marginTop: 5
266
266
  };
267
- if (!tr_utils_1.TrUtils.IsEmpty(TaskAssignees)) {
267
+ if (!utils_1.TrUtils.IsEmpty(TaskAssignees)) {
268
268
  Item.columns[1].stack.push({
269
269
  columns: [{ text: 'Assignee(s) ', color: 'magenta', width: 55, fontSize: this.BodySize, marginTop: 2 },
270
270
  { text: TaskAssignees, fontSize: this.BodySize, marginTop: 2, marginBottom: 2 }]
271
271
  });
272
272
  }
273
- if (!tr_utils_1.TrUtils.IsEmpty(TaskDueDate)) {
273
+ if (!utils_1.TrUtils.IsEmpty(TaskDueDate)) {
274
274
  Item.columns[1].stack.push({
275
275
  columns: [{ text: 'Due Date ', color: 'magenta', width: 55, fontSize: this.BodySize, marginTop: 2 },
276
276
  { text: TaskDueDate, fontSize: this.BodySize, marginTop: 2, marginBottom: 5 }]
277
277
  });
278
278
  }
279
279
  }
280
- if (!tr_utils_1.TrUtils.IsEmpty(ItemDesc)) {
280
+ if (!utils_1.TrUtils.IsEmpty(ItemDesc)) {
281
281
  tpcs.push(Item);
282
282
  tpcs.push({ stack: [shared_pdf_service_1.SharedPDFService.GetLightUnderLine(525, 'lightgray')], marginLeft: 50 });
283
283
  }
284
284
  }
285
285
  static GetDescrption(Item, MeetingData) {
286
- if (Item.Type === 'TAS' && !tr_utils_1.TrUtils.IsNull(MeetingData.MeetingTasks)) {
286
+ if (Item.Type === 'TAS' && !utils_1.TrUtils.IsNull(MeetingData.MeetingTasks)) {
287
287
  let Index = MeetingData.MeetingTasks.findIndex((task) => {
288
288
  return task._id === Item.T_Id;
289
289
  });
@@ -299,12 +299,12 @@ class MeetingPdfService {
299
299
  }
300
300
  }
301
301
  static GetDueDate(Item, MeetingData) {
302
- if (Item.Type === 'TAS' && !tr_utils_1.TrUtils.IsNull(MeetingData.MeetingTasks)) {
302
+ if (Item.Type === 'TAS' && !utils_1.TrUtils.IsNull(MeetingData.MeetingTasks)) {
303
303
  let Index = MeetingData.MeetingTasks.findIndex((task) => {
304
304
  return task._id === Item.T_Id;
305
305
  });
306
306
  if (Index !== -1) {
307
- return tr_utils_1.TrUtils.IsNull(MeetingData.MeetingTasks[Index].EstEnDt) ? '' : my_date_1.MyDate.GetWeekAndDate(MeetingData.MeetingTasks[Index].EstEnDt);
307
+ return utils_1.TrUtils.IsNull(MeetingData.MeetingTasks[Index].EstEnDt) ? '' : my_date_1.MyDate.GetWeekAndDate(MeetingData.MeetingTasks[Index].EstEnDt);
308
308
  }
309
309
  else {
310
310
  return '';
@@ -315,17 +315,17 @@ class MeetingPdfService {
315
315
  }
316
316
  }
317
317
  static getAssignee(Item, MeetingData) {
318
- if (Item.Type === 'TAS' && !tr_utils_1.TrUtils.IsNull(MeetingData.MeetingTasks)) {
318
+ if (Item.Type === 'TAS' && !utils_1.TrUtils.IsNull(MeetingData.MeetingTasks)) {
319
319
  let Index = MeetingData.MeetingTasks.findIndex((task) => {
320
320
  return task._id === Item.T_Id;
321
321
  });
322
322
  if (Index !== -1) {
323
323
  let Members = MeetingData.MeetingTasks[Index].Members.filter((member) => {
324
- return !tr_utils_1.TrUtils.IsNull(member.Ass) && tr_utils_1.TrUtils.IsNull(member.EnDt);
324
+ return !utils_1.TrUtils.IsNull(member.Ass) && utils_1.TrUtils.IsNull(member.EnDt);
325
325
  });
326
326
  let Ass = '';
327
327
  Members.forEach((member, index) => {
328
- if (!tr_utils_1.TrUtils.IsNull(member.Ass)) {
328
+ if (!utils_1.TrUtils.IsNull(member.Ass)) {
329
329
  Ass = Ass + member.Name;
330
330
  if (index !== Members.length - 1) {
331
331
  Ass = Ass + ', ';
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MaterialOutprintService = void 0;
4
- const tr_utils_1 = require("../utils/tr-utils");
4
+ const utils_1 = require("../shared/utils");
5
5
  const shared_pdf_service_1 = require("./shared-pdf.service");
6
6
  const shared_print_service_1 = require("./shared-print.service");
7
7
  class MaterialOutprintService {
@@ -137,7 +137,7 @@ class MaterialOutprintService {
137
137
  }
138
138
  static GetMainHeaderStyleForLeftAlignHeader(WorkShopName) {
139
139
  var wsname_fontSize;
140
- if (tr_utils_1.TrUtils.IsNull(WorkShopName)) {
140
+ if (utils_1.TrUtils.IsNull(WorkShopName)) {
141
141
  WorkShopName = '';
142
142
  }
143
143
  switch (true) {
@@ -172,10 +172,10 @@ class MaterialOutprintService {
172
172
  { text: '' + Entity.City + this.GetPinCode(Entity.PIN) + ', ' + 'Ph: ' + Entity.Phone, style: headerstyle },
173
173
  { text: '' + this.GetEmailName(Entity.Email) + '', style: headerstyle }
174
174
  ];
175
- if (!tr_utils_1.TrUtils.IsEmpty(Entity.Adrs2)) {
175
+ if (!utils_1.TrUtils.IsEmpty(Entity.Adrs2)) {
176
176
  SubHeader.splice(1, 0, { text: '' + Entity.Adrs2 + '', style: [headerstyle] });
177
177
  }
178
- if (!tr_utils_1.TrUtils.IsEmpty(Entity.TLine)) {
178
+ if (!utils_1.TrUtils.IsEmpty(Entity.TLine)) {
179
179
  SubHeader.unshift({ text: this.GetTagLine(Entity.TLine), fontSize: 10, bold: true, margin: [0, 0, 0, 2] });
180
180
  }
181
181
  return SubHeader;
@@ -188,31 +188,31 @@ class MaterialOutprintService {
188
188
  };
189
189
  }
190
190
  static GetTagLine(TLine) {
191
- if (tr_utils_1.TrUtils.IsEmpty(TLine)) {
191
+ if (utils_1.TrUtils.IsEmpty(TLine)) {
192
192
  TLine = '';
193
193
  }
194
194
  return TLine;
195
195
  }
196
196
  static GetEmailName(email) {
197
197
  let Email = '';
198
- if (!tr_utils_1.TrUtils.IsNull(email)) {
198
+ if (!utils_1.TrUtils.IsNull(email)) {
199
199
  Email = 'Email: ' + email;
200
200
  }
201
201
  return Email;
202
202
  }
203
203
  static GetPinCode(pin) {
204
204
  let code = '';
205
- if (!tr_utils_1.TrUtils.IsNull(pin)) {
205
+ if (!utils_1.TrUtils.IsNull(pin)) {
206
206
  code = ' - ' + pin;
207
207
  }
208
208
  return code;
209
209
  }
210
210
  static GetEntityTaxDetails(Entity) {
211
211
  let EntityData = [];
212
- if (!tr_utils_1.TrUtils.IsEmpty(Entity.GSTIN)) {
212
+ if (!utils_1.TrUtils.IsEmpty(Entity.GSTIN)) {
213
213
  EntityData.push({ name: 'GSTIN', value: Entity.GSTIN });
214
214
  }
215
- if (!tr_utils_1.TrUtils.IsEmpty(Entity.PAN)) {
215
+ if (!utils_1.TrUtils.IsEmpty(Entity.PAN)) {
216
216
  EntityData.push({ name: 'PAN No', value: Entity.PAN });
217
217
  }
218
218
  if (EntityData.length !== 0) {
@@ -245,7 +245,7 @@ class MaterialOutprintService {
245
245
  static DataCreateForTable(EntityFields) {
246
246
  var body = [];
247
247
  EntityFields.forEach((row) => {
248
- if (!tr_utils_1.TrUtils.IsFixedZero(row.value) && !tr_utils_1.TrUtils.IsEmpty(row.value)) {
248
+ if (!utils_1.TrUtils.IsFixedZero(row.value) && !utils_1.TrUtils.IsEmpty(row.value)) {
249
249
  var dataRow = [];
250
250
  dataRow.push({ text: (row.name).toString(), noWrap: true });
251
251
  dataRow.push(':');
@@ -267,7 +267,7 @@ class MaterialOutprintService {
267
267
  }
268
268
  static GetVehicle(PurchaseOrder) {
269
269
  var _a;
270
- if (tr_utils_1.TrUtils.IsNull(PurchaseOrder.BL.VNo)) {
270
+ if (utils_1.TrUtils.IsNull(PurchaseOrder.BL.VNo)) {
271
271
  PurchaseOrder.BL.VNo = '';
272
272
  }
273
273
  return {
@@ -291,7 +291,7 @@ class MaterialOutprintService {
291
291
  };
292
292
  }
293
293
  static GetVendorData(Vendor, Type) {
294
- if (tr_utils_1.TrUtils.IsNull(Vendor)) {
294
+ if (utils_1.TrUtils.IsNull(Vendor)) {
295
295
  return shared_pdf_service_1.SharedPDFService.emptyObject();
296
296
  }
297
297
  return {
@@ -322,7 +322,7 @@ class MaterialOutprintService {
322
322
  }
323
323
  static GetFormatAddress(CustomerObj) {
324
324
  var Addressnew = '';
325
- if (!tr_utils_1.TrUtils.IsNull(CustomerObj) && !tr_utils_1.TrUtils.IsNull(CustomerObj.Adrs)) {
325
+ if (!utils_1.TrUtils.IsNull(CustomerObj) && !utils_1.TrUtils.IsNull(CustomerObj.Adrs)) {
326
326
  CustomerObj.Adrs.forEach((Adrs) => {
327
327
  Addressnew = Addressnew + Adrs + '\n';
328
328
  });
@@ -331,7 +331,7 @@ class MaterialOutprintService {
331
331
  }
332
332
  static GetVendorGSTIN(Vendor) {
333
333
  let GSTIN = {};
334
- if (!tr_utils_1.TrUtils.IsEmpty(Vendor.GSTIN)) {
334
+ if (!utils_1.TrUtils.IsEmpty(Vendor.GSTIN)) {
335
335
  let columns = [];
336
336
  columns.push({ text: 'GSTIN :', width: 33, style: 'hed' });
337
337
  columns.push({ text: Vendor.GSTIN, marginTop: 1.5 });
@@ -376,7 +376,7 @@ class MaterialOutprintService {
376
376
  };
377
377
  }
378
378
  static getPartsData(MOutPrintData) {
379
- return this.GetWithOutDiscAndTaxFieldHeader(tr_utils_1.TrUtils.Stringify(MOutPrintData.Items), MOutPrintData.Entity.MPN, MOutPrintData.ShowTaxColumn, MOutPrintData.Entity.Body, MOutPrintData.ShowIGST, MOutPrintData.ShowDiscountColumn);
379
+ return this.GetWithOutDiscAndTaxFieldHeader(utils_1.TrUtils.Stringify(MOutPrintData.Items), MOutPrintData.Entity.MPN, MOutPrintData.ShowTaxColumn, MOutPrintData.Entity.Body, MOutPrintData.ShowIGST, MOutPrintData.ShowDiscountColumn);
380
380
  }
381
381
  static GetWithOutDiscAndTaxFieldHeader(Items, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ShowDiscountColumn) {
382
382
  if (Items.length !== 0) {
@@ -429,7 +429,7 @@ class MaterialOutprintService {
429
429
  var dataRow = [];
430
430
  columns.forEach((column) => {
431
431
  var _a, _b;
432
- if (!tr_utils_1.TrUtils.IsFixedZero(part[column.Field]) && !tr_utils_1.TrUtils.IsNull(part[column.Field])) {
432
+ if (!utils_1.TrUtils.IsFixedZero(part[column.Field]) && !utils_1.TrUtils.IsNull(part[column.Field])) {
433
433
  if (column.Field === 'QtyAndUoM') {
434
434
  dataRow.push({ text: (_a = part[column.Field]) === null || _a === void 0 ? void 0 : _a.toString(), alignment: 'right', nowrap: true });
435
435
  }
@@ -438,7 +438,7 @@ class MaterialOutprintService {
438
438
  if (column.Field === 'Desc') {
439
439
  let DescData = [];
440
440
  DescData.push((_b = part[column.Field]) === null || _b === void 0 ? void 0 : _b.toString());
441
- if (!tr_utils_1.TrUtils.IsEmpty(part['EDesc'])) {
441
+ if (!utils_1.TrUtils.IsEmpty(part['EDesc'])) {
442
442
  DescData.push({ text: part['EDesc'].toString(), color: 'grey' });
443
443
  }
444
444
  dataRow.push({ stack: DescData });
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.NextServiceDatePDFService = void 0;
4
- const my_date_1 = require("../utils/my-date");
4
+ const my_date_1 = require("../shared/my-date");
5
5
  const shared_pdf_service_1 = require("./shared-pdf.service");
6
6
  class NextServiceDatePDFService {
7
7
  static GetNextServiceDatePrint(InvoicesData, CName, searchValue) {
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.OperatorWiseSalesDetailsPDF = void 0;
4
- const my_date_1 = require("../utils/my-date");
5
- const tr_utils_1 = require("../utils/tr-utils");
4
+ const my_date_1 = require("../shared/my-date");
5
+ const utils_1 = require("../shared/utils");
6
6
  const shared_pdf_service_1 = require("./shared-pdf.service");
7
7
  class OperatorWiseSalesDetailsPDF {
8
8
  static GetOperatorWiseSalesDetailsPrint(InvoicesData, CName, isPhar, isHC, isSale, searchValue) {
@@ -75,12 +75,12 @@ class OperatorWiseSalesDetailsPDF {
75
75
  dataRow.push({ text: invoice.Code, style: ['headerstyle'], });
76
76
  dataRow.push({ text: my_date_1.MyDate.ConvertUTCDateToReadable(invoice.CrDate) });
77
77
  dataRow.push({ text: invoice.Name });
78
- dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.SubTotal), alignment: 'right' });
79
- dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.Disc), alignment: 'right' });
80
- dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.Tax), alignment: 'right' });
81
- dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.Adjust), alignment: 'right' });
82
- dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.Round), alignment: 'right' });
83
- dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.Total), alignment: 'right', style: ['headerstyle'], });
78
+ dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.SubTotal), alignment: 'right' });
79
+ dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.Disc), alignment: 'right' });
80
+ dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.Tax), alignment: 'right' });
81
+ dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.Adjust), alignment: 'right' });
82
+ dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.Round), alignment: 'right' });
83
+ dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.Total), alignment: 'right', style: ['headerstyle'], });
84
84
  body.push(dataRow);
85
85
  });
86
86
  return body;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.OperatorWiseSalesSummaryPDF = void 0;
4
- const tr_utils_1 = require("../utils/tr-utils");
4
+ const utils_1 = require("../shared/utils");
5
5
  const shared_pdf_service_1 = require("./shared-pdf.service");
6
6
  class OperatorWiseSalesSummaryPDF {
7
7
  static GetOperatorWiseSalesSummaryPrint(InvoicesData, CName, isPhar, isHC, HeaderName, searchValue) {
@@ -74,12 +74,12 @@ class OperatorWiseSalesSummaryPDF {
74
74
  dataRow.push({ text: invoice.Count, alignment: 'right' });
75
75
  // dataRow.push({ text: invoice.Qty, alignment: 'right' });
76
76
  // dataRow.push({ text: invoice.OfQty, alignment: 'right' });
77
- dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.SubTotal), alignment: 'right' });
78
- dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.Disc), alignment: 'right' });
79
- dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.Tax), alignment: 'right' });
80
- dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.Adjust), alignment: 'right' });
81
- dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.Round), alignment: 'right' });
82
- dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.Total), alignment: 'right', style: ['headerstyle'], });
77
+ dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.SubTotal), alignment: 'right' });
78
+ dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.Disc), alignment: 'right' });
79
+ dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.Tax), alignment: 'right' });
80
+ dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.Adjust), alignment: 'right' });
81
+ dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.Round), alignment: 'right' });
82
+ dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.Total), alignment: 'right', style: ['headerstyle'], });
83
83
  body.push(dataRow);
84
84
  });
85
85
  return body;
@@ -1,14 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PackShipPDFService = void 0;
4
- const tr_utils_1 = require("../utils/tr-utils");
4
+ const utils_1 = require("../shared/utils");
5
5
  const shared_pdf_service_1 = require("./shared-pdf.service");
6
6
  const shared_print_service_1 = require("./shared-print.service");
7
7
  class PackShipPDFService {
8
8
  static GetPackagesPrint(ShipmentData, numberofCopies) {
9
9
  // console.log(ShipmentData);
10
10
  var contents = [];
11
- if (tr_utils_1.TrUtils.IsNull(numberofCopies) || numberofCopies.length === 0) {
11
+ if (utils_1.TrUtils.IsNull(numberofCopies) || numberofCopies.length === 0) {
12
12
  contents.push(this.CommonHeaderDetails(ShipmentData, null), this.GetPackageData(), { text: 'Items', alignment: 'start', fontSize: 14, bold: true }, this.PrepareItemsTable(ShipmentData));
13
13
  }
14
14
  else {
@@ -95,7 +95,7 @@ class PackShipPDFService {
95
95
  }
96
96
  static GetFileName(ROPrintData) {
97
97
  let fileName = ROPrintData.HeaderName;
98
- if (!tr_utils_1.TrUtils.IsNull(ROPrintData.Product) && !tr_utils_1.TrUtils.IsEmpty(ROPrintData.Product.RegNo)) {
98
+ if (!utils_1.TrUtils.IsNull(ROPrintData.Product) && !utils_1.TrUtils.IsEmpty(ROPrintData.Product.RegNo)) {
99
99
  fileName = fileName + '-' + ROPrintData.Product.RegNo;
100
100
  }
101
101
  return fileName;
@@ -1,20 +1,20 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PackShipPrintService = void 0;
4
- const my_date_1 = require("../utils/my-date");
5
- const tr_utils_1 = require("../utils/tr-utils");
4
+ const my_date_1 = require("../shared/my-date");
5
+ const utils_1 = require("../shared/utils");
6
6
  const shared_print_service_1 = require("./shared-print.service");
7
7
  class PackShipPrintService {
8
8
  static GetShipmentPrintInfo(OriginalInvoiceData, OriginalEntityData, image, PackShipData, ItemsList, IsPackage) {
9
9
  // console.log(ItemsList);
10
- let ForInsurance = !tr_utils_1.TrUtils.IsNull(OriginalInvoiceData.ShipTo.InsId);
10
+ let ForInsurance = !utils_1.TrUtils.IsNull(OriginalInvoiceData.ShipTo.InsId);
11
11
  let InvoicePrintData = {};
12
- let argInvoiceData = tr_utils_1.TrUtils.Stringify(OriginalInvoiceData);
12
+ let argInvoiceData = utils_1.TrUtils.Stringify(OriginalInvoiceData);
13
13
  InvoicePrintData.Entity = shared_print_service_1.PrintSharedService.GetFormattedEntityDataForPrint(OriginalEntityData, OriginalInvoiceData.Type, OriginalInvoiceData);
14
14
  InvoicePrintData = shared_print_service_1.PrintSharedService.GetEntityHeaderStyles(InvoicePrintData, OriginalEntityData, image);
15
15
  InvoicePrintData = this.GetInvoiceOtherDetailsForPrint(InvoicePrintData, argInvoiceData, PackShipData, IsPackage);
16
- InvoicePrintData.Settings = tr_utils_1.TrUtils.Stringify(argInvoiceData.Settings);
17
- InvoicePrintData.Items = tr_utils_1.TrUtils.Stringify(ItemsList);
16
+ InvoicePrintData.Settings = utils_1.TrUtils.Stringify(argInvoiceData.Settings);
17
+ InvoicePrintData.Items = utils_1.TrUtils.Stringify(ItemsList);
18
18
  InvoicePrintData = this.GetFormattedProductDataForPrint(argInvoiceData, InvoicePrintData);
19
19
  InvoicePrintData = this.GetBillNameForInvoicePrint(argInvoiceData, InvoicePrintData);
20
20
  InvoicePrintData = this.GetShipToForSOPrint(argInvoiceData, InvoicePrintData);
@@ -36,10 +36,10 @@ class PackShipPrintService {
36
36
  InvoicePrintData.IncludeGST = IncludeGST;
37
37
  InvoicePrintData.ConsolidateGST = ConsolidateGST;
38
38
  InvoicePrintData.ShowAccParts = false;
39
- InvoicePrintData.ShowIGST = (tr_utils_1.TrUtils.IsNull(SType) || (SType === 'Intra')) ? false : true;
39
+ InvoicePrintData.ShowIGST = (utils_1.TrUtils.IsNull(SType) || (SType === 'Intra')) ? false : true;
40
40
  InvoicePrintData.ShowTaxColumn = (IncludeGST && !ConsolidateGST) ? true : false;
41
41
  // InvoicePrintData.ShowDiscountColumn = (!ForInsurance && !ConsolidateGST) ? true : false;
42
- InvoicePrintData.PrDate = tr_utils_1.TrUtils.IsNull(OriginalInvoiceData.PrDate) ? '' : my_date_1.MyDate.ConvertUTCDateToReadable(OriginalInvoiceData.PrDate);
42
+ InvoicePrintData.PrDate = utils_1.TrUtils.IsNull(OriginalInvoiceData.PrDate) ? '' : my_date_1.MyDate.ConvertUTCDateToReadable(OriginalInvoiceData.PrDate);
43
43
  return InvoicePrintData;
44
44
  }
45
45
  static GetInvoiceOtherDetailsForPrint(InvoicePrintData, OriginalInvoiceData, PackShipData, IsPackage) {
@@ -60,15 +60,15 @@ class PackShipPrintService {
60
60
  return InvoicePrintData;
61
61
  }
62
62
  static GetFormattedProductDataForPrint(OriginalInvoiceData, InvoicePrintData) {
63
- if (!tr_utils_1.TrUtils.IsNull(OriginalInvoiceData.Prod)) {
63
+ if (!utils_1.TrUtils.IsNull(OriginalInvoiceData.Prod)) {
64
64
  InvoicePrintData.Product = OriginalInvoiceData.Prod;
65
- if (tr_utils_1.TrUtils.IsNull(InvoicePrintData.Product.VIN)) {
65
+ if (utils_1.TrUtils.IsNull(InvoicePrintData.Product.VIN)) {
66
66
  InvoicePrintData.Product.VIN = '';
67
67
  }
68
- if (tr_utils_1.TrUtils.IsNull(InvoicePrintData.Product.RegNo)) {
68
+ if (utils_1.TrUtils.IsNull(InvoicePrintData.Product.RegNo)) {
69
69
  InvoicePrintData.Product.RegNo = '';
70
70
  }
71
- if (tr_utils_1.TrUtils.IsNull(InvoicePrintData.Product.EngNo)) {
71
+ if (utils_1.TrUtils.IsNull(InvoicePrintData.Product.EngNo)) {
72
72
  InvoicePrintData.Product.EngNo = '';
73
73
  }
74
74
  InvoicePrintData.MIn = OriginalInvoiceData.Prod.MIn;
@@ -81,17 +81,17 @@ class PackShipPrintService {
81
81
  Customer.Name = OriginalInvoiceData.ShipTo.Name;
82
82
  Customer.Adrs = [];
83
83
  Customer.Cons = [];
84
- if (!tr_utils_1.TrUtils.IsNull(OriginalInvoiceData.ShipTo.Adrs)) {
84
+ if (!utils_1.TrUtils.IsNull(OriginalInvoiceData.ShipTo.Adrs)) {
85
85
  Customer.Adrs.push(OriginalInvoiceData.ShipTo.Adrs.A1);
86
- if (!tr_utils_1.TrUtils.IsEmpty(OriginalInvoiceData.ShipTo.Adrs.A2)) {
86
+ if (!utils_1.TrUtils.IsEmpty(OriginalInvoiceData.ShipTo.Adrs.A2)) {
87
87
  Customer.Adrs.push(OriginalInvoiceData.ShipTo.Adrs.A2);
88
88
  }
89
- if (!tr_utils_1.TrUtils.IsEmpty(OriginalInvoiceData.ShipTo.Adrs.Ct)) {
89
+ if (!utils_1.TrUtils.IsEmpty(OriginalInvoiceData.ShipTo.Adrs.Ct)) {
90
90
  Customer.Adrs.push(OriginalInvoiceData.ShipTo.Adrs.Ct);
91
91
  }
92
92
  }
93
93
  Customer.GSTIN = OriginalInvoiceData.ShipTo.GSTIN;
94
- if (!tr_utils_1.TrUtils.IsEmpty(OriginalInvoiceData.ShipTo.Ph)) {
94
+ if (!utils_1.TrUtils.IsEmpty(OriginalInvoiceData.ShipTo.Ph)) {
95
95
  Customer.Cons = [
96
96
  {
97
97
  Type: 'M',
@@ -100,7 +100,7 @@ class PackShipPrintService {
100
100
  ];
101
101
  }
102
102
  InvoicePrintData.ShippmentTo = Customer;
103
- if (!tr_utils_1.TrUtils.IsNull(OriginalInvoiceData.ShipTo.InsId)) {
103
+ if (!utils_1.TrUtils.IsNull(OriginalInvoiceData.ShipTo.InsId)) {
104
104
  InvoicePrintData.Cust = this.GetCustomerDetails(OriginalInvoiceData);
105
105
  }
106
106
  return InvoicePrintData;
@@ -111,17 +111,17 @@ class PackShipPrintService {
111
111
  Customer.Name = OriginalInvoiceData.ShipTo.Name;
112
112
  Customer.Adrs = [];
113
113
  Customer.Cons = [];
114
- if (!tr_utils_1.TrUtils.IsNull(OriginalInvoiceData.ShipTo.Adrs)) {
114
+ if (!utils_1.TrUtils.IsNull(OriginalInvoiceData.ShipTo.Adrs)) {
115
115
  Customer.Adrs.push(OriginalInvoiceData.ShipTo.Adrs.A1);
116
- if (!tr_utils_1.TrUtils.IsEmpty(OriginalInvoiceData.ShipTo.Adrs.A2)) {
116
+ if (!utils_1.TrUtils.IsEmpty(OriginalInvoiceData.ShipTo.Adrs.A2)) {
117
117
  Customer.Adrs.push(OriginalInvoiceData.ShipTo.Adrs.A2);
118
118
  }
119
- if (!tr_utils_1.TrUtils.IsEmpty(OriginalInvoiceData.ShipTo.Adrs.Ct)) {
119
+ if (!utils_1.TrUtils.IsEmpty(OriginalInvoiceData.ShipTo.Adrs.Ct)) {
120
120
  Customer.Adrs.push(OriginalInvoiceData.ShipTo.Adrs.Ct);
121
121
  }
122
122
  }
123
123
  Customer.GSTIN = OriginalInvoiceData.ShipTo.GSTIN;
124
- if (!tr_utils_1.TrUtils.IsEmpty(OriginalInvoiceData.ShipTo.Ph)) {
124
+ if (!utils_1.TrUtils.IsEmpty(OriginalInvoiceData.ShipTo.Ph)) {
125
125
  Customer.Cons = [
126
126
  {
127
127
  Type: 'M',
@@ -130,7 +130,7 @@ class PackShipPrintService {
130
130
  ];
131
131
  }
132
132
  InvoicePrintData.Customer = Customer;
133
- if (!tr_utils_1.TrUtils.IsNull(OriginalInvoiceData.ShipTo.InsId)) {
133
+ if (!utils_1.TrUtils.IsNull(OriginalInvoiceData.ShipTo.InsId)) {
134
134
  InvoicePrintData.Cust = this.GetCustomerDetails(OriginalInvoiceData);
135
135
  }
136
136
  return InvoicePrintData;
@@ -139,7 +139,7 @@ class PackShipPrintService {
139
139
  let Customer = {};
140
140
  Customer.Name = this.GetBillToName(OriginalInvoiceData.Cust.Title, OriginalInvoiceData.Cust.Name);
141
141
  Customer.Cons = [];
142
- if (!tr_utils_1.TrUtils.IsEmpty(OriginalInvoiceData.Cust.Ph)) {
142
+ if (!utils_1.TrUtils.IsEmpty(OriginalInvoiceData.Cust.Ph)) {
143
143
  Customer.Cons = [
144
144
  {
145
145
  Type: 'M',
@@ -149,9 +149,9 @@ class PackShipPrintService {
149
149
  }
150
150
  Customer.GSTIN = OriginalInvoiceData.Cust.GSTIN;
151
151
  Customer.Adrs = [];
152
- if (!tr_utils_1.TrUtils.IsNull(OriginalInvoiceData.Cust.Adrs)) {
152
+ if (!utils_1.TrUtils.IsNull(OriginalInvoiceData.Cust.Adrs)) {
153
153
  Customer.Adrs.push(OriginalInvoiceData.Cust.Adrs.A1);
154
- if (!tr_utils_1.TrUtils.IsEmpty(OriginalInvoiceData.Cust.Adrs.A2)) {
154
+ if (!utils_1.TrUtils.IsEmpty(OriginalInvoiceData.Cust.Adrs.A2)) {
155
155
  Customer.Adrs.push(OriginalInvoiceData.Cust.Adrs.A2);
156
156
  }
157
157
  Customer.Adrs.push(OriginalInvoiceData.Cust.Adrs.Ct);
@@ -161,7 +161,7 @@ class PackShipPrintService {
161
161
  return Customer;
162
162
  }
163
163
  static GetBillToName(Title, Name) {
164
- return tr_utils_1.TrUtils.IsEmpty(Title) ? Name : Title + ' ' + Name;
164
+ return utils_1.TrUtils.IsEmpty(Title) ? Name : Title + ' ' + Name;
165
165
  }
166
166
  }
167
167
  exports.PackShipPrintService = PackShipPrintService;
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ReceiptPDFService = void 0;
4
- const my_date_1 = require("../utils/my-date");
5
- const tr_utils_1 = require("../utils/tr-utils");
4
+ const my_date_1 = require("../shared/my-date");
5
+ const utils_1 = require("../shared/utils");
6
6
  const shared_pdf_service_1 = require("./shared-pdf.service");
7
7
  class ReceiptPDFService {
8
8
  static ReceiptPrint(ReceiptData, isHC) {
@@ -36,7 +36,7 @@ class ReceiptPDFService {
36
36
  return dd;
37
37
  }
38
38
  static PrintFiles() {
39
- let dd = tr_utils_1.TrUtils.Stringify(this.PrintFile);
39
+ let dd = utils_1.TrUtils.Stringify(this.PrintFile);
40
40
  pdfMake.createPdf(dd).open();
41
41
  }
42
42
  static GetAmountAndSignature(Amount) {
@@ -191,7 +191,7 @@ class ReceiptPDFService {
191
191
  data = data + Ids[i];
192
192
  }
193
193
  }
194
- if (!tr_utils_1.TrUtils.IsEmpty(data)) {
194
+ if (!utils_1.TrUtils.IsEmpty(data)) {
195
195
  if (IsRepairOrder) {
196
196
  toward = 'RO - ' + data;
197
197
  }
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PaymentsReportPDFService = void 0;
4
- const my_date_1 = require("../utils/my-date");
5
- const tr_utils_1 = require("../utils/tr-utils");
4
+ const my_date_1 = require("../shared/my-date");
5
+ const utils_1 = require("../shared/utils");
6
6
  const shared_pdf_service_1 = require("./shared-pdf.service");
7
7
  class PaymentsReportPDFService {
8
8
  static GetPaymentsReportPrint(InvoicesData, CName, HeaerName, ispur, isSale, searchValue) {
@@ -82,7 +82,7 @@ class PaymentsReportPDFService {
82
82
  dataRow.push({ text: isSale ? invoice.CustName : invoice.Name });
83
83
  dataRow.push({ text: isSale ? my_date_1.MyDate.ConvertUTCDateTimeToReadable(invoice.Pay.Dt) : my_date_1.MyDate.ConvertUTCDateTimeToReadable(invoice.Date) });
84
84
  dataRow.push({ text: isSale ? invoice.Pay.Type : invoice.PType });
85
- 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' });
85
+ dataRow.push({ text: isSale ? utils_1.TrUtils.FixPriceValue((_a = invoice.Pay) === null || _a === void 0 ? void 0 : _a.Amt) : utils_1.TrUtils.FixPriceValue(invoice.Amt), alignment: 'right' });
86
86
  body.push(dataRow);
87
87
  });
88
88
  return body;