sigo-package 1.2.32 → 1.2.34
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 +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +11 -5
- package/dist/index.mjs +11 -5
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -96,6 +96,7 @@ interface IMOAndMaterialsRules {
|
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
interface IMateriales {
|
|
99
|
+
keyFila: string;
|
|
99
100
|
key: string;
|
|
100
101
|
cantidad: number;
|
|
101
102
|
item: ItemDetalleLogisticaDTO;
|
|
@@ -320,6 +321,7 @@ declare function obtenerTipoYCodigoMO(codigoOriginal: string): {
|
|
|
320
321
|
declare function checkAndBuildMaterialsFromStock(Materiales: IMOAndMaterialsRules[], dataStockPersonal: StockPersonalENTITY[], dataStockAlmacen: StockAlmacenENTITY[], key: string, Controller: any): IMateriales[];
|
|
321
322
|
|
|
322
323
|
declare function buildDataMaterialsRule(Materiales: Map<string, IMOAndMaterialsRules>, dataStockPersonal: Pick<StockPersonalENTITY, 'ID_StockPersonal' | 'Item' | 'Lote'>[], dataStockAlmacen: Pick<StockAlmacenENTITY, 'ID_StockAlmacen' | 'Item' | 'Lote'>[], Controller: any): {
|
|
324
|
+
keyFila: string;
|
|
323
325
|
key: string;
|
|
324
326
|
cantidad: number;
|
|
325
327
|
item: sigo_entities.ItemDetalleLogisticaDTO;
|
package/dist/index.d.ts
CHANGED
|
@@ -96,6 +96,7 @@ interface IMOAndMaterialsRules {
|
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
interface IMateriales {
|
|
99
|
+
keyFila: string;
|
|
99
100
|
key: string;
|
|
100
101
|
cantidad: number;
|
|
101
102
|
item: ItemDetalleLogisticaDTO;
|
|
@@ -320,6 +321,7 @@ declare function obtenerTipoYCodigoMO(codigoOriginal: string): {
|
|
|
320
321
|
declare function checkAndBuildMaterialsFromStock(Materiales: IMOAndMaterialsRules[], dataStockPersonal: StockPersonalENTITY[], dataStockAlmacen: StockAlmacenENTITY[], key: string, Controller: any): IMateriales[];
|
|
321
322
|
|
|
322
323
|
declare function buildDataMaterialsRule(Materiales: Map<string, IMOAndMaterialsRules>, dataStockPersonal: Pick<StockPersonalENTITY, 'ID_StockPersonal' | 'Item' | 'Lote'>[], dataStockAlmacen: Pick<StockAlmacenENTITY, 'ID_StockAlmacen' | 'Item' | 'Lote'>[], Controller: any): {
|
|
324
|
+
keyFila: string;
|
|
323
325
|
key: string;
|
|
324
326
|
cantidad: number;
|
|
325
327
|
item: sigo_entities.ItemDetalleLogisticaDTO;
|
package/dist/index.js
CHANGED
|
@@ -5944,14 +5944,17 @@ function checkAndBuildMaterialsFromStock(Materiales, dataStockPersonal, dataStoc
|
|
|
5944
5944
|
throw new Controller.SigoError(`No se encontr\xF3 el material ${codMaterial} en el stock personal para este trabajo.`);
|
|
5945
5945
|
}
|
|
5946
5946
|
const cantidad = material.CantidadPadre ? 0 : material.CantidadFija ? material.Cantidad : 0;
|
|
5947
|
+
const ID = stockPersonal ? stock.ID_StockPersonal : stock.ID_StockAlmacen;
|
|
5948
|
+
const _stock = stockPersonal ? "Personal" : "Almacen";
|
|
5947
5949
|
materiales.push({
|
|
5948
5950
|
item: stock.Item,
|
|
5949
5951
|
key,
|
|
5950
5952
|
cantidad: cantidad * material.Factor,
|
|
5951
5953
|
material,
|
|
5952
5954
|
lote: stock.Lote,
|
|
5953
|
-
stock:
|
|
5954
|
-
ID
|
|
5955
|
+
stock: _stock,
|
|
5956
|
+
ID,
|
|
5957
|
+
keyFila: `${ID}${_stock}`
|
|
5955
5958
|
});
|
|
5956
5959
|
break;
|
|
5957
5960
|
}
|
|
@@ -5973,19 +5976,22 @@ function buildDataMaterialsRule(Materiales, dataStockPersonal, dataStockAlmacen,
|
|
|
5973
5976
|
throw new Error("Error al obtener material");
|
|
5974
5977
|
}
|
|
5975
5978
|
const cantidad = material.CantidadPadre ? 0 : material.CantidadFija ? material.Cantidad : 0;
|
|
5979
|
+
const ID = stockPersonal ? e.ID_StockPersonal : e.ID_StockAlmacen;
|
|
5980
|
+
const stock = stockPersonal ? "Personal" : "Almacen";
|
|
5976
5981
|
dataMaterialsRule.push({
|
|
5977
5982
|
cantidad,
|
|
5978
5983
|
key: crypto.randomUUID(),
|
|
5979
5984
|
item: e.Item,
|
|
5980
5985
|
lote: e.Lote,
|
|
5981
5986
|
material,
|
|
5982
|
-
stock
|
|
5983
|
-
ID
|
|
5987
|
+
stock,
|
|
5988
|
+
ID,
|
|
5989
|
+
keyFila: `${ID}${stock}`
|
|
5984
5990
|
});
|
|
5985
5991
|
});
|
|
5986
5992
|
});
|
|
5987
5993
|
return dataMaterialsRule.map((e) => ({
|
|
5988
|
-
id: e.
|
|
5994
|
+
id: e.keyFila,
|
|
5989
5995
|
text: `${e.item.Codigo} - ${e.item.Nombre} ${e.lote ? `(Lote: ${e.lote})` : ""}`.trim(),
|
|
5990
5996
|
...e
|
|
5991
5997
|
}));
|
package/dist/index.mjs
CHANGED
|
@@ -5817,14 +5817,17 @@ function checkAndBuildMaterialsFromStock(Materiales, dataStockPersonal, dataStoc
|
|
|
5817
5817
|
throw new Controller.SigoError(`No se encontr\xF3 el material ${codMaterial} en el stock personal para este trabajo.`);
|
|
5818
5818
|
}
|
|
5819
5819
|
const cantidad = material.CantidadPadre ? 0 : material.CantidadFija ? material.Cantidad : 0;
|
|
5820
|
+
const ID = stockPersonal ? stock.ID_StockPersonal : stock.ID_StockAlmacen;
|
|
5821
|
+
const _stock = stockPersonal ? "Personal" : "Almacen";
|
|
5820
5822
|
materiales.push({
|
|
5821
5823
|
item: stock.Item,
|
|
5822
5824
|
key,
|
|
5823
5825
|
cantidad: cantidad * material.Factor,
|
|
5824
5826
|
material,
|
|
5825
5827
|
lote: stock.Lote,
|
|
5826
|
-
stock:
|
|
5827
|
-
ID
|
|
5828
|
+
stock: _stock,
|
|
5829
|
+
ID,
|
|
5830
|
+
keyFila: `${ID}${_stock}`
|
|
5828
5831
|
});
|
|
5829
5832
|
break;
|
|
5830
5833
|
}
|
|
@@ -5846,19 +5849,22 @@ function buildDataMaterialsRule(Materiales, dataStockPersonal, dataStockAlmacen,
|
|
|
5846
5849
|
throw new Error("Error al obtener material");
|
|
5847
5850
|
}
|
|
5848
5851
|
const cantidad = material.CantidadPadre ? 0 : material.CantidadFija ? material.Cantidad : 0;
|
|
5852
|
+
const ID = stockPersonal ? e.ID_StockPersonal : e.ID_StockAlmacen;
|
|
5853
|
+
const stock = stockPersonal ? "Personal" : "Almacen";
|
|
5849
5854
|
dataMaterialsRule.push({
|
|
5850
5855
|
cantidad,
|
|
5851
5856
|
key: crypto.randomUUID(),
|
|
5852
5857
|
item: e.Item,
|
|
5853
5858
|
lote: e.Lote,
|
|
5854
5859
|
material,
|
|
5855
|
-
stock
|
|
5856
|
-
ID
|
|
5860
|
+
stock,
|
|
5861
|
+
ID,
|
|
5862
|
+
keyFila: `${ID}${stock}`
|
|
5857
5863
|
});
|
|
5858
5864
|
});
|
|
5859
5865
|
});
|
|
5860
5866
|
return dataMaterialsRule.map((e) => ({
|
|
5861
|
-
id: e.
|
|
5867
|
+
id: e.keyFila,
|
|
5862
5868
|
text: `${e.item.Codigo} - ${e.item.Nombre} ${e.lote ? `(Lote: ${e.lote})` : ""}`.trim(),
|
|
5863
5869
|
...e
|
|
5864
5870
|
}));
|