shareneus 1.6.33 → 1.6.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.
@@ -39,11 +39,6 @@ export declare class RoprintService {
39
39
  }[];
40
40
  width: number;
41
41
  })[];
42
- } | {
43
- text: string;
44
- fontSize: number;
45
- bold: boolean;
46
- margin: number[];
47
42
  } | ({
48
43
  columns: any;
49
44
  } | {
@@ -1018,6 +1013,7 @@ export declare class RoprintService {
1018
1013
  static GetWithOutDiscAndTaxFieldHeader(Parts: any, Ops: any, ShowTaxColumn: any, PrintPartNo: any, Body: any, ShowIGST: any, ConsolidateGST: any, ShowDiscountColumn: any): any;
1019
1014
  static TaxDataTable(Parts: any, Ops: any, PrintPartNo: any, ShowTaxColumn: any, Body: any, ShowIGST: any, ConsolidateGST: any, ShowDiscountColumn: any): {
1020
1015
  style: string;
1016
+ marginTop: number;
1021
1017
  table: {
1022
1018
  widths: (string | number)[];
1023
1019
  body: any;
@@ -1031,6 +1027,7 @@ export declare class RoprintService {
1031
1027
  };
1032
1028
  static ConsolidateDataTable(Parts: any, Ops: any, PrintPartNo: any, ShowTaxColumn: any, Body: any, ShowIGST: any, ConsolidateGST: any, ShowDiscountColumn: any): {
1033
1029
  style: string;
1030
+ marginTop: number;
1034
1031
  table: {
1035
1032
  widths: number[];
1036
1033
  body: any;
@@ -1044,6 +1041,7 @@ export declare class RoprintService {
1044
1041
  };
1045
1042
  static NoTaxDataTable(Parts: any, Ops: any, PrintPartNo: any, ShowTaxColumn: any, Body: any, ShowIGST: any, ConsolidateGST: any, ShowDiscountColumn: any): {
1046
1043
  style: string;
1044
+ marginTop: number;
1047
1045
  table: {
1048
1046
  widths: number[];
1049
1047
  body: any;
@@ -15,7 +15,7 @@ class RoprintService {
15
15
  // SharedPDFService.HeaderAfterLine()
16
16
  shared_pdf_service_1.SharedPDFService.GetCustomerAndVehicleDetails(ROPrintData._id, ROPrintData.CrDate, ROPrintData.PrDate, ROPrintData.MOut, ROPrintData.MIn, ROPrintData.Vehicle, ROPrintData.Type, ROPrintData.Payee, ROPrintData.SurName, ROPrintData.SurPhone, ROPrintData.Type, ROPrintData.SurEmail, ROPrintData.InsComp, ROPrintData.PolNo, ROPrintData.PolType, ROPrintData.Customer, false, ROPrintData.Settings, ROPrintData.Location, isOtherIndustry, null, null, null, null, ROPrintData.DoS),
17
17
  shared_pdf_service_1.SharedPDFService.CustomerAndVehicleDetailsAfterLine(),
18
- shared_pdf_service_1.SharedPDFService.GetDisplayTable()
18
+ // SharedPDFService.GetDisplayTable()
19
19
  ];
20
20
  }
21
21
  static GetMainHeaderDetails(Entity, HeaderName, Image, HColor, AColor, text) {
@@ -29,13 +29,13 @@ class RoprintService {
29
29
  static CommonTotalDetails(ROPrintData, index, numberofCopies) {
30
30
  let CommonDetails = [
31
31
  shared_pdf_service_1.SharedPDFService.GetFinalTotalDetails(ROPrintData, ROPrintData.CustLaborTotalBeforeDisc, ROPrintData.CustLaborDiscTotal, ROPrintData.CustLaborCGST, ROPrintData.CustLaborSGST, ROPrintData.CustLaborIGST, ROPrintData.CustPartIGST, ROPrintData.ShowIGST, ROPrintData.ShowTaxColumn, ROPrintData.CustPartsTotalBeforeDisc, ROPrintData.CustPartsDiscTotal, ROPrintData.CustPartCGST, ROPrintData.CustPartSGST, ROPrintData.CustTaxGroupData, ROPrintData.ShowAccParts, ROPrintData.CustLaborAfterTax, ROPrintData.CustPartAfterTax, ROPrintData.FixedDisc, ROPrintData.Payee, ROPrintData.FixedTotal, ROPrintData.CustTotalRoundedBy, ROPrintData.CustRoundedTotal, ROPrintData.ShowDetailedLaborTaxInfo, ROPrintData.ShowDetailedPartTaxInfo, tr_utils_1.TrUtils.isTaxable(ROPrintData.Settings.Tax), ROPrintData.CustLaborITax, ROPrintData.CustPartITax, ROPrintData.Consolidate, ROPrintData.From, null, null, false),
32
- shared_pdf_service_1.SharedPDFService.InvoiceDueStatus(ROPrintData.Type, ROPrintData.Paid, ROPrintData.Due, ROPrintData.Sts, false, ROPrintData.Entity.DecimalsNumber),
32
+ // SharedPDFService.InvoiceDueStatus(ROPrintData.Type, ROPrintData.Paid, ROPrintData.Due, ROPrintData.Sts, false, ROPrintData.Entity.DecimalsNumber),
33
33
  shared_pdf_service_1.SharedPDFService.GetTemsAndConditions(ROPrintData.Entity.Terms),
34
34
  shared_pdf_service_1.SharedPDFService.GetUnderLine(),
35
35
  shared_pdf_service_1.SharedPDFService.GetSignatures(ROPrintData.Entity.CName, ROPrintData.Type, ROPrintData.Payee),
36
36
  ];
37
37
  if (ROPrintData.Type !== 'Invoice') {
38
- CommonDetails.splice(2, 0, shared_pdf_service_1.SharedPDFService.GetUnderLine());
38
+ CommonDetails.splice(1, 0, shared_pdf_service_1.SharedPDFService.GetUnderLine());
39
39
  }
40
40
  if (!tr_utils_1.TrUtils.IsNull(numberofCopies) && numberofCopies.length !== 0 && (index !== (numberofCopies.length - 1))) {
41
41
  CommonDetails.push({ text: '', pageBreak: 'after' });
@@ -45,13 +45,13 @@ class RoprintService {
45
45
  static CommonInsTotalDetails(ROPrintData, index, numberofCopies) {
46
46
  let CommonDetails = [
47
47
  shared_pdf_service_1.SharedPDFService.GetFinalTotalDetails(ROPrintData, ROPrintData.InsLaborTotalBeforeDisc, ROPrintData.InsLaborDiscTotal, ROPrintData.InsLaborCGST, ROPrintData.InsLaborSGST, ROPrintData.InsLaborIGST, ROPrintData.InsPartIGST, ROPrintData.ShowIGST, ROPrintData.ShowTaxColumn, ROPrintData.InsPartsTotalBeforeDisc, ROPrintData.InsPartsDiscTotal, ROPrintData.InsPartCGST, ROPrintData.InsPartSGST, ROPrintData.InsTaxGroupData, ROPrintData.ShowAccParts, ROPrintData.InsLaborTotalAfterTax, ROPrintData.InsPartsTotalAfterTax, ROPrintData.FixedDisc, ROPrintData.Payee, ROPrintData.FixedInsTotal, ROPrintData.InsTotalRoundedBy, ROPrintData.InsRoundedTotal, ROPrintData.ShowDetailedLaborTaxInfo, ROPrintData.ShowDetailedPartTaxInfo, tr_utils_1.TrUtils.isTaxable(ROPrintData.Settings.Tax), ROPrintData.InsLaborITax, ROPrintData.InsPartITax, ROPrintData.Consolidate, ROPrintData.From, null, null, false),
48
- shared_pdf_service_1.SharedPDFService.InvoiceDueStatus(ROPrintData.Type, ROPrintData.Paid, ROPrintData.Due, ROPrintData.Sts, false, ROPrintData.Entity.DecimalsNumber),
48
+ // SharedPDFService.InvoiceDueStatus(ROPrintData.Type, ROPrintData.Paid, ROPrintData.Due, ROPrintData.Sts, false, ROPrintData.Entity.DecimalsNumber),
49
49
  shared_pdf_service_1.SharedPDFService.GetTemsAndConditions(ROPrintData.Entity.Terms),
50
50
  shared_pdf_service_1.SharedPDFService.GetUnderLine(),
51
51
  shared_pdf_service_1.SharedPDFService.GetSignatures(ROPrintData.Entity.CName, ROPrintData.Type, ROPrintData.Payee),
52
52
  ];
53
53
  if (ROPrintData.Type !== 'Invoice') {
54
- CommonDetails.splice(2, 0, shared_pdf_service_1.SharedPDFService.GetUnderLine());
54
+ CommonDetails.splice(1, 0, shared_pdf_service_1.SharedPDFService.GetUnderLine());
55
55
  }
56
56
  if (!tr_utils_1.TrUtils.IsNull(numberofCopies) && numberofCopies.length !== 0 && (index !== (numberofCopies.length - 1))) {
57
57
  CommonDetails.push({ text: '', pageBreak: 'after' });
@@ -60,6 +60,7 @@ class RoprintService {
60
60
  }
61
61
  // Customer Only Print Method
62
62
  static GetCustomerPrint(ROPrintData, numberofCopies, isOtherIndustry) {
63
+ console.log(ROPrintData, numberofCopies, isOtherIndustry);
63
64
  var contents = [];
64
65
  if (tr_utils_1.TrUtils.IsNull(numberofCopies) || numberofCopies.length === 0) {
65
66
  contents.push(this.CommonHeaderDetails(ROPrintData, null, isOtherIndustry), this.CustomersparePartsTable(ROPrintData), this.CommonTotalDetails(ROPrintData, null, numberofCopies));
@@ -145,11 +146,22 @@ class RoprintService {
145
146
  );
146
147
  }
147
148
  else {
149
+ console.log('new', ROPrintData.PrintInfo);
148
150
  for (let i = 0; i < ROPrintData.PrintInfo.length; i++) {
149
- if (tr_utils_1.TrUtils.IsNull(ROPrintData.PrintInfo[i].Text)) {
150
- ROPrintData.PrintInfo[i].Text = '';
151
+ const printInfo = ROPrintData.PrintInfo[i];
152
+ const hasText = !tr_utils_1.TrUtils.IsEmpty(printInfo.Text) && ('' + printInfo.Text).trim() !== '';
153
+ const hasPartsOrOps = (!tr_utils_1.TrUtils.IsNull(printInfo.Parts) && printInfo.Parts.length > 0)
154
+ || (!tr_utils_1.TrUtils.IsNull(printInfo.Ops) && printInfo.Ops.length > 0);
155
+ const hasColli = !tr_utils_1.TrUtils.IsNull(printInfo.Colli) && printInfo.Colli.length > 0;
156
+ if (hasText) {
157
+ List.push(printInfo.Text);
158
+ }
159
+ if (hasPartsOrOps) {
160
+ List.push(this.GetWithOutDiscAndTaxFieldHeader(tr_utils_1.TrUtils.Stringify(printInfo.Parts), tr_utils_1.TrUtils.Stringify(printInfo.Ops), ROPrintData.ShowTaxColumn, ROPrintData.Entity.MPN, ROPrintData.Entity.Body, ROPrintData.ShowIGST, ROPrintData.ConsolidateGST, ROPrintData.ShowDiscountColumn));
161
+ }
162
+ if (hasColli) {
163
+ List.push(this.GetCustomerIndPartsTable(printInfo.Colli, printInfo.Type, printInfo.Sts, ROPrintData.Entity.MPN, ROPrintData.ShowTaxColumn));
151
164
  }
152
- List.push(ROPrintData.PrintInfo[i].Text, this.GetWithOutDiscAndTaxFieldHeader(tr_utils_1.TrUtils.Stringify(ROPrintData.PrintInfo[i].Parts), tr_utils_1.TrUtils.Stringify(ROPrintData.PrintInfo[i].Ops), ROPrintData.ShowTaxColumn, ROPrintData.Entity.MPN, ROPrintData.Entity.Body, ROPrintData.ShowIGST, ROPrintData.ConsolidateGST, ROPrintData.ShowDiscountColumn), this.GetCustomerIndPartsTable(ROPrintData.PrintInfo[i].Colli, ROPrintData.PrintInfo[i].Type, ROPrintData.PrintInfo[i].Sts, ROPrintData.Entity.MPN, ROPrintData.ShowTaxColumn));
153
165
  }
154
166
  }
155
167
  }
@@ -232,10 +244,20 @@ class RoprintService {
232
244
  }
233
245
  else {
234
246
  for (let i = 0; i < ROPrintData.PrintInfo.length; i++) {
235
- if (tr_utils_1.TrUtils.IsNull(ROPrintData.PrintInfo[i].Text)) {
236
- ROPrintData.PrintInfo[i].Text = '';
247
+ const printInfo = ROPrintData.PrintInfo[i];
248
+ const hasText = !tr_utils_1.TrUtils.IsNull(printInfo.Text) && ('' + printInfo.Text).trim() !== '';
249
+ const hasPartsOrOps = (!tr_utils_1.TrUtils.IsNull(printInfo.Parts) && printInfo.Parts.length > 0)
250
+ || (!tr_utils_1.TrUtils.IsNull(printInfo.Ops) && printInfo.Ops.length > 0);
251
+ const hasColli = !tr_utils_1.TrUtils.IsNull(printInfo.Colli) && printInfo.Colli.length > 0;
252
+ if (hasText) {
253
+ List.push(printInfo.Text);
254
+ }
255
+ if (hasPartsOrOps) {
256
+ List.push(this.GetWithOutDiscAndTaxFieldHeader(tr_utils_1.TrUtils.Stringify(printInfo.Parts), tr_utils_1.TrUtils.Stringify(printInfo.Ops), ROPrintData.ShowTaxColumn, ROPrintData.Entity.MPN, ROPrintData.Entity.Body, ROPrintData.ShowIGST, ROPrintData.ConsolidateGST, ROPrintData.ShowDiscountColumn));
257
+ }
258
+ if (hasColli) {
259
+ List.push(this.GetInsuranceIndPartsTable(printInfo, ROPrintData.Entity.MPN, ROPrintData.ShowTaxColumn));
237
260
  }
238
- List.push(ROPrintData.PrintInfo[i].Text, this.GetWithOutDiscAndTaxFieldHeader(tr_utils_1.TrUtils.Stringify(ROPrintData.PrintInfo[i].Parts), tr_utils_1.TrUtils.Stringify(ROPrintData.PrintInfo[i].Ops), ROPrintData.ShowTaxColumn, ROPrintData.Entity.MPN, ROPrintData.Entity.Body, ROPrintData.ShowIGST, ROPrintData.ConsolidateGST, ROPrintData.ShowDiscountColumn), this.GetInsuranceIndPartsTable(ROPrintData.PrintInfo[i], ROPrintData.Entity.MPN, ROPrintData.ShowTaxColumn));
239
261
  }
240
262
  }
241
263
  }
@@ -318,10 +340,20 @@ class RoprintService {
318
340
  }
319
341
  else {
320
342
  for (let i = 0; i < ROPrintData.PrintInfo.length; i++) {
321
- if (tr_utils_1.TrUtils.IsNull(ROPrintData.PrintInfo[i].Text)) {
322
- ROPrintData.PrintInfo[i].Text = '';
343
+ const printInfo = ROPrintData.PrintInfo[i];
344
+ const hasText = !tr_utils_1.TrUtils.IsNull(printInfo.Text) && ('' + printInfo.Text).trim() !== '';
345
+ const hasPartsOrOps = (!tr_utils_1.TrUtils.IsNull(printInfo.Parts) && printInfo.Parts.length > 0)
346
+ || (!tr_utils_1.TrUtils.IsNull(printInfo.Ops) && printInfo.Ops.length > 0);
347
+ const hasColli = !tr_utils_1.TrUtils.IsNull(printInfo.Colli) && printInfo.Colli.length > 0;
348
+ if (hasText) {
349
+ List.push(printInfo.Text);
350
+ }
351
+ if (hasPartsOrOps) {
352
+ List.push(this.GetWithOutDiscAndTaxFieldHeader(tr_utils_1.TrUtils.Stringify(printInfo.Parts), tr_utils_1.TrUtils.Stringify(printInfo.Ops), ROPrintData.ShowTaxColumn, ROPrintData.Entity.MPN, ROPrintData.Entity.Body, ROPrintData.ShowIGST, ROPrintData.ConsolidateGST, ROPrintData.ShowDiscountColumn));
353
+ }
354
+ if (hasColli) {
355
+ List.push(this.GetInsuranceAndCustomerIndPartsTable(printInfo, ROPrintData.Entity.MPN, ROPrintData.ShowTaxColumn));
323
356
  }
324
- List.push(ROPrintData.PrintInfo[i].Text, this.GetWithOutDiscAndTaxFieldHeader(tr_utils_1.TrUtils.Stringify(ROPrintData.PrintInfo[i].Parts), tr_utils_1.TrUtils.Stringify(ROPrintData.PrintInfo[i].Ops), ROPrintData.ShowTaxColumn, ROPrintData.Entity.MPN, ROPrintData.Entity.Body, ROPrintData.ShowIGST, ROPrintData.ConsolidateGST, ROPrintData.ShowDiscountColumn), this.GetInsuranceAndCustomerIndPartsTable(ROPrintData.PrintInfo[i], ROPrintData.Entity.MPN, ROPrintData.ShowTaxColumn));
325
357
  }
326
358
  }
327
359
  }
@@ -399,10 +431,20 @@ class RoprintService {
399
431
  }
400
432
  else {
401
433
  for (let i = 0; i < ROPrintData.PrintInfo.length; i++) {
402
- if (tr_utils_1.TrUtils.IsNull(ROPrintData.PrintInfo[i].Text)) {
403
- ROPrintData.PrintInfo[i].Text = '';
434
+ const printInfo = ROPrintData.PrintInfo[i];
435
+ const hasText = !tr_utils_1.TrUtils.IsNull(printInfo.Text) && ('' + printInfo.Text).trim() !== '';
436
+ const hasPartsOrOps = (!tr_utils_1.TrUtils.IsNull(printInfo.Parts) && printInfo.Parts.length > 0)
437
+ || (!tr_utils_1.TrUtils.IsNull(printInfo.Ops) && printInfo.Ops.length > 0);
438
+ const hasColli = !tr_utils_1.TrUtils.IsNull(printInfo.Colli) && printInfo.Colli.length > 0;
439
+ if (hasText) {
440
+ List.push(printInfo.Text);
441
+ }
442
+ if (hasPartsOrOps) {
443
+ List.push(this.GetWithOutDiscAndTaxFieldHeader(printInfo.Parts, printInfo.Ops, ROPrintData.ShowTaxColumn, ROPrintData.Entity.MPN, ROPrintData.Entity.Body, ROPrintData.ShowIGS, ROPrintData.ConsolidateGST, ROPrintData.ShowDiscountColumn));
444
+ }
445
+ if (hasColli) {
446
+ List.push(this.GetInsuranceOrCustomerIndPartsTable(printInfo, ROPrintData.Entity.MPN, ROPrintData.ShowTaxColumn));
404
447
  }
405
- List.push(ROPrintData.PrintInfo[i].Text, this.GetWithOutDiscAndTaxFieldHeader(ROPrintData.PrintInfo[i].Parts, ROPrintData.PrintInfo[i].Ops, ROPrintData.ShowTaxColumn, ROPrintData.Entity.MPN, ROPrintData.Entity.Body, ROPrintData.ShowIGS, ROPrintData.ConsolidateGST, ROPrintData.ShowDiscountColumn), this.GetInsuranceOrCustomerIndPartsTable(ROPrintData.PrintInfo[i], ROPrintData.Entity.MPN, ROPrintData.ShowTaxColumn));
406
448
  }
407
449
  }
408
450
  }
@@ -1354,6 +1396,7 @@ class RoprintService {
1354
1396
  dataRow.push({ text: part[column.Field].toString(), marginLeft: 50, style: 'InlineHeader' });
1355
1397
  }
1356
1398
  else {
1399
+ console.log(part.TCode);
1357
1400
  if (((column.Field === 'CGSTAmt' || column.Field === 'SGSTAmt' || column.Field === 'CGSTPerc' || column.Field === 'SGSTPerc' || column.Field === 'IGSTAmt' || column.Field === 'IGSTPerc')
1358
1401
  && tr_utils_1.TrUtils.CheckInvalidSelect(part.TCode))) {
1359
1402
  part[column.Field] = '';
@@ -1442,6 +1485,7 @@ class RoprintService {
1442
1485
  dataRow.push({ text: Ops[column.Field].toString(), marginLeft: 50, style: 'InlineHeader' });
1443
1486
  }
1444
1487
  else {
1488
+ console.log(Ops.TCode);
1445
1489
  if (((column.Field === 'CGSTAmt' || column.Field === 'SGSTAmt' || column.Field === 'CGSTPerc' || column.Field === 'SGSTPerc' || column.Field === 'IGSTAmt' || column.Field === 'IGSTPerc')
1446
1490
  && tr_utils_1.TrUtils.CheckInvalidSelect(Ops.TCode))) {
1447
1491
  Ops[column.Field] = '';
@@ -1498,6 +1542,7 @@ class RoprintService {
1498
1542
  }
1499
1543
  static GetWithOutDiscAndTaxFieldHeader(Parts, Ops, ShowTaxColumn, PrintPartNo, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn) {
1500
1544
  if (Parts.length !== 0 || Ops.length !== 0) {
1545
+ console.log('ShowTaxColumn', ShowTaxColumn);
1501
1546
  if (ShowTaxColumn) {
1502
1547
  return this.TaxDataTable(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn);
1503
1548
  }
@@ -1520,6 +1565,7 @@ class RoprintService {
1520
1565
  if (ShowIGST) {
1521
1566
  return {
1522
1567
  style: 'tableExample',
1568
+ marginTop: 7,
1523
1569
  table: {
1524
1570
  widths: shared_print_service_1.PrintSharedService.TaxTableWidths(PrintPartNo, ShowIGST, ShowDiscountColumn),
1525
1571
  // headerRows: 2,
@@ -1531,6 +1577,7 @@ class RoprintService {
1531
1577
  else {
1532
1578
  return {
1533
1579
  style: 'tableExample',
1580
+ marginTop: 7,
1534
1581
  table: {
1535
1582
  widths: shared_print_service_1.PrintSharedService.TaxTableWidths(PrintPartNo, ShowIGST, ShowDiscountColumn),
1536
1583
  // headerRows: 2,
@@ -1544,6 +1591,7 @@ class RoprintService {
1544
1591
  if (ShowIGST) {
1545
1592
  return {
1546
1593
  style: 'tableExample',
1594
+ marginTop: 7,
1547
1595
  table: {
1548
1596
  widths: shared_print_service_1.PrintSharedService.TaxTableWidths(PrintPartNo, ShowIGST, ShowDiscountColumn),
1549
1597
  // headerRows: 2,
@@ -1555,6 +1603,7 @@ class RoprintService {
1555
1603
  else {
1556
1604
  return {
1557
1605
  style: 'tableExample',
1606
+ marginTop: 7,
1558
1607
  table: {
1559
1608
  widths: shared_print_service_1.PrintSharedService.TaxTableWidths(PrintPartNo, ShowIGST, ShowDiscountColumn),
1560
1609
  // headerRows: 2,
@@ -1569,6 +1618,7 @@ class RoprintService {
1569
1618
  if (PrintPartNo) {
1570
1619
  return {
1571
1620
  style: 'tableExample',
1621
+ marginTop: 7,
1572
1622
  table: {
1573
1623
  widths: [25, 65, 273, 25, 60, 75, 10, 40],
1574
1624
  // headerRows: 1,
@@ -1580,6 +1630,7 @@ class RoprintService {
1580
1630
  else {
1581
1631
  return {
1582
1632
  style: 'tableExample',
1633
+ marginTop: 7,
1583
1634
  table: {
1584
1635
  widths: [25, 290, 50, 80, 80, 10, 40],
1585
1636
  // headerRows: 1,
@@ -1593,6 +1644,7 @@ class RoprintService {
1593
1644
  if (PrintPartNo) {
1594
1645
  return {
1595
1646
  style: 'tableExample',
1647
+ marginTop: 7,
1596
1648
  table: {
1597
1649
  widths: shared_print_service_1.PrintSharedService.WidthForInsuranceOrNot(ShowDiscountColumn, PrintPartNo),
1598
1650
  // headerRows: 1,
@@ -1604,6 +1656,7 @@ class RoprintService {
1604
1656
  else {
1605
1657
  return {
1606
1658
  style: 'tableExample',
1659
+ marginTop: 7,
1607
1660
  table: {
1608
1661
  widths: shared_print_service_1.PrintSharedService.WidthForInsuranceOrNot(ShowDiscountColumn, PrintPartNo),
1609
1662
  // headerRows: 1,
@@ -1,5 +1,6 @@
1
1
  export declare class ROPrintService {
2
2
  static GetTaxAmountFromGroup(item: any, taxGroupKey: string, taxCode: string, fallbackKey: string): any;
3
+ static GetTCode(item: any): any;
3
4
  static GetTaxRateFromGroup(item: any, taxGroupKey: string, taxCode: string): number;
4
5
  static GetTaxRate(item: any, taxCode: string, preferredTaxGroupKey?: string): number;
5
6
  static GetRepairOrderPrintInfo(OriginalROData: any, OriginalCustomerData: any, OriginalVehicleData: any, OriginalEntityData: any, image: any, IncludeGST: boolean, ConsolidateGST: boolean, Payee: any, InsCompanyName: any, AsCustomerOnly: boolean, AsInsuranceOnly: boolean, TaxCodes: any, OrderType: any, isReverse: boolean): any;
@@ -19,6 +19,20 @@ class ROPrintService {
19
19
  }
20
20
  return tr_utils_1.TrUtils.SetValueToZeroIfNull(item === null || item === void 0 ? void 0 : item[fallbackKey]);
21
21
  }
22
+ static GetTCode(item) {
23
+ const taxGroupKeys = ['CTaxes', 'ATaxes', 'ETaxes'];
24
+ for (const taxGroupKey of taxGroupKeys) {
25
+ const groupedTaxes = item === null || item === void 0 ? void 0 : item[taxGroupKey];
26
+ if (!Array.isArray(groupedTaxes)) {
27
+ continue;
28
+ }
29
+ const matchedTax = groupedTaxes.find((tax) => !tr_utils_1.TrUtils.IsNull(tax === null || tax === void 0 ? void 0 : tax.TaxCodeId));
30
+ if (!tr_utils_1.TrUtils.IsNull(matchedTax === null || matchedTax === void 0 ? void 0 : matchedTax.TaxCodeId)) {
31
+ return matchedTax.TaxCodeId;
32
+ }
33
+ }
34
+ return item === null || item === void 0 ? void 0 : item.TCode;
35
+ }
22
36
  static GetTaxRateFromGroup(item, taxGroupKey, taxCode) {
23
37
  const groupedTaxes = item === null || item === void 0 ? void 0 : item[taxGroupKey];
24
38
  if (Array.isArray(groupedTaxes)) {
@@ -663,6 +677,7 @@ class ROPrintService {
663
677
  Labor.IGSTAmt = 0;
664
678
  }
665
679
  }
680
+ Labor.TCode = this.GetTCode(Labor);
666
681
  Labor.CGSTPerc = this.GetTaxRate(Labor, 'CGST', taxGroupKey);
667
682
  Labor.SGSTPerc = this.GetTaxRate(Labor, 'SGST', taxGroupKey);
668
683
  Labor.IGSTPerc = this.GetTaxRate(Labor, 'IGST', taxGroupKey);
@@ -716,6 +731,7 @@ class ROPrintService {
716
731
  if (!tr_utils_1.TrUtils.IsZero(Item.Qty) && !tr_utils_1.TrUtils.CheckInvalidSelect(Item.UoM)) {
717
732
  Item.QtyAndUoM = Item.Qty + ' ' + Item.UoM;
718
733
  }
734
+ Item.TCode = this.GetTCode(Item);
719
735
  Item.CGSTPerc = this.GetTaxRate(Item, 'CGST', taxGroupKey);
720
736
  Item.SGSTPerc = this.GetTaxRate(Item, 'SGST', taxGroupKey);
721
737
  Item.IGSTPerc = this.GetTaxRate(Item, 'IGST', taxGroupKey);
@@ -724,7 +740,7 @@ class ROPrintService {
724
740
  }
725
741
  static CheckLaborTaxItemIndex(LaborList) {
726
742
  let TaxIndex = LaborList.findIndex((Labor) => {
727
- if (!tr_utils_1.TrUtils.CheckInvalidSelect(Labor.TCode)) {
743
+ if (!this.GetTCode(Labor)) {
728
744
  return Labor;
729
745
  }
730
746
  });
@@ -732,7 +748,7 @@ class ROPrintService {
732
748
  }
733
749
  static CheckPartTaxItemIndex(PartsList) {
734
750
  let TaxIndex = PartsList.findIndex((Part) => {
735
- if (!tr_utils_1.TrUtils.CheckInvalidSelect(Part.TCode)) {
751
+ if (!this.GetTCode(Part)) {
736
752
  return Part;
737
753
  }
738
754
  });
@@ -769,6 +769,7 @@ export declare class SharedPDFService {
769
769
  };
770
770
  static GetSignatures(CName: any, For: any, Type: any): {
771
771
  columns: {
772
+ marginTop: number;
772
773
  stack: ({
773
774
  text: {
774
775
  text: ({
@@ -791,7 +792,6 @@ export declare class SharedPDFService {
791
792
  }[];
792
793
  };
793
794
  static GetInvSignatures(CName: any, isCounterSale: boolean): {
794
- marginTop: number;
795
795
  columns: {
796
796
  stack: ({
797
797
  text: {
@@ -816,6 +816,7 @@ export declare class SharedPDFService {
816
816
  };
817
817
  static GetHCInvSignatures(CName: any, isCounterSale: boolean): {
818
818
  columns: {
819
+ marginTop: number;
819
820
  stack: ({
820
821
  text: {
821
822
  text: ({
@@ -2181,7 +2181,6 @@ class SharedPDFService {
2181
2181
  // { name: 'Labor Total', value: LaborAfterGST },
2182
2182
  // { name: 'Part Total', value: PartsAfterGST },
2183
2183
  ];
2184
- console.log('shared Consolidate', Consolidate);
2185
2184
  if (moreDiscDetails) {
2186
2185
  if (!tr_utils_1.TrUtils.IsZero(RecordData.PDisc)) {
2187
2186
  AccountFields.push({ name: 'Items Discount', value: tr_utils_1.TrUtils.FixPriceValue(RecordData.PDisc, DecimalsNumber) });
@@ -2463,6 +2462,7 @@ class SharedPDFService {
2463
2462
  static GetSignatures(CName, For, Type) {
2464
2463
  return {
2465
2464
  columns: [{
2465
+ marginTop: 3,
2466
2466
  stack: [
2467
2467
  { text: this.CompanyName(CName), alignment: 'right' },
2468
2468
  { columns: [this.CustomerSignature(), this.SurveyorSignature(For, Type), this.Authorizedsignature()] }
@@ -2472,7 +2472,6 @@ class SharedPDFService {
2472
2472
  }
2473
2473
  static GetInvSignatures(CName, isCounterSale) {
2474
2474
  return {
2475
- marginTop: 3,
2476
2475
  columns: [{
2477
2476
  stack: [
2478
2477
  { text: this.CompanyName(CName), alignment: 'right' },
@@ -2484,6 +2483,7 @@ class SharedPDFService {
2484
2483
  static GetHCInvSignatures(CName, isCounterSale) {
2485
2484
  return {
2486
2485
  columns: [{
2486
+ marginTop: 5,
2487
2487
  stack: [
2488
2488
  { text: this.CompanyName(CName), alignment: 'right' },
2489
2489
  { columns: [this.PatientSignature(), this.SparesSignature(isCounterSale), this.Authorizedsignature()] }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shareneus",
3
- "version": "1.6.33",
3
+ "version": "1.6.35",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",