agregado procesos y bd clases
This commit is contained in:
127
bdAsegasa/Extensiones/ve_recibos.cs
Normal file
127
bdAsegasa/Extensiones/ve_recibos.cs
Normal file
@@ -0,0 +1,127 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using tsUtilidades;
|
||||
|
||||
namespace bdAsegasa.db
|
||||
{
|
||||
public class ve_recibos
|
||||
{
|
||||
public int idRecibo { get; set; }
|
||||
public int idPoliza { get; set; }
|
||||
public DateOnly? FechaFacturacion { get; set; }
|
||||
public DateOnly? FechaPago { get; set; }
|
||||
public string CodigoRecibo { get; set; }
|
||||
public string NumeroPoliza { get; set; }
|
||||
public string Tomador { get; set; }
|
||||
public string CIFTomador { get; set; }
|
||||
public string Telefono1Tomador { get; set; }
|
||||
public string Telefono2Tomador { get; set; }
|
||||
public string Matricula { get; set; }
|
||||
public DateOnly FechaEfecto { get; set; }
|
||||
public DateOnly? FechaRecepcionCia { get; set; }
|
||||
public DateOnly FechaVencimiento { get; set; }
|
||||
public string Compania { get; set; }
|
||||
public string Agente { get; set; }
|
||||
public string SubAgente { get; set; }
|
||||
public string Ramo { get; set; }
|
||||
public DateOnly? FechaExpedicion { get; set; }
|
||||
|
||||
public string BienesAsegurados { get; set; }
|
||||
public DateOnly? FechaBaja { get; set; }
|
||||
public DateOnly? FechaDevolucionBanco { get; set; }
|
||||
public string CausaBaja { get; set; }
|
||||
public string TipoRecibo { get; set; }
|
||||
public string TipoPago { get; set; }
|
||||
public string Oficina { get; set; }
|
||||
public double? PrimaNeta { get; set; }
|
||||
public double? BonificacionORecargo { get; set; }
|
||||
public double? Consorcio { get; set; }
|
||||
public double? Impuesto { get; set; }
|
||||
public double? RecargoExterno { get; set; }
|
||||
public double? TotalRecibo { get; set; }
|
||||
public double? ComisionReciboPrimaNeta { get; set; }
|
||||
public double? PorcentajeReciboPrimaNeta { get; set; }
|
||||
public double? TotalComision { get; set; }
|
||||
public double? SobreComision { get; set; }
|
||||
public double? PorcentajeComisionAgente { get; set; }
|
||||
public double? ComisionAgente { get; set; }
|
||||
public double? ComisionAsegasaPrimaNeta { get; set; }
|
||||
public double? AsegasaRecargoExterno { get; set; }
|
||||
public double? AsegasaComisionConsorcio { get; set; }
|
||||
public double? AsegasaComisionTotal { get; set; }
|
||||
public double? ComisionPrevista { get; set; }
|
||||
|
||||
public double DiferenciaComision
|
||||
{
|
||||
get
|
||||
{
|
||||
double crpn = ComisionReciboPrimaNeta ?? 0;
|
||||
double cp = ComisionPrevista ?? 0;
|
||||
return Math.Round(crpn - cp, 2, MidpointRounding.AwayFromZero);
|
||||
}
|
||||
}
|
||||
|
||||
public int? idSituacion { get; set; }
|
||||
public DateOnly? FechaLiquidacionAgente { get; set; }
|
||||
public DateOnly? FechaLiquidacionCia { get; set; }
|
||||
public DateOnly? FechaLiquidacionCiaDevuelto { get; set; }
|
||||
|
||||
public static int? idSitr1 = null;
|
||||
public bool BloquearFacturacion
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!idSitr1.HasValue)
|
||||
{
|
||||
using (var bd = bdAsegasa.tscgestionasegasa.NuevoContexto())
|
||||
{
|
||||
idSitr1 = bd.enumeraciones.FirstOrDefault(x => x.Codigo == "SITR.1")?.idEnumeracion;
|
||||
}
|
||||
}
|
||||
return idSituacion.HasValue && idSituacion.Value == idSitr1;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (!idSitr1.HasValue)
|
||||
{
|
||||
using (var bd = bdAsegasa.tscgestionasegasa.NuevoContexto())
|
||||
{
|
||||
idSitr1 = bd.enumeraciones.FirstOrDefault(x => x.Codigo == "SITR.1")?.idEnumeracion;
|
||||
}
|
||||
}
|
||||
if (value)
|
||||
{
|
||||
idSituacion = idSitr1;
|
||||
}
|
||||
else
|
||||
{
|
||||
idSituacion = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string TelefonoMovilValido
|
||||
{
|
||||
get
|
||||
{
|
||||
if (tsUtilidades.Extensiones.StringExtensions.EsNumeroTelefonoMovilEspañolValido(Telefono1Tomador))
|
||||
{
|
||||
return Telefono1Tomador;
|
||||
}
|
||||
else if (tsUtilidades.Extensiones.StringExtensions.EsNumeroTelefonoMovilEspañolValido(Telefono2Tomador))
|
||||
{
|
||||
return Telefono2Tomador;
|
||||
}
|
||||
else
|
||||
{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string Observaciones { get; set; }
|
||||
public string ObservacionesPoliza { get; set; }
|
||||
public DateOnly? FechaRemesa { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user