shareneus 1.4.8 → 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.
|
@@ -375,33 +375,31 @@ class InvoiceTotalsService {
|
|
|
375
375
|
static GetLaborDiscountedTotal(LaborList, isTaxable, finalTotalsData) {
|
|
376
376
|
let LaborDiscountedTotal = 0;
|
|
377
377
|
let overallLaborDisc = 0;
|
|
378
|
-
if (!isTaxable) {
|
|
379
|
-
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
}
|
|
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
|
+
// }
|
|
386
385
|
return (0, aggregation_1.addition)(LaborDiscountedTotal, overallLaborDisc);
|
|
387
386
|
}
|
|
388
387
|
static GetPartDiscountedTotal(PartsList, isTaxable, finalTotalsData) {
|
|
389
388
|
let PartsDiscountedTotal = 0;
|
|
390
389
|
let RetPartsDiscountedTotal = 0;
|
|
391
390
|
let overallPartDisc = 0;
|
|
392
|
-
if (!isTaxable) {
|
|
393
|
-
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
}
|
|
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
|
+
// }
|
|
405
403
|
return (0, aggregation_1.addition)((0, aggregation_1.subtraction)(PartsDiscountedTotal, RetPartsDiscountedTotal), overallPartDisc);
|
|
406
404
|
}
|
|
407
405
|
static GetLaborTaxTotalFor(opCodesList, IsIndependentTax) {
|