@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.
- package/dist/cjs/receptions.js +3 -3
- package/dist/esm/receptions.js +3 -3
- package/package.json +2 -2
package/dist/cjs/receptions.js
CHANGED
|
@@ -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/dist/esm/receptions.js
CHANGED
|
@@ -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.
|
|
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": "
|
|
37
|
+
"gitHead": "edff68b863dca997b5d0567656b57cf82ae51857"
|
|
38
38
|
}
|