18 lines
		
	
	
		
			810 B
		
	
	
	
		
			C#
		
	
	
	
	
	
		
		
			
		
	
	
			18 lines
		
	
	
		
			810 B
		
	
	
	
		
			C#
		
	
	
	
	
	
|  | namespace GestionIntegral.Api.Dtos.Reportes.ViewModels | ||
|  | { | ||
|  |     // Esta clase anidada representará los datos de una empresa | ||
|  |     public class DatosEmpresaViewModel | ||
|  |     { | ||
|  |         public string NombreEmpresa { get; set; } = string.Empty; | ||
|  |         public IEnumerable<FacturasParaReporteDto> Facturas { get; set; } = new List<FacturasParaReporteDto>(); | ||
|  |         public decimal TotalEmpresa => Facturas.Sum(f => f.ImporteFinal); | ||
|  |     } | ||
|  | 
 | ||
|  |     public class FacturasPublicidadViewModel | ||
|  |     { | ||
|  |         public IEnumerable<DatosEmpresaViewModel> DatosPorEmpresa { get; set; } = new List<DatosEmpresaViewModel>(); | ||
|  |         public string Periodo { get; set; } = string.Empty; | ||
|  |         public string FechaGeneracion { get; set; } = string.Empty; | ||
|  |         public decimal TotalGeneral => DatosPorEmpresa.Sum(e => e.TotalEmpresa); | ||
|  |     } | ||
|  | } |