sigo-package 1.2.168 → 1.2.170
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 +7 -3
- package/dist/index.d.ts +7 -3
- package/dist/index.js +164 -43
- package/dist/index.mjs +160 -41
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as sigo_entities from 'sigo-entities';
|
|
2
|
-
import { ManoObraENTITY, ReservaENTITY, ItemDetalleLogisticaDTO, CodigoNombreUMDTO, PrecioContratistaMOAL04ENTITY, ManoObraGlobalENTITY, ValorizacionManoObraDTO, PrecioContratistaMOAL02ENTITY, HomePassDTO, FlujoDocDTO, NodoDocDTO, DocumentacionPEXENTITY, PrecioEspecialidadENTITY, ObraChile9512ENTITY, TrabajoAlemaniaENTITY, ValorizacionAlemaniaDTO, ValorizacionDTO, StockPersonalENTITY, StockAlmacenENTITY, ConsumoMaterialAlemaniaENTITY, ValorizacionesDTO, PrecioContratistaMaterialENTITY, TrabajoENTITY, ActividadesDTO, PreciosVigentesDTO, ContratoOTENTITY, DetalleChileValorizacionMODTO, PrecioMaterialENTITY, DocumentRequirementDto, CodigoNombreDTO, SystemOptionEntity, MenuDto } from 'sigo-entities';
|
|
2
|
+
import { ManoObraENTITY, ReservaENTITY, ItemDetalleLogisticaDTO, CodigoNombreUMDTO, PrecioContratistaMOAL04ENTITY, ManoObraGlobalENTITY, ValorizacionManoObraDTO, PrecioContratistaMOAL02ENTITY, HomePassDTO, FlujoDocDTO, NodoDocDTO, DocumentacionPEXENTITY, PrecioEspecialidadENTITY, ObraChile9512ENTITY, TrabajoAlemaniaENTITY, ValorizacionAlemaniaDTO, ValorizacionDTO, StockPersonalENTITY, StockAlmacenENTITY, ConsumoMaterialAlemaniaENTITY, ValorizacionesDTO, PrecioContratistaMaterialENTITY, TrabajoENTITY, ActividadesDTO, PreciosVigentesDTO, ContratoOTENTITY, DetalleChileValorizacionMODTO, PrecioMaterialENTITY, DocumentRequirementDto, AltasNVTOrderENTITY, CodigoNombreDTO, SystemOptionEntity, MenuDto, FilesDocDTO } from 'sigo-entities';
|
|
3
3
|
import { ClassConstructor } from 'class-transformer';
|
|
4
4
|
import { Request, Response, NextFunction } from 'express';
|
|
5
5
|
|
|
@@ -686,7 +686,9 @@ declare function calcularTotalMaterialValorizacionPeru9112(valorizaciones: Pick<
|
|
|
686
686
|
|
|
687
687
|
declare const mapeoZonasSimilares: Record<string, string[]>;
|
|
688
688
|
|
|
689
|
-
declare const
|
|
689
|
+
declare const documentRequirementAltasNVT: DocumentRequirementDto[];
|
|
690
|
+
|
|
691
|
+
declare function verifyInventoryFinalize(docs: AltasNVTOrderENTITY[], UnprocessableEntityException?: ClassConstructor<Error>): void;
|
|
690
692
|
|
|
691
693
|
declare enum Position {
|
|
692
694
|
left = "left",
|
|
@@ -854,6 +856,8 @@ declare function builSystemOption(params: IParams): Promise<{
|
|
|
854
856
|
type TranslateFn = (key: string) => string;
|
|
855
857
|
declare const buildMenu: (data: SystemOptionEntity[], t: TranslateFn) => MenuDto[];
|
|
856
858
|
|
|
859
|
+
declare function verifyFiles(documentation: FilesDocDTO[], documentRequirement: DocumentRequirementDto[], BadRequestException?: ClassConstructor<Error>): void;
|
|
860
|
+
|
|
857
861
|
declare function validateUUIDv4Param(BadRequestException: ClassConstructor<Error>, req: Request<any>, _res: Response, next: NextFunction): Promise<void>;
|
|
858
862
|
|
|
859
|
-
export { ActualizarDataManoObra, ActualizarDataReserva, ActualizarDataResumenLiquidaciones, ActualizarDataResumenLiquidacionesColombia, ActualizarDataResumenValorizacionesAlemania, ActualizarDataTrabajos, AsignacionHelper, BuscarZonaContratista, CalcularResumenHPMOLiquidado, CalcularResumenLiquidaciones, CalcularResumenLiquidacionesColombia, CalcularResumenValorizacionesAlemania, CodigosMaterialDuctosAL02, CodigosMaterialDuctosAL04, CodigosMaterialSoplado, CodsMapeoMOMaterial, CodsMapeoMOMaterialNVT01, CodsMapeoMOMaterialSopladoClientes, CodsMapeoMOMaterialSopladoTroncal, CodsMapeoMO_Material_Arquertas, CompararFechas, CurrencyFormat, DocumentacionReplanteo, EstadoEspecialidad9612, FormatearErrorValidacionMOHijas, GemeindeChangeNomenclatura, GetCodigoFechaActual, type IDPContrato, type IDocumentacion, type ILineaValidacion, type IMOAndMaterialsRules, type IMORules, type IMateriales, type IResultadoValidacionMOHijas, MOCantidadNVT01, MOHijasAL04, MOHijasDEPTH, MapeoEspecialidades9612, MapeoMOBOMAL04, MapeoMatBOMAL04, type MatRetiradosType, type MatStockAlmacenType, type MatStockPersonalType$2 as MatStockPersonalType, type MatUtilizadosType$2 as MatUtilizadosType, type MoUoType$2 as MoUoType, ModelDataFlujosDocumentacionReplanteo, ObtenerMONoReservada, ObtenerPrecioContratistaVigente, ObtenerZonaAsignada, type ResumenLiquidacionesType, type ResumenLiquidacionesTypeChile, type ResumenLiquidacionesTypeColombia, SEGMENT_TY, type TARGET, UpdateNodosDocDP, ValidarRelacionMOHijasAL04, ValorizacionHelper, builSystemOption, buildDataMOFromMaterialRules, buildDataMaterialsRule, buildKeyMO, buildMenu, buildReservaMOJobMajorProjectsAlemaniaAL02, buildReservaMOJobMajorProjectsAlemaniaAL04, buildTenantCollectionName, calcularTotalMaterialValorizacionPeru9112, checkAndBuildMaterialsFromStock, checkMaterialAvailability, codBalizaAL04, codClientes, codIssueByPeriodoAL02, codMOClientesAL02, codMOClientesAL02Asfaltado, codMOClientesAL02OC, codMOClientesAL02Soplado, codMOClientes_ReglaLiquidacion1, codMODROPAL04, codMODROPAL04OC, codMODROPAL04Soplado, codMOFTTFAL04, codMONoClientesAL02, codMONoClientesAL02Asfaltado, codMONoClientesAL02OC, codMONoClientesAL02Soplado, codMONoClientes_ReglaLiquidacion1, codMOOcultosAL04, codMOPublico, codMOTroncalAL02, codMOTroncalAL02Asfaltado, codMOTroncalAL02OC, codMOTroncalAL02Soplado, codMOTroncalAL04, codMOTroncalAL04Asfaltado, codMOTroncalAL04Issue, codMOTroncalAL04OC, codMOTroncalAL04Soplado, codMOTroncalHistoricoAL02, codMOTroncal_ReglaLiquidacion1, codNoCliente, codSopladoRD, codigosMOT1_F2, codigosMaterialDuctos, codigosMaterialUGG, collections, consumirStockPersonal, convertDates, dataFlujosHomePass, db_default, db_root,
|
|
863
|
+
export { ActualizarDataManoObra, ActualizarDataReserva, ActualizarDataResumenLiquidaciones, ActualizarDataResumenLiquidacionesColombia, ActualizarDataResumenValorizacionesAlemania, ActualizarDataTrabajos, AsignacionHelper, BuscarZonaContratista, CalcularResumenHPMOLiquidado, CalcularResumenLiquidaciones, CalcularResumenLiquidacionesColombia, CalcularResumenValorizacionesAlemania, CodigosMaterialDuctosAL02, CodigosMaterialDuctosAL04, CodigosMaterialSoplado, CodsMapeoMOMaterial, CodsMapeoMOMaterialNVT01, CodsMapeoMOMaterialSopladoClientes, CodsMapeoMOMaterialSopladoTroncal, CodsMapeoMO_Material_Arquertas, CompararFechas, CurrencyFormat, DocumentacionReplanteo, EstadoEspecialidad9612, FormatearErrorValidacionMOHijas, GemeindeChangeNomenclatura, GetCodigoFechaActual, type IDPContrato, type IDocumentacion, type ILineaValidacion, type IMOAndMaterialsRules, type IMORules, type IMateriales, type IResultadoValidacionMOHijas, MOCantidadNVT01, MOHijasAL04, MOHijasDEPTH, MapeoEspecialidades9612, MapeoMOBOMAL04, MapeoMatBOMAL04, type MatRetiradosType, type MatStockAlmacenType, type MatStockPersonalType$2 as MatStockPersonalType, type MatUtilizadosType$2 as MatUtilizadosType, type MoUoType$2 as MoUoType, ModelDataFlujosDocumentacionReplanteo, ObtenerMONoReservada, ObtenerPrecioContratistaVigente, ObtenerZonaAsignada, type ResumenLiquidacionesType, type ResumenLiquidacionesTypeChile, type ResumenLiquidacionesTypeColombia, SEGMENT_TY, type TARGET, UpdateNodosDocDP, ValidarRelacionMOHijasAL04, ValorizacionHelper, builSystemOption, buildDataMOFromMaterialRules, buildDataMaterialsRule, buildKeyMO, buildMenu, buildReservaMOJobMajorProjectsAlemaniaAL02, buildReservaMOJobMajorProjectsAlemaniaAL04, buildTenantCollectionName, calcularTotalMaterialValorizacionPeru9112, checkAndBuildMaterialsFromStock, checkMaterialAvailability, codBalizaAL04, codClientes, codIssueByPeriodoAL02, codMOClientesAL02, codMOClientesAL02Asfaltado, codMOClientesAL02OC, codMOClientesAL02Soplado, codMOClientes_ReglaLiquidacion1, codMODROPAL04, codMODROPAL04OC, codMODROPAL04Soplado, codMOFTTFAL04, codMONoClientesAL02, codMONoClientesAL02Asfaltado, codMONoClientesAL02OC, codMONoClientesAL02Soplado, codMONoClientes_ReglaLiquidacion1, codMOOcultosAL04, codMOPublico, codMOTroncalAL02, codMOTroncalAL02Asfaltado, codMOTroncalAL02OC, codMOTroncalAL02Soplado, codMOTroncalAL04, codMOTroncalAL04Asfaltado, codMOTroncalAL04Issue, codMOTroncalAL04OC, codMOTroncalAL04Soplado, codMOTroncalHistoricoAL02, codMOTroncal_ReglaLiquidacion1, codNoCliente, codSopladoRD, codigosMOT1_F2, codigosMaterialDuctos, codigosMaterialUGG, collections, consumirStockPersonal, convertDates, dataFlujosHomePass, db_default, db_root, documentRequirementAltasNVT, empresas, esCadenaFechaISOValida, esObjetoFecha, formatCurrencyV1, formatNumberSmart, formatNumberV1, formatPercentageV1, generateUniqueNumber, generateUniqueNumberArray, getChannelName, getContainerName, getDBName, getDateInTimeZone, getKeyRedisSortedSet, getModelDataAdicional, getNextID_Amap, getNextID_AsignacionValorizacion, getNextID_Valorizacion, getPrecioContratista, getPriceMaterial, getQueueName, getQueueNameSaveOneNotification, hashCode, isValidDate, isValidPartialEntity, logTiempoProceso, mapaDPContratoPrecioFullAL02, mapaEstadoObraFaseAL02, mapaMOMaterialAL02, mapaMOMaterialAL04, mapaReglaSopladoClientes, mapaReglaSopladoTroncal, mapeoZonasSimilares, newCodMOTroncalReglaLiquidacion1, obtenerDocumentacionClientes, obtenerDocumentacionNoClientes, obtenerPrecioContratistaMaterial, obtenerPrecioManoObraAL02, obtenerPrecioManoObraAL04, obtenerTipoYCodigoMO, paisMap, parseDuplicateKeyError, roundNumber, searchCurrentContractorSpecialtyPrice, setColModels, setContext, updatePriceContractorMOAL02, updatePriceContractorMOAL04, updatePriceMOAL02, updatePriceMOAL04, updatePricePBBudgetAlemaniaAL02, updatePricePBBudgetAlemaniaAL04, uuidRegex, validateNoLookup, validateUUIDv4Param, verifyFiles, verifyInventoryFinalize };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as sigo_entities from 'sigo-entities';
|
|
2
|
-
import { ManoObraENTITY, ReservaENTITY, ItemDetalleLogisticaDTO, CodigoNombreUMDTO, PrecioContratistaMOAL04ENTITY, ManoObraGlobalENTITY, ValorizacionManoObraDTO, PrecioContratistaMOAL02ENTITY, HomePassDTO, FlujoDocDTO, NodoDocDTO, DocumentacionPEXENTITY, PrecioEspecialidadENTITY, ObraChile9512ENTITY, TrabajoAlemaniaENTITY, ValorizacionAlemaniaDTO, ValorizacionDTO, StockPersonalENTITY, StockAlmacenENTITY, ConsumoMaterialAlemaniaENTITY, ValorizacionesDTO, PrecioContratistaMaterialENTITY, TrabajoENTITY, ActividadesDTO, PreciosVigentesDTO, ContratoOTENTITY, DetalleChileValorizacionMODTO, PrecioMaterialENTITY, DocumentRequirementDto, CodigoNombreDTO, SystemOptionEntity, MenuDto } from 'sigo-entities';
|
|
2
|
+
import { ManoObraENTITY, ReservaENTITY, ItemDetalleLogisticaDTO, CodigoNombreUMDTO, PrecioContratistaMOAL04ENTITY, ManoObraGlobalENTITY, ValorizacionManoObraDTO, PrecioContratistaMOAL02ENTITY, HomePassDTO, FlujoDocDTO, NodoDocDTO, DocumentacionPEXENTITY, PrecioEspecialidadENTITY, ObraChile9512ENTITY, TrabajoAlemaniaENTITY, ValorizacionAlemaniaDTO, ValorizacionDTO, StockPersonalENTITY, StockAlmacenENTITY, ConsumoMaterialAlemaniaENTITY, ValorizacionesDTO, PrecioContratistaMaterialENTITY, TrabajoENTITY, ActividadesDTO, PreciosVigentesDTO, ContratoOTENTITY, DetalleChileValorizacionMODTO, PrecioMaterialENTITY, DocumentRequirementDto, AltasNVTOrderENTITY, CodigoNombreDTO, SystemOptionEntity, MenuDto, FilesDocDTO } from 'sigo-entities';
|
|
3
3
|
import { ClassConstructor } from 'class-transformer';
|
|
4
4
|
import { Request, Response, NextFunction } from 'express';
|
|
5
5
|
|
|
@@ -686,7 +686,9 @@ declare function calcularTotalMaterialValorizacionPeru9112(valorizaciones: Pick<
|
|
|
686
686
|
|
|
687
687
|
declare const mapeoZonasSimilares: Record<string, string[]>;
|
|
688
688
|
|
|
689
|
-
declare const
|
|
689
|
+
declare const documentRequirementAltasNVT: DocumentRequirementDto[];
|
|
690
|
+
|
|
691
|
+
declare function verifyInventoryFinalize(docs: AltasNVTOrderENTITY[], UnprocessableEntityException?: ClassConstructor<Error>): void;
|
|
690
692
|
|
|
691
693
|
declare enum Position {
|
|
692
694
|
left = "left",
|
|
@@ -854,6 +856,8 @@ declare function builSystemOption(params: IParams): Promise<{
|
|
|
854
856
|
type TranslateFn = (key: string) => string;
|
|
855
857
|
declare const buildMenu: (data: SystemOptionEntity[], t: TranslateFn) => MenuDto[];
|
|
856
858
|
|
|
859
|
+
declare function verifyFiles(documentation: FilesDocDTO[], documentRequirement: DocumentRequirementDto[], BadRequestException?: ClassConstructor<Error>): void;
|
|
860
|
+
|
|
857
861
|
declare function validateUUIDv4Param(BadRequestException: ClassConstructor<Error>, req: Request<any>, _res: Response, next: NextFunction): Promise<void>;
|
|
858
862
|
|
|
859
|
-
export { ActualizarDataManoObra, ActualizarDataReserva, ActualizarDataResumenLiquidaciones, ActualizarDataResumenLiquidacionesColombia, ActualizarDataResumenValorizacionesAlemania, ActualizarDataTrabajos, AsignacionHelper, BuscarZonaContratista, CalcularResumenHPMOLiquidado, CalcularResumenLiquidaciones, CalcularResumenLiquidacionesColombia, CalcularResumenValorizacionesAlemania, CodigosMaterialDuctosAL02, CodigosMaterialDuctosAL04, CodigosMaterialSoplado, CodsMapeoMOMaterial, CodsMapeoMOMaterialNVT01, CodsMapeoMOMaterialSopladoClientes, CodsMapeoMOMaterialSopladoTroncal, CodsMapeoMO_Material_Arquertas, CompararFechas, CurrencyFormat, DocumentacionReplanteo, EstadoEspecialidad9612, FormatearErrorValidacionMOHijas, GemeindeChangeNomenclatura, GetCodigoFechaActual, type IDPContrato, type IDocumentacion, type ILineaValidacion, type IMOAndMaterialsRules, type IMORules, type IMateriales, type IResultadoValidacionMOHijas, MOCantidadNVT01, MOHijasAL04, MOHijasDEPTH, MapeoEspecialidades9612, MapeoMOBOMAL04, MapeoMatBOMAL04, type MatRetiradosType, type MatStockAlmacenType, type MatStockPersonalType$2 as MatStockPersonalType, type MatUtilizadosType$2 as MatUtilizadosType, type MoUoType$2 as MoUoType, ModelDataFlujosDocumentacionReplanteo, ObtenerMONoReservada, ObtenerPrecioContratistaVigente, ObtenerZonaAsignada, type ResumenLiquidacionesType, type ResumenLiquidacionesTypeChile, type ResumenLiquidacionesTypeColombia, SEGMENT_TY, type TARGET, UpdateNodosDocDP, ValidarRelacionMOHijasAL04, ValorizacionHelper, builSystemOption, buildDataMOFromMaterialRules, buildDataMaterialsRule, buildKeyMO, buildMenu, buildReservaMOJobMajorProjectsAlemaniaAL02, buildReservaMOJobMajorProjectsAlemaniaAL04, buildTenantCollectionName, calcularTotalMaterialValorizacionPeru9112, checkAndBuildMaterialsFromStock, checkMaterialAvailability, codBalizaAL04, codClientes, codIssueByPeriodoAL02, codMOClientesAL02, codMOClientesAL02Asfaltado, codMOClientesAL02OC, codMOClientesAL02Soplado, codMOClientes_ReglaLiquidacion1, codMODROPAL04, codMODROPAL04OC, codMODROPAL04Soplado, codMOFTTFAL04, codMONoClientesAL02, codMONoClientesAL02Asfaltado, codMONoClientesAL02OC, codMONoClientesAL02Soplado, codMONoClientes_ReglaLiquidacion1, codMOOcultosAL04, codMOPublico, codMOTroncalAL02, codMOTroncalAL02Asfaltado, codMOTroncalAL02OC, codMOTroncalAL02Soplado, codMOTroncalAL04, codMOTroncalAL04Asfaltado, codMOTroncalAL04Issue, codMOTroncalAL04OC, codMOTroncalAL04Soplado, codMOTroncalHistoricoAL02, codMOTroncal_ReglaLiquidacion1, codNoCliente, codSopladoRD, codigosMOT1_F2, codigosMaterialDuctos, codigosMaterialUGG, collections, consumirStockPersonal, convertDates, dataFlujosHomePass, db_default, db_root,
|
|
863
|
+
export { ActualizarDataManoObra, ActualizarDataReserva, ActualizarDataResumenLiquidaciones, ActualizarDataResumenLiquidacionesColombia, ActualizarDataResumenValorizacionesAlemania, ActualizarDataTrabajos, AsignacionHelper, BuscarZonaContratista, CalcularResumenHPMOLiquidado, CalcularResumenLiquidaciones, CalcularResumenLiquidacionesColombia, CalcularResumenValorizacionesAlemania, CodigosMaterialDuctosAL02, CodigosMaterialDuctosAL04, CodigosMaterialSoplado, CodsMapeoMOMaterial, CodsMapeoMOMaterialNVT01, CodsMapeoMOMaterialSopladoClientes, CodsMapeoMOMaterialSopladoTroncal, CodsMapeoMO_Material_Arquertas, CompararFechas, CurrencyFormat, DocumentacionReplanteo, EstadoEspecialidad9612, FormatearErrorValidacionMOHijas, GemeindeChangeNomenclatura, GetCodigoFechaActual, type IDPContrato, type IDocumentacion, type ILineaValidacion, type IMOAndMaterialsRules, type IMORules, type IMateriales, type IResultadoValidacionMOHijas, MOCantidadNVT01, MOHijasAL04, MOHijasDEPTH, MapeoEspecialidades9612, MapeoMOBOMAL04, MapeoMatBOMAL04, type MatRetiradosType, type MatStockAlmacenType, type MatStockPersonalType$2 as MatStockPersonalType, type MatUtilizadosType$2 as MatUtilizadosType, type MoUoType$2 as MoUoType, ModelDataFlujosDocumentacionReplanteo, ObtenerMONoReservada, ObtenerPrecioContratistaVigente, ObtenerZonaAsignada, type ResumenLiquidacionesType, type ResumenLiquidacionesTypeChile, type ResumenLiquidacionesTypeColombia, SEGMENT_TY, type TARGET, UpdateNodosDocDP, ValidarRelacionMOHijasAL04, ValorizacionHelper, builSystemOption, buildDataMOFromMaterialRules, buildDataMaterialsRule, buildKeyMO, buildMenu, buildReservaMOJobMajorProjectsAlemaniaAL02, buildReservaMOJobMajorProjectsAlemaniaAL04, buildTenantCollectionName, calcularTotalMaterialValorizacionPeru9112, checkAndBuildMaterialsFromStock, checkMaterialAvailability, codBalizaAL04, codClientes, codIssueByPeriodoAL02, codMOClientesAL02, codMOClientesAL02Asfaltado, codMOClientesAL02OC, codMOClientesAL02Soplado, codMOClientes_ReglaLiquidacion1, codMODROPAL04, codMODROPAL04OC, codMODROPAL04Soplado, codMOFTTFAL04, codMONoClientesAL02, codMONoClientesAL02Asfaltado, codMONoClientesAL02OC, codMONoClientesAL02Soplado, codMONoClientes_ReglaLiquidacion1, codMOOcultosAL04, codMOPublico, codMOTroncalAL02, codMOTroncalAL02Asfaltado, codMOTroncalAL02OC, codMOTroncalAL02Soplado, codMOTroncalAL04, codMOTroncalAL04Asfaltado, codMOTroncalAL04Issue, codMOTroncalAL04OC, codMOTroncalAL04Soplado, codMOTroncalHistoricoAL02, codMOTroncal_ReglaLiquidacion1, codNoCliente, codSopladoRD, codigosMOT1_F2, codigosMaterialDuctos, codigosMaterialUGG, collections, consumirStockPersonal, convertDates, dataFlujosHomePass, db_default, db_root, documentRequirementAltasNVT, empresas, esCadenaFechaISOValida, esObjetoFecha, formatCurrencyV1, formatNumberSmart, formatNumberV1, formatPercentageV1, generateUniqueNumber, generateUniqueNumberArray, getChannelName, getContainerName, getDBName, getDateInTimeZone, getKeyRedisSortedSet, getModelDataAdicional, getNextID_Amap, getNextID_AsignacionValorizacion, getNextID_Valorizacion, getPrecioContratista, getPriceMaterial, getQueueName, getQueueNameSaveOneNotification, hashCode, isValidDate, isValidPartialEntity, logTiempoProceso, mapaDPContratoPrecioFullAL02, mapaEstadoObraFaseAL02, mapaMOMaterialAL02, mapaMOMaterialAL04, mapaReglaSopladoClientes, mapaReglaSopladoTroncal, mapeoZonasSimilares, newCodMOTroncalReglaLiquidacion1, obtenerDocumentacionClientes, obtenerDocumentacionNoClientes, obtenerPrecioContratistaMaterial, obtenerPrecioManoObraAL02, obtenerPrecioManoObraAL04, obtenerTipoYCodigoMO, paisMap, parseDuplicateKeyError, roundNumber, searchCurrentContractorSpecialtyPrice, setColModels, setContext, updatePriceContractorMOAL02, updatePriceContractorMOAL04, updatePriceMOAL02, updatePriceMOAL04, updatePricePBBudgetAlemaniaAL02, updatePricePBBudgetAlemaniaAL04, uuidRegex, validateNoLookup, validateUUIDv4Param, verifyFiles, verifyInventoryFinalize };
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,6 @@ var __defProp = Object.defineProperty;
|
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7
6
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
8
7
|
var __export = (target, all) => {
|
|
9
8
|
for (var name in all)
|
|
@@ -18,7 +17,6 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
17
|
return to;
|
|
19
18
|
};
|
|
20
19
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
-
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
22
20
|
|
|
23
21
|
// src/index.ts
|
|
24
22
|
var index_exports = {};
|
|
@@ -116,7 +114,7 @@ __export(index_exports, {
|
|
|
116
114
|
dataFlujosHomePass: () => dataFlujosHomePass,
|
|
117
115
|
db_default: () => db_default,
|
|
118
116
|
db_root: () => db_root,
|
|
119
|
-
|
|
117
|
+
documentRequirementAltasNVT: () => documentRequirementAltasNVT,
|
|
120
118
|
empresas: () => empresas,
|
|
121
119
|
esCadenaFechaISOValida: () => esCadenaFechaISOValida,
|
|
122
120
|
esObjetoFecha: () => esObjetoFecha,
|
|
@@ -171,7 +169,9 @@ __export(index_exports, {
|
|
|
171
169
|
updatePricePBBudgetAlemaniaAL04: () => updatePricePBBudgetAlemaniaAL04,
|
|
172
170
|
uuidRegex: () => uuidRegex,
|
|
173
171
|
validateNoLookup: () => validateNoLookup,
|
|
174
|
-
validateUUIDv4Param: () => validateUUIDv4Param
|
|
172
|
+
validateUUIDv4Param: () => validateUUIDv4Param,
|
|
173
|
+
verifyFiles: () => verifyFiles,
|
|
174
|
+
verifyInventoryFinalize: () => verifyInventoryFinalize
|
|
175
175
|
});
|
|
176
176
|
module.exports = __toCommonJS(index_exports);
|
|
177
177
|
|
|
@@ -16295,17 +16295,17 @@ var GetCodigoFechaActual = /* @__PURE__ */ __name((fecha) => {
|
|
|
16295
16295
|
}, "GetCodigoFechaActual");
|
|
16296
16296
|
|
|
16297
16297
|
// src/shared/Utils/CurrencyFormat.ts
|
|
16298
|
-
var
|
|
16299
|
-
|
|
16300
|
-
|
|
16301
|
-
__publicField(this, "symbolCoin", "");
|
|
16302
|
-
__publicField(this, "symbolCoinPosition", "left");
|
|
16303
|
-
__publicField(this, "isPorcent", false);
|
|
16304
|
-
__publicField(this, "decimal", 2);
|
|
16305
|
-
__publicField(this, "codeCountry", "");
|
|
16306
|
-
__publicField(this, "currency", "");
|
|
16298
|
+
var Params = class Params2 {
|
|
16299
|
+
static {
|
|
16300
|
+
__name(this, "Params");
|
|
16307
16301
|
}
|
|
16308
|
-
|
|
16302
|
+
symbolCoin = "";
|
|
16303
|
+
symbolCoinPosition = "left";
|
|
16304
|
+
isPorcent = false;
|
|
16305
|
+
decimal = 2;
|
|
16306
|
+
codeCountry = "";
|
|
16307
|
+
currency = "";
|
|
16308
|
+
};
|
|
16309
16309
|
function CurrencyFormat(value = 0, options = new Params()) {
|
|
16310
16310
|
try {
|
|
16311
16311
|
let _value = structuredClone(value);
|
|
@@ -16697,13 +16697,16 @@ function buildKeyMO(mo) {
|
|
|
16697
16697
|
__name(buildKeyMO, "buildKeyMO");
|
|
16698
16698
|
|
|
16699
16699
|
// src/Programados/calcularMOAsignada.ts
|
|
16700
|
-
var
|
|
16700
|
+
var AsignacionHelper = class {
|
|
16701
|
+
static {
|
|
16702
|
+
__name(this, "AsignacionHelper");
|
|
16703
|
+
}
|
|
16704
|
+
valorizacionMap;
|
|
16701
16705
|
/**
|
|
16702
16706
|
* Inicializa el helper y construye el índice de asignaciones.
|
|
16703
16707
|
* @param trabajos Lista de trabajos con asignaciones
|
|
16704
16708
|
*/
|
|
16705
16709
|
constructor(trabajos) {
|
|
16706
|
-
__publicField(this, "valorizacionMap");
|
|
16707
16710
|
this.valorizacionMap = this.buildValorizacionMap(trabajos);
|
|
16708
16711
|
}
|
|
16709
16712
|
/**
|
|
@@ -16738,23 +16741,24 @@ var _AsignacionHelper = class _AsignacionHelper {
|
|
|
16738
16741
|
};
|
|
16739
16742
|
}
|
|
16740
16743
|
};
|
|
16741
|
-
__name(_AsignacionHelper, "AsignacionHelper");
|
|
16742
|
-
var AsignacionHelper = _AsignacionHelper;
|
|
16743
16744
|
|
|
16744
16745
|
// src/Programados/calcularMOValorizada.ts
|
|
16745
|
-
var
|
|
16746
|
+
var ValorizacionHelper = class {
|
|
16747
|
+
static {
|
|
16748
|
+
__name(this, "ValorizacionHelper");
|
|
16749
|
+
}
|
|
16750
|
+
valorizacionMap;
|
|
16751
|
+
estadosPermitidos = /* @__PURE__ */ new Set([
|
|
16752
|
+
"PRODUCCION",
|
|
16753
|
+
"CERTIFICADA",
|
|
16754
|
+
"PRELIQUIDADA",
|
|
16755
|
+
"LIQUIDADA"
|
|
16756
|
+
]);
|
|
16746
16757
|
/**
|
|
16747
16758
|
* Inicializa el helper y construye el índice de valorizaciones.
|
|
16748
16759
|
* @param trabajos Lista de trabajos con valorizaciones
|
|
16749
16760
|
*/
|
|
16750
16761
|
constructor(trabajos) {
|
|
16751
|
-
__publicField(this, "valorizacionMap");
|
|
16752
|
-
__publicField(this, "estadosPermitidos", /* @__PURE__ */ new Set([
|
|
16753
|
-
"PRODUCCION",
|
|
16754
|
-
"CERTIFICADA",
|
|
16755
|
-
"PRELIQUIDADA",
|
|
16756
|
-
"LIQUIDADA"
|
|
16757
|
-
]));
|
|
16758
16762
|
this.valorizacionMap = this.buildValorizacionMap(trabajos);
|
|
16759
16763
|
}
|
|
16760
16764
|
/**
|
|
@@ -16791,8 +16795,6 @@ var _ValorizacionHelper = class _ValorizacionHelper {
|
|
|
16791
16795
|
};
|
|
16792
16796
|
}
|
|
16793
16797
|
};
|
|
16794
|
-
__name(_ValorizacionHelper, "ValorizacionHelper");
|
|
16795
|
-
var ValorizacionHelper = _ValorizacionHelper;
|
|
16796
16798
|
|
|
16797
16799
|
// src/Programados/getPriceMaterial.ts
|
|
16798
16800
|
function getPriceMaterial(CodigoItem, dataPriceMaterial) {
|
|
@@ -16880,7 +16882,7 @@ var acceptedFileExtensions = [
|
|
|
16880
16882
|
import_sigo_entities6.FileExtension.Jpeg,
|
|
16881
16883
|
import_sigo_entities6.FileExtension.Png
|
|
16882
16884
|
];
|
|
16883
|
-
var
|
|
16885
|
+
var documentRequirementAltasNVT = [
|
|
16884
16886
|
{
|
|
16885
16887
|
id: "roseta",
|
|
16886
16888
|
label: "Roseta",
|
|
@@ -16888,23 +16890,65 @@ var documentRequirement = [
|
|
|
16888
16890
|
children: [
|
|
16889
16891
|
{
|
|
16890
16892
|
id: "rosetaTA",
|
|
16891
|
-
label: "Roseta TA
|
|
16893
|
+
label: "Roseta TA",
|
|
16892
16894
|
acceptedFileExtensions,
|
|
16893
|
-
children: [
|
|
16894
|
-
|
|
16895
|
-
|
|
16896
|
-
|
|
16897
|
-
|
|
16895
|
+
children: [
|
|
16896
|
+
{
|
|
16897
|
+
id: "rosetaTAAbierta",
|
|
16898
|
+
label: "Roseta TA abierta",
|
|
16899
|
+
acceptedFileExtensions,
|
|
16900
|
+
children: [],
|
|
16901
|
+
minFiles: 1,
|
|
16902
|
+
maxFiles: 1,
|
|
16903
|
+
requiresMetadata: true,
|
|
16904
|
+
maxFileSize: 2
|
|
16905
|
+
},
|
|
16906
|
+
{
|
|
16907
|
+
id: "rosetaTACerrada",
|
|
16908
|
+
label: "Roseta TA cerrada",
|
|
16909
|
+
acceptedFileExtensions,
|
|
16910
|
+
children: [],
|
|
16911
|
+
minFiles: 1,
|
|
16912
|
+
maxFiles: 1,
|
|
16913
|
+
requiresMetadata: true,
|
|
16914
|
+
maxFileSize: 2
|
|
16915
|
+
}
|
|
16916
|
+
],
|
|
16917
|
+
minFiles: 0,
|
|
16918
|
+
maxFiles: 0,
|
|
16919
|
+
requiresMetadata: false,
|
|
16920
|
+
maxFileSize: 0
|
|
16898
16921
|
},
|
|
16899
16922
|
{
|
|
16900
16923
|
id: "rosetaAP",
|
|
16901
|
-
label: "Roseta AP
|
|
16924
|
+
label: "Roseta AP",
|
|
16902
16925
|
acceptedFileExtensions,
|
|
16903
|
-
children: [
|
|
16904
|
-
|
|
16905
|
-
|
|
16906
|
-
|
|
16907
|
-
|
|
16926
|
+
children: [
|
|
16927
|
+
{
|
|
16928
|
+
id: "rosetAPAbierta",
|
|
16929
|
+
label: "Roseta AP abierta",
|
|
16930
|
+
acceptedFileExtensions,
|
|
16931
|
+
children: [],
|
|
16932
|
+
minFiles: 1,
|
|
16933
|
+
maxFiles: 1,
|
|
16934
|
+
requiresMetadata: true,
|
|
16935
|
+
maxFileSize: 2
|
|
16936
|
+
},
|
|
16937
|
+
{
|
|
16938
|
+
id: "rosetAPCerrada",
|
|
16939
|
+
label: "Roseta AP cerrada",
|
|
16940
|
+
acceptedFileExtensions,
|
|
16941
|
+
children: [],
|
|
16942
|
+
minFiles: 1,
|
|
16943
|
+
maxFiles: 1,
|
|
16944
|
+
requiresMetadata: true,
|
|
16945
|
+
maxFileSize: 2
|
|
16946
|
+
}
|
|
16947
|
+
],
|
|
16948
|
+
minFiles: 0,
|
|
16949
|
+
maxFiles: 0,
|
|
16950
|
+
requiresMetadata: false,
|
|
16951
|
+
maxFileSize: 0
|
|
16908
16952
|
}
|
|
16909
16953
|
],
|
|
16910
16954
|
minFiles: 0,
|
|
@@ -16975,6 +17019,33 @@ var documentRequirement = [
|
|
|
16975
17019
|
}
|
|
16976
17020
|
];
|
|
16977
17021
|
|
|
17022
|
+
// src/Operativa/AltasNVT/verifyInventoryFinalize.ts
|
|
17023
|
+
function verifyInventoryFinalize(docs, UnprocessableEntityException) {
|
|
17024
|
+
const codigo = "40928145";
|
|
17025
|
+
const orders = docs.filter((e) => e.inventory.some((inv) => inv.codigo === codigo));
|
|
17026
|
+
if (orders.length === 0) {
|
|
17027
|
+
const msg = `No se puede finalizar la orden, la orden no tiene el material ${codigo}`;
|
|
17028
|
+
if (UnprocessableEntityException) {
|
|
17029
|
+
throw new UnprocessableEntityException(msg, true);
|
|
17030
|
+
} else {
|
|
17031
|
+
throw new Error(msg, {
|
|
17032
|
+
cause: "USER_MESSAGE"
|
|
17033
|
+
});
|
|
17034
|
+
}
|
|
17035
|
+
}
|
|
17036
|
+
if (orders.length > 1) {
|
|
17037
|
+
const msg = `No se puede finalizar la orden, existen ordenes con el material ${codigo}`;
|
|
17038
|
+
if (UnprocessableEntityException) {
|
|
17039
|
+
throw new UnprocessableEntityException(msg, true);
|
|
17040
|
+
} else {
|
|
17041
|
+
throw new Error(msg, {
|
|
17042
|
+
cause: "USER_MESSAGE"
|
|
17043
|
+
});
|
|
17044
|
+
}
|
|
17045
|
+
}
|
|
17046
|
+
}
|
|
17047
|
+
__name(verifyInventoryFinalize, "verifyInventoryFinalize");
|
|
17048
|
+
|
|
16978
17049
|
// src/constants/collections.ts
|
|
16979
17050
|
var collections = Object.freeze({
|
|
16980
17051
|
PERU_9112_ToaOrder: "PERU_9112_ToaOrder",
|
|
@@ -17141,6 +17212,54 @@ var buildMenu = /* @__PURE__ */ __name((data, t) => {
|
|
|
17141
17212
|
return rootItems;
|
|
17142
17213
|
}, "buildMenu");
|
|
17143
17214
|
|
|
17215
|
+
// src/v2/utils/verifyFiles.ts
|
|
17216
|
+
function verifyFiles(documentation, documentRequirement, BadRequestException) {
|
|
17217
|
+
const verifyRequirements = /* @__PURE__ */ __name((requirements) => {
|
|
17218
|
+
requirements.forEach((requirement) => {
|
|
17219
|
+
if (requirement.children.length > 0) {
|
|
17220
|
+
verifyRequirements(requirement.children);
|
|
17221
|
+
return;
|
|
17222
|
+
}
|
|
17223
|
+
const files = documentation.filter((file) => file.CodigoNodo === requirement.id);
|
|
17224
|
+
if (files.length < requirement.minFiles) {
|
|
17225
|
+
const msg = `El requisito "${requirement.label}" requiere al menos ${requirement.minFiles} archivo(s)`;
|
|
17226
|
+
if (BadRequestException) {
|
|
17227
|
+
throw new BadRequestException(msg, true);
|
|
17228
|
+
} else {
|
|
17229
|
+
throw new Error(msg, {
|
|
17230
|
+
cause: "USER_MESSAGE"
|
|
17231
|
+
});
|
|
17232
|
+
}
|
|
17233
|
+
}
|
|
17234
|
+
if (files.length > requirement.maxFiles) {
|
|
17235
|
+
const msg = `El requisito "${requirement.label}" permite como m\xE1ximo ${requirement.maxFiles} archivo(s)`;
|
|
17236
|
+
if (BadRequestException) {
|
|
17237
|
+
throw new BadRequestException(msg, true);
|
|
17238
|
+
} else {
|
|
17239
|
+
throw new Error(msg, {
|
|
17240
|
+
cause: "USER_MESSAGE"
|
|
17241
|
+
});
|
|
17242
|
+
}
|
|
17243
|
+
}
|
|
17244
|
+
files.forEach((file) => {
|
|
17245
|
+
const extension = `.${file.Extension.toLowerCase()}`;
|
|
17246
|
+
if (!requirement.acceptedFileExtensions.includes(extension)) {
|
|
17247
|
+
const msg = `El archivo "${file.NameOriginal}" no tiene una extensi\xF3n v\xE1lida para "${requirement.label}"`;
|
|
17248
|
+
if (BadRequestException) {
|
|
17249
|
+
throw new BadRequestException(msg, true);
|
|
17250
|
+
} else {
|
|
17251
|
+
throw new Error(msg, {
|
|
17252
|
+
cause: "USER_MESSAGE"
|
|
17253
|
+
});
|
|
17254
|
+
}
|
|
17255
|
+
}
|
|
17256
|
+
});
|
|
17257
|
+
});
|
|
17258
|
+
}, "verifyRequirements");
|
|
17259
|
+
verifyRequirements(documentRequirement);
|
|
17260
|
+
}
|
|
17261
|
+
__name(verifyFiles, "verifyFiles");
|
|
17262
|
+
|
|
17144
17263
|
// src/v2/middlewares/validateUUIDv4Param.ts
|
|
17145
17264
|
async function validateUUIDv4Param(BadRequestException, req, _res, next) {
|
|
17146
17265
|
try {
|
|
@@ -17251,7 +17370,7 @@ __name(validateUUIDv4Param, "validateUUIDv4Param");
|
|
|
17251
17370
|
dataFlujosHomePass,
|
|
17252
17371
|
db_default,
|
|
17253
17372
|
db_root,
|
|
17254
|
-
|
|
17373
|
+
documentRequirementAltasNVT,
|
|
17255
17374
|
empresas,
|
|
17256
17375
|
esCadenaFechaISOValida,
|
|
17257
17376
|
esObjetoFecha,
|
|
@@ -17306,5 +17425,7 @@ __name(validateUUIDv4Param, "validateUUIDv4Param");
|
|
|
17306
17425
|
updatePricePBBudgetAlemaniaAL04,
|
|
17307
17426
|
uuidRegex,
|
|
17308
17427
|
validateNoLookup,
|
|
17309
|
-
validateUUIDv4Param
|
|
17428
|
+
validateUUIDv4Param,
|
|
17429
|
+
verifyFiles,
|
|
17430
|
+
verifyInventoryFinalize
|
|
17310
17431
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
2
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
4
|
-
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
3
|
|
|
6
4
|
// src/Programados/ActualizarDataManoObra.ts
|
|
7
5
|
var ActualizarDataManoObra = /* @__PURE__ */ __name(({ manoObra, ContratoOT, envSIGO, obra }) => {
|
|
@@ -16123,17 +16121,17 @@ var GetCodigoFechaActual = /* @__PURE__ */ __name((fecha) => {
|
|
|
16123
16121
|
}, "GetCodigoFechaActual");
|
|
16124
16122
|
|
|
16125
16123
|
// src/shared/Utils/CurrencyFormat.ts
|
|
16126
|
-
var
|
|
16127
|
-
|
|
16128
|
-
|
|
16129
|
-
__publicField(this, "symbolCoin", "");
|
|
16130
|
-
__publicField(this, "symbolCoinPosition", "left");
|
|
16131
|
-
__publicField(this, "isPorcent", false);
|
|
16132
|
-
__publicField(this, "decimal", 2);
|
|
16133
|
-
__publicField(this, "codeCountry", "");
|
|
16134
|
-
__publicField(this, "currency", "");
|
|
16124
|
+
var Params = class Params2 {
|
|
16125
|
+
static {
|
|
16126
|
+
__name(this, "Params");
|
|
16135
16127
|
}
|
|
16136
|
-
|
|
16128
|
+
symbolCoin = "";
|
|
16129
|
+
symbolCoinPosition = "left";
|
|
16130
|
+
isPorcent = false;
|
|
16131
|
+
decimal = 2;
|
|
16132
|
+
codeCountry = "";
|
|
16133
|
+
currency = "";
|
|
16134
|
+
};
|
|
16137
16135
|
function CurrencyFormat(value = 0, options = new Params()) {
|
|
16138
16136
|
try {
|
|
16139
16137
|
let _value = structuredClone(value);
|
|
@@ -16525,13 +16523,16 @@ function buildKeyMO(mo) {
|
|
|
16525
16523
|
__name(buildKeyMO, "buildKeyMO");
|
|
16526
16524
|
|
|
16527
16525
|
// src/Programados/calcularMOAsignada.ts
|
|
16528
|
-
var
|
|
16526
|
+
var AsignacionHelper = class {
|
|
16527
|
+
static {
|
|
16528
|
+
__name(this, "AsignacionHelper");
|
|
16529
|
+
}
|
|
16530
|
+
valorizacionMap;
|
|
16529
16531
|
/**
|
|
16530
16532
|
* Inicializa el helper y construye el índice de asignaciones.
|
|
16531
16533
|
* @param trabajos Lista de trabajos con asignaciones
|
|
16532
16534
|
*/
|
|
16533
16535
|
constructor(trabajos) {
|
|
16534
|
-
__publicField(this, "valorizacionMap");
|
|
16535
16536
|
this.valorizacionMap = this.buildValorizacionMap(trabajos);
|
|
16536
16537
|
}
|
|
16537
16538
|
/**
|
|
@@ -16566,23 +16567,24 @@ var _AsignacionHelper = class _AsignacionHelper {
|
|
|
16566
16567
|
};
|
|
16567
16568
|
}
|
|
16568
16569
|
};
|
|
16569
|
-
__name(_AsignacionHelper, "AsignacionHelper");
|
|
16570
|
-
var AsignacionHelper = _AsignacionHelper;
|
|
16571
16570
|
|
|
16572
16571
|
// src/Programados/calcularMOValorizada.ts
|
|
16573
|
-
var
|
|
16572
|
+
var ValorizacionHelper = class {
|
|
16573
|
+
static {
|
|
16574
|
+
__name(this, "ValorizacionHelper");
|
|
16575
|
+
}
|
|
16576
|
+
valorizacionMap;
|
|
16577
|
+
estadosPermitidos = /* @__PURE__ */ new Set([
|
|
16578
|
+
"PRODUCCION",
|
|
16579
|
+
"CERTIFICADA",
|
|
16580
|
+
"PRELIQUIDADA",
|
|
16581
|
+
"LIQUIDADA"
|
|
16582
|
+
]);
|
|
16574
16583
|
/**
|
|
16575
16584
|
* Inicializa el helper y construye el índice de valorizaciones.
|
|
16576
16585
|
* @param trabajos Lista de trabajos con valorizaciones
|
|
16577
16586
|
*/
|
|
16578
16587
|
constructor(trabajos) {
|
|
16579
|
-
__publicField(this, "valorizacionMap");
|
|
16580
|
-
__publicField(this, "estadosPermitidos", /* @__PURE__ */ new Set([
|
|
16581
|
-
"PRODUCCION",
|
|
16582
|
-
"CERTIFICADA",
|
|
16583
|
-
"PRELIQUIDADA",
|
|
16584
|
-
"LIQUIDADA"
|
|
16585
|
-
]));
|
|
16586
16588
|
this.valorizacionMap = this.buildValorizacionMap(trabajos);
|
|
16587
16589
|
}
|
|
16588
16590
|
/**
|
|
@@ -16619,8 +16621,6 @@ var _ValorizacionHelper = class _ValorizacionHelper {
|
|
|
16619
16621
|
};
|
|
16620
16622
|
}
|
|
16621
16623
|
};
|
|
16622
|
-
__name(_ValorizacionHelper, "ValorizacionHelper");
|
|
16623
|
-
var ValorizacionHelper = _ValorizacionHelper;
|
|
16624
16624
|
|
|
16625
16625
|
// src/Programados/getPriceMaterial.ts
|
|
16626
16626
|
function getPriceMaterial(CodigoItem, dataPriceMaterial) {
|
|
@@ -16708,7 +16708,7 @@ var acceptedFileExtensions = [
|
|
|
16708
16708
|
FileExtension.Jpeg,
|
|
16709
16709
|
FileExtension.Png
|
|
16710
16710
|
];
|
|
16711
|
-
var
|
|
16711
|
+
var documentRequirementAltasNVT = [
|
|
16712
16712
|
{
|
|
16713
16713
|
id: "roseta",
|
|
16714
16714
|
label: "Roseta",
|
|
@@ -16716,23 +16716,65 @@ var documentRequirement = [
|
|
|
16716
16716
|
children: [
|
|
16717
16717
|
{
|
|
16718
16718
|
id: "rosetaTA",
|
|
16719
|
-
label: "Roseta TA
|
|
16719
|
+
label: "Roseta TA",
|
|
16720
16720
|
acceptedFileExtensions,
|
|
16721
|
-
children: [
|
|
16722
|
-
|
|
16723
|
-
|
|
16724
|
-
|
|
16725
|
-
|
|
16721
|
+
children: [
|
|
16722
|
+
{
|
|
16723
|
+
id: "rosetaTAAbierta",
|
|
16724
|
+
label: "Roseta TA abierta",
|
|
16725
|
+
acceptedFileExtensions,
|
|
16726
|
+
children: [],
|
|
16727
|
+
minFiles: 1,
|
|
16728
|
+
maxFiles: 1,
|
|
16729
|
+
requiresMetadata: true,
|
|
16730
|
+
maxFileSize: 2
|
|
16731
|
+
},
|
|
16732
|
+
{
|
|
16733
|
+
id: "rosetaTACerrada",
|
|
16734
|
+
label: "Roseta TA cerrada",
|
|
16735
|
+
acceptedFileExtensions,
|
|
16736
|
+
children: [],
|
|
16737
|
+
minFiles: 1,
|
|
16738
|
+
maxFiles: 1,
|
|
16739
|
+
requiresMetadata: true,
|
|
16740
|
+
maxFileSize: 2
|
|
16741
|
+
}
|
|
16742
|
+
],
|
|
16743
|
+
minFiles: 0,
|
|
16744
|
+
maxFiles: 0,
|
|
16745
|
+
requiresMetadata: false,
|
|
16746
|
+
maxFileSize: 0
|
|
16726
16747
|
},
|
|
16727
16748
|
{
|
|
16728
16749
|
id: "rosetaAP",
|
|
16729
|
-
label: "Roseta AP
|
|
16750
|
+
label: "Roseta AP",
|
|
16730
16751
|
acceptedFileExtensions,
|
|
16731
|
-
children: [
|
|
16732
|
-
|
|
16733
|
-
|
|
16734
|
-
|
|
16735
|
-
|
|
16752
|
+
children: [
|
|
16753
|
+
{
|
|
16754
|
+
id: "rosetAPAbierta",
|
|
16755
|
+
label: "Roseta AP abierta",
|
|
16756
|
+
acceptedFileExtensions,
|
|
16757
|
+
children: [],
|
|
16758
|
+
minFiles: 1,
|
|
16759
|
+
maxFiles: 1,
|
|
16760
|
+
requiresMetadata: true,
|
|
16761
|
+
maxFileSize: 2
|
|
16762
|
+
},
|
|
16763
|
+
{
|
|
16764
|
+
id: "rosetAPCerrada",
|
|
16765
|
+
label: "Roseta AP cerrada",
|
|
16766
|
+
acceptedFileExtensions,
|
|
16767
|
+
children: [],
|
|
16768
|
+
minFiles: 1,
|
|
16769
|
+
maxFiles: 1,
|
|
16770
|
+
requiresMetadata: true,
|
|
16771
|
+
maxFileSize: 2
|
|
16772
|
+
}
|
|
16773
|
+
],
|
|
16774
|
+
minFiles: 0,
|
|
16775
|
+
maxFiles: 0,
|
|
16776
|
+
requiresMetadata: false,
|
|
16777
|
+
maxFileSize: 0
|
|
16736
16778
|
}
|
|
16737
16779
|
],
|
|
16738
16780
|
minFiles: 0,
|
|
@@ -16803,6 +16845,33 @@ var documentRequirement = [
|
|
|
16803
16845
|
}
|
|
16804
16846
|
];
|
|
16805
16847
|
|
|
16848
|
+
// src/Operativa/AltasNVT/verifyInventoryFinalize.ts
|
|
16849
|
+
function verifyInventoryFinalize(docs, UnprocessableEntityException) {
|
|
16850
|
+
const codigo = "40928145";
|
|
16851
|
+
const orders = docs.filter((e) => e.inventory.some((inv) => inv.codigo === codigo));
|
|
16852
|
+
if (orders.length === 0) {
|
|
16853
|
+
const msg = `No se puede finalizar la orden, la orden no tiene el material ${codigo}`;
|
|
16854
|
+
if (UnprocessableEntityException) {
|
|
16855
|
+
throw new UnprocessableEntityException(msg, true);
|
|
16856
|
+
} else {
|
|
16857
|
+
throw new Error(msg, {
|
|
16858
|
+
cause: "USER_MESSAGE"
|
|
16859
|
+
});
|
|
16860
|
+
}
|
|
16861
|
+
}
|
|
16862
|
+
if (orders.length > 1) {
|
|
16863
|
+
const msg = `No se puede finalizar la orden, existen ordenes con el material ${codigo}`;
|
|
16864
|
+
if (UnprocessableEntityException) {
|
|
16865
|
+
throw new UnprocessableEntityException(msg, true);
|
|
16866
|
+
} else {
|
|
16867
|
+
throw new Error(msg, {
|
|
16868
|
+
cause: "USER_MESSAGE"
|
|
16869
|
+
});
|
|
16870
|
+
}
|
|
16871
|
+
}
|
|
16872
|
+
}
|
|
16873
|
+
__name(verifyInventoryFinalize, "verifyInventoryFinalize");
|
|
16874
|
+
|
|
16806
16875
|
// src/constants/collections.ts
|
|
16807
16876
|
var collections = Object.freeze({
|
|
16808
16877
|
PERU_9112_ToaOrder: "PERU_9112_ToaOrder",
|
|
@@ -16969,6 +17038,54 @@ var buildMenu = /* @__PURE__ */ __name((data, t) => {
|
|
|
16969
17038
|
return rootItems;
|
|
16970
17039
|
}, "buildMenu");
|
|
16971
17040
|
|
|
17041
|
+
// src/v2/utils/verifyFiles.ts
|
|
17042
|
+
function verifyFiles(documentation, documentRequirement, BadRequestException) {
|
|
17043
|
+
const verifyRequirements = /* @__PURE__ */ __name((requirements) => {
|
|
17044
|
+
requirements.forEach((requirement) => {
|
|
17045
|
+
if (requirement.children.length > 0) {
|
|
17046
|
+
verifyRequirements(requirement.children);
|
|
17047
|
+
return;
|
|
17048
|
+
}
|
|
17049
|
+
const files = documentation.filter((file) => file.CodigoNodo === requirement.id);
|
|
17050
|
+
if (files.length < requirement.minFiles) {
|
|
17051
|
+
const msg = `El requisito "${requirement.label}" requiere al menos ${requirement.minFiles} archivo(s)`;
|
|
17052
|
+
if (BadRequestException) {
|
|
17053
|
+
throw new BadRequestException(msg, true);
|
|
17054
|
+
} else {
|
|
17055
|
+
throw new Error(msg, {
|
|
17056
|
+
cause: "USER_MESSAGE"
|
|
17057
|
+
});
|
|
17058
|
+
}
|
|
17059
|
+
}
|
|
17060
|
+
if (files.length > requirement.maxFiles) {
|
|
17061
|
+
const msg = `El requisito "${requirement.label}" permite como m\xE1ximo ${requirement.maxFiles} archivo(s)`;
|
|
17062
|
+
if (BadRequestException) {
|
|
17063
|
+
throw new BadRequestException(msg, true);
|
|
17064
|
+
} else {
|
|
17065
|
+
throw new Error(msg, {
|
|
17066
|
+
cause: "USER_MESSAGE"
|
|
17067
|
+
});
|
|
17068
|
+
}
|
|
17069
|
+
}
|
|
17070
|
+
files.forEach((file) => {
|
|
17071
|
+
const extension = `.${file.Extension.toLowerCase()}`;
|
|
17072
|
+
if (!requirement.acceptedFileExtensions.includes(extension)) {
|
|
17073
|
+
const msg = `El archivo "${file.NameOriginal}" no tiene una extensi\xF3n v\xE1lida para "${requirement.label}"`;
|
|
17074
|
+
if (BadRequestException) {
|
|
17075
|
+
throw new BadRequestException(msg, true);
|
|
17076
|
+
} else {
|
|
17077
|
+
throw new Error(msg, {
|
|
17078
|
+
cause: "USER_MESSAGE"
|
|
17079
|
+
});
|
|
17080
|
+
}
|
|
17081
|
+
}
|
|
17082
|
+
});
|
|
17083
|
+
});
|
|
17084
|
+
}, "verifyRequirements");
|
|
17085
|
+
verifyRequirements(documentRequirement);
|
|
17086
|
+
}
|
|
17087
|
+
__name(verifyFiles, "verifyFiles");
|
|
17088
|
+
|
|
16972
17089
|
// src/v2/middlewares/validateUUIDv4Param.ts
|
|
16973
17090
|
async function validateUUIDv4Param(BadRequestException, req, _res, next) {
|
|
16974
17091
|
try {
|
|
@@ -17078,7 +17195,7 @@ export {
|
|
|
17078
17195
|
dataFlujosHomePass,
|
|
17079
17196
|
db_default,
|
|
17080
17197
|
db_root,
|
|
17081
|
-
|
|
17198
|
+
documentRequirementAltasNVT,
|
|
17082
17199
|
empresas,
|
|
17083
17200
|
esCadenaFechaISOValida,
|
|
17084
17201
|
esObjetoFecha,
|
|
@@ -17133,5 +17250,7 @@ export {
|
|
|
17133
17250
|
updatePricePBBudgetAlemaniaAL04,
|
|
17134
17251
|
uuidRegex,
|
|
17135
17252
|
validateNoLookup,
|
|
17136
|
-
validateUUIDv4Param
|
|
17253
|
+
validateUUIDv4Param,
|
|
17254
|
+
verifyFiles,
|
|
17255
|
+
verifyInventoryFinalize
|
|
17137
17256
|
};
|