sigo-package 1.2.154 → 1.2.156
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 +76 -49
- package/dist/index.d.ts +76 -49
- package/dist/index.js +87 -15
- package/dist/index.mjs +85 -15
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -135,6 +135,81 @@ declare function updatePricePBBudgetAlemaniaAL04(ManoObra: CodigoNombreUMDTO, Ca
|
|
|
135
135
|
|
|
136
136
|
declare function buildReservaMOJobMajorProjectsAlemaniaAL04(dataMOG: ManoObraGlobalENTITY[], priceContractorMOPropia: PrecioContratistaMOAL04ENTITY, codigoMacroObras: string, ExceptionClass?: new (message?: string, messageSigo?: boolean) => Error): ValorizacionManoObraDTO[];
|
|
137
137
|
|
|
138
|
+
declare const CalcularResumenValorizacionesAlemania: Funcion$5;
|
|
139
|
+
interface Funcion$5 {
|
|
140
|
+
(trabajo: TrabajoType$2, trabajos: any[]): ResumenLiquidacionesType;
|
|
141
|
+
}
|
|
142
|
+
interface ResumenLiquidacionesType {
|
|
143
|
+
MoUo: MoUoType$2[];
|
|
144
|
+
MatUtilizados: MatUtilizadosType$2[];
|
|
145
|
+
MatRetirados: MatRetiradosType[];
|
|
146
|
+
MatStockPersonal: MatStockPersonalType$2[];
|
|
147
|
+
MatStockAlmacen: MatStockAlmacenType[];
|
|
148
|
+
}
|
|
149
|
+
interface MatStockPersonalType$2 {
|
|
150
|
+
ID_Trabajo: number;
|
|
151
|
+
Identificacion: string;
|
|
152
|
+
Codigo: string;
|
|
153
|
+
CodigoLlave: string;
|
|
154
|
+
Cantidad: number;
|
|
155
|
+
}
|
|
156
|
+
interface MatStockAlmacenType {
|
|
157
|
+
ID_Trabajo: number;
|
|
158
|
+
CodigoLlave: string;
|
|
159
|
+
Codigo: string;
|
|
160
|
+
Cantidad: number;
|
|
161
|
+
Empresa: string;
|
|
162
|
+
}
|
|
163
|
+
interface MatRetiradosType {
|
|
164
|
+
Codigo: string;
|
|
165
|
+
Cantidad: number;
|
|
166
|
+
}
|
|
167
|
+
interface MatUtilizadosType$2 {
|
|
168
|
+
Codigo: string;
|
|
169
|
+
Cantidad: number;
|
|
170
|
+
}
|
|
171
|
+
interface MoUoType$2 {
|
|
172
|
+
LineaCodigoCub: string;
|
|
173
|
+
Cantidad: number;
|
|
174
|
+
CantidadUO: number;
|
|
175
|
+
}
|
|
176
|
+
interface TrabajoType$2 {
|
|
177
|
+
ID_Trabajo: number;
|
|
178
|
+
Ultima_PreLiquidacion: PreLiquidacionType$2;
|
|
179
|
+
}
|
|
180
|
+
interface PreLiquidacionType$2 {
|
|
181
|
+
Valorizacion: ValorizacionType$2[];
|
|
182
|
+
}
|
|
183
|
+
interface ValorizacionType$2 {
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
interface IResultadoValidacionMOHijas {
|
|
187
|
+
CodigoMOMadre: string;
|
|
188
|
+
CodigoMOHija: string;
|
|
189
|
+
TotalMadreUsado: number;
|
|
190
|
+
TotalHijaUsado: number;
|
|
191
|
+
DiferenciaExcedida: number;
|
|
192
|
+
LineasMadre: ILineaValidacion[];
|
|
193
|
+
LineasHija: ILineaValidacion[];
|
|
194
|
+
}
|
|
195
|
+
interface ILineaValidacion {
|
|
196
|
+
LineaCodigoCub: string;
|
|
197
|
+
Codigo: string;
|
|
198
|
+
Descripcion: string;
|
|
199
|
+
CantidadUsado: number;
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Valida que el total preliquidado de MO hijas no supere al de sus MO madres.
|
|
203
|
+
*
|
|
204
|
+
* @param moUo — Suma de TODAS las valorizaciones de TODOS los trabajos de la obra
|
|
205
|
+
* (viene de CalcularResumenValorizacionesAlemania).
|
|
206
|
+
* Ya excluye INACTIVAS y certificaciones con Mes != 0.
|
|
207
|
+
* @param manoObraDB — Solo se usa como diccionario LineaCodigoCub → Codigo.
|
|
208
|
+
* NO se usa para cantidades.
|
|
209
|
+
*/
|
|
210
|
+
declare function ValidarRelacionMOHijasAL04(moUo: MoUoType$2[], manoObraDB: any): IResultadoValidacionMOHijas[];
|
|
211
|
+
declare function FormatearErrorValidacionMOHijas(violaciones: IResultadoValidacionMOHijas[]): string | null;
|
|
212
|
+
|
|
138
213
|
declare const codMOTroncalAL02OC: never[];
|
|
139
214
|
declare const codMOTroncalAL02Soplado: never[];
|
|
140
215
|
declare const codMOTroncalAL02Asfaltado: never[];
|
|
@@ -267,54 +342,6 @@ interface IDocumentacion {
|
|
|
267
342
|
}
|
|
268
343
|
declare const UpdateNodosDocDP: <T extends IDocumentacion>({ documentacion, obra, trabajo }: params$1<T>) => T;
|
|
269
344
|
|
|
270
|
-
declare const CalcularResumenValorizacionesAlemania: Funcion$5;
|
|
271
|
-
interface Funcion$5 {
|
|
272
|
-
(trabajo: TrabajoType$2, trabajos: any[]): ResumenLiquidacionesType;
|
|
273
|
-
}
|
|
274
|
-
interface ResumenLiquidacionesType {
|
|
275
|
-
MoUo: MoUoType$2[];
|
|
276
|
-
MatUtilizados: MatUtilizadosType$2[];
|
|
277
|
-
MatRetirados: MatRetiradosType[];
|
|
278
|
-
MatStockPersonal: MatStockPersonalType$2[];
|
|
279
|
-
MatStockAlmacen: MatStockAlmacenType[];
|
|
280
|
-
}
|
|
281
|
-
interface MatStockPersonalType$2 {
|
|
282
|
-
ID_Trabajo: number;
|
|
283
|
-
Identificacion: string;
|
|
284
|
-
Codigo: string;
|
|
285
|
-
CodigoLlave: string;
|
|
286
|
-
Cantidad: number;
|
|
287
|
-
}
|
|
288
|
-
interface MatStockAlmacenType {
|
|
289
|
-
ID_Trabajo: number;
|
|
290
|
-
CodigoLlave: string;
|
|
291
|
-
Codigo: string;
|
|
292
|
-
Cantidad: number;
|
|
293
|
-
Empresa: string;
|
|
294
|
-
}
|
|
295
|
-
interface MatRetiradosType {
|
|
296
|
-
Codigo: string;
|
|
297
|
-
Cantidad: number;
|
|
298
|
-
}
|
|
299
|
-
interface MatUtilizadosType$2 {
|
|
300
|
-
Codigo: string;
|
|
301
|
-
Cantidad: number;
|
|
302
|
-
}
|
|
303
|
-
interface MoUoType$2 {
|
|
304
|
-
LineaCodigoCub: string;
|
|
305
|
-
Cantidad: number;
|
|
306
|
-
CantidadUO: number;
|
|
307
|
-
}
|
|
308
|
-
interface TrabajoType$2 {
|
|
309
|
-
ID_Trabajo: number;
|
|
310
|
-
Ultima_PreLiquidacion: PreLiquidacionType$2;
|
|
311
|
-
}
|
|
312
|
-
interface PreLiquidacionType$2 {
|
|
313
|
-
Valorizacion: ValorizacionType$2[];
|
|
314
|
-
}
|
|
315
|
-
interface ValorizacionType$2 {
|
|
316
|
-
}
|
|
317
|
-
|
|
318
345
|
declare const ActualizarDataResumenValorizacionesAlemania: Funcion$4;
|
|
319
346
|
interface Funcion$4 {
|
|
320
347
|
(ManoObra: any, Reserva: any, StockPersonal: any[], ResumenPreLiquidado: ResumenLiquidacionesType): void;
|
|
@@ -822,4 +849,4 @@ declare const buildMenu: (data: SystemOptionEntity[], t: TranslateFn) => MenuDto
|
|
|
822
849
|
|
|
823
850
|
declare function validateUUIDv4Param(BadRequestException: ClassConstructor<Error>, req: Request<any>, _res: Response, next: NextFunction): Promise<void>;
|
|
824
851
|
|
|
825
|
-
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, GemeindeChangeNomenclatura, GetCodigoFechaActual, type IDPContrato, type IDocumentacion, type IMOAndMaterialsRules, type IMORules, type IMateriales, 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, 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, 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 };
|
|
852
|
+
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, 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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -135,6 +135,81 @@ declare function updatePricePBBudgetAlemaniaAL04(ManoObra: CodigoNombreUMDTO, Ca
|
|
|
135
135
|
|
|
136
136
|
declare function buildReservaMOJobMajorProjectsAlemaniaAL04(dataMOG: ManoObraGlobalENTITY[], priceContractorMOPropia: PrecioContratistaMOAL04ENTITY, codigoMacroObras: string, ExceptionClass?: new (message?: string, messageSigo?: boolean) => Error): ValorizacionManoObraDTO[];
|
|
137
137
|
|
|
138
|
+
declare const CalcularResumenValorizacionesAlemania: Funcion$5;
|
|
139
|
+
interface Funcion$5 {
|
|
140
|
+
(trabajo: TrabajoType$2, trabajos: any[]): ResumenLiquidacionesType;
|
|
141
|
+
}
|
|
142
|
+
interface ResumenLiquidacionesType {
|
|
143
|
+
MoUo: MoUoType$2[];
|
|
144
|
+
MatUtilizados: MatUtilizadosType$2[];
|
|
145
|
+
MatRetirados: MatRetiradosType[];
|
|
146
|
+
MatStockPersonal: MatStockPersonalType$2[];
|
|
147
|
+
MatStockAlmacen: MatStockAlmacenType[];
|
|
148
|
+
}
|
|
149
|
+
interface MatStockPersonalType$2 {
|
|
150
|
+
ID_Trabajo: number;
|
|
151
|
+
Identificacion: string;
|
|
152
|
+
Codigo: string;
|
|
153
|
+
CodigoLlave: string;
|
|
154
|
+
Cantidad: number;
|
|
155
|
+
}
|
|
156
|
+
interface MatStockAlmacenType {
|
|
157
|
+
ID_Trabajo: number;
|
|
158
|
+
CodigoLlave: string;
|
|
159
|
+
Codigo: string;
|
|
160
|
+
Cantidad: number;
|
|
161
|
+
Empresa: string;
|
|
162
|
+
}
|
|
163
|
+
interface MatRetiradosType {
|
|
164
|
+
Codigo: string;
|
|
165
|
+
Cantidad: number;
|
|
166
|
+
}
|
|
167
|
+
interface MatUtilizadosType$2 {
|
|
168
|
+
Codigo: string;
|
|
169
|
+
Cantidad: number;
|
|
170
|
+
}
|
|
171
|
+
interface MoUoType$2 {
|
|
172
|
+
LineaCodigoCub: string;
|
|
173
|
+
Cantidad: number;
|
|
174
|
+
CantidadUO: number;
|
|
175
|
+
}
|
|
176
|
+
interface TrabajoType$2 {
|
|
177
|
+
ID_Trabajo: number;
|
|
178
|
+
Ultima_PreLiquidacion: PreLiquidacionType$2;
|
|
179
|
+
}
|
|
180
|
+
interface PreLiquidacionType$2 {
|
|
181
|
+
Valorizacion: ValorizacionType$2[];
|
|
182
|
+
}
|
|
183
|
+
interface ValorizacionType$2 {
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
interface IResultadoValidacionMOHijas {
|
|
187
|
+
CodigoMOMadre: string;
|
|
188
|
+
CodigoMOHija: string;
|
|
189
|
+
TotalMadreUsado: number;
|
|
190
|
+
TotalHijaUsado: number;
|
|
191
|
+
DiferenciaExcedida: number;
|
|
192
|
+
LineasMadre: ILineaValidacion[];
|
|
193
|
+
LineasHija: ILineaValidacion[];
|
|
194
|
+
}
|
|
195
|
+
interface ILineaValidacion {
|
|
196
|
+
LineaCodigoCub: string;
|
|
197
|
+
Codigo: string;
|
|
198
|
+
Descripcion: string;
|
|
199
|
+
CantidadUsado: number;
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Valida que el total preliquidado de MO hijas no supere al de sus MO madres.
|
|
203
|
+
*
|
|
204
|
+
* @param moUo — Suma de TODAS las valorizaciones de TODOS los trabajos de la obra
|
|
205
|
+
* (viene de CalcularResumenValorizacionesAlemania).
|
|
206
|
+
* Ya excluye INACTIVAS y certificaciones con Mes != 0.
|
|
207
|
+
* @param manoObraDB — Solo se usa como diccionario LineaCodigoCub → Codigo.
|
|
208
|
+
* NO se usa para cantidades.
|
|
209
|
+
*/
|
|
210
|
+
declare function ValidarRelacionMOHijasAL04(moUo: MoUoType$2[], manoObraDB: any): IResultadoValidacionMOHijas[];
|
|
211
|
+
declare function FormatearErrorValidacionMOHijas(violaciones: IResultadoValidacionMOHijas[]): string | null;
|
|
212
|
+
|
|
138
213
|
declare const codMOTroncalAL02OC: never[];
|
|
139
214
|
declare const codMOTroncalAL02Soplado: never[];
|
|
140
215
|
declare const codMOTroncalAL02Asfaltado: never[];
|
|
@@ -267,54 +342,6 @@ interface IDocumentacion {
|
|
|
267
342
|
}
|
|
268
343
|
declare const UpdateNodosDocDP: <T extends IDocumentacion>({ documentacion, obra, trabajo }: params$1<T>) => T;
|
|
269
344
|
|
|
270
|
-
declare const CalcularResumenValorizacionesAlemania: Funcion$5;
|
|
271
|
-
interface Funcion$5 {
|
|
272
|
-
(trabajo: TrabajoType$2, trabajos: any[]): ResumenLiquidacionesType;
|
|
273
|
-
}
|
|
274
|
-
interface ResumenLiquidacionesType {
|
|
275
|
-
MoUo: MoUoType$2[];
|
|
276
|
-
MatUtilizados: MatUtilizadosType$2[];
|
|
277
|
-
MatRetirados: MatRetiradosType[];
|
|
278
|
-
MatStockPersonal: MatStockPersonalType$2[];
|
|
279
|
-
MatStockAlmacen: MatStockAlmacenType[];
|
|
280
|
-
}
|
|
281
|
-
interface MatStockPersonalType$2 {
|
|
282
|
-
ID_Trabajo: number;
|
|
283
|
-
Identificacion: string;
|
|
284
|
-
Codigo: string;
|
|
285
|
-
CodigoLlave: string;
|
|
286
|
-
Cantidad: number;
|
|
287
|
-
}
|
|
288
|
-
interface MatStockAlmacenType {
|
|
289
|
-
ID_Trabajo: number;
|
|
290
|
-
CodigoLlave: string;
|
|
291
|
-
Codigo: string;
|
|
292
|
-
Cantidad: number;
|
|
293
|
-
Empresa: string;
|
|
294
|
-
}
|
|
295
|
-
interface MatRetiradosType {
|
|
296
|
-
Codigo: string;
|
|
297
|
-
Cantidad: number;
|
|
298
|
-
}
|
|
299
|
-
interface MatUtilizadosType$2 {
|
|
300
|
-
Codigo: string;
|
|
301
|
-
Cantidad: number;
|
|
302
|
-
}
|
|
303
|
-
interface MoUoType$2 {
|
|
304
|
-
LineaCodigoCub: string;
|
|
305
|
-
Cantidad: number;
|
|
306
|
-
CantidadUO: number;
|
|
307
|
-
}
|
|
308
|
-
interface TrabajoType$2 {
|
|
309
|
-
ID_Trabajo: number;
|
|
310
|
-
Ultima_PreLiquidacion: PreLiquidacionType$2;
|
|
311
|
-
}
|
|
312
|
-
interface PreLiquidacionType$2 {
|
|
313
|
-
Valorizacion: ValorizacionType$2[];
|
|
314
|
-
}
|
|
315
|
-
interface ValorizacionType$2 {
|
|
316
|
-
}
|
|
317
|
-
|
|
318
345
|
declare const ActualizarDataResumenValorizacionesAlemania: Funcion$4;
|
|
319
346
|
interface Funcion$4 {
|
|
320
347
|
(ManoObra: any, Reserva: any, StockPersonal: any[], ResumenPreLiquidado: ResumenLiquidacionesType): void;
|
|
@@ -822,4 +849,4 @@ declare const buildMenu: (data: SystemOptionEntity[], t: TranslateFn) => MenuDto
|
|
|
822
849
|
|
|
823
850
|
declare function validateUUIDv4Param(BadRequestException: ClassConstructor<Error>, req: Request<any>, _res: Response, next: NextFunction): Promise<void>;
|
|
824
851
|
|
|
825
|
-
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, GemeindeChangeNomenclatura, GetCodigoFechaActual, type IDPContrato, type IDocumentacion, type IMOAndMaterialsRules, type IMORules, type IMateriales, 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, 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, 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 };
|
|
852
|
+
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, 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 };
|
package/dist/index.js
CHANGED
|
@@ -47,6 +47,7 @@ __export(index_exports, {
|
|
|
47
47
|
CurrencyFormat: () => CurrencyFormat,
|
|
48
48
|
DocumentacionReplanteo: () => DocumentacionReplanteo,
|
|
49
49
|
EstadoEspecialidad9612: () => EstadoEspecialidad9612,
|
|
50
|
+
FormatearErrorValidacionMOHijas: () => FormatearErrorValidacionMOHijas,
|
|
50
51
|
GemeindeChangeNomenclatura: () => GemeindeChangeNomenclatura,
|
|
51
52
|
GetCodigoFechaActual: () => GetCodigoFechaActual,
|
|
52
53
|
MOCantidadNVT01: () => MOCantidadNVT01,
|
|
@@ -61,6 +62,7 @@ __export(index_exports, {
|
|
|
61
62
|
ObtenerZonaAsignada: () => ObtenerZonaAsignada,
|
|
62
63
|
SEGMENT_TY: () => SEGMENT_TY,
|
|
63
64
|
UpdateNodosDocDP: () => UpdateNodosDocDP,
|
|
65
|
+
ValidarRelacionMOHijasAL04: () => ValidarRelacionMOHijasAL04,
|
|
64
66
|
ValorizacionHelper: () => ValorizacionHelper,
|
|
65
67
|
builSystemOption: () => builSystemOption,
|
|
66
68
|
buildDataMOFromMaterialRules: () => buildDataMOFromMaterialRules,
|
|
@@ -457,7 +459,18 @@ var codMOTroncalAL04Soplado = [
|
|
|
457
459
|
"MS01"
|
|
458
460
|
];
|
|
459
461
|
var codMOTroncalAL04Asfaltado = [
|
|
460
|
-
"AP02"
|
|
462
|
+
"AP02",
|
|
463
|
+
//#region Cambios solicitados por Arturo (Josué Laameme) 15-07-2025
|
|
464
|
+
// Asunto: Creación baremos ExtraWide Asphalt AL04
|
|
465
|
+
// 7 nuevos baremos para zanjas extra anchas — el técnico los agrega manualmente en terreno.
|
|
466
|
+
// Precios: Gercotronic(DE351502120)=89.54€ todos los gemeindes | Consol(DE367038931)=71-99€ solo Cochem
|
|
467
|
+
"AP02_61/70",
|
|
468
|
+
"AP02_71/80",
|
|
469
|
+
"AP02_81/90",
|
|
470
|
+
"AP02_91/100",
|
|
471
|
+
"AP02_101/110",
|
|
472
|
+
"AP02_111/120",
|
|
473
|
+
"AP02_121"
|
|
461
474
|
];
|
|
462
475
|
var codMOTroncalAL04Issue = [
|
|
463
476
|
"EXTRA05"
|
|
@@ -3775,7 +3788,7 @@ var switchTipo = {
|
|
|
3775
3788
|
function obtenerTipoYCodigoMO(codigoOriginal) {
|
|
3776
3789
|
let CodigoMO = codigoOriginal;
|
|
3777
3790
|
let TipoMO = null;
|
|
3778
|
-
if (
|
|
3791
|
+
if (/^[FT]\d+_/.test(CodigoMO)) {
|
|
3779
3792
|
const letraTipo = CodigoMO.split("_")[0].slice(0, 1);
|
|
3780
3793
|
TipoMO = switchTipo[letraTipo];
|
|
3781
3794
|
if (!TipoMO) {
|
|
@@ -4022,6 +4035,75 @@ function buildReservaMOJobMajorProjectsAlemaniaAL04(dataMOG, priceContractorMOPr
|
|
|
4022
4035
|
}
|
|
4023
4036
|
__name(buildReservaMOJobMajorProjectsAlemaniaAL04, "buildReservaMOJobMajorProjectsAlemaniaAL04");
|
|
4024
4037
|
|
|
4038
|
+
// src/Programados/Alemania/AL04/ValidarRelacionMOHijasAL04.ts
|
|
4039
|
+
function ValidarRelacionMOHijasAL04(moUo, manoObraDB) {
|
|
4040
|
+
const violaciones = [];
|
|
4041
|
+
if (!manoObraDB?.Valorizacion || !Array.isArray(manoObraDB.Valorizacion)) {
|
|
4042
|
+
return violaciones;
|
|
4043
|
+
}
|
|
4044
|
+
const mapaLineaACodigo = /* @__PURE__ */ new Map();
|
|
4045
|
+
for (const val of manoObraDB.Valorizacion) {
|
|
4046
|
+
const lcc = val.DetalleChile?.LineaCodigoCub;
|
|
4047
|
+
if (lcc) mapaLineaACodigo.set(lcc, {
|
|
4048
|
+
codigo: val.Codigo,
|
|
4049
|
+
descripcion: val.Descripcion || ""
|
|
4050
|
+
});
|
|
4051
|
+
}
|
|
4052
|
+
for (const regla of MOHijasAL04) {
|
|
4053
|
+
const { CodigoMOMadre, CodigoMOHija } = regla;
|
|
4054
|
+
let totalMadre = 0;
|
|
4055
|
+
const detalleMadre = [];
|
|
4056
|
+
let totalHija = 0;
|
|
4057
|
+
const detalleHija = [];
|
|
4058
|
+
for (const item of moUo) {
|
|
4059
|
+
const info = mapaLineaACodigo.get(item.LineaCodigoCub);
|
|
4060
|
+
if (!info) continue;
|
|
4061
|
+
if (info.codigo === CodigoMOMadre) {
|
|
4062
|
+
totalMadre += item.Cantidad;
|
|
4063
|
+
detalleMadre.push({
|
|
4064
|
+
LineaCodigoCub: item.LineaCodigoCub,
|
|
4065
|
+
Codigo: info.codigo,
|
|
4066
|
+
Descripcion: info.descripcion,
|
|
4067
|
+
CantidadUsado: item.Cantidad
|
|
4068
|
+
});
|
|
4069
|
+
}
|
|
4070
|
+
if (info.codigo === CodigoMOHija) {
|
|
4071
|
+
totalHija += item.Cantidad;
|
|
4072
|
+
detalleHija.push({
|
|
4073
|
+
LineaCodigoCub: item.LineaCodigoCub,
|
|
4074
|
+
Codigo: info.codigo,
|
|
4075
|
+
Descripcion: info.descripcion,
|
|
4076
|
+
CantidadUsado: item.Cantidad
|
|
4077
|
+
});
|
|
4078
|
+
}
|
|
4079
|
+
}
|
|
4080
|
+
if (totalHija > totalMadre) {
|
|
4081
|
+
violaciones.push({
|
|
4082
|
+
CodigoMOMadre,
|
|
4083
|
+
CodigoMOHija,
|
|
4084
|
+
TotalMadreUsado: totalMadre,
|
|
4085
|
+
TotalHijaUsado: totalHija,
|
|
4086
|
+
DiferenciaExcedida: totalHija - totalMadre,
|
|
4087
|
+
LineasMadre: detalleMadre,
|
|
4088
|
+
LineasHija: detalleHija
|
|
4089
|
+
});
|
|
4090
|
+
}
|
|
4091
|
+
}
|
|
4092
|
+
return violaciones;
|
|
4093
|
+
}
|
|
4094
|
+
__name(ValidarRelacionMOHijasAL04, "ValidarRelacionMOHijasAL04");
|
|
4095
|
+
function FormatearErrorValidacionMOHijas(violaciones) {
|
|
4096
|
+
if (!violaciones.length) return null;
|
|
4097
|
+
return violaciones.map((v) => {
|
|
4098
|
+
const descMadre = v.LineasMadre[0]?.Descripcion || v.CodigoMOMadre;
|
|
4099
|
+
const descHija = v.LineasHija[0]?.Descripcion || v.CodigoMOHija;
|
|
4100
|
+
return `No se puede preliquidar porque la cantidad total de ${descHija} (${v.CodigoMOHija}: ${v.TotalHijaUsado.toFixed(2)}) supera la cantidad de ${descMadre} (${v.CodigoMOMadre}: ${v.TotalMadreUsado.toFixed(2)}) preliquidada en esta obra.
|
|
4101
|
+
Excedente: ${v.DiferenciaExcedida.toFixed(2)}.
|
|
4102
|
+
Debe preliquidar primero al menos ${v.DiferenciaExcedida.toFixed(2)} de ${v.CodigoMOMadre} antes de agregar m\xE1s ${v.CodigoMOHija}.`;
|
|
4103
|
+
}).join("\n\n");
|
|
4104
|
+
}
|
|
4105
|
+
__name(FormatearErrorValidacionMOHijas, "FormatearErrorValidacionMOHijas");
|
|
4106
|
+
|
|
4025
4107
|
// src/Programados/Alemania/codMOTroncal_ReglaLiquidacion1.ts
|
|
4026
4108
|
var codMOTroncal_ReglaLiquidacion1 = [
|
|
4027
4109
|
"011304100",
|
|
@@ -4129,19 +4211,7 @@ var codMOTroncal_ReglaLiquidacion1 = [
|
|
|
4129
4211
|
"T54",
|
|
4130
4212
|
//#endregion Cambios solicitados por arturo 14-10-2025 Ticket (73900)
|
|
4131
4213
|
//#region Cambios solicitados por arturo 14-10-2025 Ticket (74007)
|
|
4132
|
-
"T55"
|
|
4133
|
-
//#endregion Cambios solicitados por arturo 14-10-2025 Ticket (74007)
|
|
4134
|
-
//#region Cambios solicitados por Arturo (Josué Laameme) 15-07-2025
|
|
4135
|
-
// Asunto: Creación baremos ExtraWide Asphalt AL04
|
|
4136
|
-
// 7 nuevos baremos para zanjas extra anchas — el técnico los agrega manualmente en terreno.
|
|
4137
|
-
// Precios: Gercotronic(DE351502120)=89.54€ todos los gemeindes | Consol(DE367038931)=71-99€ solo Cochem
|
|
4138
|
-
"AP02_61/70",
|
|
4139
|
-
"AP02_71/80",
|
|
4140
|
-
"AP02_81/90",
|
|
4141
|
-
"AP02_91/100",
|
|
4142
|
-
"AP02_101/110",
|
|
4143
|
-
"AP02_111/120",
|
|
4144
|
-
"AP02_121"
|
|
4214
|
+
"T55"
|
|
4145
4215
|
];
|
|
4146
4216
|
var codMOClientes_ReglaLiquidacion1 = [
|
|
4147
4217
|
"073106600",
|
|
@@ -17004,6 +17074,7 @@ __name(validateUUIDv4Param, "validateUUIDv4Param");
|
|
|
17004
17074
|
CurrencyFormat,
|
|
17005
17075
|
DocumentacionReplanteo,
|
|
17006
17076
|
EstadoEspecialidad9612,
|
|
17077
|
+
FormatearErrorValidacionMOHijas,
|
|
17007
17078
|
GemeindeChangeNomenclatura,
|
|
17008
17079
|
GetCodigoFechaActual,
|
|
17009
17080
|
MOCantidadNVT01,
|
|
@@ -17018,6 +17089,7 @@ __name(validateUUIDv4Param, "validateUUIDv4Param");
|
|
|
17018
17089
|
ObtenerZonaAsignada,
|
|
17019
17090
|
SEGMENT_TY,
|
|
17020
17091
|
UpdateNodosDocDP,
|
|
17092
|
+
ValidarRelacionMOHijasAL04,
|
|
17021
17093
|
ValorizacionHelper,
|
|
17022
17094
|
builSystemOption,
|
|
17023
17095
|
buildDataMOFromMaterialRules,
|
package/dist/index.mjs
CHANGED
|
@@ -288,7 +288,18 @@ var codMOTroncalAL04Soplado = [
|
|
|
288
288
|
"MS01"
|
|
289
289
|
];
|
|
290
290
|
var codMOTroncalAL04Asfaltado = [
|
|
291
|
-
"AP02"
|
|
291
|
+
"AP02",
|
|
292
|
+
//#region Cambios solicitados por Arturo (Josué Laameme) 15-07-2025
|
|
293
|
+
// Asunto: Creación baremos ExtraWide Asphalt AL04
|
|
294
|
+
// 7 nuevos baremos para zanjas extra anchas — el técnico los agrega manualmente en terreno.
|
|
295
|
+
// Precios: Gercotronic(DE351502120)=89.54€ todos los gemeindes | Consol(DE367038931)=71-99€ solo Cochem
|
|
296
|
+
"AP02_61/70",
|
|
297
|
+
"AP02_71/80",
|
|
298
|
+
"AP02_81/90",
|
|
299
|
+
"AP02_91/100",
|
|
300
|
+
"AP02_101/110",
|
|
301
|
+
"AP02_111/120",
|
|
302
|
+
"AP02_121"
|
|
292
303
|
];
|
|
293
304
|
var codMOTroncalAL04Issue = [
|
|
294
305
|
"EXTRA05"
|
|
@@ -3606,7 +3617,7 @@ var switchTipo = {
|
|
|
3606
3617
|
function obtenerTipoYCodigoMO(codigoOriginal) {
|
|
3607
3618
|
let CodigoMO = codigoOriginal;
|
|
3608
3619
|
let TipoMO = null;
|
|
3609
|
-
if (
|
|
3620
|
+
if (/^[FT]\d+_/.test(CodigoMO)) {
|
|
3610
3621
|
const letraTipo = CodigoMO.split("_")[0].slice(0, 1);
|
|
3611
3622
|
TipoMO = switchTipo[letraTipo];
|
|
3612
3623
|
if (!TipoMO) {
|
|
@@ -3853,6 +3864,75 @@ function buildReservaMOJobMajorProjectsAlemaniaAL04(dataMOG, priceContractorMOPr
|
|
|
3853
3864
|
}
|
|
3854
3865
|
__name(buildReservaMOJobMajorProjectsAlemaniaAL04, "buildReservaMOJobMajorProjectsAlemaniaAL04");
|
|
3855
3866
|
|
|
3867
|
+
// src/Programados/Alemania/AL04/ValidarRelacionMOHijasAL04.ts
|
|
3868
|
+
function ValidarRelacionMOHijasAL04(moUo, manoObraDB) {
|
|
3869
|
+
const violaciones = [];
|
|
3870
|
+
if (!manoObraDB?.Valorizacion || !Array.isArray(manoObraDB.Valorizacion)) {
|
|
3871
|
+
return violaciones;
|
|
3872
|
+
}
|
|
3873
|
+
const mapaLineaACodigo = /* @__PURE__ */ new Map();
|
|
3874
|
+
for (const val of manoObraDB.Valorizacion) {
|
|
3875
|
+
const lcc = val.DetalleChile?.LineaCodigoCub;
|
|
3876
|
+
if (lcc) mapaLineaACodigo.set(lcc, {
|
|
3877
|
+
codigo: val.Codigo,
|
|
3878
|
+
descripcion: val.Descripcion || ""
|
|
3879
|
+
});
|
|
3880
|
+
}
|
|
3881
|
+
for (const regla of MOHijasAL04) {
|
|
3882
|
+
const { CodigoMOMadre, CodigoMOHija } = regla;
|
|
3883
|
+
let totalMadre = 0;
|
|
3884
|
+
const detalleMadre = [];
|
|
3885
|
+
let totalHija = 0;
|
|
3886
|
+
const detalleHija = [];
|
|
3887
|
+
for (const item of moUo) {
|
|
3888
|
+
const info = mapaLineaACodigo.get(item.LineaCodigoCub);
|
|
3889
|
+
if (!info) continue;
|
|
3890
|
+
if (info.codigo === CodigoMOMadre) {
|
|
3891
|
+
totalMadre += item.Cantidad;
|
|
3892
|
+
detalleMadre.push({
|
|
3893
|
+
LineaCodigoCub: item.LineaCodigoCub,
|
|
3894
|
+
Codigo: info.codigo,
|
|
3895
|
+
Descripcion: info.descripcion,
|
|
3896
|
+
CantidadUsado: item.Cantidad
|
|
3897
|
+
});
|
|
3898
|
+
}
|
|
3899
|
+
if (info.codigo === CodigoMOHija) {
|
|
3900
|
+
totalHija += item.Cantidad;
|
|
3901
|
+
detalleHija.push({
|
|
3902
|
+
LineaCodigoCub: item.LineaCodigoCub,
|
|
3903
|
+
Codigo: info.codigo,
|
|
3904
|
+
Descripcion: info.descripcion,
|
|
3905
|
+
CantidadUsado: item.Cantidad
|
|
3906
|
+
});
|
|
3907
|
+
}
|
|
3908
|
+
}
|
|
3909
|
+
if (totalHija > totalMadre) {
|
|
3910
|
+
violaciones.push({
|
|
3911
|
+
CodigoMOMadre,
|
|
3912
|
+
CodigoMOHija,
|
|
3913
|
+
TotalMadreUsado: totalMadre,
|
|
3914
|
+
TotalHijaUsado: totalHija,
|
|
3915
|
+
DiferenciaExcedida: totalHija - totalMadre,
|
|
3916
|
+
LineasMadre: detalleMadre,
|
|
3917
|
+
LineasHija: detalleHija
|
|
3918
|
+
});
|
|
3919
|
+
}
|
|
3920
|
+
}
|
|
3921
|
+
return violaciones;
|
|
3922
|
+
}
|
|
3923
|
+
__name(ValidarRelacionMOHijasAL04, "ValidarRelacionMOHijasAL04");
|
|
3924
|
+
function FormatearErrorValidacionMOHijas(violaciones) {
|
|
3925
|
+
if (!violaciones.length) return null;
|
|
3926
|
+
return violaciones.map((v) => {
|
|
3927
|
+
const descMadre = v.LineasMadre[0]?.Descripcion || v.CodigoMOMadre;
|
|
3928
|
+
const descHija = v.LineasHija[0]?.Descripcion || v.CodigoMOHija;
|
|
3929
|
+
return `No se puede preliquidar porque la cantidad total de ${descHija} (${v.CodigoMOHija}: ${v.TotalHijaUsado.toFixed(2)}) supera la cantidad de ${descMadre} (${v.CodigoMOMadre}: ${v.TotalMadreUsado.toFixed(2)}) preliquidada en esta obra.
|
|
3930
|
+
Excedente: ${v.DiferenciaExcedida.toFixed(2)}.
|
|
3931
|
+
Debe preliquidar primero al menos ${v.DiferenciaExcedida.toFixed(2)} de ${v.CodigoMOMadre} antes de agregar m\xE1s ${v.CodigoMOHija}.`;
|
|
3932
|
+
}).join("\n\n");
|
|
3933
|
+
}
|
|
3934
|
+
__name(FormatearErrorValidacionMOHijas, "FormatearErrorValidacionMOHijas");
|
|
3935
|
+
|
|
3856
3936
|
// src/Programados/Alemania/codMOTroncal_ReglaLiquidacion1.ts
|
|
3857
3937
|
var codMOTroncal_ReglaLiquidacion1 = [
|
|
3858
3938
|
"011304100",
|
|
@@ -3960,19 +4040,7 @@ var codMOTroncal_ReglaLiquidacion1 = [
|
|
|
3960
4040
|
"T54",
|
|
3961
4041
|
//#endregion Cambios solicitados por arturo 14-10-2025 Ticket (73900)
|
|
3962
4042
|
//#region Cambios solicitados por arturo 14-10-2025 Ticket (74007)
|
|
3963
|
-
"T55"
|
|
3964
|
-
//#endregion Cambios solicitados por arturo 14-10-2025 Ticket (74007)
|
|
3965
|
-
//#region Cambios solicitados por Arturo (Josué Laameme) 15-07-2025
|
|
3966
|
-
// Asunto: Creación baremos ExtraWide Asphalt AL04
|
|
3967
|
-
// 7 nuevos baremos para zanjas extra anchas — el técnico los agrega manualmente en terreno.
|
|
3968
|
-
// Precios: Gercotronic(DE351502120)=89.54€ todos los gemeindes | Consol(DE367038931)=71-99€ solo Cochem
|
|
3969
|
-
"AP02_61/70",
|
|
3970
|
-
"AP02_71/80",
|
|
3971
|
-
"AP02_81/90",
|
|
3972
|
-
"AP02_91/100",
|
|
3973
|
-
"AP02_101/110",
|
|
3974
|
-
"AP02_111/120",
|
|
3975
|
-
"AP02_121"
|
|
4043
|
+
"T55"
|
|
3976
4044
|
];
|
|
3977
4045
|
var codMOClientes_ReglaLiquidacion1 = [
|
|
3978
4046
|
"073106600",
|
|
@@ -16834,6 +16902,7 @@ export {
|
|
|
16834
16902
|
CurrencyFormat,
|
|
16835
16903
|
DocumentacionReplanteo,
|
|
16836
16904
|
EstadoEspecialidad9612,
|
|
16905
|
+
FormatearErrorValidacionMOHijas,
|
|
16837
16906
|
GemeindeChangeNomenclatura,
|
|
16838
16907
|
GetCodigoFechaActual,
|
|
16839
16908
|
MOCantidadNVT01,
|
|
@@ -16848,6 +16917,7 @@ export {
|
|
|
16848
16917
|
ObtenerZonaAsignada,
|
|
16849
16918
|
SEGMENT_TY,
|
|
16850
16919
|
UpdateNodosDocDP,
|
|
16920
|
+
ValidarRelacionMOHijasAL04,
|
|
16851
16921
|
ValorizacionHelper,
|
|
16852
16922
|
builSystemOption,
|
|
16853
16923
|
buildDataMOFromMaterialRules,
|