shareneus 1.4.8 → 1.4.10

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.
@@ -49,7 +49,7 @@ class InvoiceTotalsService {
49
49
  Operation.AfterLaborTax = (0, aggregation_1.addition)(Operation.AfterLaborDisc, Operation.CGST, Operation.SGST, Operation.IGST);
50
50
  }
51
51
  else {
52
- Operation.AfterLaborDisc = (0, aggregation_1.subtraction)(Operation.Amt, Operation.Disc);
52
+ Operation.AfterLaborDisc = (0, aggregation_1.subtraction)(Operation.Amt, Operation.Disc, Operation.RecDisc);
53
53
  Operation.AfterLaborTax = Operation.AfterLaborDisc;
54
54
  }
55
55
  });
@@ -81,7 +81,7 @@ class InvoiceTotalsService {
81
81
  Part.AfterPartTax = (0, aggregation_1.addition)(Part.AfterPartDisc, Part.CGST, Part.SGST, Part.IGST);
82
82
  }
83
83
  else {
84
- Part.AfterPartDisc = (0, aggregation_1.subtraction)(Part.UnAmt, Part.Disc);
84
+ Part.AfterPartDisc = (0, aggregation_1.subtraction)(Part.UnAmt, Part.Disc, Part.RecDisc);
85
85
  Part.AfterPartTax = Part.AfterPartDisc;
86
86
  }
87
87
  });
@@ -147,7 +147,6 @@ class InvoiceTotalsService {
147
147
  let CustPartsDiscTotal = this.GetPartDiscountedTotal(PartsList, IsIndependentTax, finalTotalsData);
148
148
  let CustLaborTotalAfterDisc = this.GetLaborTotalAfterDiscount(LaborList);
149
149
  let CustPartsTotalAfterDisc = this.GetPartsTotalAfterDiscount(PartsList);
150
- console.log(CustLaborDiscTotal, CustPartsDiscTotal, CustLaborTotalAfterDisc, CustPartsTotalAfterDisc);
151
150
  // if (IsIndependentTax) {
152
151
  finalTotalsData.STotal = (0, aggregation_1.addition)(CustLaborDiscTotal, CustPartsDiscTotal, CustLaborTotalAfterDisc, CustPartsTotalAfterDisc);
153
152
  // } else {
@@ -375,33 +374,31 @@ class InvoiceTotalsService {
375
374
  static GetLaborDiscountedTotal(LaborList, isTaxable, finalTotalsData) {
376
375
  let LaborDiscountedTotal = 0;
377
376
  let overallLaborDisc = 0;
378
- if (!isTaxable) {
379
- overallLaborDisc = tr_utils_1.TrUtils.SetValueToZeroIfNull(finalTotalsData.LDisc);
380
- }
381
- else {
382
- LaborList.forEach((Labor) => {
383
- LaborDiscountedTotal = (0, aggregation_1.addition)(LaborDiscountedTotal, Labor.DiscountedPrice);
384
- });
385
- }
377
+ // if (!isTaxable) {
378
+ // overallLaborDisc = TrUtils.SetValueToZeroIfNull(finalTotalsData.LDisc)
379
+ // } else {
380
+ LaborList.forEach((Labor) => {
381
+ LaborDiscountedTotal = (0, aggregation_1.addition)(LaborDiscountedTotal, Labor.DiscountedPrice);
382
+ });
383
+ // }
386
384
  return (0, aggregation_1.addition)(LaborDiscountedTotal, overallLaborDisc);
387
385
  }
388
386
  static GetPartDiscountedTotal(PartsList, isTaxable, finalTotalsData) {
389
387
  let PartsDiscountedTotal = 0;
390
388
  let RetPartsDiscountedTotal = 0;
391
389
  let overallPartDisc = 0;
392
- if (!isTaxable) {
393
- overallPartDisc = tr_utils_1.TrUtils.SetValueToZeroIfNull(finalTotalsData.PDisc);
394
- }
395
- else {
396
- PartsList.forEach((Part) => {
397
- if (Part.Ret === true) {
398
- RetPartsDiscountedTotal = (0, aggregation_1.addition)(RetPartsDiscountedTotal, Part.DiscountedPrice);
399
- }
400
- else {
401
- PartsDiscountedTotal = (0, aggregation_1.addition)(PartsDiscountedTotal, Part.DiscountedPrice);
402
- }
403
- });
404
- }
390
+ // if (!isTaxable) {
391
+ // overallPartDisc = TrUtils.SetValueToZeroIfNull(finalTotalsData.PDisc)
392
+ // } else {
393
+ PartsList.forEach((Part) => {
394
+ if (Part.Ret === true) {
395
+ RetPartsDiscountedTotal = (0, aggregation_1.addition)(RetPartsDiscountedTotal, Part.DiscountedPrice);
396
+ }
397
+ else {
398
+ PartsDiscountedTotal = (0, aggregation_1.addition)(PartsDiscountedTotal, Part.DiscountedPrice);
399
+ }
400
+ });
401
+ // }
405
402
  return (0, aggregation_1.addition)((0, aggregation_1.subtraction)(PartsDiscountedTotal, RetPartsDiscountedTotal), overallPartDisc);
406
403
  }
407
404
  static GetLaborTaxTotalFor(opCodesList, IsIndependentTax) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shareneus",
3
- "version": "1.4.8",
3
+ "version": "1.4.10",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",