cambios 17/02/2026

This commit is contained in:
2026-02-17 13:47:52 +01:00
parent 79ae74ee26
commit 28e20494ae
51 changed files with 3199 additions and 691 deletions

View File

@@ -0,0 +1,46 @@
using bdGrupoSanchoToro.db;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Text.Json.Serialization;
using System.Threading.Tasks;
namespace bdGrupoSanchoToro.extensiones
{
public class DesglosePorEmpresa
{
public int Empresa { get; set; }
public double TotalUnidades { get; set; }
public double UnidadesInicialesOFabricadas { get; set; }
public double UnidadesCompradas { get; set; }
public double UnidadesAlquiladas { get; set; }
public double UnidadesAveriadas { get; set; }
public double UnidadesVendidas { get; set; }
public double UnidadesSubAlquiladas { get; set; }
public double UnidadesDesechadas { get; set; }
[NotMapped]
[JsonIgnore]
public double UnidadesDisponibles
{
get
{
return this.TotalUnidades - this.UnidadesAlquiladas - this.UnidadesAveriadas;
}
}
[NotMapped]
[JsonIgnore]
public string NombreEmpresa
{
get
{
var emp = empresas.ListadoEmpresas().FirstOrDefault(x => x.idEmpresa == Empresa);
return emp == null ? "" : emp.RazonSocial;
}
}
}
}