sigo-package 1.2.28 → 1.2.30
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 +23 -9
- package/dist/index.d.ts +23 -9
- package/dist/index.js +62 -14
- package/dist/index.mjs +61 -14
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as sigo_entities from 'sigo-entities';
|
|
2
|
+
import { ManoObraENTITY, ReservaENTITY, ItemDetalleLogisticaDTO, HomePassDTO, FlujoDocDTO, NodoDocDTO, DocumentacionPEXENTITY, ManoObraGlobalENTITY, PrecioEspecialidadENTITY, ObraChile9512ENTITY, ValorizacionManoObraDTO, ValorizacionDTO, PrecioContratistaMOAL02ENTITY, StockPersonalENTITY, StockAlmacenENTITY, TrabajoENTITY, ActividadesDTO, PreciosVigentesDTO, ContratoOTENTITY } from 'sigo-entities';
|
|
2
3
|
|
|
3
4
|
interface IenvSIGO$1 {
|
|
4
5
|
SISTEMAS_VALORIZACION_MANO_OBRA: string[];
|
|
@@ -94,6 +95,16 @@ interface IMOAndMaterialsRules {
|
|
|
94
95
|
ManoObra: Map<string, IMOAndMaterialsRules> | IMOAndMaterialsRules[];
|
|
95
96
|
}
|
|
96
97
|
|
|
98
|
+
interface IMateriales {
|
|
99
|
+
key: string;
|
|
100
|
+
cantidad: number;
|
|
101
|
+
item: ItemDetalleLogisticaDTO;
|
|
102
|
+
material: IMOAndMaterialsRules;
|
|
103
|
+
stock: 'Personal' | 'Almacen';
|
|
104
|
+
ID: number;
|
|
105
|
+
lote: string;
|
|
106
|
+
}
|
|
107
|
+
|
|
97
108
|
declare const mapaMOMaterialAL04: Map<string, IMOAndMaterialsRules>;
|
|
98
109
|
|
|
99
110
|
declare const codMOTroncalAL02OC: never[];
|
|
@@ -306,19 +317,22 @@ declare function obtenerTipoYCodigoMO(codigoOriginal: string): {
|
|
|
306
317
|
CodigoMO: string;
|
|
307
318
|
};
|
|
308
319
|
|
|
309
|
-
|
|
310
|
-
|
|
320
|
+
declare function checkAndBuildMaterialsFromPersonalStock(Materiales: IMOAndMaterialsRules[], dataStockPersonal: StockPersonalENTITY[], dataStockAlmacen: StockAlmacenENTITY[], key: string, Controller: any): IMateriales[];
|
|
321
|
+
|
|
322
|
+
declare function buildDataMaterialsRule(Materiales: Map<string, IMOAndMaterialsRules>, dataStockPersonal: Pick<StockPersonalENTITY, 'ID_StockPersonal' | 'Item' | 'Lote'>[], dataStockAlmacen: Pick<StockAlmacenENTITY, 'ID_StockAlmacen' | 'Item' | 'Lote'>[], Controller: any): {
|
|
323
|
+
key: string;
|
|
311
324
|
cantidad: number;
|
|
312
|
-
item: ItemDetalleLogisticaDTO;
|
|
325
|
+
item: sigo_entities.ItemDetalleLogisticaDTO;
|
|
313
326
|
material: IMOAndMaterialsRules;
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
declare function buildDataMaterialsRule(Materiales: Map<string, IMOAndMaterialsRules>, dataStockPersonal: Pick<StockPersonalENTITY, 'ID_StockPersonal' | 'Item' | 'Lote'>[]): {
|
|
327
|
+
stock: "Personal" | "Almacen";
|
|
328
|
+
ID: number;
|
|
329
|
+
lote: string;
|
|
318
330
|
id: number;
|
|
319
331
|
text: string;
|
|
320
332
|
}[];
|
|
321
333
|
|
|
334
|
+
declare function consumirStockPersonal(codDelegacion: string, codigoMaterial: string): boolean;
|
|
335
|
+
|
|
322
336
|
declare const CalcularResumenLiquidaciones: Funcion$1;
|
|
323
337
|
interface Funcion$1 {
|
|
324
338
|
(trabajo: TrabajoType, trabajos: any[]): ResumenLiquidacionesTypeChile;
|
|
@@ -507,4 +521,4 @@ declare function generateUniqueNumberArray(index: number): number;
|
|
|
507
521
|
|
|
508
522
|
declare function setContext(this: any, modules: __WebpackModuleApi.RequireContext): void;
|
|
509
523
|
|
|
510
|
-
export { ActualizarDataManoObra, ActualizarDataReserva, ActualizarDataResumenLiquidaciones, ActualizarDataResumenValorizacionesAlemania, ActualizarDataTrabajos, BuscarZonaContratista, CalcularResumenHPMOLiquidado, CalcularResumenLiquidaciones, CalcularResumenValorizacionesAlemania, CodigosMaterialDuctosAL02, CodigosMaterialDuctosAL04, CodigosMaterialSoplado, CodsMapeoMOMaterial, CodsMapeoMOMaterialNVT01, CodsMapeoMOMaterialSopladoClientes, CodsMapeoMOMaterialSopladoTroncal, CodsMapeoMO_Material_Arquertas, CompararFechas, CurrencyFormat, DocumentacionReplanteo, EstadoEspecialidad9612, GemeindeChangeNomenclatura, GetCodigoFechaActual, type IDocumentacion, type IMOAndMaterialsRules, MOCantidadNVT01, MOHijasAL04, MOHijasDEPTH, MapeoEspecialidades9612, MapeoMOBOMAL04, MapeoMatBOMAL04, type MatRetiradosType, type MatStockAlmacenType, type MatStockPersonalType$1 as MatStockPersonalType, type MatUtilizadosType$1 as MatUtilizadosType, type MoUoType$1 as MoUoType, ModelDataFlujosDocumentacionReplanteo, ObtenerMONoReservada, ObtenerPrecioContratistaVigente, ObtenerZonaAsignada, type ResumenLiquidacionesType, type ResumenLiquidacionesTypeChile, SEGMENT_TY, type TARGET, UpdateNodosDocDP, buildDataMaterialsRule, checkAndBuildMaterialsFromPersonalStock, codBalizaAL04, codClientes, codMOClientesAL02, codMOClientesAL02Asfaltado, codMOClientesAL02OC, codMOClientesAL02Soplado, codMOClientes_ReglaLiquidacion1, codMODROPAL04, codMODROPAL04OC, codMODROPAL04Soplado, codMOFTTFAL04, codMONoClientesAL02, codMONoClientesAL02Asfaltado, codMONoClientesAL02OC, codMONoClientesAL02Soplado, codMONoClientes_ReglaLiquidacion1, codMOOcultosAL04, codMOPublico, codMOTroncalAL02, codMOTroncalAL02Asfaltado, codMOTroncalAL02OC, codMOTroncalAL02Soplado, codMOTroncalAL04, codMOTroncalAL04Asfaltado, codMOTroncalAL04OC, codMOTroncalAL04Soplado, codMOTroncal_ReglaLiquidacion1, codNoCliente, codSopladoRD, codigosMOT1_F2, codigosMaterialDuctos, codigosMaterialUGG, convertDates, dataFlujosHomePass, esCadenaFechaISOValida, esObjetoFecha, generateUniqueNumber, generateUniqueNumberArray, getChannelName, getDateInTimeZone, getKeyRedisSortedSet, getModelDataAdicional, getNextID_Valorizacion, getQueueName, getQueueNameSaveOneNotification, isValidDate, isValidPartialEntity, logTiempoProceso, mapaEstadoObraFaseAL02, mapaMOMaterialAL02, mapaMOMaterialAL04, mapaReglaSopladoClientes, mapaReglaSopladoTroncal, obtenerDocumentacionClientes, obtenerDocumentacionNoClientes, obtenerPrecioManoObraAL02, obtenerPrecioManoObraAL04, obtenerTipoYCodigoMO, paisMap, searchCurrentContractorSpecialtyPrice, setContext, updatePriceContractorMOAL02, updatePriceContractorMOAL04, updatePriceMOAL02, updatePriceMOAL04, validateNoLookup };
|
|
524
|
+
export { ActualizarDataManoObra, ActualizarDataReserva, ActualizarDataResumenLiquidaciones, ActualizarDataResumenValorizacionesAlemania, ActualizarDataTrabajos, BuscarZonaContratista, CalcularResumenHPMOLiquidado, CalcularResumenLiquidaciones, CalcularResumenValorizacionesAlemania, CodigosMaterialDuctosAL02, CodigosMaterialDuctosAL04, CodigosMaterialSoplado, CodsMapeoMOMaterial, CodsMapeoMOMaterialNVT01, CodsMapeoMOMaterialSopladoClientes, CodsMapeoMOMaterialSopladoTroncal, CodsMapeoMO_Material_Arquertas, CompararFechas, CurrencyFormat, DocumentacionReplanteo, EstadoEspecialidad9612, GemeindeChangeNomenclatura, GetCodigoFechaActual, type IDocumentacion, type IMOAndMaterialsRules, type IMateriales, MOCantidadNVT01, MOHijasAL04, MOHijasDEPTH, MapeoEspecialidades9612, MapeoMOBOMAL04, MapeoMatBOMAL04, type MatRetiradosType, type MatStockAlmacenType, type MatStockPersonalType$1 as MatStockPersonalType, type MatUtilizadosType$1 as MatUtilizadosType, type MoUoType$1 as MoUoType, ModelDataFlujosDocumentacionReplanteo, ObtenerMONoReservada, ObtenerPrecioContratistaVigente, ObtenerZonaAsignada, type ResumenLiquidacionesType, type ResumenLiquidacionesTypeChile, SEGMENT_TY, type TARGET, UpdateNodosDocDP, buildDataMaterialsRule, checkAndBuildMaterialsFromPersonalStock, codBalizaAL04, codClientes, codMOClientesAL02, codMOClientesAL02Asfaltado, codMOClientesAL02OC, codMOClientesAL02Soplado, codMOClientes_ReglaLiquidacion1, codMODROPAL04, codMODROPAL04OC, codMODROPAL04Soplado, codMOFTTFAL04, codMONoClientesAL02, codMONoClientesAL02Asfaltado, codMONoClientesAL02OC, codMONoClientesAL02Soplado, codMONoClientes_ReglaLiquidacion1, codMOOcultosAL04, codMOPublico, codMOTroncalAL02, codMOTroncalAL02Asfaltado, codMOTroncalAL02OC, codMOTroncalAL02Soplado, codMOTroncalAL04, codMOTroncalAL04Asfaltado, codMOTroncalAL04OC, codMOTroncalAL04Soplado, codMOTroncal_ReglaLiquidacion1, codNoCliente, codSopladoRD, codigosMOT1_F2, codigosMaterialDuctos, codigosMaterialUGG, consumirStockPersonal, convertDates, dataFlujosHomePass, esCadenaFechaISOValida, esObjetoFecha, generateUniqueNumber, generateUniqueNumberArray, getChannelName, getDateInTimeZone, getKeyRedisSortedSet, getModelDataAdicional, getNextID_Valorizacion, getQueueName, getQueueNameSaveOneNotification, isValidDate, isValidPartialEntity, logTiempoProceso, mapaEstadoObraFaseAL02, mapaMOMaterialAL02, mapaMOMaterialAL04, mapaReglaSopladoClientes, mapaReglaSopladoTroncal, obtenerDocumentacionClientes, obtenerDocumentacionNoClientes, obtenerPrecioManoObraAL02, obtenerPrecioManoObraAL04, obtenerTipoYCodigoMO, paisMap, searchCurrentContractorSpecialtyPrice, setContext, updatePriceContractorMOAL02, updatePriceContractorMOAL04, updatePriceMOAL02, updatePriceMOAL04, validateNoLookup };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as sigo_entities from 'sigo-entities';
|
|
2
|
+
import { ManoObraENTITY, ReservaENTITY, ItemDetalleLogisticaDTO, HomePassDTO, FlujoDocDTO, NodoDocDTO, DocumentacionPEXENTITY, ManoObraGlobalENTITY, PrecioEspecialidadENTITY, ObraChile9512ENTITY, ValorizacionManoObraDTO, ValorizacionDTO, PrecioContratistaMOAL02ENTITY, StockPersonalENTITY, StockAlmacenENTITY, TrabajoENTITY, ActividadesDTO, PreciosVigentesDTO, ContratoOTENTITY } from 'sigo-entities';
|
|
2
3
|
|
|
3
4
|
interface IenvSIGO$1 {
|
|
4
5
|
SISTEMAS_VALORIZACION_MANO_OBRA: string[];
|
|
@@ -94,6 +95,16 @@ interface IMOAndMaterialsRules {
|
|
|
94
95
|
ManoObra: Map<string, IMOAndMaterialsRules> | IMOAndMaterialsRules[];
|
|
95
96
|
}
|
|
96
97
|
|
|
98
|
+
interface IMateriales {
|
|
99
|
+
key: string;
|
|
100
|
+
cantidad: number;
|
|
101
|
+
item: ItemDetalleLogisticaDTO;
|
|
102
|
+
material: IMOAndMaterialsRules;
|
|
103
|
+
stock: 'Personal' | 'Almacen';
|
|
104
|
+
ID: number;
|
|
105
|
+
lote: string;
|
|
106
|
+
}
|
|
107
|
+
|
|
97
108
|
declare const mapaMOMaterialAL04: Map<string, IMOAndMaterialsRules>;
|
|
98
109
|
|
|
99
110
|
declare const codMOTroncalAL02OC: never[];
|
|
@@ -306,19 +317,22 @@ declare function obtenerTipoYCodigoMO(codigoOriginal: string): {
|
|
|
306
317
|
CodigoMO: string;
|
|
307
318
|
};
|
|
308
319
|
|
|
309
|
-
|
|
310
|
-
|
|
320
|
+
declare function checkAndBuildMaterialsFromPersonalStock(Materiales: IMOAndMaterialsRules[], dataStockPersonal: StockPersonalENTITY[], dataStockAlmacen: StockAlmacenENTITY[], key: string, Controller: any): IMateriales[];
|
|
321
|
+
|
|
322
|
+
declare function buildDataMaterialsRule(Materiales: Map<string, IMOAndMaterialsRules>, dataStockPersonal: Pick<StockPersonalENTITY, 'ID_StockPersonal' | 'Item' | 'Lote'>[], dataStockAlmacen: Pick<StockAlmacenENTITY, 'ID_StockAlmacen' | 'Item' | 'Lote'>[], Controller: any): {
|
|
323
|
+
key: string;
|
|
311
324
|
cantidad: number;
|
|
312
|
-
item: ItemDetalleLogisticaDTO;
|
|
325
|
+
item: sigo_entities.ItemDetalleLogisticaDTO;
|
|
313
326
|
material: IMOAndMaterialsRules;
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
declare function buildDataMaterialsRule(Materiales: Map<string, IMOAndMaterialsRules>, dataStockPersonal: Pick<StockPersonalENTITY, 'ID_StockPersonal' | 'Item' | 'Lote'>[]): {
|
|
327
|
+
stock: "Personal" | "Almacen";
|
|
328
|
+
ID: number;
|
|
329
|
+
lote: string;
|
|
318
330
|
id: number;
|
|
319
331
|
text: string;
|
|
320
332
|
}[];
|
|
321
333
|
|
|
334
|
+
declare function consumirStockPersonal(codDelegacion: string, codigoMaterial: string): boolean;
|
|
335
|
+
|
|
322
336
|
declare const CalcularResumenLiquidaciones: Funcion$1;
|
|
323
337
|
interface Funcion$1 {
|
|
324
338
|
(trabajo: TrabajoType, trabajos: any[]): ResumenLiquidacionesTypeChile;
|
|
@@ -507,4 +521,4 @@ declare function generateUniqueNumberArray(index: number): number;
|
|
|
507
521
|
|
|
508
522
|
declare function setContext(this: any, modules: __WebpackModuleApi.RequireContext): void;
|
|
509
523
|
|
|
510
|
-
export { ActualizarDataManoObra, ActualizarDataReserva, ActualizarDataResumenLiquidaciones, ActualizarDataResumenValorizacionesAlemania, ActualizarDataTrabajos, BuscarZonaContratista, CalcularResumenHPMOLiquidado, CalcularResumenLiquidaciones, CalcularResumenValorizacionesAlemania, CodigosMaterialDuctosAL02, CodigosMaterialDuctosAL04, CodigosMaterialSoplado, CodsMapeoMOMaterial, CodsMapeoMOMaterialNVT01, CodsMapeoMOMaterialSopladoClientes, CodsMapeoMOMaterialSopladoTroncal, CodsMapeoMO_Material_Arquertas, CompararFechas, CurrencyFormat, DocumentacionReplanteo, EstadoEspecialidad9612, GemeindeChangeNomenclatura, GetCodigoFechaActual, type IDocumentacion, type IMOAndMaterialsRules, MOCantidadNVT01, MOHijasAL04, MOHijasDEPTH, MapeoEspecialidades9612, MapeoMOBOMAL04, MapeoMatBOMAL04, type MatRetiradosType, type MatStockAlmacenType, type MatStockPersonalType$1 as MatStockPersonalType, type MatUtilizadosType$1 as MatUtilizadosType, type MoUoType$1 as MoUoType, ModelDataFlujosDocumentacionReplanteo, ObtenerMONoReservada, ObtenerPrecioContratistaVigente, ObtenerZonaAsignada, type ResumenLiquidacionesType, type ResumenLiquidacionesTypeChile, SEGMENT_TY, type TARGET, UpdateNodosDocDP, buildDataMaterialsRule, checkAndBuildMaterialsFromPersonalStock, codBalizaAL04, codClientes, codMOClientesAL02, codMOClientesAL02Asfaltado, codMOClientesAL02OC, codMOClientesAL02Soplado, codMOClientes_ReglaLiquidacion1, codMODROPAL04, codMODROPAL04OC, codMODROPAL04Soplado, codMOFTTFAL04, codMONoClientesAL02, codMONoClientesAL02Asfaltado, codMONoClientesAL02OC, codMONoClientesAL02Soplado, codMONoClientes_ReglaLiquidacion1, codMOOcultosAL04, codMOPublico, codMOTroncalAL02, codMOTroncalAL02Asfaltado, codMOTroncalAL02OC, codMOTroncalAL02Soplado, codMOTroncalAL04, codMOTroncalAL04Asfaltado, codMOTroncalAL04OC, codMOTroncalAL04Soplado, codMOTroncal_ReglaLiquidacion1, codNoCliente, codSopladoRD, codigosMOT1_F2, codigosMaterialDuctos, codigosMaterialUGG, convertDates, dataFlujosHomePass, esCadenaFechaISOValida, esObjetoFecha, generateUniqueNumber, generateUniqueNumberArray, getChannelName, getDateInTimeZone, getKeyRedisSortedSet, getModelDataAdicional, getNextID_Valorizacion, getQueueName, getQueueNameSaveOneNotification, isValidDate, isValidPartialEntity, logTiempoProceso, mapaEstadoObraFaseAL02, mapaMOMaterialAL02, mapaMOMaterialAL04, mapaReglaSopladoClientes, mapaReglaSopladoTroncal, obtenerDocumentacionClientes, obtenerDocumentacionNoClientes, obtenerPrecioManoObraAL02, obtenerPrecioManoObraAL04, obtenerTipoYCodigoMO, paisMap, searchCurrentContractorSpecialtyPrice, setContext, updatePriceContractorMOAL02, updatePriceContractorMOAL04, updatePriceMOAL02, updatePriceMOAL04, validateNoLookup };
|
|
524
|
+
export { ActualizarDataManoObra, ActualizarDataReserva, ActualizarDataResumenLiquidaciones, ActualizarDataResumenValorizacionesAlemania, ActualizarDataTrabajos, BuscarZonaContratista, CalcularResumenHPMOLiquidado, CalcularResumenLiquidaciones, CalcularResumenValorizacionesAlemania, CodigosMaterialDuctosAL02, CodigosMaterialDuctosAL04, CodigosMaterialSoplado, CodsMapeoMOMaterial, CodsMapeoMOMaterialNVT01, CodsMapeoMOMaterialSopladoClientes, CodsMapeoMOMaterialSopladoTroncal, CodsMapeoMO_Material_Arquertas, CompararFechas, CurrencyFormat, DocumentacionReplanteo, EstadoEspecialidad9612, GemeindeChangeNomenclatura, GetCodigoFechaActual, type IDocumentacion, type IMOAndMaterialsRules, type IMateriales, MOCantidadNVT01, MOHijasAL04, MOHijasDEPTH, MapeoEspecialidades9612, MapeoMOBOMAL04, MapeoMatBOMAL04, type MatRetiradosType, type MatStockAlmacenType, type MatStockPersonalType$1 as MatStockPersonalType, type MatUtilizadosType$1 as MatUtilizadosType, type MoUoType$1 as MoUoType, ModelDataFlujosDocumentacionReplanteo, ObtenerMONoReservada, ObtenerPrecioContratistaVigente, ObtenerZonaAsignada, type ResumenLiquidacionesType, type ResumenLiquidacionesTypeChile, SEGMENT_TY, type TARGET, UpdateNodosDocDP, buildDataMaterialsRule, checkAndBuildMaterialsFromPersonalStock, codBalizaAL04, codClientes, codMOClientesAL02, codMOClientesAL02Asfaltado, codMOClientesAL02OC, codMOClientesAL02Soplado, codMOClientes_ReglaLiquidacion1, codMODROPAL04, codMODROPAL04OC, codMODROPAL04Soplado, codMOFTTFAL04, codMONoClientesAL02, codMONoClientesAL02Asfaltado, codMONoClientesAL02OC, codMONoClientesAL02Soplado, codMONoClientes_ReglaLiquidacion1, codMOOcultosAL04, codMOPublico, codMOTroncalAL02, codMOTroncalAL02Asfaltado, codMOTroncalAL02OC, codMOTroncalAL02Soplado, codMOTroncalAL04, codMOTroncalAL04Asfaltado, codMOTroncalAL04OC, codMOTroncalAL04Soplado, codMOTroncal_ReglaLiquidacion1, codNoCliente, codSopladoRD, codigosMOT1_F2, codigosMaterialDuctos, codigosMaterialUGG, consumirStockPersonal, convertDates, dataFlujosHomePass, esCadenaFechaISOValida, esObjetoFecha, generateUniqueNumber, generateUniqueNumberArray, getChannelName, getDateInTimeZone, getKeyRedisSortedSet, getModelDataAdicional, getNextID_Valorizacion, getQueueName, getQueueNameSaveOneNotification, isValidDate, isValidPartialEntity, logTiempoProceso, mapaEstadoObraFaseAL02, mapaMOMaterialAL02, mapaMOMaterialAL04, mapaReglaSopladoClientes, mapaReglaSopladoTroncal, obtenerDocumentacionClientes, obtenerDocumentacionNoClientes, obtenerPrecioManoObraAL02, obtenerPrecioManoObraAL04, obtenerTipoYCodigoMO, paisMap, searchCurrentContractorSpecialtyPrice, setContext, updatePriceContractorMOAL02, updatePriceContractorMOAL04, updatePriceMOAL02, updatePriceMOAL04, validateNoLookup };
|
package/dist/index.js
CHANGED
|
@@ -92,6 +92,7 @@ __export(index_exports, {
|
|
|
92
92
|
codigosMOT1_F2: () => codigosMOT1_F2,
|
|
93
93
|
codigosMaterialDuctos: () => codigosMaterialDuctos,
|
|
94
94
|
codigosMaterialUGG: () => codigosMaterialUGG,
|
|
95
|
+
consumirStockPersonal: () => consumirStockPersonal,
|
|
95
96
|
convertDates: () => convertDates,
|
|
96
97
|
dataFlujosHomePass: () => dataFlujosHomePass,
|
|
97
98
|
esCadenaFechaISOValida: () => esCadenaFechaISOValida,
|
|
@@ -5902,31 +5903,55 @@ function updatePriceMOAL04(valorizaciones, priceContractorMO) {
|
|
|
5902
5903
|
}
|
|
5903
5904
|
__name(updatePriceMOAL04, "updatePriceMOAL04");
|
|
5904
5905
|
|
|
5906
|
+
// src/Programados/Alemania/determinarConsumirStockPersonal.ts
|
|
5907
|
+
function consumirStockPersonal(codDelegacion, codigoMaterial) {
|
|
5908
|
+
switch (codDelegacion) {
|
|
5909
|
+
case "AL02":
|
|
5910
|
+
return !codigosMaterialUGG.includes(codigoMaterial);
|
|
5911
|
+
case "AL04":
|
|
5912
|
+
return CodigosMaterialDuctosAL04.includes(codigoMaterial);
|
|
5913
|
+
default:
|
|
5914
|
+
return true;
|
|
5915
|
+
}
|
|
5916
|
+
}
|
|
5917
|
+
__name(consumirStockPersonal, "consumirStockPersonal");
|
|
5918
|
+
|
|
5905
5919
|
// src/Programados/Alemania/checkAndBuildMaterialsFromPersonalStock.ts
|
|
5906
|
-
function checkAndBuildMaterialsFromPersonalStock(Materiales, dataStockPersonal,
|
|
5920
|
+
function checkAndBuildMaterialsFromPersonalStock(Materiales, dataStockPersonal, dataStockAlmacen, key, Controller) {
|
|
5907
5921
|
const errores = [];
|
|
5908
5922
|
for (const element of Materiales) {
|
|
5909
|
-
const
|
|
5923
|
+
const stockPersonal = consumirStockPersonal(Controller.Delegacion.Codigo, element.Codigo);
|
|
5924
|
+
const data = stockPersonal ? dataStockPersonal : dataStockAlmacen;
|
|
5925
|
+
const exist = data.find((e) => e.Item.Codigo === element.Codigo);
|
|
5910
5926
|
if (!exist) {
|
|
5911
|
-
errores.push(
|
|
5927
|
+
errores.push({
|
|
5928
|
+
codigo: element.Codigo,
|
|
5929
|
+
stock: stockPersonal ? "personal" : "almac\xE9n"
|
|
5930
|
+
});
|
|
5912
5931
|
}
|
|
5913
5932
|
}
|
|
5914
5933
|
if (errores.length) {
|
|
5915
|
-
|
|
5934
|
+
const mensaje = errores.map((e) => `No se encontr\xF3 material "${e.codigo}" en el stock ${e.stock}<br>`).join("");
|
|
5935
|
+
throw new Controller.SigoError(mensaje);
|
|
5916
5936
|
}
|
|
5917
5937
|
const materiales = [];
|
|
5918
5938
|
for (const material of Materiales) {
|
|
5919
5939
|
const { Codigo: codMaterial } = material;
|
|
5920
|
-
const
|
|
5921
|
-
|
|
5940
|
+
const stockPersonal = consumirStockPersonal(Controller.Delegacion.Codigo, codMaterial);
|
|
5941
|
+
const data = stockPersonal ? dataStockPersonal : dataStockAlmacen;
|
|
5942
|
+
const stock = data.find((e) => e.Item.Codigo === codMaterial);
|
|
5943
|
+
if (!stock) {
|
|
5922
5944
|
throw new Controller.SigoError(`No se encontr\xF3 el material ${codMaterial} en el stock personal para este trabajo.`);
|
|
5923
5945
|
}
|
|
5924
5946
|
const cantidad = material.CantidadPadre ? 0 : material.CantidadFija ? material.Cantidad : 0;
|
|
5925
5947
|
materiales.push({
|
|
5926
|
-
item:
|
|
5927
|
-
|
|
5948
|
+
item: stock.Item,
|
|
5949
|
+
key,
|
|
5928
5950
|
cantidad: cantidad * material.Factor,
|
|
5929
|
-
material
|
|
5951
|
+
material,
|
|
5952
|
+
lote: stock.Lote,
|
|
5953
|
+
stock: stockPersonal ? "Personal" : "Almacen",
|
|
5954
|
+
ID: stockPersonal ? stock.ID_StockPersonal : stock.ID_StockAlmacen
|
|
5930
5955
|
});
|
|
5931
5956
|
break;
|
|
5932
5957
|
}
|
|
@@ -5935,13 +5960,35 @@ function checkAndBuildMaterialsFromPersonalStock(Materiales, dataStockPersonal,
|
|
|
5935
5960
|
__name(checkAndBuildMaterialsFromPersonalStock, "checkAndBuildMaterialsFromPersonalStock");
|
|
5936
5961
|
|
|
5937
5962
|
// src/Programados/Alemania/buildDataMaterialsRule.ts
|
|
5938
|
-
function buildDataMaterialsRule(Materiales, dataStockPersonal) {
|
|
5963
|
+
function buildDataMaterialsRule(Materiales, dataStockPersonal, dataStockAlmacen, Controller) {
|
|
5939
5964
|
const codigosMaterial = Array.from(Materiales.keys());
|
|
5940
|
-
const dataMaterialsRule =
|
|
5941
|
-
|
|
5942
|
-
|
|
5965
|
+
const dataMaterialsRule = [];
|
|
5966
|
+
codigosMaterial.forEach((el) => {
|
|
5967
|
+
const stockPersonal = consumirStockPersonal(Controller.Delegacion.Codigo, el);
|
|
5968
|
+
const data = stockPersonal ? dataStockPersonal : dataStockAlmacen;
|
|
5969
|
+
const stocks = data.filter((e) => e.Item.Codigo === el);
|
|
5970
|
+
stocks.forEach((e) => {
|
|
5971
|
+
const material = Materiales.get(el);
|
|
5972
|
+
if (!material) {
|
|
5973
|
+
throw new Error("Error al obtener material");
|
|
5974
|
+
}
|
|
5975
|
+
const cantidad = material.CantidadPadre ? 0 : material.CantidadFija ? material.Cantidad : 0;
|
|
5976
|
+
dataMaterialsRule.push({
|
|
5977
|
+
cantidad,
|
|
5978
|
+
key: crypto.randomUUID(),
|
|
5979
|
+
item: e.Item,
|
|
5980
|
+
lote: e.Lote,
|
|
5981
|
+
material,
|
|
5982
|
+
stock: stockPersonal ? "Personal" : "Almacen",
|
|
5983
|
+
ID: stockPersonal ? e.ID_StockPersonal : e.ID_StockAlmacen
|
|
5984
|
+
});
|
|
5985
|
+
});
|
|
5986
|
+
});
|
|
5987
|
+
return dataMaterialsRule.map((e) => ({
|
|
5988
|
+
id: e.ID,
|
|
5989
|
+
text: `${e.item.Codigo} - ${e.item.Nombre} ${e.lote ? `(Lote: ${e.lote})` : ""}`.trim(),
|
|
5990
|
+
...e
|
|
5943
5991
|
}));
|
|
5944
|
-
return dataMaterialsRule;
|
|
5945
5992
|
}
|
|
5946
5993
|
__name(buildDataMaterialsRule, "buildDataMaterialsRule");
|
|
5947
5994
|
|
|
@@ -6651,6 +6698,7 @@ var getNextID_Valorizacion = /* @__PURE__ */ __name((valorizaciones) => {
|
|
|
6651
6698
|
codigosMOT1_F2,
|
|
6652
6699
|
codigosMaterialDuctos,
|
|
6653
6700
|
codigosMaterialUGG,
|
|
6701
|
+
consumirStockPersonal,
|
|
6654
6702
|
convertDates,
|
|
6655
6703
|
dataFlujosHomePass,
|
|
6656
6704
|
esCadenaFechaISOValida,
|
package/dist/index.mjs
CHANGED
|
@@ -5776,31 +5776,55 @@ function updatePriceMOAL04(valorizaciones, priceContractorMO) {
|
|
|
5776
5776
|
}
|
|
5777
5777
|
__name(updatePriceMOAL04, "updatePriceMOAL04");
|
|
5778
5778
|
|
|
5779
|
+
// src/Programados/Alemania/determinarConsumirStockPersonal.ts
|
|
5780
|
+
function consumirStockPersonal(codDelegacion, codigoMaterial) {
|
|
5781
|
+
switch (codDelegacion) {
|
|
5782
|
+
case "AL02":
|
|
5783
|
+
return !codigosMaterialUGG.includes(codigoMaterial);
|
|
5784
|
+
case "AL04":
|
|
5785
|
+
return CodigosMaterialDuctosAL04.includes(codigoMaterial);
|
|
5786
|
+
default:
|
|
5787
|
+
return true;
|
|
5788
|
+
}
|
|
5789
|
+
}
|
|
5790
|
+
__name(consumirStockPersonal, "consumirStockPersonal");
|
|
5791
|
+
|
|
5779
5792
|
// src/Programados/Alemania/checkAndBuildMaterialsFromPersonalStock.ts
|
|
5780
|
-
function checkAndBuildMaterialsFromPersonalStock(Materiales, dataStockPersonal,
|
|
5793
|
+
function checkAndBuildMaterialsFromPersonalStock(Materiales, dataStockPersonal, dataStockAlmacen, key, Controller) {
|
|
5781
5794
|
const errores = [];
|
|
5782
5795
|
for (const element of Materiales) {
|
|
5783
|
-
const
|
|
5796
|
+
const stockPersonal = consumirStockPersonal(Controller.Delegacion.Codigo, element.Codigo);
|
|
5797
|
+
const data = stockPersonal ? dataStockPersonal : dataStockAlmacen;
|
|
5798
|
+
const exist = data.find((e) => e.Item.Codigo === element.Codigo);
|
|
5784
5799
|
if (!exist) {
|
|
5785
|
-
errores.push(
|
|
5800
|
+
errores.push({
|
|
5801
|
+
codigo: element.Codigo,
|
|
5802
|
+
stock: stockPersonal ? "personal" : "almac\xE9n"
|
|
5803
|
+
});
|
|
5786
5804
|
}
|
|
5787
5805
|
}
|
|
5788
5806
|
if (errores.length) {
|
|
5789
|
-
|
|
5807
|
+
const mensaje = errores.map((e) => `No se encontr\xF3 material "${e.codigo}" en el stock ${e.stock}<br>`).join("");
|
|
5808
|
+
throw new Controller.SigoError(mensaje);
|
|
5790
5809
|
}
|
|
5791
5810
|
const materiales = [];
|
|
5792
5811
|
for (const material of Materiales) {
|
|
5793
5812
|
const { Codigo: codMaterial } = material;
|
|
5794
|
-
const
|
|
5795
|
-
|
|
5813
|
+
const stockPersonal = consumirStockPersonal(Controller.Delegacion.Codigo, codMaterial);
|
|
5814
|
+
const data = stockPersonal ? dataStockPersonal : dataStockAlmacen;
|
|
5815
|
+
const stock = data.find((e) => e.Item.Codigo === codMaterial);
|
|
5816
|
+
if (!stock) {
|
|
5796
5817
|
throw new Controller.SigoError(`No se encontr\xF3 el material ${codMaterial} en el stock personal para este trabajo.`);
|
|
5797
5818
|
}
|
|
5798
5819
|
const cantidad = material.CantidadPadre ? 0 : material.CantidadFija ? material.Cantidad : 0;
|
|
5799
5820
|
materiales.push({
|
|
5800
|
-
item:
|
|
5801
|
-
|
|
5821
|
+
item: stock.Item,
|
|
5822
|
+
key,
|
|
5802
5823
|
cantidad: cantidad * material.Factor,
|
|
5803
|
-
material
|
|
5824
|
+
material,
|
|
5825
|
+
lote: stock.Lote,
|
|
5826
|
+
stock: stockPersonal ? "Personal" : "Almacen",
|
|
5827
|
+
ID: stockPersonal ? stock.ID_StockPersonal : stock.ID_StockAlmacen
|
|
5804
5828
|
});
|
|
5805
5829
|
break;
|
|
5806
5830
|
}
|
|
@@ -5809,13 +5833,35 @@ function checkAndBuildMaterialsFromPersonalStock(Materiales, dataStockPersonal,
|
|
|
5809
5833
|
__name(checkAndBuildMaterialsFromPersonalStock, "checkAndBuildMaterialsFromPersonalStock");
|
|
5810
5834
|
|
|
5811
5835
|
// src/Programados/Alemania/buildDataMaterialsRule.ts
|
|
5812
|
-
function buildDataMaterialsRule(Materiales, dataStockPersonal) {
|
|
5836
|
+
function buildDataMaterialsRule(Materiales, dataStockPersonal, dataStockAlmacen, Controller) {
|
|
5813
5837
|
const codigosMaterial = Array.from(Materiales.keys());
|
|
5814
|
-
const dataMaterialsRule =
|
|
5815
|
-
|
|
5816
|
-
|
|
5838
|
+
const dataMaterialsRule = [];
|
|
5839
|
+
codigosMaterial.forEach((el) => {
|
|
5840
|
+
const stockPersonal = consumirStockPersonal(Controller.Delegacion.Codigo, el);
|
|
5841
|
+
const data = stockPersonal ? dataStockPersonal : dataStockAlmacen;
|
|
5842
|
+
const stocks = data.filter((e) => e.Item.Codigo === el);
|
|
5843
|
+
stocks.forEach((e) => {
|
|
5844
|
+
const material = Materiales.get(el);
|
|
5845
|
+
if (!material) {
|
|
5846
|
+
throw new Error("Error al obtener material");
|
|
5847
|
+
}
|
|
5848
|
+
const cantidad = material.CantidadPadre ? 0 : material.CantidadFija ? material.Cantidad : 0;
|
|
5849
|
+
dataMaterialsRule.push({
|
|
5850
|
+
cantidad,
|
|
5851
|
+
key: crypto.randomUUID(),
|
|
5852
|
+
item: e.Item,
|
|
5853
|
+
lote: e.Lote,
|
|
5854
|
+
material,
|
|
5855
|
+
stock: stockPersonal ? "Personal" : "Almacen",
|
|
5856
|
+
ID: stockPersonal ? e.ID_StockPersonal : e.ID_StockAlmacen
|
|
5857
|
+
});
|
|
5858
|
+
});
|
|
5859
|
+
});
|
|
5860
|
+
return dataMaterialsRule.map((e) => ({
|
|
5861
|
+
id: e.ID,
|
|
5862
|
+
text: `${e.item.Codigo} - ${e.item.Nombre} ${e.lote ? `(Lote: ${e.lote})` : ""}`.trim(),
|
|
5863
|
+
...e
|
|
5817
5864
|
}));
|
|
5818
|
-
return dataMaterialsRule;
|
|
5819
5865
|
}
|
|
5820
5866
|
__name(buildDataMaterialsRule, "buildDataMaterialsRule");
|
|
5821
5867
|
|
|
@@ -6524,6 +6570,7 @@ export {
|
|
|
6524
6570
|
codigosMOT1_F2,
|
|
6525
6571
|
codigosMaterialDuctos,
|
|
6526
6572
|
codigosMaterialUGG,
|
|
6573
|
+
consumirStockPersonal,
|
|
6527
6574
|
convertDates,
|
|
6528
6575
|
dataFlujosHomePass,
|
|
6529
6576
|
esCadenaFechaISOValida,
|