@zauru-sdk/hooks 1.0.106 → 1.0.107

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.
@@ -175,9 +175,9 @@ const getPesadasByForm = (formInput, stocks_only_integer = false) => {
175
175
  // Iterar sobre los campos del formulario y extraer la información de pesadas
176
176
  let index = 0;
177
177
  while (formInput.hasOwnProperty(`basket${index}`)) {
178
- const baskets = Number(formInput[`basket${index}`] || 0);
179
- const totalWeight = Number(formInput[`weight${index}`] || 0);
180
- const discount = Number(formInput[`discount${index}`] || 0);
178
+ const baskets = Number(formInput[`basket${index}`] || 0) ?? 0;
179
+ const totalWeight = Number(formInput[`weight${index}`] || 0) ?? 0;
180
+ const discount = Number(formInput[`discount${index}`] || 0) ?? 0;
181
181
  // Realizar los cálculos necesarios
182
182
  const basketWeight = 5;
183
183
  let netWeight = totalWeight - baskets * basketWeight;
@@ -175,9 +175,9 @@ const getPesadasByForm = (formInput, stocks_only_integer = false) => {
175
175
  // Iterar sobre los campos del formulario y extraer la información de pesadas
176
176
  let index = 0;
177
177
  while (formInput.hasOwnProperty(`basket${index}`)) {
178
- const baskets = Number(formInput[`basket${index}`] || 0);
179
- const totalWeight = Number(formInput[`weight${index}`] || 0);
180
- const discount = Number(formInput[`discount${index}`] || 0);
178
+ const baskets = Number(formInput[`basket${index}`] || 0) ?? 0;
179
+ const totalWeight = Number(formInput[`weight${index}`] || 0) ?? 0;
180
+ const discount = Number(formInput[`discount${index}`] || 0) ?? 0;
181
181
  // Realizar los cálculos necesarios
182
182
  const basketWeight = 5;
183
183
  let netWeight = totalWeight - baskets * basketWeight;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zauru-sdk/hooks",
3
- "version": "1.0.106",
3
+ "version": "1.0.107",
4
4
  "description": "Hooks reutilizables dentro de las webapps de Zauru.",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",
@@ -34,5 +34,5 @@
34
34
  "react": "^18.2.0",
35
35
  "react-dom": "^18.2.0"
36
36
  },
37
- "gitHead": "664e7ee59830cf458ea3e47b597a89867b65b66b"
37
+ "gitHead": "edff68b863dca997b5d0567656b57cf82ae51857"
38
38
  }