shareneus 1.3.9 → 1.4.1

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.
@@ -373,24 +373,24 @@ class PurchaseOrderPDFService {
373
373
  }
374
374
  static getPartsData(ROPrintData) {
375
375
  if (ROPrintData.Entity.Body === 1) {
376
- return this.GetPartsTableForView(tr_utils_1.TrUtils.Stringify(ROPrintData.Items), ROPrintData.Entity.MPN);
376
+ return this.GetPartsTableForView(tr_utils_1.TrUtils.Stringify(ROPrintData.Items), tr_utils_1.TrUtils.Stringify(ROPrintData.Ops), ROPrintData.Entity.MPN);
377
377
  }
378
378
  else {
379
379
  if (ROPrintData.Entity.Body === 2) {
380
- return this.WithOutDiscountFieldTable(tr_utils_1.TrUtils.Stringify(ROPrintData.Items), ROPrintData.Entity.MPN, ROPrintData.ShowTaxColumn, ROPrintData.Entity.Body, ROPrintData.ShowIGST, ROPrintData.ShowDiscountColumn);
380
+ return this.WithOutDiscountFieldTable(tr_utils_1.TrUtils.Stringify(ROPrintData.Items), tr_utils_1.TrUtils.Stringify(ROPrintData.Ops), ROPrintData.Entity.MPN, ROPrintData.ShowTaxColumn, ROPrintData.Entity.Body, ROPrintData.ShowIGST, ROPrintData.ShowDiscountColumn);
381
381
  }
382
382
  else {
383
- return this.GetWithOutDiscAndTaxFieldHeader(tr_utils_1.TrUtils.Stringify(ROPrintData.Items), ROPrintData.Entity.MPN, ROPrintData.ShowTaxColumn, ROPrintData.Entity.Body, ROPrintData.ShowIGST, ROPrintData.ShowDiscountColumn);
383
+ return this.GetWithOutDiscAndTaxFieldHeader(tr_utils_1.TrUtils.Stringify(ROPrintData.Items), tr_utils_1.TrUtils.Stringify(ROPrintData.Ops), ROPrintData.Entity.MPN, ROPrintData.ShowTaxColumn, ROPrintData.Entity.Body, ROPrintData.ShowIGST, ROPrintData.ShowDiscountColumn);
384
384
  }
385
385
  }
386
386
  }
