shareneus 1.4.7 → 1.4.9

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.
@@ -147,6 +147,7 @@ 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);
150
151
  // if (IsIndependentTax) {
151
152
  finalTotalsData.STotal = (0, aggregation_1.addition)(CustLaborDiscTotal, CustPartsDiscTotal, CustLaborTotalAfterDisc, CustPartsTotalAfterDisc);
152
153
  // } else {
@@ -374,33 +375,31 @@ class InvoiceTotalsService {
374
375
  static GetLaborDiscountedTotal(LaborList, isTaxable, finalTotalsData) {
375
376
  let LaborDiscountedTotal = 0;
376
377
  let overallLaborDisc = 0;
377
- if (!isTaxable) {
378
- overallLaborDisc = tr_utils_1.TrUtils.SetValueToZeroIfNull(finalTotalsData.LDisc);
379
- }
380
- else {
381
- LaborList.forEach((Labor) => {
382
- LaborDiscountedTotal = (0, aggregation_1.addition)(LaborDiscountedTotal, Labor.DiscountedPrice);
383
- });
384
- }
378
+ // if (!isTaxable) {
379
+ // overallLaborDisc = TrUtils.SetValueToZeroIfNull(finalTotalsData.LDisc)
380
+ // } else {
381
+ LaborList.forEach((Labor) => {
382
+ LaborDiscountedTotal = (0, aggregation_1.addition)(LaborDiscountedTotal, Labor.DiscountedPrice);
383
+ });
384
+ // }
385
385
  return (0, aggregation_1.addition)(LaborDiscountedTotal, overallLaborDisc);
386
386
  }
387
387
  static GetPartDiscountedTotal(PartsList, isTaxable, finalTotalsData) {
388
388
  let PartsDiscountedTotal = 0;
389
389
  let RetPartsDiscountedTotal = 0;
390
390
  let overallPartDisc = 0;
391
- if (!isTaxable) {
392
- overallPartDisc = tr_utils_1.TrUtils.SetValueToZeroIfNull(finalTotalsData.PDisc);
393
- }
394
- else {
395
- PartsList.forEach((Part) => {
396
- if (Part.Ret === true) {
397
- RetPartsDiscountedTotal = (0, aggregation_1.addition)(RetPartsDiscountedTotal, Part.DiscountedPrice);
398
- }
399
- else {
400
- PartsDiscountedTotal = (0, aggregation_1.addition)(PartsDiscountedTotal, Part.DiscountedPrice);
401
- }
402
- });
403
- }
391
+ // if (!isTaxable) {
392
+ // overallPartDisc = TrUtils.SetValueToZeroIfNull(finalTotalsData.PDisc)
393
+ // } else {
394
+ PartsList.forEach((Part) => {
395
+ if (Part.Ret === true) {
396
+ RetPartsDiscountedTotal = (0, aggregation_1.addition)(RetPartsDiscountedTotal, Part.DiscountedPrice);
397
+ }
398
+ else {
399
+ PartsDiscountedTotal = (0, aggregation_1.addition)(PartsDiscountedTotal, Part.DiscountedPrice);
400
+ }
401
+ });
402
+ // }
404
403
  return (0, aggregation_1.addition)((0, aggregation_1.subtraction)(PartsDiscountedTotal, RetPartsDiscountedTotal), overallPartDisc);
405
404
  }
406
405
  static GetLaborTaxTotalFor(opCodesList, IsIndependentTax) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shareneus",
3
- "version": "1.4.7",
3
+ "version": "1.4.9",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",