shareneus 1.4.5 → 1.4.6

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.
@@ -30,7 +30,8 @@ class DeliveryChallanTotalsService {
30
30
  PartsList.forEach((Part) => {
31
31
  Part = this.ResetLaborPartValueIfInvalid(Part);
32
32
  Part.DiscountedPrice = (0, aggregation_1.addition)(Part.Disc, tr_utils_1.TrUtils.SetValueToZeroIfNull(Part.RecDisc));
33
- Part.AfterPartDisc = Part.NetAmt;
33
+ let NetAmt = (0, aggregation_1.subtraction)(Part.UnAmt, Part.Disc, Part.RecDisc);
34
+ Part.AfterPartDisc = NetAmt;
34
35
  if (IsIndependentTax) {
35
36
  Part.AfterPartTax = (0, aggregation_1.addition)(Part.AfterPartDisc, Part.CGST, Part.SGST, Part.IGST);
36
37
  }
@@ -106,7 +106,8 @@ class SalesPrintService {
106
106
  DiscAmt = DiscAmt + tr_utils_1.TrUtils.SetValueToZeroIfNull(Item.Disc) + tr_utils_1.TrUtils.SetValueToZeroIfNull(Item.RecDisc);
107
107
  TaxAmt = TaxAmt + tr_utils_1.TrUtils.SetValueToZeroIfNull(Item.CGST) + tr_utils_1.TrUtils.SetValueToZeroIfNull(Item.SGST)
108
108
  + tr_utils_1.TrUtils.SetValueToZeroIfNull(Item.IGST);
109
- TotalAmt = TotalAmt + tr_utils_1.TrUtils.SetValueToZeroIfNull(Item.NetAmt) +
109
+ let NetAmt = (0, aggregation_1.subtraction)(Item.UnAmt, Item.Disc, Item.RecDisc);
110
+ TotalAmt = TotalAmt + tr_utils_1.TrUtils.SetValueToZeroIfNull(NetAmt) +
110
111
  tr_utils_1.TrUtils.SetValueToZeroIfNull(Item.CGST) + tr_utils_1.TrUtils.SetValueToZeroIfNull(Item.SGST)
111
112
  + tr_utils_1.TrUtils.SetValueToZeroIfNull(Item.IGST);
112
113
  if (Consolidate) {
@@ -33,7 +33,8 @@ class SalesTotalsService {
33
33
  ItemsList.forEach((Item) => {
34
34
  Item = this.ResetLaborItemValueIfInvalid(Item);
35
35
  Item.DiscountedPrice = (0, aggregation_1.addition)(Item.Disc, Item.RecDisc);
36
- Item.AfterItemDisc = tr_utils_1.TrUtils.SetValueToZeroIfNull(Item.NetAmt);
36
+ let NetAmt = (0, aggregation_1.subtraction)(Item.UnAmt, Item.Disc, Item.RecDisc);
37
+ Item.AfterItemDisc = tr_utils_1.TrUtils.SetValueToZeroIfNull(NetAmt);
37
38
  if (IsIndependentTax) {
38
39
  Item.AfterItemTax = (0, aggregation_1.addition)(Item.AfterItemDisc, Item.CGST, Item.SGST, Item.IGST);
39
40
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shareneus",
3
- "version": "1.4.5",
3
+ "version": "1.4.6",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",