387
- static GetWithOutDiscAndTaxFieldHeader(Items, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ShowDiscountColumn) {
387
+ static GetWithOutDiscAndTaxFieldHeader(Items, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ShowDiscountColumn) {
388
388
  if (Items.length !== 0) {
389
389
  if (ShowTaxColumn) {
390
- return this.TaxDataTable(PrintPartNo, ShowIGST, Items, Body, ShowTaxColumn, ShowDiscountColumn);
390
+ return this.TaxDataTable(PrintPartNo, ShowIGST, Items, Ops, Body, ShowTaxColumn, ShowDiscountColumn);
391
391
  }
392
392
  else {
393
- return this.WithOutTaxDataTable(PrintPartNo, ShowIGST, Items, Body, ShowTaxColumn, ShowDiscountColumn);
393
+ return this.WithOutTaxDataTable(PrintPartNo, ShowIGST, Items, Ops, Body, ShowTaxColumn, ShowDiscountColumn);
394
394
  }
395
395
  }
396
396
  else {
@@ -398,101 +398,101 @@ class PurchaseOrderPDFService {
398
398
  return a;
399
399
  }
400
400
  }
401
- static TaxDataTable(PrintPartNo, ShowIGST, Items, Body, ShowTaxColumn, ShowDiscountColumn) {
401
+ static TaxDataTable(PrintPartNo, ShowIGST, Items, Ops, Body, ShowTaxColumn, ShowDiscountColumn) {
402
402
  if (PrintPartNo) {
403
- return this.TaxDataTableWithPartNumber(PrintPartNo, ShowIGST, Items, Body, ShowTaxColumn, ShowDiscountColumn);
403
+ return this.TaxDataTableWithPartNumber(PrintPartNo, ShowIGST, Items, Ops, Body, ShowTaxColumn, ShowDiscountColumn);
404
404
  }
405
405
  else {
406
- return this.TaxDataTableWithOutPartNumber(PrintPartNo, ShowIGST, Items, Body, ShowTaxColumn, ShowDiscountColumn);
406
+ return this.TaxDataTableWithOutPartNumber(PrintPartNo, ShowIGST, Items, Ops, Body, ShowTaxColumn, ShowDiscountColumn);
407
407
  }
408
408
  }
409
- static TaxDataTableWithPartNumber(PrintPartNo, ShowIGST, Items, Body, ShowTaxColumn, ShowDiscountColumn) {
409
+ static TaxDataTableWithPartNumber(PrintPartNo, ShowIGST, Items, Ops, Body, ShowTaxColumn, ShowDiscountColumn) {
410
410
  if (ShowIGST) {
411
- return this.IGSTTaxDataTableWithPartNumber(PrintPartNo, ShowIGST, Items, Body, ShowTaxColumn, ShowDiscountColumn);
411
+ return this.IGSTTaxDataTableWithPartNumber(PrintPartNo, ShowIGST, Items, Ops, Body, ShowTaxColumn, ShowDiscountColumn);
412
412
  }
413
413
  else {
414
- return this.CGSTAndSGSTTaxDataTableWithPartNUmber(PrintPartNo, ShowIGST, Items, Body, ShowTaxColumn, ShowDiscountColumn);
414
+ return this.CGSTAndSGSTTaxDataTableWithPartNUmber(PrintPartNo, ShowIGST, Items, Ops, Body, ShowTaxColumn, ShowDiscountColumn);
415
415
  }
416
416
  }
417
- static IGSTTaxDataTableWithPartNumber(PrintPartNo, ShowIGST, Items, Body, ShowTaxColumn, ShowDiscountColumn) {
417
+ static IGSTTaxDataTableWithPartNumber(PrintPartNo, ShowIGST, Items, Ops, Body, ShowTaxColumn, ShowDiscountColumn) {
418
418
  return {
419
419
  style: 'table_data',
420
420
  table: {
421
421
  widths: shared_print_service_1.PrintSharedService.TaxTableWidths(PrintPartNo, ShowIGST, ShowDiscountColumn),
422
- body: this.BuildTableBodyForLaborAndParts(Items, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ShowDiscountColumn)
422
+ body: this.BuildTableBodyForLaborAndParts(Items, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ShowDiscountColumn)
423
423
  },
424
424
  layout: shared_print_service_1.PrintSharedService.LayOutStyle()
425
425
  };
426
426
  }
427
- static CGSTAndSGSTTaxDataTableWithPartNUmber(PrintPartNo, ShowIGST, Items, Body, ShowTaxColumn, ShowDiscountColumn) {
427
+ static CGSTAndSGSTTaxDataTableWithPartNUmber(PrintPartNo, ShowIGST, Items, Ops, Body, ShowTaxColumn, ShowDiscountColumn) {
428
428
  return {
429
429
  style: 'table_data',
430
430
  table: {
431
431
  widths: shared_print_service_1.PrintSharedService.TaxTableWidths(PrintPartNo, ShowIGST, ShowDiscountColumn),
432
- body: this.BuildTableBodyForLaborAndParts(Items, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ShowDiscountColumn)
432
+ body: this.BuildTableBodyForLaborAndParts(Items, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ShowDiscountColumn)
433
433
  },
434
434
  layout: shared_print_service_1.PrintSharedService.LayOutStyle()
435
435
  };
436
436
  }
437
- static TaxDataTableWithOutPartNumber(PrintPartNo, ShowIGST, Items, Body, ShowTaxColumn, ShowDiscountColumn) {
437
+ static TaxDataTableWithOutPartNumber(PrintPartNo, ShowIGST, Items, Ops, Body, ShowTaxColumn, ShowDiscountColumn) {
438
438
  if (ShowIGST) {
439
- return this.IGSTTaxDataTableWithOutPartNumber(PrintPartNo, ShowIGST, Items, Body, ShowTaxColumn, ShowDiscountColumn);
439
+ return this.IGSTTaxDataTableWithOutPartNumber(PrintPartNo, ShowIGST, Items, Ops, Body, ShowTaxColumn, ShowDiscountColumn);
440
440
  }
441
441
  else {
442
- return this.CGSTAndSGSTTaxDataTableWithOutPartNUmber(PrintPartNo, ShowIGST, Items, Body, ShowTaxColumn, ShowDiscountColumn);
442
+ return this.CGSTAndSGSTTaxDataTableWithOutPartNUmber(PrintPartNo, ShowIGST, Items, Ops, Body, ShowTaxColumn, ShowDiscountColumn);
443
443
  }
444
444
  }
445
- static IGSTTaxDataTableWithOutPartNumber(PrintPartNo, ShowIGST, Items, Body, ShowTaxColumn, ShowDiscountColumn) {
445
+ static IGSTTaxDataTableWithOutPartNumber(PrintPartNo, ShowIGST, Items, Ops, Body, ShowTaxColumn, ShowDiscountColumn) {
446
446
  return {
447
447
  style: 'table_data',
448
448
  table: {
449
449
  widths: shared_print_service_1.PrintSharedService.TaxTableWidths(PrintPartNo, ShowIGST, ShowDiscountColumn),
450
- body: this.BuildTableBodyForLaborAndParts(Items, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ShowDiscountColumn)
450
+ body: this.BuildTableBodyForLaborAndParts(Items, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ShowDiscountColumn)
451
451
  },
452
452
  layout: shared_print_service_1.PrintSharedService.LayOutStyle()
453
453
  };
454
454
  }
455
- static CGSTAndSGSTTaxDataTableWithOutPartNUmber(PrintPartNo, ShowIGST, Items, Body, ShowTaxColumn, ShowDiscountColumn) {
455
+ static CGSTAndSGSTTaxDataTableWithOutPartNUmber(PrintPartNo, ShowIGST, Items, Ops, Body, ShowTaxColumn, ShowDiscountColumn) {
456
456
  return {
457
457
  style: 'table_data',
458
458
  table: {
459
459
  widths: shared_print_service_1.PrintSharedService.TaxTableWidths(PrintPartNo, ShowIGST, ShowDiscountColumn),
460
- body: this.BuildTableBodyForLaborAndParts(Items, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ShowDiscountColumn)
460
+ body: this.BuildTableBodyForLaborAndParts(Items, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ShowDiscountColumn)
461
461
  },
462
462
  layout: shared_print_service_1.PrintSharedService.LayOutStyle()
463
463
  };
464
464
  }
465
- static WithOutTaxDataTable(PrintPartNo, ShowIGST, Items, Body, ShowTaxColumn, ShowDiscountColumn) {
465
+ static WithOutTaxDataTable(PrintPartNo, ShowIGST, Items, Ops, Body, ShowTaxColumn, ShowDiscountColumn) {
466
466
  if (PrintPartNo) {
467
- return this.WithOutTaxDataTableWithPartNumber(Items, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ShowDiscountColumn);
467
+ return this.WithOutTaxDataTableWithPartNumber(Items, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ShowDiscountColumn);
468
468
  }
469
469
  else {
470
- return this.WithOutTaxDataTableWithOutPartNumber(Items, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ShowDiscountColumn);
470
+ return this.WithOutTaxDataTableWithOutPartNumber(Items, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ShowDiscountColumn);
471
471
  }
472
472
  }
473
- static WithOutTaxDataTableWithPartNumber(Items, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ShowDiscountColumn) {
473
+ static WithOutTaxDataTableWithPartNumber(Items, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ShowDiscountColumn) {
474
474
  return {
475
475
  style: 'table_data',
476
476
  marginLeft: 20,
477
477
  table: {
478
478
  widths: [15, 70, 200, 25, 60, 40, 40, 55],
479
- body: this.BuildTableBodyForLaborAndParts(Items, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ShowDiscountColumn)
479
+ body: this.BuildTableBodyForLaborAndParts(Items, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ShowDiscountColumn)
480
480
  },
481
481
  layout: shared_print_service_1.PrintSharedService.LayOutStyle()
482
482
  };
483
483
  }
484
- static WithOutTaxDataTableWithOutPartNumber(Items, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ShowDiscountColumn) {
484
+ static WithOutTaxDataTableWithOutPartNumber(Items, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ShowDiscountColumn) {
485
485
  return {
486
486
  style: 'table_data',
487
487
  marginLeft: 20,
488
488
  table: {
489
489
  widths: [15, 274, 50, 72, 80],
490
- body: this.BuildTableBodyForLaborAndParts(Items, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ShowDiscountColumn)
490
+ body: this.BuildTableBodyForLaborAndParts(Items, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ShowDiscountColumn)
491
491
  },
492
492
  layout: shared_print_service_1.PrintSharedService.LayOutStyle()
493
493
  };
494
494
  }
495
- static GetPartsTableForView(Items, PrintPartNo) {
495
+ static GetPartsTableForView(Items, Ops, PrintPartNo) {
496
496
  if (Items.length !== 0) {
497
497
  if (PrintPartNo) {
498
498
  return {
@@ -501,7 +501,7 @@ class PurchaseOrderPDFService {
501
501
  table: {
502
502
  widths: [15, 85, 170, 20, 50, 30, 30, 60],
503
503
  // headerRows: 2,
504
- body: this.PartsTableBody(Items, PrintPartNo)
504
+ body: this.PartsTableBody(Items, Ops, PrintPartNo)
505
505
  },
506
506
  layout: shared_print_service_1.PrintSharedService.LayOutStyleanother()
507
507
  };
@@ -513,7 +513,7 @@ class PurchaseOrderPDFService {
513
513
  table: {
514
514
  widths: [15, 250, 25, 50, 35, 35, 60],
515
515
  // headerRows: 2,
516
- body: this.PartsTableBody(Items, PrintPartNo)
516
+ body: this.PartsTableBody(Items, Ops, PrintPartNo)
517
517
  },
518
518
  layout: shared_print_service_1.PrintSharedService.LayOutStyleanother()
519
519
  };
@@ -524,7 +524,7 @@ class PurchaseOrderPDFService {
524
524
  return a;
525
525
  }
526
526
  }
527
- static WithOutDiscountFieldTable(Items, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ShowDiscountColumn) {
527
+ static WithOutDiscountFieldTable(Items, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ShowDiscountColumn) {
528
528
  if (Items.length !== 0) {
529
529
  if (PrintPartNo) {
530
530
  return {
@@ -533,7 +533,7 @@ class PurchaseOrderPDFService {
533
533
  table: {
534
534
  widths: [15, 67, 160, 25, 50, 60, 30, 53],
535
535
  headerRows: 1,
536
- body: this.BuildTableBodyForLaborAndParts(Items, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ShowDiscountColumn)
536
+ body: this.BuildTableBodyForLaborAndParts(Items, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ShowDiscountColumn)
537
537
  },
538
538
  layout: shared_print_service_1.PrintSharedService.LayOutStyleanother()
539
539
  };
@@ -545,7 +545,7 @@ class PurchaseOrderPDFService {
545
545
  table: {
546
546
  widths: [15, 215, 25, 50, 60, 45, 60],
547
547
  headerRows: 1,
548
- body: this.BuildTableBodyForLaborAndParts(Items, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ShowDiscountColumn)
548
+ body: this.BuildTableBodyForLaborAndParts(Items, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ShowDiscountColumn)
549
549
  },
550
550
  layout: shared_print_service_1.PrintSharedService.LayOutStyleanother()
551
551
  };
@@ -556,7 +556,7 @@ class PurchaseOrderPDFService {
556
556
  return a;
557
557
  }
558
558
  }
559
- static BuildTableBodyForLaborAndParts(Items, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ShowDiscountColumn) {
559
+ static BuildTableBodyForLaborAndParts(Items, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ShowDiscountColumn) {
560
560
  var body = [];
561
561
  let columns = shared_print_service_1.PrintSharedService.GetWithOutDiscountFieldHeader(PrintPartNo, ShowTaxColumn, Body, ShowIGST, ShowDiscountColumn);
562
562
  // if (ShowTaxColumn) {
@@ -567,10 +567,10 @@ class PurchaseOrderPDFService {
567
567
  // } else {
568
568
  // body.push(columns);
569
569
  // }
570
- let PartsTable = this.GetPartsDataTable(Items, columns, body);
570
+ let PartsTable = this.GetPartsDataTable(Items, Ops, columns, body);
571
571
  return PartsTable;
572
572
  }
573
- static GetPartsDataTable(Items, columns, body) {
573
+ static GetPartsDataTable(Items, Ops, columns, body) {
574
574
  let SNo = 1;
575
575
  Items.forEach((part) => {
576
576
  var dataRow = [];
@@ -618,15 +618,61 @@ class PurchaseOrderPDFService {
618
618
  });
619
619
  body.push(dataRow);
620
620
  });
621
+ Ops.forEach((part) => {
622
+ var dataRow = [];
623
+ columns.forEach((column) => {
624
+ var _a, _b, _c, _d;
625
+ if (!tr_utils_1.TrUtils.IsFixedZero(part[column.Field]) && !tr_utils_1.TrUtils.IsNull(part[column.Field])
626
+ || column.text === 'Line Total' || column.text === 'Unit Price') {
627
+ if (part[column.Field] === 'Spare Items') {
628
+ dataRow.push({ text: (_a = part[column.Field]) === null || _a === void 0 ? void 0 : _a.toString(), marginLeft: 50, style: 'InlineHeader' });
629
+ }
630
+ else {
631
+ if (column.text === 'Line Total' || column.Field === 'QtyAndUoM'
632
+ || column.Field === 'CGSTAmt' || column.Field === 'SGSTAmt') {
633
+ dataRow.push({ text: (_b = part[column.Field]) === null || _b === void 0 ? void 0 : _b.toString(), alignment: 'right', nowrap: true });
634
+ }
635
+ else if (column.Field1 === 'UnCo') {
636
+ dataRow.push({ text: (_c = part[column.Field1]) === null || _c === void 0 ? void 0 : _c.toString(), alignment: 'right', nowrap: true });
637
+ }
638
+ else {
639
+ // dataRow.push(part[column.Field].toString());
640
+ if (column.Field === 'Desc') {
641
+ let DescData = [];
642
+ DescData.push((_d = part[column.Field]) === null || _d === void 0 ? void 0 : _d.toString());
643
+ if (!tr_utils_1.TrUtils.IsEmpty(part['EDesc'])) {
644
+ DescData.push({ text: part['EDesc'].toString(), color: 'grey' });
645
+ }
646
+ dataRow.push({ stack: DescData });
647
+ }
648
+ else {
649
+ dataRow.push({ text: part[column.Field].toString() });
650
+ }
651
+ }
652
+ }
653
+ }
654
+ else {
655
+ if (column.Field === 'SNo') {
656
+ part[column.Field] = SNo;
657
+ SNo = SNo + 1;
658
+ }
659
+ else {
660
+ part[column.Field] = '';
661
+ }
662
+ dataRow.push({ text: part[column.Field].toString(), alignment: 'center' });
663
+ }
664
+ });
665
+ body.push(dataRow);
666
+ });
621
667
  return body;
622
668
  }
623
- static PartsTableBody(Items, PrintPartNo) {
669
+ static PartsTableBody(Items, Ops, PrintPartNo) {
624
670
  var body = [];
625
671
  let columns = shared_pdf_service_1.SharedPDFService.GetHeaders(PrintPartNo);
626
672
  for (let i = 0; i < columns.length; i++) {
627
673
  body.push(columns[i]);
628
674
  }
629
- let PartsTable = this.GetPartsDataTable(Items, columns[1], body);
675
+ let PartsTable = this.GetPartsDataTable(Items, Ops, columns[1], body);
630
676
  return PartsTable;
631
677
  }
632
678
  static GetPOTotalDetails(ROPrintData) {
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PurchaseOrderPrintService = void 0;
4
+ const aggregation_1 = require("../aggregation/aggregation");
4
5
  const code_enums_1 = require("../enums/code-enums");
5
6
  const my_date_1 = require("../utils/my-date");
6
7
  const tr_utils_1 = require("../utils/tr-utils");
@@ -39,6 +40,8 @@ class PurchaseOrderPrintService {
39
40
  PurchaseOrderPDFData.DeDate = my_date_1.MyDate.ConvertUTCDateToReadable(PurchaseOrderData.DeDate);
40
41
  }
41
42
  PurchaseOrderPDFData.Items = tr_utils_1.TrUtils.Stringify(PurchaseOrderData.Items);
43
+ PurchaseOrderPDFData.Ops = tr_utils_1.TrUtils.Stringify(PurchaseOrderData.Ops);
44
+ PurchaseOrderPDFData.Ops = this.GetLaborPrintInfo(PurchaseOrderPDFData.Ops, TaxCodes, 'AT');
42
45
  // PurchaseOrderPDFData.Items = this.GetPartsDescription(PurchaseOrderPDFData.Items);
43
46
  PurchaseOrderPDFData.Items = this.GetQtyWithUoM(PurchaseOrderPDFData.Items);
44
47
  let DetailedTotalsInfo;
@@ -66,6 +69,37 @@ class PurchaseOrderPrintService {
66
69
  PurchaseOrderPDFData = this.FixPriceValuesForPrint(PurchaseOrderPDFData, TaxCodes);
67
70
  return PurchaseOrderPDFData;
68
71
  }
72
+ static GetLaborPrintInfo(LaborList, TaxCodes, LineTotal) {
73
+ LaborList.forEach((Labor) => {
74
+ Labor.HSN = Labor.SAC;
75
+ if (tr_utils_1.TrUtils.IsNull(Labor.Qty)) {
76
+ Labor.Qty = 1;
77
+ }
78
+ Labor.UnCo = tr_utils_1.TrUtils.FixPriceValue(Labor.Pr);
79
+ // Labor.TaxName = this.getTaxName(Labor.TCode, TaxCodes);
80
+ if (!tr_utils_1.TrUtils.IsEmpty(Labor.Perc)) {
81
+ Labor.DiscPerc = Labor.Perc;
82
+ }
83
+ else {
84
+ Labor.DiscPerc = Labor.Perc;
85
+ Labor.DiscPerc = (0, aggregation_1.division)((0, aggregation_1.multiply)(100, Labor.Disc), Labor.UnCo);
86
+ }
87
+ Labor.CGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Labor.CGST);
88
+ Labor.SGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Labor.SGST);
89
+ Labor.IGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Labor.IGST);
90
+ Labor.QtyAndUoM = Labor.Qty.toString();
91
+ Labor.CGSTPerc = shared_print_service_1.PrintSharedService.GetCGSTValueBasedOnTaxCode(Labor.TCode, TaxCodes);
92
+ Labor.SGSTPerc = shared_print_service_1.PrintSharedService.GetSGSTValueBasedOnTaxCode(Labor.TCode, TaxCodes);
93
+ Labor.IGSTPerc = shared_print_service_1.PrintSharedService.GetIGSTValueBasedOnTaxCode(Labor.TCode, TaxCodes);
94
+ // console.log('hello', TrUtils.Stringify(Labor));
95
+ // if (LineTotal === 'AT') {
96
+ // Labor.LineTotal = TrUtils.FixPriceValue(Labor.AfterLaborTax);
97
+ // } else {
98
+ // Labor.LineTotal = TrUtils.FixPriceValue(subtraction(Labor.Amt, Labor.Disc));
99
+ // }
100
+ });
101
+ return LaborList;
102
+ }
69
103
  static GetVendorDataForPrint(argVendorData) {
70
104
  if (tr_utils_1.TrUtils.IsNull(argVendorData)) {
71
105
  return null;
@@ -40,6 +40,7 @@ class PurchaseOrderTotalsService {
40
40
  if (tr_utils_1.TrUtils.IsNull(Operation.Amt)) {
41
41
  Operation.Amt = Operation.Pr;
42
42
  }
43
+ Operation.GSTAmt = (0, aggregation_1.addition)(Operation.SGST, Operation.CGST, Operation.IGST);
43
44
  if (IsIndependentTax) {
44
45
  let NetAmt = (0, aggregation_1.subtraction)(Operation.Amt, Operation.Disc, Operation.RecDisc);
45
46
  Operation.AfterLaborDisc = NetAmt;
@@ -49,6 +50,14 @@ class PurchaseOrderTotalsService {
49
50
  Operation.AfterLaborDisc = (0, aggregation_1.subtraction)(Operation.Amt, Operation.Disc);
50
51
  Operation.AfterLaborTax = Operation.AfterLaborDisc;
51
52
  }
53
+ let Price = 0;
54
+ Price = (0, aggregation_1.multiply)(Operation.Pr, Operation.Qty);
55
+ if (IsIndependentTax) {
56
+ Operation.LineTotal = tr_utils_1.TrUtils.FixedTo((0, aggregation_1.addition)((0, aggregation_1.subtraction)(Price, Operation.Disc), Operation.GSTAmt));
57
+ }
58
+ else {
59
+ Operation.LineTotal = tr_utils_1.TrUtils.FixedTo((0, aggregation_1.subtraction)(Price, Operation.Disc));
60
+ }
52
61
  });
53
62
  return opCodesList;
54
63
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shareneus",
3
- "version": "1.3.9",
3
+ "version": "1.4.1",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",