shareneus 1.5.1 → 1.5.3

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.
Files changed (48) hide show
  1. package/dist/accounting/counter-sales/sales-receipt-print.service.js +8 -9
  2. package/dist/accounting/credit-note/cn-print.service.js +7 -7
  3. package/dist/accounting/credit-note/credit-note-totals.service.d.ts +2 -2
  4. package/dist/accounting/credit-note/credit-note-totals.service.js +33 -33
  5. package/dist/accounting/debit-note/debit-note-print.service.js +8 -8
  6. package/dist/accounting/debit-note/debit-note-totals.service.d.ts +2 -2
  7. package/dist/accounting/debit-note/debit-note-totals.service.js +27 -27
  8. package/dist/accounting/invoice/inv-pdf.service.js +12 -12
  9. package/dist/accounting/invoice/inv-print.service.js +11 -11
  10. package/dist/accounting/invoice/invoice-landscape-pdf.service.js +4 -4
  11. package/dist/accounting/invoice/invoice-letterhead-pdf.service.js +12 -12
  12. package/dist/accounting/invoice/invoice-portrait-pdf.js +5 -5
  13. package/dist/accounting/invoice/invoice-total.service.d.ts +8 -8
  14. package/dist/accounting/invoice/invoice-total.service.js +79 -79
  15. package/dist/accounting/invoice/reports/excel/items-wise-sales-excel.service.js +2 -2
  16. package/dist/accounting/invoice/reports/excel/sa-wise-labor-sales-excel.service.js +4 -4
  17. package/dist/accounting/invoice/reports/excel/sa-wise-part-sales-excel.service.js +4 -4
  18. package/dist/accounting/invoice/reports/excel/sale-summary-excel.service.js +3 -3
  19. package/dist/accounting/invoice/reports/excel/sales-by-service-summary-excel.service.js +3 -3
  20. package/dist/accounting/invoice/reports/pdf/item-wise-sales-pdf.service.js +2 -2
  21. package/dist/accounting/invoice/reports/pdf/manf-wise-sales-pdf.service.js +2 -2
  22. package/dist/accounting/invoice/reports/pdf/sales-by-service-pdf.service.js +2 -2
  23. package/dist/appointments/appointments/appointment-total.service.js +12 -12
  24. package/dist/appointments/consultations/consultation-fee-receipt.service.js +2 -2
  25. package/dist/purchases/purchase-order/po-totals.service.js +13 -13
  26. package/dist/purchases/purchase-order/purchase-order-totals.service.d.ts +1 -1
  27. package/dist/purchases/purchase-order/purchase-order-totals.service.js +58 -58
  28. package/dist/purchases/vendor-credit-note/vendor-credit-note-totals.service.d.ts +1 -1
  29. package/dist/purchases/vendor-credit-note/vendor-credit-note-totals.service.js +20 -20
  30. package/dist/purchases/vendor-debit-note/vendor-debit-note-print.service.js +7 -7
  31. package/dist/purchases/vendor-debit-note/vendor-debit-note-totals.service.d.ts +2 -2
  32. package/dist/purchases/vendor-debit-note/vendor-debit-note-totals.service.js +26 -26
  33. package/dist/sales/delivery-challan/dc-landscape-pdf.service.js +4 -4
  34. package/dist/sales/delivery-challan/delivery-challan-print.service.js +7 -7
  35. package/dist/sales/delivery-challan/delivery-challan-totals.js +35 -35
  36. package/dist/sales/sales/sales-print.service.js +9 -9
  37. package/dist/sales/sales/sales-totals.service.js +32 -32
  38. package/dist/sales-receive/sales-receive-print.service.js +10 -10
  39. package/dist/sales-receive/sales-receive-totals.service.d.ts +2 -2
  40. package/dist/sales-receive/sales-receive-totals.service.js +32 -32
  41. package/dist/sales-receive/sales-total-calculation.js +1 -1
  42. package/dist/services/est.print-service.js +5 -5
  43. package/dist/services/ro-print-service.js +13 -13
  44. package/dist/services/ro-totals.service.d.ts +4 -4
  45. package/dist/services/ro-totals.service.js +140 -140
  46. package/dist/shared/math-operations.js +46 -41
  47. package/dist/shared/shared-pdf.service.js +8 -8
  48. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VendorCreditNoteTotalsService = void 0;
4
- const aggregation_1 = require("../../aggregation/aggregation");
4
+ const math_operations_1 = require("../../shared/math-operations");
5
5
  const tr_utils_1 = require("../../utils/tr-utils");
