@zauru-sdk/utils 2.0.19 → 2.0.20

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.
@@ -100,10 +100,11 @@ export const register4pinosReception = async ({ cookie, idWebAppTable, agency_id
100
100
  otrasRazones: values.otrasRazones,
101
101
  };
102
102
  let keys = Object.keys(values);
103
- let netWeight = values.netWgt;
104
- const total_baskets = values.totalBaskets + "";
105
- const stockInteger = values.stockInteger == "true";
106
103
  let webapp_table_object = {};
104
+ const netWeight = Number(values.netWgt);
105
+ const total_baskets = Number(values.totalBaskets);
106
+ const netWeightByBasket = Number(netWeight) / total_baskets;
107
+ const stockInteger = values.stockInteger == "true";
107
108
  const buildArray = (keyIncludes, processValue) => {
108
109
  const regex = /\d/; // Expresión regular para buscar al menos un dígito.
109
110
  return keys
@@ -178,7 +179,7 @@ export const register4pinosReception = async ({ cookie, idWebAppTable, agency_id
178
179
  import: false,
179
180
  tag_ids: ["", tag_id],
180
181
  memo: qualityControlBaskets + "",
181
- origin: netWeight,
182
+ origin: netWeight?.toString(),
182
183
  purchase_order_details: newPurchaseOrderDetails,
183
184
  incoterm_destination: provenance.slice(0, 254),
184
185
  transport_type: discountReason,
@@ -285,7 +286,6 @@ export const register4pinosReception = async ({ cookie, idWebAppTable, agency_id
285
286
  if (apiResponses.apiCall === 6 && qualityControlBaskets.length > 0) {
286
287
  console.log("------------- REALIZANDO ENVÍO DE CANASTAS A CONTROL DE CALIDAD");
287
288
  const total_qc_baskets = Number(values.totalQCBaskets);
288
- const netWeightByBasket = Number(netWeight) / total_qc_baskets;
289
289
  const lotResponse = await getLoteByName(session, apiResponses.authorizedPO.id_number);
290
290
  if (lotResponse.error || !lotResponse.data || !lotResponse.data.id) {
291
291
  throw new Error("Error al intentar obtener el lote por nombre: " +
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zauru-sdk/utils",
3
- "version": "2.0.19",
3
+ "version": "2.0.20",
4
4
  "description": "Utilidades, parseo de request y demás para desarrollo de webapps de Zauru",
5
5
  "main": "./dist/esm/index.js",
6
6
  "module": "./dist/esm/index.js",
@@ -30,5 +30,5 @@
30
30
  "@zauru-sdk/services": "^2.0.19",
31
31
  "@zauru-sdk/types": "^2.0.18"
32
32
  },
33
- "gitHead": "68ff5684747f6fa9616a57dcc8a8ec702dcda3ee"
33
+ "gitHead": "cf77d984c832d98ccb35cc02ef705c31d25f3ab8"
34
34
  }