shareneus 1.0.6 → 1.0.8

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.
@@ -34,7 +34,8 @@ class CreditNoteTotalsService {
34
34
  Part.Qty = 1;
35
35
  }
36
36
  Part.DiscountedPrice = (0, aggregation_1.addition)(Part.Disc, Part.RecDisc);
37
- Part.AfterPartDisc = Part.NetAmt;
37
+ // Part.AfterPartDisc = Part.NetAmt;
38
+ Part.AfterPartDisc = (0, aggregation_1.subtraction)(Part.UnAmt, Part.Disc, Part.RecDisc);
38
39
  if (IsIndependentTax) {
39
40
  Part.AfterPartTax = (0, aggregation_1.addition)(Part.AfterPartDisc, Part.CGST, Part.SGST, Part.IGST);
40
41
  }
@@ -34,7 +34,8 @@ class DebitNoteTotalsService {
34
34
  PartsList.forEach((Part) => {
35
35
  Part = this.ResetLaborPartValueIfInvalid(Part);
36
36
  Part.DiscountedPrice = (0, aggregation_1.addition)(Part.Disc, Part.RecDisc);
37
- Part.AfterPartDisc = Part.NetAmt;
37
+ // Part.AfterPartDisc = Part.NetAmt;
38
+ Part.AfterPartDisc = (0, aggregation_1.subtraction)(Part.UnAmt, Part.Disc, Part.RecDisc);
38
39
  if (IsIndependentTax) {
39
40
  Part.AfterPartTax = (0, aggregation_1.addition)(Part.AfterPartDisc, Part.CGST, Part.SGST, Part.IGST);
40
41
  }
@@ -69,7 +69,8 @@ class DeliveryChallanTotalsService {
69
69
  // let CustLaborTaxTotal = this.GetLaborTaxTotalFor(IsIndependentTax);
70
70
  let CustPartTaxTotal = this.GetPartsTaxTotalFor(PartsList, IsIndependentTax);
71
71
  // console.log('CustPartTaxTotal', CustPartTaxTotal);
72
- finalTotalsData.SubTotal = tr_utils_1.TrUtils.FixedTo(CustomerAfterDiscTotals);
72
+ let CustItemsDiscTotal = this.GetPartDiscountedTotal(PartsList);
73
+ finalTotalsData.SubTotal = (0, aggregation_1.addition)(CustomerAfterDiscTotals, CustItemsDiscTotal);
73
74
  let CustTotal = this.GetCustomerTotalBasedOnTaxType(CustPartTaxTotal, PartsList, IsIndependentTax);
74
75
  // console.log('CustTotal', CustTotal);
75
76
  if (isRoundable) {
@@ -34,7 +34,7 @@ class VendorCreditNoteTotalsService {
34
34
  ItemsList.forEach((Item) => {
35
35
  Item = this.ResetLaborItemValueIfInvalid(Item);
36
36
  Item.DiscountedPrice = (0, aggregation_1.addition)(Item.Disc, Item.RecDisc);
37
- Item.AfterItemDisc = Item.NetAmt;
37
+ Item.AfterItemDisc = (0, aggregation_1.subtraction)(Item.UnAmt, Item.Disc, Item.RecDisc);
38
38
  if (IsIndependentTax) {
39
39
  Item.AfterItemTax = (0, aggregation_1.addition)(Item.AfterItemDisc, Item.CGST, Item.SGST, Item.IGST);
40
40
  }
@@ -45,7 +45,7 @@ class VendorCreditNoteTotalsService {
45
45
  return ItemsList;
46
46
  }
47
47
  static ResetLaborItemValueIfInvalid(Item) {
48
- Item.UnPr = tr_utils_1.TrUtils.SetValueToZeroIfNull(Item.UnPr);
48
+ Item.UnCo = tr_utils_1.TrUtils.SetValueToZeroIfNull(Item.UnCo);
49
49
  Item.Disc = tr_utils_1.TrUtils.SetValueToZeroIfNull(Item.Disc);
50
50
  Item.RecDisc = tr_utils_1.TrUtils.SetValueToZeroIfNull(Item.RecDisc);
51
51
  Item.CGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(Item.CGST);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shareneus",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",