sigo-package 1.2.71 → 1.2.72

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/index.js CHANGED
@@ -201,10 +201,12 @@ var ActualizarDataResumenLiquidaciones = /* @__PURE__ */ __name((ManoObra, Reser
201
201
  for (const stockPersonal of StockPersonal) {
202
202
  stockPersonal.Liquidacion = 0;
203
203
  const stock = ResumenPreLiquidado.MatStockPersonal.filter((e) => e.ID_StockPersonal === stockPersonal.ID_StockPersonal);
204
- if (stock.length !== 1) {
204
+ if (stock.length > 1) {
205
205
  throw new Error(`Hay ${stock.length} resultados para stock ID_StockPersonal: ${stockPersonal.ID_StockPersonal}`);
206
206
  }
207
- stockPersonal.Liquidacion = stock[0].Cantidad;
207
+ if (stock.length === 1) {
208
+ stockPersonal.Liquidacion = stock[0].Cantidad;
209
+ }
208
210
  }
209
211
  }
210
212
  }, "ActualizarDataResumenLiquidaciones");
package/dist/index.mjs CHANGED
@@ -59,10 +59,12 @@ var ActualizarDataResumenLiquidaciones = /* @__PURE__ */ __name((ManoObra, Reser
59
59
  for (const stockPersonal of StockPersonal) {
60
60
  stockPersonal.Liquidacion = 0;
61
61
  const stock = ResumenPreLiquidado.MatStockPersonal.filter((e) => e.ID_StockPersonal === stockPersonal.ID_StockPersonal);
62
- if (stock.length !== 1) {
62
+ if (stock.length > 1) {
63
63
  throw new Error(`Hay ${stock.length} resultados para stock ID_StockPersonal: ${stockPersonal.ID_StockPersonal}`);
64
64
  }
65
- stockPersonal.Liquidacion = stock[0].Cantidad;
65
+ if (stock.length === 1) {
66
+ stockPersonal.Liquidacion = stock[0].Cantidad;
67
+ }
66
68
  }
67
69
  }
68
70
  }, "ActualizarDataResumenLiquidaciones");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sigo-package",
3
- "version": "1.2.71",
3
+ "version": "1.2.72",
4
4
  "description": "Funciones compartidas sigo",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",