using System; using System.Collections.Generic; using System.Linq; namespace GestionIntegral.Api.Dtos.Reportes.ViewModels { public class DistribucionCanillasViewModel { // --- Datos de entrada --- public IEnumerable Canillas { get; set; } = new List(); public IEnumerable CanillasAccionistas { get; set; } = new List(); public IEnumerable CanillasTodos { get; set; } = new List(); public IEnumerable CanillasLiquidadasOtraFecha { get; set; } = new List(); public IEnumerable CanillasAccionistasLiquidadasOtraFecha { get; set; } = new List(); public IEnumerable ControlDevolucionesDetalle { get; set; } = new List(); public int RemitoIngresado { get; set; } // --- ParĂ¡metros del reporte --- public string Empresa { get; set; } = string.Empty; public string FechaConsultada { get; set; } = string.Empty; public string FechaReporte { get; set; } = DateTime.Now.ToString("dd/MM/yyyy"); // Propiedades calculadas para el resumen final public int VentaTotal => (ControlDevolucionesDetalle?.Sum(d => d.Llevados) ?? 0) - (ControlDevolucionesDetalle?.Sum(d => d.Devueltos) ?? 0); public int DevolucionTotal => RemitoIngresado - VentaTotal; } }