sigo-package 1.2.155 → 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 +74 -1
- package/dist/index.mjs +72 -1
- 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,
|
|
@@ -3786,7 +3788,7 @@ var switchTipo = {
|
|
|
3786
3788
|
function obtenerTipoYCodigoMO(codigoOriginal) {
|
|
3787
3789
|
let CodigoMO = codigoOriginal;
|
|
3788
3790
|
let TipoMO = null;
|
|
3789
|
-
if (
|
|
3791
|
+
if (/^[FT]\d+_/.test(CodigoMO)) {
|
|
3790
3792
|
const letraTipo = CodigoMO.split("_")[0].slice(0, 1);
|
|
3791
3793
|
TipoMO = switchTipo[letraTipo];
|
|
3792
3794
|
if (!TipoMO) {
|
|
@@ -4033,6 +4035,75 @@ function buildReservaMOJobMajorProjectsAlemaniaAL04(dataMOG, priceContractorMOPr
|
|
|
4033
4035
|
}
|
|
4034
4036
|
__name(buildReservaMOJobMajorProjectsAlemaniaAL04, "buildReservaMOJobMajorProjectsAlemaniaAL04");
|
|
4035
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
|
+
|
|
4036
4107
|
// src/Programados/Alemania/codMOTroncal_ReglaLiquidacion1.ts
|
|
4037
4108
|
var codMOTroncal_ReglaLiquidacion1 = [
|
|
4038
4109
|
"011304100",
|
|
@@ -17003,6 +17074,7 @@ __name(validateUUIDv4Param, "validateUUIDv4Param");
|
|
|
17003
17074
|
CurrencyFormat,
|
|
17004
17075
|
DocumentacionReplanteo,
|
|
17005
17076
|
EstadoEspecialidad9612,
|
|
17077
|
+
FormatearErrorValidacionMOHijas,
|
|
17006
17078
|
GemeindeChangeNomenclatura,
|
|
17007
17079
|
GetCodigoFechaActual,
|
|
17008
17080
|
MOCantidadNVT01,
|
|
@@ -17017,6 +17089,7 @@ __name(validateUUIDv4Param, "validateUUIDv4Param");
|
|
|
17017
17089
|
ObtenerZonaAsignada,
|
|
17018
17090
|
SEGMENT_TY,
|
|
17019
17091
|
UpdateNodosDocDP,
|
|
17092
|
+
ValidarRelacionMOHijasAL04,
|
|
17020
17093
|
ValorizacionHelper,
|
|
17021
17094
|
builSystemOption,
|
|
17022
17095
|
buildDataMOFromMaterialRules,
|
package/dist/index.mjs
CHANGED
|
@@ -3617,7 +3617,7 @@ var switchTipo = {
|
|
|
3617
3617
|
function obtenerTipoYCodigoMO(codigoOriginal) {
|
|
3618
3618
|
let CodigoMO = codigoOriginal;
|
|
3619
3619
|
let TipoMO = null;
|
|
3620
|
-
if (
|
|
3620
|
+
if (/^[FT]\d+_/.test(CodigoMO)) {
|
|
3621
3621
|
const letraTipo = CodigoMO.split("_")[0].slice(0, 1);
|
|
3622
3622
|
TipoMO = switchTipo[letraTipo];
|
|
3623
3623
|
if (!TipoMO) {
|
|
@@ -3864,6 +3864,75 @@ function buildReservaMOJobMajorProjectsAlemaniaAL04(dataMOG, priceContractorMOPr
|
|
|
3864
3864
|
}
|
|
3865
3865
|
__name(buildReservaMOJobMajorProjectsAlemaniaAL04, "buildReservaMOJobMajorProjectsAlemaniaAL04");
|
|
3866
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
|
+
|
|
3867
3936
|
// src/Programados/Alemania/codMOTroncal_ReglaLiquidacion1.ts
|
|
3868
3937
|
var codMOTroncal_ReglaLiquidacion1 = [
|
|
3869
3938
|
"011304100",
|
|
@@ -16833,6 +16902,7 @@ export {
|
|
|
16833
16902
|
CurrencyFormat,
|
|
16834
16903
|
DocumentacionReplanteo,
|
|
16835
16904
|
EstadoEspecialidad9612,
|
|
16905
|
+
FormatearErrorValidacionMOHijas,
|
|
16836
16906
|
GemeindeChangeNomenclatura,
|
|
16837
16907
|
GetCodigoFechaActual,
|
|
16838
16908
|
MOCantidadNVT01,
|
|
@@ -16847,6 +16917,7 @@ export {
|
|
|
16847
16917
|
ObtenerZonaAsignada,
|
|
16848
16918
|
SEGMENT_TY,
|
|
16849
16919
|
UpdateNodosDocDP,
|
|
16920
|
+
ValidarRelacionMOHijasAL04,
|
|
16850
16921
|
ValorizacionHelper,
|
|
16851
16922
|
builSystemOption,
|
|
16852
16923
|
buildDataMOFromMaterialRules,
|