shareneus 1.7.332 → 1.7.333

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.
@@ -235,6 +235,7 @@ function GetTCodeFromTaxes(item) {
235
235
  return item === null || item === void 0 ? void 0 : item.TCode;
236
236
  }
237
237
  function GetLaborPrintInfo(LaborList, Consolidate, TaxCodes, LineTotal, DecimalsNumber) {
238
+ console.log('LaborList', LaborList);
238
239
  LaborList.forEach((Labor) => {
239
240
  Labor.HSN = Labor.SAC;
240
241
  if (tr_utils_1.TrUtils.IsNull(Labor.Qty)) {
@@ -55,6 +55,7 @@ class InvoiceTotalsService {
55
55
  }
56
56
  static CalculateLaborValues(opCodesList, IsIndependentTax) {
57
57
  opCodesList = this.ResetLaborValues(opCodesList, IsIndependentTax);
58
+ console.log('opCodesList', opCodesList);
58
59
  // opCodesList = this.GetOperationsDiscountPrice(opCodesList);
59
60
  // opCodesList = this.GetOperationsAfterDiscount(opCodesList,IsIndependentTax);
60
61
  // opCodesList = this.GetOperationsAfterTax(opCodesList, IsIndependentTax);
@@ -80,10 +80,8 @@ function GetItemPriceForPriceList(item, priceList, includeMargin = false, quanti
80
80
  if (includeMargin && (0, util_1.IsNotNull)(element.Cost)) {
81
81
  element.Margin = (0, math_operations_1.GetMarginValue)(element.Price, element.Cost);
82
82
  }
83
- console.log('element', element);
84
83
  }
85
84
  }
86
- console.log('item after price list application', item);
87
85
  return item;
88
86
  }
89
87
  return CalculatePriceBasedOnPriceList(item, priceList, includeMargin, resolvedQty);
@@ -146,10 +144,6 @@ function CalculatePriceBasedOnPriceList(item, priceList, includeMargin, quantity
146
144
  if (priceList.Fixed && (0, util_1.IsNotNull)(priceList.Fixed.Price)) {
147
145
  const fixedPrice = priceList.Fixed.Price;
148
146
  const fixedDisc = priceList.Fixed.Disc || 0;
149
- console.log('Track', item.Track);
150
- console.log('Batches', item.Batches);
151
- console.log('is Array', Array.isArray(item.Batches));
152
- console.log('condition', item.Track === "BN" && Array.isArray(item.Batches));
153
147
  if (item.Track === "TR" || item.Track === "SN") {
154
148
  item.Sale["MRP"] = item.Sale.Price;
155
149
  if ((0, util_1.IsNotNull)(fixedDisc) && fixedDisc > 0) {
@@ -164,7 +158,6 @@ function CalculatePriceBasedOnPriceList(item, priceList, includeMargin, quantity
164
158
  }
165
159
  else if (item.Track === "BN" && Array.isArray(item.Batches)) {
166
160
  for (const batch of item.Batches) {
167
- console.log('element batch before price calculation', batch);
168
161
  batch.MRP = batch.Price;
169
162
  if ((0, util_1.IsNotNull)(fixedDisc) && fixedDisc > 0) {
170
163
  batch.Price = CalcItemFinalSalePrice(fixedPrice, fixedDisc, priceList);
@@ -175,7 +168,6 @@ function CalculatePriceBasedOnPriceList(item, priceList, includeMargin, quantity
175
168
  if (includeMargin && (0, util_1.IsNotNull)(batch.Cost)) {
176
169
  batch.Margin = (0, math_operations_1.GetMarginValue)(batch.Price, batch.Cost);
177
170
  }
178
- console.log('element batch', batch);
179
171
  }
180
172
  }
181
173
  }
@@ -223,7 +215,6 @@ function CalculatePriceBasedOnPriceList(item, priceList, includeMargin, quantity
223
215
  }
224
216
  }
225
217
  }
226
- console.log('item after price list application', item);
227
218
  return item;
228
219
  }
229
220
  function ApplyRounding(price, priceList) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shareneus",
3
- "version": "1.7.332",
3
+ "version": "1.7.333",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -251,7 +251,8 @@ export function GetTCodeFromTaxes(item: any) {
251
251
  }
252
252
 
253
253
  export function GetLaborPrintInfo(LaborList: any, Consolidate: boolean, TaxCodes: any, LineTotal: string, DecimalsNumber: number) {
254
- LaborList.forEach((Labor: any) => {
254
+ console.log('LaborList', LaborList);
255
+ LaborList.forEach((Labor: any) => {
255
256
  Labor.HSN = Labor.SAC;
256
257
  if (TrUtils.IsNull(Labor.Qty)) {
257
258
  Labor.Qty = 1;
@@ -71,7 +71,7 @@ export class InvoiceTotalsService {
71
71
 
72
72
  static CalculateLaborValues(opCodesList: any, IsIndependentTax: boolean) {
73
73
  opCodesList = this.ResetLaborValues(opCodesList, IsIndependentTax);
74
-
74
+ console.log('opCodesList', opCodesList);
75
75
  // opCodesList = this.GetOperationsDiscountPrice(opCodesList);
76
76
 
77
77
  // opCodesList = this.GetOperationsAfterDiscount(opCodesList,IsIndependentTax);
@@ -91,10 +91,9 @@ export function GetItemPriceForPriceList(
91
91
  if (includeMargin && IsNotNull(element.Cost)) {
92
92
  element.Margin = GetMarginValue(element.Price, element.Cost);
93
93
  }
94
- console.log('element', element);
95
94
  }
96
95
  }
97
- console.log('item after price list application', item);
96
+
98
97
  return item;
99
98
  }
100
99
 
@@ -179,10 +178,7 @@ function CalculatePriceBasedOnPriceList(
179
178
  if (priceList.Fixed && IsNotNull(priceList.Fixed.Price)) {
180
179
  const fixedPrice = priceList.Fixed.Price;
181
180
  const fixedDisc = priceList.Fixed.Disc || 0;
182
- console.log('Track', item.Track);
183
- console.log('Batches', item.Batches);
184
- console.log('is Array', Array.isArray(item.Batches));
185
- console.log('condition', item.Track === "BN" && Array.isArray(item.Batches));
181
+
186
182
  if (item.Track === "TR" || item.Track === "SN") {
187
183
  item.Sale["MRP"] = item.Sale.Price;
188
184
  if (IsNotNull(fixedDisc) && fixedDisc > 0) {
@@ -196,7 +192,6 @@ console.log('condition', item.Track === "BN" && Array.isArray(item.Batches));
196
192
  }
197
193
  } else if (item.Track === "BN" && Array.isArray(item.Batches)) {
198
194
  for (const batch of item.Batches) {
199
- console.log('element batch before price calculation', batch);
200
195
  batch.MRP = batch.Price;
201
196
  if (IsNotNull(fixedDisc) && fixedDisc > 0) {
202
197
  batch.Price = CalcItemFinalSalePrice(fixedPrice, fixedDisc, priceList);
@@ -206,7 +201,6 @@ console.log('condition', item.Track === "BN" && Array.isArray(item.Batches));
206
201
  if (includeMargin && IsNotNull(batch.Cost)) {
207
202
  batch.Margin = GetMarginValue(batch.Price, batch.Cost);
208
203
  }
209
- console.log('element batch', batch);
210
204
  }
211
205
  }
212
206
  }
@@ -255,7 +249,7 @@ console.log('condition', item.Track === "BN" && Array.isArray(item.Batches));
255
249
  }
256
250
  }
257
251
  }
258
- console.log('item after price list application', item);
252
+
259
253
  return item;
260
254
  }
261
255