27 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
		
		
			
		
	
	
			27 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
|  | using System; | ||
|  | using System.Collections.Generic; | ||
|  | using System.Linq; | ||
|  | 
 | ||
|  | namespace GestionIntegral.Api.Dtos.Reportes.ViewModels | ||
|  | { | ||
|  |     public class DistribucionCanillasViewModel | ||
|  |     { | ||
|  |         // --- Datos de entrada --- | ||
|  |         public IEnumerable<DetalleDistribucionCanillaDto> Canillas { get; set; } = new List<DetalleDistribucionCanillaDto>(); | ||
|  |         public IEnumerable<DetalleDistribucionCanillaDto> CanillasAccionistas { get; set; } = new List<DetalleDistribucionCanillaDto>(); | ||
|  |         public IEnumerable<DetalleDistribucionCanillaAllDto> CanillasTodos { get; set; } = new List<DetalleDistribucionCanillaAllDto>(); | ||
|  |         public IEnumerable<DetalleDistribucionCanillaDto> CanillasLiquidadasOtraFecha { get; set; } = new List<DetalleDistribucionCanillaDto>(); | ||
|  |         public IEnumerable<DetalleDistribucionCanillaDto> CanillasAccionistasLiquidadasOtraFecha { get; set; } = new List<DetalleDistribucionCanillaDto>(); | ||
|  |         public IEnumerable<ControlDevolucionesReporteDto> ControlDevolucionesDetalle { get; set; } = new List<ControlDevolucionesReporteDto>(); | ||
|  |         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; | ||
|  |     } | ||
|  | } |