6
6
  class VendorCreditNoteTotalsService {
7
7
  static GetTotalsValue(opCodesList, ItemsList, IsIndependentTax, DetailedInfo, Disc, Perc, TaxCodes, WithItems, Settings, EntitySettings) {
@@ -33,10 +33,10 @@ class VendorCreditNoteTotalsService {
33
33
  static ResetLaborItemValues(ItemsList, IsIndependentTax) {
34
34
  ItemsList.forEach((Item) => {
35
35
  Item = this.ResetLaborItemValueIfInvalid(Item);
36
- Item.DiscountedPrice = (0, aggregation_1.addition)(Item.Disc, Item.RecDisc);
37
- Item.AfterItemDisc = (0, aggregation_1.subtraction)(Item.UnAmt, Item.Disc, Item.RecDisc);
36
+ Item.DiscountedPrice = (0, math_operations_1.Add)(Item.Disc, Item.RecDisc);
37
+ Item.AfterItemDisc = (0, math_operations_1.Subtract)(Item.UnAmt, Item.Disc, Item.RecDisc);
38
38
  if (IsIndependentTax) {
39
- Item.AfterItemTax = (0, aggregation_1.addition)(Item.AfterItemDisc, Item.CGST, Item.SGST, Item.IGST);
39
+ Item.AfterItemTax = (0, math_operations_1.Add)(Item.AfterItemDisc, Item.CGST, Item.SGST, Item.IGST);
40
40
  }
41
41
  else {
42
42
  Item.AfterItemTax = Item.AfterItemDisc;
@@ -83,9 +83,9 @@ class VendorCreditNoteTotalsService {
83
83
  let CustItemsDiscTotal = this.GetItemDiscountedTotal(ItemsList, IsIndependentTax, finalTotalsData, DecimalsNumber);
84
84
  // let CustLaborTotalAfterDisc = this.GetLaborTotalAfterDiscount(LaborList);
85
85
  let CustItemsTotalAfterDisc = this.GetItemsTotalAfterDiscount(ItemsList);
86
- finalTotalsData.STotal = tr_utils_1.TrUtils.FixedTo((0, aggregation_1.addition)(CustItemsDiscTotal, CustItemsTotalAfterDisc), DecimalsNumber);
86
+ finalTotalsData.STotal = tr_utils_1.TrUtils.FixedTo((0, math_operations_1.Add)(CustItemsDiscTotal, CustItemsTotalAfterDisc), DecimalsNumber);
87
87
  let CustTotal = this.GetCustomerTotalBasedOnTaxType(finalTotalsData, CustLaborTaxTotal, CustItemTaxTotal, [], ItemsList, IsIndependentTax, DecimalsNumber);
88
- finalTotalsData.Round = tr_utils_1.TrUtils.FixedTo((0, aggregation_1.subtraction)(Math.round(CustTotal), CustTotal), DecimalsNumber);
88
+ finalTotalsData.Round = tr_utils_1.TrUtils.FixedTo((0, math_operations_1.Subtract)(Math.round(CustTotal), CustTotal), DecimalsNumber);
89
89
  finalTotalsData.Total = Math.round(CustTotal);
90
90
  if (DetailedInfo) {
91
91
  finalTotalsData.FixedSubTotal = tr_utils_1.TrUtils.FixedTo(CustomerAfterDiscTotals, DecimalsNumber);
@@ -112,7 +112,7 @@ class VendorCreditNoteTotalsService {
112
112
  finalTotalsData.CustItemsTotalAfterDisc = this.GetItemsTotalAfterDiscount(ItemsList);
113
113
  // finalTotalsData.CustLaborTotalBeforeDisc = TrUtils.FixedTo(finalTotalsData.CustLaborTotalAfterDisc
114
114
  // + finalTotalsData.CustLaborDiscTotal);
115
- finalTotalsData.CustItemsTotalBeforeDisc = tr_utils_1.TrUtils.FixedTo((0, aggregation_1.addition)(finalTotalsData.CustItemsTotalAfterDisc, finalTotalsData.CustItemsDiscTotal), DecimalsNumber);
115
+ finalTotalsData.CustItemsTotalBeforeDisc = tr_utils_1.TrUtils.FixedTo((0, math_operations_1.Add)(finalTotalsData.CustItemsTotalAfterDisc, finalTotalsData.CustItemsDiscTotal), DecimalsNumber);
116
116
  // finalTotalsData.CustLaborITax = this.GetLaborTaxTotalFor(opCodesList, IsIndependentTax);
117
117
  // finalTotalsData.CustLaborSGST = this.GetLaborSGSTTaxTotal(opCodesList, IsIndependentTax);
118
118
  // finalTotalsData.CustLaborCGST = this.GetLaborCGSTTaxTotal(opCodesList, IsIndependentTax);
@@ -127,7 +127,7 @@ class VendorCreditNoteTotalsService {
127
127
  // finalTotalsData.CustItemIGST = this.GetItemIGSTTaxTotal(ItemsList, IsIndependentTax);
128
128
  // finalTotalsData.CustItemSGST = this.GetItemSGSTTaxTotal(ItemsList, IsIndependentTax);
129
129
  // finalTotalsData.CustLaborAfterTax = TrUtils.FixedTo(finalTotalsData.CustLaborITax + finalTotalsData.CustLaborTotalAfterDisc);
130
- finalTotalsData.CustItemAfterTax = tr_utils_1.TrUtils.FixedTo((0, aggregation_1.addition)(finalTotalsData.CustItemITax, finalTotalsData.CustItemsTotalAfterDisc), DecimalsNumber);
130
+ finalTotalsData.CustItemAfterTax = tr_utils_1.TrUtils.FixedTo((0, math_operations_1.Add)(finalTotalsData.CustItemITax, finalTotalsData.CustItemsTotalAfterDisc), DecimalsNumber);
131
131
  finalTotalsData.CustTaxGroupData = this.GetTaxGroupingForItemsByHSN(ItemsList, TaxCodes, DecimalsNumber);
132
132
  finalTotalsData.CustTotalRoundedBy = tr_utils_1.TrUtils.FixedTo(finalTotalsData.Round, DecimalsNumber);
133
133
  finalTotalsData.CustRoundedTotal = tr_utils_1.TrUtils.FixedTo(finalTotalsData.Total, DecimalsNumber);
@@ -150,7 +150,7 @@ class VendorCreditNoteTotalsService {
150
150
  ItemsList.forEach((Item) => {
151
151
  ItemsDiscountedTotal += Item.DiscountedPrice;
152
152
  });
153
- return tr_utils_1.TrUtils.FixedTo(((0, aggregation_1.addition)(ItemsDiscountedTotal, overallItemDisc)), DecimalsNumber);
153
+ return tr_utils_1.TrUtils.FixedTo(((0, math_operations_1.Add)(ItemsDiscountedTotal, overallItemDisc)), DecimalsNumber);
154
154
  }
155
155
  static GetLaborTaxTotalFor(opCodesList, IsIndependentTax) {
156
156
  let TotalTaxAmt = 0;
@@ -174,10 +174,10 @@ class VendorCreditNoteTotalsService {
174
174
  // let LaborTotalAfterDisc: any = this.GetLaborTotalAfterDiscount(LaborList);
175
175
  let ItemsTotalAfterDisc = this.GetItemsTotalAfterDiscount(ItemsList);
176
176
  if (IsIndependentTax) {
177
- return (0, aggregation_1.addition)(ItemsTotalAfterDisc, LaborTaxAmount, ItemsTaxAmount);
177
+ return (0, math_operations_1.Add)(ItemsTotalAfterDisc, LaborTaxAmount, ItemsTaxAmount);
178
178
  }
179
179
  else {
180
- return tr_utils_1.TrUtils.FixedTo((0, aggregation_1.subtraction)(ItemsTotalAfterDisc, finalTotalsData.Disc), DecimalsNumber);
180
+ return tr_utils_1.TrUtils.FixedTo((0, math_operations_1.Subtract)(ItemsTotalAfterDisc, finalTotalsData.Disc), DecimalsNumber);
181
181
  }
182
182
  }
183
183
  static LaborTotalAfterDiscount(LaborTotalAfterDisc, LaborTaxAmount, MainLDisc, LDiscInPerc) {
@@ -211,10 +211,10 @@ class VendorCreditNoteTotalsService {
211
211
  let TotalTaxAmt = 0;
212
212
  if (IsIndependentTax) {
213
213
  ItemsList.forEach((Item) => {
214
- TotalCGSTAmt = (0, aggregation_1.addition)(TotalCGSTAmt, Item.CGST);
215
- TotalSGSTAmt = (0, aggregation_1.addition)(TotalSGSTAmt, Item.SGST);
216
- TotalIGSTAmt = (0, aggregation_1.addition)(TotalIGSTAmt, Item.IGST);
217
- TotalTaxAmt = (0, aggregation_1.addition)(TotalTaxAmt, Item.CGST, Item.SGST, Item.IGST);
214
+ TotalCGSTAmt = (0, math_operations_1.Add)(TotalCGSTAmt, Item.CGST);
215
+ TotalSGSTAmt = (0, math_operations_1.Add)(TotalSGSTAmt, Item.SGST);
216
+ TotalIGSTAmt = (0, math_operations_1.Add)(TotalIGSTAmt, Item.IGST);
217
+ TotalTaxAmt = (0, math_operations_1.Add)(TotalTaxAmt, Item.CGST, Item.SGST, Item.IGST);
218
218
  });
219
219
  }
220
220
  return [TotalCGSTAmt, TotalSGSTAmt, TotalIGSTAmt, TotalTaxAmt];
@@ -234,7 +234,7 @@ class VendorCreditNoteTotalsService {
234
234
  Item.CGSTAmt = tr_utils_1.TrUtils.SetValueToZeroIfNull(TaxInfo[0]);
235
235
  Item.SGSTAmt = tr_utils_1.TrUtils.SetValueToZeroIfNull(TaxInfo[1]);
236
236
  Item.IGSTAmt = tr_utils_1.TrUtils.SetValueToZeroIfNull(TaxInfo[2]);
237
- Item.CombinedTaxPercentage = (0, aggregation_1.addition)(Item.CGSTAmt, Item.SGSTAmt, Item.IGSTAmt);
237
+ Item.CombinedTaxPercentage = (0, math_operations_1.Add)(Item.CGSTAmt, Item.SGSTAmt, Item.IGSTAmt);
238
238
  });
239
239
  return Items;
240
240
  }
@@ -278,10 +278,10 @@ class VendorCreditNoteTotalsService {
278
278
  let HSN = MatchedItem[0].HSN;
279
279
  TaxInfo.CombinedTaxPercentage = MatchedItem[0].CombinedTaxPercentage;
280
280
  MatchedItem.forEach((argMatchedGSTItem) => {
281
- TaxOnAmount = (0, aggregation_1.addition)(TaxOnAmount, argMatchedGSTItem.AfterItemDisc);
282
- TaxAmount = (0, aggregation_1.addition)(TaxAmount, argMatchedGSTItem.CGST);
283
- TaxAmount = (0, aggregation_1.addition)(TaxAmount, argMatchedGSTItem.IGST);
284
- TaxAmount = (0, aggregation_1.addition)(TaxAmount, argMatchedGSTItem.SGST);
281
+ TaxOnAmount = (0, math_operations_1.Add)(TaxOnAmount, argMatchedGSTItem.AfterItemDisc);
282
+ TaxAmount = (0, math_operations_1.Add)(TaxAmount, argMatchedGSTItem.CGST);
283
+ TaxAmount = (0, math_operations_1.Add)(TaxAmount, argMatchedGSTItem.IGST);
284
+ TaxAmount = (0, math_operations_1.Add)(TaxAmount, argMatchedGSTItem.SGST);
285
285
  });
286
286
  TaxInfo.HSN = HSN;
287
287
  TaxInfo.TotalTaxableAmount = tr_utils_1.TrUtils.FixPriceValue(TaxOnAmount, DecimalsNumber);
@@ -5,9 +5,9 @@ const my_date_1 = require("../../utils/my-date");
5
5
  const tr_utils_1 = require("../../utils/tr-utils");
6
6
  const enums_1 = require("../../enums/enums");
7
7
  const code_enums_1 = require("../../enums/code-enums");
8
- const aggregation_1 = require("../../aggregation/aggregation");
9
8
  const debit_note_totals_service_1 = require("../../accounting/debit-note/debit-note-totals.service");
10
9
  const shared_print_service_1 = require("../../shared/shared-print.service");
10
+ const math_operations_1 = require("../../shared/math-operations");
11
11
  class VendorDebitNotePrintService {
12
12
  static GetDebitNotePrintInfo(OriginalInvoiceData, OriginalEntityData, image, IncludeGST, ConsolidateGST, TaxCodes, IsProforma) {
13
13
  var _a, _b;
@@ -106,11 +106,11 @@ class VendorDebitNotePrintService {
106
106
  static GetItemsPrintInfo(Items, Consolidate, TaxCodes, LineTotal, DecimalsNumber) {
107
107
  Items.forEach((Item) => {
108
108
  if (Consolidate) {
109
- let AfterDiscForEach = (0, aggregation_1.division)(Item.AfterPartDisc, Item.Qty);
110
- let CTaxAmtPerItem = (0, aggregation_1.division)(Item.CGST, Item.Qty);
111
- let STaxAmtPerItem = (0, aggregation_1.division)(Item.SGST, Item.Qty);
112
- let ITaxAmtPerItem = (0, aggregation_1.division)(Item.IGST, Item.Qty);
113
- Item.UnPr = tr_utils_1.TrUtils.FixedTo((0, aggregation_1.addition)(AfterDiscForEach, CTaxAmtPerItem, STaxAmtPerItem, ITaxAmtPerItem), DecimalsNumber);
109
+ let AfterDiscForEach = (0, math_operations_1.Divide)(Item.AfterPartDisc, Item.Qty);
110
+ let CTaxAmtPerItem = (0, math_operations_1.Divide)(Item.CGST, Item.Qty);
111
+ let STaxAmtPerItem = (0, math_operations_1.Divide)(Item.SGST, Item.Qty);
112
+ let ITaxAmtPerItem = (0, math_operations_1.Divide)(Item.IGST, Item.Qty);
113
+ Item.UnPr = tr_utils_1.TrUtils.FixedTo((0, math_operations_1.Add)(AfterDiscForEach, CTaxAmtPerItem, STaxAmtPerItem, ITaxAmtPerItem), DecimalsNumber);
114
114
  }
115
115
  else {
116
116
  Item.UnPr = tr_utils_1.TrUtils.FixPriceValue(Item.UnPr, DecimalsNumber);
@@ -125,7 +125,7 @@ class VendorDebitNotePrintService {
125
125
  Item.LineTotal = tr_utils_1.TrUtils.FixPriceValue(Item.AfterPartTax, DecimalsNumber);
126
126
  }
127
127
  else {
128
- Item.LineTotal = tr_utils_1.TrUtils.FixPriceValue((0, aggregation_1.subtraction)(Item.UnAmt, Item.Disc), DecimalsNumber);
128
+ Item.LineTotal = tr_utils_1.TrUtils.FixPriceValue((0, math_operations_1.Subtract)(Item.UnAmt, Item.Disc), DecimalsNumber);
129
129
  }
130
130
  if (!tr_utils_1.TrUtils.IsZero(Item.Qty) && !tr_utils_1.TrUtils.CheckInvalidSelect(Item.UoM)) {
131
131
  Item.QtyAndUoM = Item.Qty + ' ' + Item.UoM;
@@ -9,9 +9,9 @@ export declare class VendorDebitNoteTotalsService {
9
9
  static GetSubTotalFor(ItemsList: any): any;
10
10
  static GetItemsTotalAfterDiscount(ItemsList: any): any;
11
11
  static GetDetailedTotalsData(finalTotalsData: any, IsIndependentTax: boolean, ItemsList: any, TaxCodes: any, DecimalsNumber: number): any;
12
- static GetItemDiscountedTotal(ItemsList: any, isTaxable: boolean, finalTotalsData: any): any;
12
+ static GetItemDiscountedTotal(ItemsList: any, isTaxable: boolean, finalTotalsData: any): number;
13
13
  static GetItemsTaxTotalFor(ItemsList: any, IsIndependentTax: boolean): any;
14
- static GetCustomerTotalBasedOnTaxType(finalTotalsData: any, ItemsTaxAmount: number, ItemsList: any, IsIndependentTax: boolean): any;
14
+ static GetCustomerTotalBasedOnTaxType(finalTotalsData: any, ItemsTaxAmount: number, ItemsList: any, IsIndependentTax: boolean): number;
15
15
  static ItemsTotalAfterDiscount(ItemsTotalAfterDisc: number, ItemsTaxAmount: number, MainPDisc: number, PDiscInPerc: string): number;
16
16
  static GetItemGSTTaxTotal(ItemsList: any, IsIndependentTax: boolean): number[];
17
17
  static GetTaxGroupingForItemsByHSN(Items: any, TaxCodes: any, DecimalsNumber: number): any[];
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VendorDebitNoteTotalsService = void 0;
4
- const aggregation_1 = require("../../aggregation/aggregation");
4
+ const math_operations_1 = require("../../shared/math-operations");
5
5
  const tr_utils_1 = require("../../utils/tr-utils");
6
6
  class VendorDebitNoteTotalsService {
7
7
  static GetTotalsValue(ItemsList, IsIndependentTax, DetailedInfo, Disc, Perc, TaxCodes, WithItems, Settings, EntitySettings) {
@@ -36,10 +36,10 @@ class VendorDebitNoteTotalsService {
36
36
  if (tr_utils_1.TrUtils.IsZero(Item.Qty)) {
37
37
  Item.Qty = 1;
38
38
  }
39
- Item.DiscountedPrice = (0, aggregation_1.addition)(Item.Disc, Item.RecDisc);
39
+ Item.DiscountedPrice = (0, math_operations_1.Add)(Item.Disc, Item.RecDisc);
40
40
  Item.AfterItemDisc = Item.NetAmt;
41
41
  if (IsIndependentTax) {
42
- Item.AfterItemTax = (0, aggregation_1.addition)(Item.AfterItemDisc, Item.CGST, Item.SGST, Item.IGST);
42
+ Item.AfterItemTax = (0, math_operations_1.Add)(Item.AfterItemDisc, Item.CGST, Item.SGST, Item.IGST);
43
43
  }
44
44
  else {
45
45
  Item.AfterItemTax = Item.AfterItemDisc;
@@ -86,9 +86,9 @@ class VendorDebitNoteTotalsService {
86
86
  let CustItemsDiscTotal = this.GetItemDiscountedTotal(ItemsList, IsIndependentTax, finalTotalsData);
87
87
  // let CustLaborTotalAfterDisc = this.GetLaborTotalAfterDiscount(LaborList);
88
88
  let CustItemsTotalAfterDisc = this.GetItemsTotalAfterDiscount(ItemsList);
89
- finalTotalsData.STotal = (0, aggregation_1.addition)(CustItemsDiscTotal, CustItemsTotalAfterDisc);
89
+ finalTotalsData.STotal = (0, math_operations_1.Add)(CustItemsDiscTotal, CustItemsTotalAfterDisc);
90
90
  let CustTotal = this.GetCustomerTotalBasedOnTaxType(finalTotalsData, CustItemTaxTotal, ItemsList, IsIndependentTax);
91
- finalTotalsData.Round = (0, aggregation_1.subtraction)(Math.round(CustTotal), CustTotal);
91
+ finalTotalsData.Round = (0, math_operations_1.Subtract)(Math.round(CustTotal), CustTotal);
92
92
  finalTotalsData.Total = Math.round(CustTotal);
93
93
  if (DetailedInfo) {
94
94
  finalTotalsData.FixedSubTotal = tr_utils_1.TrUtils.FixedTo(CustomerAfterDiscTotals, DecimalsNumber);
@@ -104,7 +104,7 @@ class VendorDebitNoteTotalsService {
104
104
  static GetItemsTotalAfterDiscount(ItemsList) {
105
105
  let ItemsTotalAfterDisc = 0;
106
106
  ItemsList.forEach((Item) => {
107
- ItemsTotalAfterDisc = (0, aggregation_1.addition)(ItemsTotalAfterDisc, Item.AfterItemDisc);
107
+ ItemsTotalAfterDisc = (0, math_operations_1.Add)(ItemsTotalAfterDisc, Item.AfterItemDisc);
108
108
  });
109
109
  return ItemsTotalAfterDisc;
110
110
  }
@@ -115,7 +115,7 @@ class VendorDebitNoteTotalsService {
115
115
  finalTotalsData.CustItemsTotalAfterDisc = this.GetItemsTotalAfterDiscount(ItemsList);
116
116
  // finalTotalsData.CustLaborTotalBeforeDisc = TrUtils.FixedTo(finalTotalsData.CustLaborTotalAfterDisc
117
117
  // + finalTotalsData.CustLaborDiscTotal);
118
- finalTotalsData.CustItemsTotalBeforeDisc = (0, aggregation_1.addition)(finalTotalsData.CustItemsTotalAfterDisc, finalTotalsData.CustItemsDiscTotal);
118
+ finalTotalsData.CustItemsTotalBeforeDisc = (0, math_operations_1.Add)(finalTotalsData.CustItemsTotalAfterDisc, finalTotalsData.CustItemsDiscTotal);
119
119
  // finalTotalsData.CustLaborITax = this.GetLaborTaxTotalFor(opCodesList, IsIndependentTax);
120
120
  // finalTotalsData.CustLaborSGST = this.GetLaborSGSTTaxTotal(opCodesList, IsIndependentTax);
121
121
  // finalTotalsData.CustLaborCGST = this.GetLaborCGSTTaxTotal(opCodesList, IsIndependentTax);
@@ -129,8 +129,8 @@ class VendorDebitNoteTotalsService {
129
129
  // finalTotalsData.CustItemCGST = this.GetItemCGSTTaxTotal(ItemsList, IsIndependentTax);
130
130
  // finalTotalsData.CustItemIGST = this.GetItemIGSTTaxTotal(ItemsList, IsIndependentTax);
131
131
  // finalTotalsData.CustItemSGST = this.GetItemSGSTTaxTotal(ItemsList, IsIndependentTax);
132
- // finalTotalsData.CustLaborAfterTax = addition(finalTotalsData.CustLaborITax , finalTotalsData.CustLaborTotalAfterDisc);
133
- finalTotalsData.CustItemAfterTax = (0, aggregation_1.addition)(finalTotalsData.CustItemITax, finalTotalsData.CustItemsTotalAfterDisc);
132
+ // finalTotalsData.CustLaborAfterTax = Add(finalTotalsData.CustLaborITax , finalTotalsData.CustLaborTotalAfterDisc);
133
+ finalTotalsData.CustItemAfterTax = (0, math_operations_1.Add)(finalTotalsData.CustItemITax, finalTotalsData.CustItemsTotalAfterDisc);
134
134
  finalTotalsData.CustTaxGroupData = this.GetTaxGroupingForItemsByHSN(ItemsList, TaxCodes, DecimalsNumber);
135
135
  finalTotalsData.CustTotalRoundedBy = tr_utils_1.TrUtils.FixedTo(finalTotalsData.Round, DecimalsNumber);
136
136
  finalTotalsData.CustRoundedTotal = tr_utils_1.TrUtils.FixedTo(finalTotalsData.Total, DecimalsNumber);
@@ -151,15 +151,15 @@ class VendorDebitNoteTotalsService {
151
151
  overallItemDisc = tr_utils_1.TrUtils.SetValueToZeroIfNull(finalTotalsData.PDisc);
152
152
  }
153
153
  ItemsList.forEach((Item) => {
154
- ItemsDiscountedTotal = (0, aggregation_1.addition)(ItemsDiscountedTotal, Item.DiscountedPrice);
154
+ ItemsDiscountedTotal = (0, math_operations_1.Add)(ItemsDiscountedTotal, Item.DiscountedPrice);
155
155
  });
156
- return (0, aggregation_1.addition)(ItemsDiscountedTotal, overallItemDisc);
156
+ return (0, math_operations_1.Add)(ItemsDiscountedTotal, overallItemDisc);
157
157
  }
158
158
  static GetItemsTaxTotalFor(ItemsList, IsIndependentTax) {
159
159
  let TotalTaxAmt = 0;
160
160
  if (IsIndependentTax) {
161
161
  ItemsList.forEach((Item) => {
162
- TotalTaxAmt = (0, aggregation_1.addition)(TotalTaxAmt, Item.CGST, Item.SGST, Item.IGST);
162
+ TotalTaxAmt = (0, math_operations_1.Add)(TotalTaxAmt, Item.CGST, Item.SGST, Item.IGST);
163
163
  });
164
164
  }
165
165
  return TotalTaxAmt;
@@ -168,20 +168,20 @@ class VendorDebitNoteTotalsService {
168
168
  // let LaborTotalAfterDisc: any = this.GetLaborTotalAfterDiscount(LaborList);
169
169
  let ItemsTotalAfterDisc = this.GetItemsTotalAfterDiscount(ItemsList);
170
170
  if (IsIndependentTax) {
171
- return (0, aggregation_1.addition)(ItemsTotalAfterDisc, ItemsTaxAmount);
171
+ return (0, math_operations_1.Add)(ItemsTotalAfterDisc, ItemsTaxAmount);
172
172
  }
173
173
  else {
174
- return (0, aggregation_1.subtraction)(ItemsTotalAfterDisc, finalTotalsData.Disc);
174
+ return (0, math_operations_1.Subtract)(ItemsTotalAfterDisc, finalTotalsData.Disc);
175
175
  }
176
176
  }
177
177
  static ItemsTotalAfterDiscount(ItemsTotalAfterDisc, ItemsTaxAmount, MainPDisc, PDiscInPerc) {
178
- let ItemsTotal = (0, aggregation_1.addition)(ItemsTotalAfterDisc, ItemsTaxAmount);
178
+ let ItemsTotal = (0, math_operations_1.Add)(ItemsTotalAfterDisc, ItemsTaxAmount);
179
179
  if (!tr_utils_1.TrUtils.IsZero(MainPDisc)) {
180
180
  if (!tr_utils_1.TrUtils.IsEmpty(PDiscInPerc)) {
181
- ItemsTotal = (0, aggregation_1.subtraction)(ItemsTotal, (0, aggregation_1.division)((0, aggregation_1.multiply)(ItemsTotal, Number(PDiscInPerc)), 100));
181
+ ItemsTotal = (0, math_operations_1.Subtract)(ItemsTotal, (0, math_operations_1.Divide)((0, math_operations_1.Multiply)(ItemsTotal, Number(PDiscInPerc)), 100));
182
182
  }
183
183
  else {
184
- ItemsTotal = (0, aggregation_1.subtraction)(ItemsTotal, MainPDisc);
184
+ ItemsTotal = (0, math_operations_1.Subtract)(ItemsTotal, MainPDisc);
185
185
  }
186
186
  }
187
187
  return ItemsTotal;
@@ -193,10 +193,10 @@ class VendorDebitNoteTotalsService {
193
193
  let TotalTaxAmt = 0;
194
194
  if (IsIndependentTax) {
195
195
  ItemsList.forEach((Item) => {
196
- TotalCGSTAmt = (0, aggregation_1.addition)(TotalCGSTAmt, Item.CGST);
197
- TotalSGSTAmt = (0, aggregation_1.addition)(TotalSGSTAmt, Item.SGST);
198
- TotalIGSTAmt = (0, aggregation_1.addition)(TotalIGSTAmt, Item.IGST);
199
- TotalTaxAmt = (0, aggregation_1.addition)(TotalTaxAmt, Item.CGST, Item.SGST, Item.IGST);
196
+ TotalCGSTAmt = (0, math_operations_1.Add)(TotalCGSTAmt, Item.CGST);
197
+ TotalSGSTAmt = (0, math_operations_1.Add)(TotalSGSTAmt, Item.SGST);
198
+ TotalIGSTAmt = (0, math_operations_1.Add)(TotalIGSTAmt, Item.IGST);
199
+ TotalTaxAmt = (0, math_operations_1.Add)(TotalTaxAmt, Item.CGST, Item.SGST, Item.IGST);
200
200
  });
201
201
  }
202
202
  return [TotalCGSTAmt, TotalSGSTAmt, TotalIGSTAmt, TotalTaxAmt];
@@ -216,7 +216,7 @@ class VendorDebitNoteTotalsService {
216
216
  Item.CGSTAmt = tr_utils_1.TrUtils.SetValueToZeroIfNull(TaxInfo[0]);
217
217
  Item.SGSTAmt = tr_utils_1.TrUtils.SetValueToZeroIfNull(TaxInfo[1]);
218
218
  Item.IGSTAmt = tr_utils_1.TrUtils.SetValueToZeroIfNull(TaxInfo[2]);
219
- Item.CombinedTaxPercentage = (0, aggregation_1.addition)(Item.CGSTAmt, Item.SGSTAmt, Item.IGSTAmt);
219
+ Item.CombinedTaxPercentage = (0, math_operations_1.Add)(Item.CGSTAmt, Item.SGSTAmt, Item.IGSTAmt);
220
220
  });
221
221
  return Items;
222
222
  }
@@ -260,10 +260,10 @@ class VendorDebitNoteTotalsService {
260
260
  let HSN = MatchedItem[0].HSN;
261
261
  TaxInfo.CombinedTaxPercentage = MatchedItem[0].CombinedTaxPercentage;
262
262
  MatchedItem.forEach((argMatchedGSTItem) => {
263
- TaxOnAmount = (0, aggregation_1.addition)(TaxOnAmount, argMatchedGSTItem.AfterItemDisc);
264
- TaxAmount = (0, aggregation_1.addition)(TaxAmount, argMatchedGSTItem.CGST);
265
- TaxAmount = (0, aggregation_1.addition)(TaxAmount, argMatchedGSTItem.IGST);
266
- TaxAmount = (0, aggregation_1.addition)(TaxAmount, argMatchedGSTItem.SGST);
263
+ TaxOnAmount = (0, math_operations_1.Add)(TaxOnAmount, argMatchedGSTItem.AfterItemDisc);
264
+ TaxAmount = (0, math_operations_1.Add)(TaxAmount, argMatchedGSTItem.CGST);
265
+ TaxAmount = (0, math_operations_1.Add)(TaxAmount, argMatchedGSTItem.IGST);
266
+ TaxAmount = (0, math_operations_1.Add)(TaxAmount, argMatchedGSTItem.SGST);
267
267
  });
268
268
  TaxInfo.HSN = HSN;
269
269
  TaxInfo.TotalTaxableAmount = tr_utils_1.TrUtils.FixPriceValue(TaxOnAmount, DecimalsNumber);
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DCLandscapePdfService = void 0;
4
- const aggregation_1 = require("../../aggregation/aggregation");
4
+ const math_operations_1 = require("../../shared/math-operations");
5
5
  const shared_pdf_service_1 = require("../../shared/shared-pdf.service");
6
6
  const shared_print_service_1 = require("../../shared/shared-print.service");
7
7
  const my_date_1 = require("../../utils/my-date");
@@ -856,12 +856,12 @@ class DCLandscapePdfService {
856
856
  let totalDisc;
857
857
  let totalTax;
858
858
  if (!ROPrintData.Consolidate) {
859
- totalTax = tr_utils_1.TrUtils.FixPriceValue((0, aggregation_1.addition)(Number(0), Number(ROPrintData.CustPartITax)), DecimalsNumber);
859
+ totalTax = tr_utils_1.TrUtils.FixPriceValue((0, math_operations_1.Add)(Number(0), Number(ROPrintData.CustPartITax)), DecimalsNumber);
860
860
  if (tr_utils_1.TrUtils.isTaxable(ROPrintData.Settings.Tax)) {
861
- totalDisc = tr_utils_1.TrUtils.FixPriceValue((0, aggregation_1.addition)(Number(0), Number(ROPrintData.CustPartsDiscTotal)), DecimalsNumber);
861
+ totalDisc = tr_utils_1.TrUtils.FixPriceValue((0, math_operations_1.Add)(Number(0), Number(ROPrintData.CustPartsDiscTotal)), DecimalsNumber);
862
862
  }
863
863
  else {
864
- totalDisc = tr_utils_1.TrUtils.FixPriceValue((0, aggregation_1.addition)(Number(0), Number(ROPrintData.CustPartsDiscTotal), Number(ROPrintData.FixedDisc)), DecimalsNumber);
864
+ totalDisc = tr_utils_1.TrUtils.FixPriceValue((0, math_operations_1.Add)(Number(0), Number(ROPrintData.CustPartsDiscTotal), Number(ROPrintData.FixedDisc)), DecimalsNumber);
865
865
  }
866
866
  }
867
867
  return [
@@ -5,8 +5,8 @@ const delivery_challan_totals_1 = require("./delivery-challan-totals");
5
5
  const tr_utils_1 = require("../../utils/tr-utils");
6
6
  const code_enums_1 = require("../../enums/code-enums");
7
7
  const my_date_1 = require("../../utils/my-date");
8
- const aggregation_1 = require("../../aggregation/aggregation");
9
8
  const shared_print_service_1 = require("../../shared/shared-print.service");
9
+ const math_operations_1 = require("../../shared/math-operations");
10
10
  class DeliveryChallanPrintService {
11
11
  static GetChallanDataPrintInfo(OriginalInvoiceData, OriginalEntityData, image, IncludeGST, ConsolidateGST, TaxCodes, IsProforma) {
12
12
  var _a, _b;
@@ -79,11 +79,11 @@ class DeliveryChallanPrintService {
79
79
  static GetItemsPrintInfo(Items, Consolidate, TaxCodes, LineTotal, DecimalsNumber) {
80
80
  Items.forEach((Item) => {
81
81
  if (Consolidate) {
82
- let AfterDiscForEach = Item.AfterPartDisc / Item.Qty;
83
- let CTaxAmtPerItem = Item.CGST / Item.Qty;
84
- let STaxAmtPerItem = Item.SGST / Item.Qty;
85
- let ITaxAmtPerItem = Item.IGST / Item.Qty;
86
- Item.UnPr = tr_utils_1.TrUtils.FixPriceValue((0, aggregation_1.addition)(AfterDiscForEach, CTaxAmtPerItem, STaxAmtPerItem, ITaxAmtPerItem), DecimalsNumber);
82
+ let AfterDiscForEach = (0, math_operations_1.Divide)(Item.AfterPartDisc, Item.Qty);
83
+ let CTaxAmtPerItem = (0, math_operations_1.Divide)(Item.CGST, Item.Qty);
84
+ let STaxAmtPerItem = (0, math_operations_1.Divide)(Item.SGST, Item.Qty);
85
+ let ITaxAmtPerItem = (0, math_operations_1.Divide)(Item.IGST, Item.Qty);
86
+ Item.UnPr = tr_utils_1.TrUtils.FixPriceValue((0, math_operations_1.Add)(AfterDiscForEach, CTaxAmtPerItem, STaxAmtPerItem, ITaxAmtPerItem), DecimalsNumber);
87
87
  }
88
88
  else {
89
89
  Item.UnPr = tr_utils_1.TrUtils.FixPriceValue(Item.UnPr, DecimalsNumber);
@@ -98,7 +98,7 @@ class DeliveryChallanPrintService {
98
98
  Item.LineTotal = tr_utils_1.TrUtils.FixPriceValue(Item.AfterPartTax, DecimalsNumber);
99
99
  }
100
100
  else {
101
- Item.LineTotal = tr_utils_1.TrUtils.FixPriceValue((0, aggregation_1.subtraction)(Item.UnAmt, Item.Disc), DecimalsNumber);
101
+ Item.LineTotal = tr_utils_1.TrUtils.FixPriceValue((0, math_operations_1.Subtract)(Item.UnAmt, Item.Disc), DecimalsNumber);
102
102
  }
103
103
  if (!tr_utils_1.TrUtils.IsZero(Item.Qty) && !tr_utils_1.TrUtils.CheckInvalidSelect(Item.UoM)) {
104
104
  Item.QtyAndUoM = Item.Qty + ' ' + Item.UoM;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DeliveryChallanTotalsService = void 0;
4
- const aggregation_1 = require("../../aggregation/aggregation");
4
+ const math_operations_1 = require("../../shared/math-operations");
5
5
  const tr_utils_1 = require("../../utils/tr-utils");
6
6
  class DeliveryChallanTotalsService {
7
7
  static GetTotalsValue(PartsList, IsIndependentTax, DetailedInfo, Disc, Perc, TaxCodes, WithItems, Settings, isRoundable, EntitySettings) {
@@ -29,11 +29,11 @@ class DeliveryChallanTotalsService {
29
29
  static ResetLaborPartValues(PartsList, IsIndependentTax) {
30
30
  PartsList.forEach((Part) => {
31
31
  Part = this.ResetLaborPartValueIfInvalid(Part);
32
- Part.DiscountedPrice = (0, aggregation_1.addition)(Part.Disc, tr_utils_1.TrUtils.SetValueToZeroIfNull(Part.RecDisc));
33
- let NetAmt = (0, aggregation_1.subtraction)(Part.UnAmt, Part.Disc, Part.RecDisc);
32
+ Part.DiscountedPrice = (0, math_operations_1.Add)(Part.Disc, tr_utils_1.TrUtils.SetValueToZeroIfNull(Part.RecDisc));
33
+ let NetAmt = (0, math_operations_1.Subtract)(Part.UnAmt, Part.Disc, Part.RecDisc);
34
34
  Part.AfterPartDisc = NetAmt;
35
35
  if (IsIndependentTax) {
36
- Part.AfterPartTax = (0, aggregation_1.addition)(Part.AfterPartDisc, Part.CGST, Part.SGST, Part.IGST);
36
+ Part.AfterPartTax = (0, math_operations_1.Add)(Part.AfterPartDisc, Part.CGST, Part.SGST, Part.IGST);
37
37
  }
38
38
  else {
39
39
  Part.AfterPartTax = Part.AfterPartDisc;
@@ -71,11 +71,11 @@ class DeliveryChallanTotalsService {
71
71
  let CustPartTaxTotal = this.GetPartsTaxTotalFor(PartsList, IsIndependentTax);
72
72
  // console.log('CustPartTaxTotal', CustPartTaxTotal);
73
73
  let CustItemsDiscTotal = this.GetPartDiscountedTotal(PartsList);
74
- finalTotalsData.SubTotal = (0, aggregation_1.addition)(CustomerAfterDiscTotals, CustItemsDiscTotal);
74
+ finalTotalsData.SubTotal = (0, math_operations_1.Add)(CustomerAfterDiscTotals, CustItemsDiscTotal);
75
75
  let CustTotal = this.GetCustomerTotalBasedOnTaxType(CustPartTaxTotal, PartsList, IsIndependentTax);
76
76
  // console.log('CustTotal', CustTotal);
77
77
  if (isRoundable) {
78
- finalTotalsData.Round = tr_utils_1.TrUtils.FixedTo((0, aggregation_1.subtraction)(Math.round(CustTotal), CustTotal), DecimalsNumber);
78
+ finalTotalsData.Round = tr_utils_1.TrUtils.FixedTo((0, math_operations_1.Subtract)(Math.round(CustTotal), CustTotal), DecimalsNumber);
79
79
  finalTotalsData.Total = Math.round(CustTotal);
80
80
  }
81
81
  else {
@@ -96,7 +96,7 @@ class DeliveryChallanTotalsService {
96
96
  let PartsTotalAfterDisc = 0;
97
97
  // console.log('PartsList', PartsList);
98
98
  PartsList.forEach((Part) => {
99
- PartsTotalAfterDisc = (0, aggregation_1.addition)(PartsTotalAfterDisc, Part.AfterPartDisc);
99
+ PartsTotalAfterDisc = (0, math_operations_1.Add)(PartsTotalAfterDisc, Part.AfterPartDisc);
100
100
  });
101
101
  return PartsTotalAfterDisc;
102
102
  }
@@ -105,8 +105,8 @@ class DeliveryChallanTotalsService {
105
105
  finalTotalsData.CustPartsDiscTotal = this.GetPartDiscountedTotal(PartsList);
106
106
  // finalTotalsData.CustLaborTotalAfterDisc = this.GetLaborTotalAfterDiscount(opCodesList);
107
107
  finalTotalsData.CustPartsTotalAfterDisc = this.GetPartsTotalAfterDiscount(PartsList);
108
- finalTotalsData.CustLaborTotalBeforeDisc = (0, aggregation_1.addition)(finalTotalsData.CustLaborTotalAfterDisc, finalTotalsData.CustLaborDiscTotal);
109
- finalTotalsData.CustPartsTotalBeforeDisc = (0, aggregation_1.addition)(finalTotalsData.CustPartsTotalAfterDisc, finalTotalsData.CustPartsDiscTotal);
108
+ finalTotalsData.CustLaborTotalBeforeDisc = (0, math_operations_1.Add)(finalTotalsData.CustLaborTotalAfterDisc, finalTotalsData.CustLaborDiscTotal);
109
+ finalTotalsData.CustPartsTotalBeforeDisc = (0, math_operations_1.Add)(finalTotalsData.CustPartsTotalAfterDisc, finalTotalsData.CustPartsDiscTotal);
110
110
  // finalTotalsData.CustLaborITax = this.GetLaborTaxTotalFor(opCodesList, IsIndependentTax);
111
111
  // finalTotalsData.CustLaborSGST = this.GetLaborSGSTTaxTotal(opCodesList, IsIndependentTax);
112
112
  // finalTotalsData.CustLaborCGST = this.GetLaborCGSTTaxTotal(opCodesList, IsIndependentTax);
@@ -121,7 +121,7 @@ class DeliveryChallanTotalsService {
121
121
  finalTotalsData.CustPartIGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(TaxInfo[2]);
122
122
  finalTotalsData.CustPartSGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(TaxInfo[1]);
123
123
  // finalTotalsData.CustLaborAfterTax = TrUtils.FixedTo(finalTotalsData.CustLaborITax + finalTotalsData.CustLaborTotalAfterDisc);
124
- finalTotalsData.CustPartAfterTax = (0, aggregation_1.addition)(finalTotalsData.CustPartITax, finalTotalsData.CustPartsTotalAfterDisc);
124
+ finalTotalsData.CustPartAfterTax = (0, math_operations_1.Add)(finalTotalsData.CustPartITax, finalTotalsData.CustPartsTotalAfterDisc);
125
125
  finalTotalsData.CustTaxGroupData = this.GetTaxGroupingForPartsByHSN(PartsList, TaxCodes, DecimalsNumber);
126
126
  finalTotalsData.CustTaxGroupDataByPerc = this.GetTaxGroupingForPartsByPerc(PartsList, TaxCodes, DecimalsNumber);
127
127
  finalTotalsData.CustTotalRoundedBy = tr_utils_1.TrUtils.FixedTo(finalTotalsData.Round, DecimalsNumber);
@@ -176,14 +176,14 @@ class DeliveryChallanTotalsService {
176
176
  static GetLaborDiscountedTotal(LaborList) {
177
177
  let LaborDiscountedTotal = 0;
178
178
  LaborList.forEach((Labor) => {
179
- LaborDiscountedTotal = (0, aggregation_1.addition)(LaborDiscountedTotal, Labor.DiscountedPrice);
179
+ LaborDiscountedTotal = (0, math_operations_1.Add)(LaborDiscountedTotal, Labor.DiscountedPrice);
180
180
  });
181
181
  return LaborDiscountedTotal;
182
182
  }
183
183
  static GetPartDiscountedTotal(PartsList) {
184
184
  let PartsDiscountedTotal = 0;
185
185
  PartsList.forEach((Part) => {
186
- PartsDiscountedTotal = (0, aggregation_1.addition)(PartsDiscountedTotal, Part.DiscountedPrice);
186
+ PartsDiscountedTotal = (0, math_operations_1.Add)(PartsDiscountedTotal, Part.DiscountedPrice);
187
187
  });
188
188
  return PartsDiscountedTotal;
189
189
  }
@@ -191,7 +191,7 @@ class DeliveryChallanTotalsService {
191
191
  let TotalTaxAmt = 0;
192
192
  if (IsIndependentTax) {
193
193
  PartsList.forEach((Part) => {
194
- TotalTaxAmt = (0, aggregation_1.addition)(TotalTaxAmt, Part.CGST, Part.SGST, Part.IGST);
194
+ TotalTaxAmt = (0, math_operations_1.Add)(TotalTaxAmt, Part.CGST, Part.SGST, Part.IGST);
195
195
  });
196
196
  }
197
197
  return TotalTaxAmt;
@@ -200,32 +200,32 @@ class DeliveryChallanTotalsService {
200
200
  // let LaborTotalAfterDisc: any = this.GetLaborTotalAfterDiscount(LaborList);
201
201
  let PartsTotalAfterDisc = this.GetPartsTotalAfterDiscount(PartsList);
202
202
  if (IsIndependentTax) {
203
- return (0, aggregation_1.addition)(PartsTotalAfterDisc, PartsTaxAmount);
203
+ return (0, math_operations_1.Add)(PartsTotalAfterDisc, PartsTaxAmount);
204
204
  }
205
205
  else {
206
206
  return PartsTotalAfterDisc;
207
207
  }
208
208
  }
209
209
  static LaborTotalAfterDiscount(LaborTotalAfterDisc, LaborTaxAmount, MainLDisc, LDiscInPerc) {
210
- let LaborTotal = (0, aggregation_1.addition)(LaborTotalAfterDisc, LaborTaxAmount);
210
+ let LaborTotal = (0, math_operations_1.Add)(LaborTotalAfterDisc, LaborTaxAmount);
211
211
  if (!tr_utils_1.TrUtils.IsZero(MainLDisc)) {
212
212
  if (!tr_utils_1.TrUtils.IsEmpty(LDiscInPerc)) {
213
- LaborTotal = (0, aggregation_1.subtraction)(LaborTotal, (0, aggregation_1.division)((0, aggregation_1.multiply)(LaborTotal, Number(LDiscInPerc)), 100));
213
+ LaborTotal = (0, math_operations_1.Subtract)(LaborTotal, (0, math_operations_1.Divide)((0, math_operations_1.Multiply)(LaborTotal, Number(LDiscInPerc)), 100));
214
214
  }
215
215
  else {
216
- LaborTotal = (0, aggregation_1.subtraction)(LaborTotal, MainLDisc);
216
+ LaborTotal = (0, math_operations_1.Subtract)(LaborTotal, MainLDisc);
217
217
  }
218
218
  }
219
219
  return LaborTotal;
220
220
  }
221
221
  static ItemsTotalAfterDiscount(PartsTotalAfterDisc, PartsTaxAmount, MainPDisc, PDiscInPerc) {
222
- let ItemsTotal = (0, aggregation_1.addition)(PartsTotalAfterDisc, PartsTaxAmount);
222
+ let ItemsTotal = (0, math_operations_1.Add)(PartsTotalAfterDisc, PartsTaxAmount);
223
223
  if (!tr_utils_1.TrUtils.IsZero(MainPDisc)) {
224
224
  if (!tr_utils_1.TrUtils.IsEmpty(PDiscInPerc)) {
225
- ItemsTotal = (0, aggregation_1.subtraction)(ItemsTotal, (0, aggregation_1.division)((0, aggregation_1.multiply)(ItemsTotal, Number(PDiscInPerc)), 100));
225
+ ItemsTotal = (0, math_operations_1.Subtract)(ItemsTotal, (0, math_operations_1.Divide)((0, math_operations_1.Multiply)(ItemsTotal, Number(PDiscInPerc)), 100));
226
226
  }
227
227
  else {
228
- ItemsTotal = (0, aggregation_1.subtraction)(ItemsTotal, MainPDisc);
228
+ ItemsTotal = (0, math_operations_1.Subtract)(ItemsTotal, MainPDisc);
229
229
  }
230
230
  }
231
231
  return ItemsTotal;
@@ -234,7 +234,7 @@ class DeliveryChallanTotalsService {
234
234
  let TotalTaxAmt = 0;
235
235
  if (IsIndependentTax) {
236
236
  opCodesList.forEach((Labor) => {
237
- TotalTaxAmt = (0, aggregation_1.addition)(TotalTaxAmt, Labor.CGST);
237
+ TotalTaxAmt = (0, math_operations_1.Add)(TotalTaxAmt, Labor.CGST);
238
238
  });
239
239
  }
240
240
  return TotalTaxAmt;
@@ -243,7 +243,7 @@ class DeliveryChallanTotalsService {
243
243
  let TotalTaxAmt = 0;
244
244
  if (IsIndependentTax) {
245
245
  opCodesList.forEach((Labor) => {
246
- TotalTaxAmt = (0, aggregation_1.addition)(TotalTaxAmt, Labor.IGST);
246
+ TotalTaxAmt = (0, math_operations_1.Add)(TotalTaxAmt, Labor.IGST);
247
247
  });
248
248
  }
249
249
  return TotalTaxAmt;
@@ -252,7 +252,7 @@ class DeliveryChallanTotalsService {
252
252
  let TotalTaxAmt = 0;
253
253
  if (IsIndependentTax) {
254
254
  opCodesList.forEach((Labor) => {
255
- TotalTaxAmt = (0, aggregation_1.addition)(TotalTaxAmt, Labor.SGST);
255
+ TotalTaxAmt = (0, math_operations_1.Add)(TotalTaxAmt, Labor.SGST);
256
256
  });
257
257
  }
258
258
  return TotalTaxAmt;
@@ -264,10 +264,10 @@ class DeliveryChallanTotalsService {
264
264
  let TotalTaxAmt = 0;
265
265
  if (IsIndependentTax) {
266
266
  PartsList.forEach((Part) => {
267
- TotalCGSTAmt = (0, aggregation_1.addition)(TotalCGSTAmt, Part.CGST);
268
- TotalSGSTAmt = (0, aggregation_1.addition)(TotalSGSTAmt, Part.SGST);
269
- TotalIGSTAmt = (0, aggregation_1.addition)(TotalIGSTAmt, Part.IGST);
270
- TotalTaxAmt = (0, aggregation_1.addition)(TotalTaxAmt, Part.CGST, Part.SGST, Part.IGST);
267
+ TotalCGSTAmt = (0, math_operations_1.Add)(TotalCGSTAmt, Part.CGST);
268
+ TotalSGSTAmt = (0, math_operations_1.Add)(TotalSGSTAmt, Part.SGST);
269
+ TotalIGSTAmt = (0, math_operations_1.Add)(TotalIGSTAmt, Part.IGST);
270
+ TotalTaxAmt = (0, math_operations_1.Add)(TotalTaxAmt, Part.CGST, Part.SGST, Part.IGST);
271
271
  });
272
272
  }
273
273
  return [TotalCGSTAmt, TotalSGSTAmt, TotalIGSTAmt, TotalTaxAmt];
@@ -287,7 +287,7 @@ class DeliveryChallanTotalsService {
287
287
  Part.CGSTAmt = tr_utils_1.TrUtils.SetValueToZeroIfNull(GSTValues[0]);
288
288
  Part.SGSTAmt = tr_utils_1.TrUtils.SetValueToZeroIfNull(GSTValues[1]);
289
289
  Part.IGSTAmt = tr_utils_1.TrUtils.SetValueToZeroIfNull(GSTValues[2]);
290
- Part.CombinedTaxPercentage = (0, aggregation_1.addition)(Part.CGSTAmt, Part.SGSTAmt, Part.IGSTAmt);
290
+ Part.CombinedTaxPercentage = (0, math_operations_1.Add)(Part.CGSTAmt, Part.SGSTAmt, Part.IGSTAmt);
291
291
  });
292
292
  return Parts;
293
293
  }
@@ -334,13 +334,13 @@ class DeliveryChallanTotalsService {
334
334
  let HSN = MatchedPart[0].HSN;
335
335
  TaxInfo.CombinedTaxPercentage = MatchedPart[0].CombinedTaxPercentage;
336
336
  MatchedPart.forEach((argMatchedGSTPart) => {
337
- TaxOnAmount = (0, aggregation_1.addition)(TaxOnAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.AfterPartDisc, DecimalsNumber));
338
- TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.CGST, DecimalsNumber));
339
- TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.IGST, DecimalsNumber));
340
- TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.SGST, DecimalsNumber));
341
- CGSTAmt = (0, aggregation_1.addition)(CGSTAmt, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.CGST, DecimalsNumber));
342
- SGSTAmt = (0, aggregation_1.addition)(SGSTAmt, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.SGST, DecimalsNumber));
343
- IGSTAmt = (0, aggregation_1.addition)(IGSTAmt, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.IGST, DecimalsNumber));
337
+ TaxOnAmount = (0, math_operations_1.Add)(TaxOnAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.AfterPartDisc, DecimalsNumber));
338
+ TaxAmount = (0, math_operations_1.Add)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.CGST, DecimalsNumber));
339
+ TaxAmount = (0, math_operations_1.Add)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.IGST, DecimalsNumber));
340
+ TaxAmount = (0, math_operations_1.Add)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.SGST, DecimalsNumber));
341
+ CGSTAmt = (0, math_operations_1.Add)(CGSTAmt, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.CGST, DecimalsNumber));
342
+ SGSTAmt = (0, math_operations_1.Add)(SGSTAmt, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.SGST, DecimalsNumber));
343
+ IGSTAmt = (0, math_operations_1.Add)(IGSTAmt, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.IGST, DecimalsNumber));
344
344
  });
345
345
  TaxInfo.HSN = HSN;
346
346
  TaxInfo.CGSTAmt = CGSTAmt;