/** * PresupuestoService - Gestión de Presupuestos de Obra * * Gestiona presupuestos de obra con sus partidas. * Soporta versionamiento y aprobación. * * @module Budgets */ import { Repository } from 'typeorm'; import { BaseService, ServiceContext, PaginatedResult } from '../../../shared/services/base.service'; import { Presupuesto } from '../entities/presupuesto.entity'; import { PresupuestoPartida } from '../entities/presupuesto-partida.entity'; export interface CreatePresupuestoDto { code: string; name: string; description?: string; fraccionamientoId?: string; prototipoId?: string; currencyId?: string; } export interface AddPartidaDto { conceptoId: string; quantity: number; unitPrice: number; sequence?: number; } export interface UpdatePartidaDto { quantity?: number; unitPrice?: number; sequence?: number; } export declare class PresupuestoService extends BaseService { private readonly partidaRepository; constructor(repository: Repository, partidaRepository: Repository); /** * Crear nuevo presupuesto */ createPresupuesto(ctx: ServiceContext, data: CreatePresupuestoDto): Promise; /** * Obtener presupuestos por fraccionamiento */ findByFraccionamiento(ctx: ServiceContext, fraccionamientoId: string, page?: number, limit?: number): Promise>; /** * Obtener presupuesto con sus partidas */ findWithPartidas(ctx: ServiceContext, id: string): Promise; /** * Agregar partida al presupuesto */ addPartida(ctx: ServiceContext, presupuestoId: string, data: AddPartidaDto): Promise; /** * Actualizar partida */ updatePartida(ctx: ServiceContext, partidaId: string, data: UpdatePartidaDto): Promise; /** * Eliminar partida */ removePartida(ctx: ServiceContext, partidaId: string): Promise; /** * Recalcular total del presupuesto */ recalculateTotal(ctx: ServiceContext, presupuestoId: string): Promise; /** * Crear nueva versión del presupuesto */ createNewVersion(ctx: ServiceContext, presupuestoId: string): Promise; /** * Aprobar presupuesto */ approve(ctx: ServiceContext, presupuestoId: string): Promise; } //# sourceMappingURL=presupuesto.service.d.ts.map