sigo-package 1.2.70 → 1.2.71
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.d.mts +1 -4
- package/dist/index.d.ts +1 -4
- package/dist/index.js +9 -14
- package/dist/index.mjs +9 -14
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -384,10 +384,7 @@ interface ResumenLiquidacionesTypeChile {
|
|
|
384
384
|
MatStockAlmacen: MatStockPersonalType[];
|
|
385
385
|
}
|
|
386
386
|
interface MatStockPersonalType {
|
|
387
|
-
|
|
388
|
-
Identificacion: string;
|
|
389
|
-
Codigo: string;
|
|
390
|
-
CodigoLlave: string;
|
|
387
|
+
ID_StockPersonal: number;
|
|
391
388
|
Cantidad: number;
|
|
392
389
|
}
|
|
393
390
|
interface MatUtilizadosType {
|
package/dist/index.d.ts
CHANGED
|
@@ -384,10 +384,7 @@ interface ResumenLiquidacionesTypeChile {
|
|
|
384
384
|
MatStockAlmacen: MatStockPersonalType[];
|
|
385
385
|
}
|
|
386
386
|
interface MatStockPersonalType {
|
|
387
|
-
|
|
388
|
-
Identificacion: string;
|
|
389
|
-
Codigo: string;
|
|
390
|
-
CodigoLlave: string;
|
|
387
|
+
ID_StockPersonal: number;
|
|
391
388
|
Cantidad: number;
|
|
392
389
|
}
|
|
393
390
|
interface MatUtilizadosType {
|
package/dist/index.js
CHANGED
|
@@ -200,16 +200,11 @@ var ActualizarDataResumenLiquidaciones = /* @__PURE__ */ __name((ManoObra, Reser
|
|
|
200
200
|
if (StockPersonal && Array.isArray(StockPersonal)) {
|
|
201
201
|
for (const stockPersonal of StockPersonal) {
|
|
202
202
|
stockPersonal.Liquidacion = 0;
|
|
203
|
-
const stock = ResumenPreLiquidado.MatStockPersonal.
|
|
204
|
-
if (stock) {
|
|
205
|
-
|
|
206
|
-
stockPersonal.Liquidacion = stockPersonal.Despacho;
|
|
207
|
-
stock.Cantidad = stock.Cantidad - stockPersonal.Despacho;
|
|
208
|
-
} else {
|
|
209
|
-
stockPersonal.Liquidacion = stock.Cantidad;
|
|
210
|
-
stock.Cantidad = 0;
|
|
211
|
-
}
|
|
203
|
+
const stock = ResumenPreLiquidado.MatStockPersonal.filter((e) => e.ID_StockPersonal === stockPersonal.ID_StockPersonal);
|
|
204
|
+
if (stock.length !== 1) {
|
|
205
|
+
throw new Error(`Hay ${stock.length} resultados para stock ID_StockPersonal: ${stockPersonal.ID_StockPersonal}`);
|
|
212
206
|
}
|
|
207
|
+
stockPersonal.Liquidacion = stock[0].Cantidad;
|
|
213
208
|
}
|
|
214
209
|
}
|
|
215
210
|
}, "ActualizarDataResumenLiquidaciones");
|
|
@@ -14841,13 +14836,13 @@ var CalcularResumenLiquidaciones = /* @__PURE__ */ __name((trabajo, trabajos) =>
|
|
|
14841
14836
|
Codigo: mu.Codigo,
|
|
14842
14837
|
Cantidad: mu.Cantidad
|
|
14843
14838
|
});
|
|
14844
|
-
const matStockPersonal = MatStockPersonal.find((e) => e.
|
|
14839
|
+
const matStockPersonal = MatStockPersonal.find((e) => e.ID_StockPersonal === mu.ID_StockPersonal);
|
|
14845
14840
|
if (matStockPersonal) matStockPersonal.Cantidad += mu.Cantidad;
|
|
14846
14841
|
else MatStockPersonal.push({
|
|
14847
|
-
|
|
14848
|
-
Identificacion: trabajoDB.Ultima_asignacion.Personal[0].Identificacion,
|
|
14849
|
-
CodigoLlave: mu.CodigoLlave,
|
|
14850
|
-
Codigo: mu.Codigo,
|
|
14842
|
+
ID_StockPersonal: mu.ID_StockPersonal,
|
|
14843
|
+
// Identificacion: trabajoDB.Ultima_asignacion.Personal[0].Identificacion,
|
|
14844
|
+
// CodigoLlave: mu.CodigoLlave,
|
|
14845
|
+
// Codigo: mu.Codigo,
|
|
14851
14846
|
Cantidad: mu.Cantidad
|
|
14852
14847
|
});
|
|
14853
14848
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -58,16 +58,11 @@ var ActualizarDataResumenLiquidaciones = /* @__PURE__ */ __name((ManoObra, Reser
|
|
|
58
58
|
if (StockPersonal && Array.isArray(StockPersonal)) {
|
|
59
59
|
for (const stockPersonal of StockPersonal) {
|
|
60
60
|
stockPersonal.Liquidacion = 0;
|
|
61
|
-
const stock = ResumenPreLiquidado.MatStockPersonal.
|
|
62
|
-
if (stock) {
|
|
63
|
-
|
|
64
|
-
stockPersonal.Liquidacion = stockPersonal.Despacho;
|
|
65
|
-
stock.Cantidad = stock.Cantidad - stockPersonal.Despacho;
|
|
66
|
-
} else {
|
|
67
|
-
stockPersonal.Liquidacion = stock.Cantidad;
|
|
68
|
-
stock.Cantidad = 0;
|
|
69
|
-
}
|
|
61
|
+
const stock = ResumenPreLiquidado.MatStockPersonal.filter((e) => e.ID_StockPersonal === stockPersonal.ID_StockPersonal);
|
|
62
|
+
if (stock.length !== 1) {
|
|
63
|
+
throw new Error(`Hay ${stock.length} resultados para stock ID_StockPersonal: ${stockPersonal.ID_StockPersonal}`);
|
|
70
64
|
}
|
|
65
|
+
stockPersonal.Liquidacion = stock[0].Cantidad;
|
|
71
66
|
}
|
|
72
67
|
}
|
|
73
68
|
}, "ActualizarDataResumenLiquidaciones");
|
|
@@ -14699,13 +14694,13 @@ var CalcularResumenLiquidaciones = /* @__PURE__ */ __name((trabajo, trabajos) =>
|
|
|
14699
14694
|
Codigo: mu.Codigo,
|
|
14700
14695
|
Cantidad: mu.Cantidad
|
|
14701
14696
|
});
|
|
14702
|
-
const matStockPersonal = MatStockPersonal.find((e) => e.
|
|
14697
|
+
const matStockPersonal = MatStockPersonal.find((e) => e.ID_StockPersonal === mu.ID_StockPersonal);
|
|
14703
14698
|
if (matStockPersonal) matStockPersonal.Cantidad += mu.Cantidad;
|
|
14704
14699
|
else MatStockPersonal.push({
|
|
14705
|
-
|
|
14706
|
-
Identificacion: trabajoDB.Ultima_asignacion.Personal[0].Identificacion,
|
|
14707
|
-
CodigoLlave: mu.CodigoLlave,
|
|
14708
|
-
Codigo: mu.Codigo,
|
|
14700
|
+
ID_StockPersonal: mu.ID_StockPersonal,
|
|
14701
|
+
// Identificacion: trabajoDB.Ultima_asignacion.Personal[0].Identificacion,
|
|
14702
|
+
// CodigoLlave: mu.CodigoLlave,
|
|
14703
|
+
// Codigo: mu.Codigo,
|
|
14709
14704
|
Cantidad: mu.Cantidad
|
|
14710
14705
|
});
|
|
14711
14706
|
}
|