Files

1031 lines
37 KiB
C#

using System;
using System.Collections.Generic;
using System.Text;
namespace ADSTimbrado
{
public enum TipoDeComprobante
{
SinDefinir = -1,
ingreso = 0,
egreso = 1,
traslado = 2
}
[Serializable]
public class Factura
{
public int CveEstatusRefacturacion { get; set; } = 0;
public int NuevaFactura { get; set; }
public bool EnviarCorreo { get; set; } = false;
public List<string> ErrorList { get; set; }
public int TipoContrato { get; set; }
public int CvePedido { get; set; } = -1;
public int CvePedidoA { get; set; } = -1;
public int CvePedido2 { get; set; } = -1;
public int CveAlmacenTraspasoOrigen { get; set; } = -1;
public int CveAlmacenTraspasoDestino { get; set; } = -1;
public int EsDevolucionVenta { get; set; } = -1;
public int EsInterno { get; set; } = -1;
public int CveEmpresaCRM { get; set; } = -1;
public string EmpresaCRM { get; set; } = "";
public decimal TotalImpuestoLocal { get; set; } = 0;
public bool AplicaDevolucion { get; set; }
public int CveVentaDevolucion { get; set; }
public string ObservacionesAlmacen { get; set; }
public int CveOC { get; set; } = -1;
public int CveCuentaTerminal { get; set; } = -1;
public bool ClienteEsDistribuidor { get; set; } = false;
public bool AplicaGastoContrato { get; set; } = false;
public Factura FacturaDevolucion { get; set; }
public int CveOrdenProduccion { get; set; } = -1;
public int Pago { get; set; }
public int TipoAmortizacionAnticipo { get; set; }
public int CveAlmacenExistenciasContrato { get; set; }
public int EraCotizacion { get; set; }
public int CveRemision { get; set; } = -1;
public int CveCotizacion { get; set; } = -1;
public int DevPed { get; set; } = -1;
public int CveFactura { get; set; }
public int CveCicloComercial { get; set; }
public string TipoDoctoDevolucion { get; set; }
public bool SeGuardoPrePoliza { get; set; }
public string DirectorioServidor { get; set; }
public int FacturaMateriales { get; set; }
public int TipoDescuento { get; set; }
public decimal SubProyectoPorcentajeIVA { get; set; }
public int CveAlmacenOrigenContrato { get; set; }
public int CveDevolucion { get; set; }
public decimal TotalOtrosConceptos { get; set; }
public int CvePSAmortizacion { get; set; }
public decimal SaldoVentaDevolucion { get; set; }
public decimal Saldo { get; set; }
public decimal SaldoAlmacen { get; set; }
public decimal SaldoAnticipo { get; set; }
public decimal SaldoAmortizado { get; set; }
public int CvePAC { get; set; }
public int CveAnticipo { get; set; }
public List<int> RemisionesLista { get; set; }
public int CveAlmacen { get; set; }
public int CveAlmacenDevolucion { get; set; }
public int CveVenta { get; set; }
public int CveEmpresa { get; set; }
public int CveSucursal { get; set; } // sucursal de la empresa que factura
public int CveSubProyecto { get; set; }
public int CveAlmacenRecepcionUsados { get; set; } = -1;
public int CveDireccionEnvio { get; set; }
public bool RefacturacionGeneroNC { get; set; } = false;
public decimal Pagado { get; set; }
public decimal DescuentoProntoPago { get; set; }
// Public Property Sucursal As SucursalModel
public SubProyectoModel SubProyecto { get; set; }
public System.Data.DataTable DtDetalle { get; set; }
public System.Data.DataTable DtDetalleAC { get; set; }
public System.Data.DataTable DtAjustes { get; set; }
public System.Data.DataTable DtRecepcionUsados { get; set; }
public System.Data.DataTable DtPolizasVirtuales { get; set; }
public System.Data.DataTable DtVentasNC { get; set; }
public System.Data.DataTable DtDeduccion { get; set; }
public System.Data.DataTable DtFirmas { get; set; }
public System.Data.DataTable DtDesgloseImpuestos { get; set; }
public System.Data.DataTable DtDocumentosRelacionados { get; set; }
public System.Data.DataTable DtNCVinculadas { get; set; }
public System.Data.DataTable DtAnticipos { get; set; }
public System.Data.DataTable DtPromociones { get; set; }
public System.Data.DataTable DtImpuestosLocales { get; set; }
public System.Data.DataTable DtPagos { get; set; }
public System.Data.DataTable DtRemisionesPS { get; set; }
public System.Data.DataTable DtRemisiones { get; set; }
public System.Data.DataTable DtPedidos2 { get; set; }
public System.Data.DataTable DtPedidos2PS { get; set; }
public System.Data.DataTable DTOrdenesCompraPS { get; set; }
public System.Data.DataTable DtCotizacionesPS { get; set; }
public System.Data.DataTable DtDocumentacionCliente { get; set; }
public System.Data.DataTable DtContratosSerieDetalle { get; set; }
public System.Data.DataTable DtOtrosConceptos { get; set; }
public System.Data.DataTable DtInventario { get; set; }
// Public Property DtAnticipoAmortizacion As Data.DataTable
public System.Data.DataTable DtRemConceptosSurtidos { get; set; }
public List<int> UsadosBonificacion { get; set; }
public int TipoBonificacion { get; set; } = 0;
public CFDITimbre Timbre { get; set; }
public int CveCliente { get; set; }
public ClienteModel Cliente { get; set; }
public SubProyectoModel SubProyectoMatriz { get; set; }
// CFDi
//[System.ComponentModel.DataAnnotations.Schema.NotMapped]
public string Version { get; set; }
public string Serie { get; set; } = "";
public int Folio { get; set; }
//[System.ComponentModel.DataAnnotations.Schema.NotMapped]
public string SerieFolio
{
get
{
if (Serie != null && Serie.Trim() != string.Empty)
return string.Format("{0}-{1}", Serie, Folio);
else
return Folio.ToString();
}
}
public int Inv_CveMovimiento { get; set; }
public int Inv_CveEstatusEntrega { get; set; }
public string Inv_EstatusEntrega { get; set; }
public decimal Inv_ValorInventario { get; set; }
public DateTime Fecha { get; set; }
//[System.ComponentModel.DataAnnotations.Schema.NotMapped]
public DateTime GetLastWeekdayOfMonth(DateTime fecha, DayOfWeek day)
{
DateTime lastDayOfMonth = new DateTime(fecha.Year, fecha.Month, 1).AddMonths(1).AddDays(-1);
int wantedDay = System.Convert.ToInt32(day);
int lastDay = System.Convert.ToInt32(lastDayOfMonth.DayOfWeek);
return lastDayOfMonth.AddDays(lastDay >= wantedDay ? wantedDay - lastDay : wantedDay - lastDay - 7);
}
public DateTime GetFirstWeekdayOfMonth(DateTime fecha, DayOfWeek day)
{
DateTime result = new DateTime(fecha.Year, fecha.Month, 1);
while (result.DayOfWeek != day)
result = result.AddDays(1);
return result;
}
public bool EsHorarioVerano(DateTime fecha)
{
int Year = fecha.Year;
DateTime FechaI = GetFirstWeekdayOfMonth(new DateTime(Year, 4, 1, 0, 0, 0), DayOfWeek.Sunday); // PRIMER DOMINGO DE ABRIL
DateTime FechaF = GetLastWeekdayOfMonth(new DateTime(Year, 10, 1, 23, 59, 59), DayOfWeek.Sunday); // ULTIMO DOMINGO DE OCTUBRE
return fecha >= FechaI && fecha <= FechaF;
}
public DateTime FechaCP
{
get
{
if (this.SubProyecto != null)
{
if (EsHorarioVerano(DateTime.Now))
return DateTime.UtcNow.AddHours(this.SubProyecto.UTCOffsetVerano);
else
return DateTime.UtcNow.AddHours(this.SubProyecto.UTCOffsetInvierno);
}
else
return Fecha;
}
}
public DateTime FechaVencimiento { get; set; }
public string EstatusFactura { get; set; }
public string SeTimbro { get; set; }
public string TipoDocto { get; set; }
public string RefDocto { get; set; }
public bool RealizarDevolucionAlmacen { get; set; }
public int CveAlmacenDevolucionVenta { get; set; }
public string TipoDocumento { get; set; }
//[System.ComponentModel.DataAnnotations.Schema.NotMapped]
public string TipodeComprobante
{
get
{
switch (TipoDocto)
{
case "Ing":
{
return "Ingresos";
}
case "Egs":
{
return "Egresos";
}
case "Dev":
{
return "Devolucion";
}
case "Ped":
{
return "Pedido";
}
case "Cot":
{
return "Cotización";
}
case "Rem":
{
return "Remisión";
}
case "Nom":
{
return "Nom";
}
case "Ant":
{
return "Anticipos";
}
default:
{
return "No Identificado";
}
}
}
}
public int CvePlantillaPoliza
{
get
{
switch (TipoDocto)
{
case "Ing":
{
return 4;
}
case "Egs":
{
return 7;
}
case "Dev":
{
return 7;
}
case "Rem":
{
return 4;
}
case "Ant":
{
return 12;
}
default:
{
return -1;
}
}
}
}
public TipoDeComprobante TipodeComprobanteSAT
{
get
{
switch (TipoDocto)
{
case "Ing":
{
return TipoDeComprobante.ingreso;
}
case "Egs":
{
return TipoDeComprobante.egreso;
}
case "Dev":
{
return TipoDeComprobante.egreso;
}
//case "Cot":
// {
// return null/* TODO Change to default(_) if this is not a reference type */;
// }
//case "Rem":
// {
// return null/* TODO Change to default(_) if this is not a reference type */;
// }
//case "Nom":
// {
// return null/* TODO Change to default(_) if this is not a reference type */;
// }
case "Ant":
{
return TipoDeComprobante.ingreso;
}
default:
{
return TipoDeComprobante.SinDefinir/* TODO Change to default(_) if this is not a reference type */;
}
}
}
}
public int ClaseDoctoSat
{
get
{
switch (TipoDocto)
{
case "Ing":
{
return 1;
}
case "Egs":
{
return 9;
}
case "Dev":
{
return 9;
}
case "Cot":
{
return 0;
}
case "Rem":
{
return 0;
}
case "Nom":
{
return 0;
}
case "Ant":
{
return 0;
}
default:
{
return 0;
}
}
}
}
public int CveUsuario { get; set; }
public string SerieFolioPadre { get; set; }
public int CveMoneda { get; set; }
public string Moneda { get; set; }
public string MonedaSAT { get; set; }
public string UsuarioCreo { get; set; }
public string MonedaAbreviatura { get; set; }
public decimal TipoCambio { get; set; }
public decimal TipoCambioDolares { get; set; }
public bool ConvertirPesos { get; set; }
public bool ConvertirDolares { get; set; }
public int FormaPago { get; set; }
public string FormaPagoText
{
get
{
var retorno = "";
switch (FormaPago)
{
case 0:
{
retorno = "PAGO EN UNA SOLA EXHIBICIÓN";
break;
}
case 1:
{
retorno = "PAGO EN PARCIALIDADES";
break;
}
}
return retorno;
}
}
public int CondicionesPago { get; set; }
public string CondicionesPagoText
{
get
{
var retorno = "";
switch (CondicionesPago)
{
case 0:
{
retorno = "contado";
break;
}
case 1:
{
retorno = "crédito";
break;
}
}
return retorno;
}
}
public string MotivoDescuento { get; set; }
public decimal SubTotal { get; set; }
public decimal Descuento { get; set; }
public decimal Amortizacion { get; set; }
// IVA
public decimal RetIVA { get; set; }
public decimal RetISR { get; set; }
public decimal IVA { get; set; }
public decimal IEPS { get; set; }
public decimal Total { get; set; }
public decimal Otros { get; set; }
public decimal TotalRemNCAplicado { get; set; }
public decimal SubTotalTC
{
get
{
if (ConvertirPesos)
return SubTotal * TipoCambio;
else
return SubTotal;
}
}
public decimal DescuentoTC
{
get
{
if (ConvertirPesos)
return Descuento * TipoCambio;
else
return Descuento;
}
}
public decimal AmortizacionTC
{
get
{
if (ConvertirPesos)
return Amortizacion * TipoCambio;
else
return Amortizacion;
}
}
// IVA
public decimal RetIVATC
{
get
{
if (ConvertirPesos)
return RetIVA * TipoCambio;
else
return RetIVA;
}
}
public decimal RetISRTC
{
get
{
if (ConvertirPesos)
return RetISR * TipoCambio;
else
return RetISR;
}
}
public decimal IVATC
{
get
{
if (ConvertirPesos)
return IVA * TipoCambio;
else
return IVA;
}
}
public decimal IEPSTC
{
get
{
if (ConvertirPesos)
return IEPS * TipoCambio;
else
return IEPS;
}
}
public decimal TotalTC
{
get
{
if (ConvertirPesos)
return Total * TipoCambio;
else
return Total;
}
}
public decimal OtrosTC
{
get
{
if (ConvertirPesos)
return Otros * TipoCambio;
else
return Otros;
}
}
public string AtencionA { get; set; }
public string AtnA { get; set; }
public string TelefonoGenerico { get; set; }
public string Det_OrdenCompra { get; set; }
public string Det_FechaOrdenCompra { get; set; }
public string Det_ContraRecibo { get; set; }
public string Observaciones { get; set; }
public string Alfa1 { get; set; }
public string Alfa2 { get; set; }
public string Alfa3 { get; set; }
public DateTime Fech1 { get; set; }
public DateTime Fech2 { get; set; }
public DateTime Fech3 { get; set; }
public decimal Num1 { get; set; }
public decimal Num2 { get; set; }
public decimal Num3 { get; set; }
public int DiasCredito { get; set; }
public bool EsDiasCreditoFijo { get; set; }
public int CveCorte { get; set; }
public int CveMesa { get; set; }
public int NumeroPersonas { get; set; }
//[System.ComponentModel.DataAnnotations.Schema.NotMapped]
public DateTime FechaPago { get; set; }
public int CveNCaVincular { get; set; }
public string FolioFiscal { get; set; }
public string NoSerieCertificado { get; set; }
public string SelloCFDi { get; set; }
public string SelloSAT { get; set; }
public DateTime FechaEmision { get; set; }
public DateTime FechaCertificacion { get; set; }
public string NoSerieCertificadoContribuyente { get; set; }
public string NumeroCuenta { get; set; }
public int CveTipoAmortizacionAnticipo { get; set; } = -1;
public string DescripcionContrato { get; set; }
public string NumeroDescripcionContrato { get; set; }
public int CveComplementoTimbrado { get; set; } = 0;
public ComplementoINE ComplementoINE { get; set; }
public string FordGSDB { get; set; } = "";
public string FordASN { get; set; } = "";
public FemsaFactura FemsaFactura { get; set; }
//public void SetSubProyecto()
//{
// if (CveSubProyecto > 0)
// SubProyecto = new Modelos.SubProyectoModel(GlobalDTSubProyectos(-1).FiltroPrimero($"CveSubProyecto = {CveSubProyecto}"));
//}
//public void SetSubProyectoMatriz()
//{
// System.Data.DataRow Row = GlobalDTSubProyectos(-1, CveSubProyecto: -1, CveEmpresa: UsuarioActual.CveEmpresa).FiltroPrimero("TipoSucursal=1");
// if (!Information.IsNothing(Row))
// SubProyectoMatriz = new Modelos.SubProyectoModel(Row);
//}
//public void SetCliente()
//{
// if (CveCliente > 0)
// Cliente = new Modelos.ClienteModel(CveCliente, CveEmpresa);
//}
//public void SetMoneda()
//{
// if (CveMoneda > 0)
// {
// DataRow dr = GlobalDTMonedas.FiltroPrimero(string.Format("CveMoneda ={0}", CveMoneda));
// if (!IsNothing(dr))
// {
// Moneda = dr("Moneda").ToString();
// MonedaSAT = dr("AbreviaturaSAT").ToString();
// MonedaAbreviatura = dr("Abreviatura").ToString();
// }
// }
//}
//public void SetMetodoPago()
//{
// if (CveMetodoPago > 0 && !IsNothing(GlobalDTMetodosPago.FiltroPrimero(string.Format(" CveMetodoPago ={0}", CveMetodoPago))))
// {
// MetodoPago = GlobalDTMetodosPago.FiltroPrimero(string.Format(" CveMetodoPago ={0}", CveMetodoPago))("MetodoPago").ToString();
// ClaveMetodoPagoSAT = GlobalDTMetodosPago.FiltroPrimero(string.Format(" CveMetodoPago ={0}", CveMetodoPago))("ClaveSAT").ToString();
// }
//}
//public void SetMoneda(ClsPaginas ObjClsPaginas)
//{
// if (!IsNothing(ObjClsPaginas))
// {
// DataRow dr = ObjClsPaginas.GlobalDTMonedas.FiltroPrimero(string.Format("CveMoneda ={0}", CveMoneda));
// if (!IsNothing(dr))
// {
// Moneda = dr("Moneda").ToString();
// MonedaSAT = dr("AbreviaturaSAT").ToString();
// MonedaAbreviatura = dr("Abreviatura").ToString();
// }
// }
//}
//public void SetMetodoPago(ClsPaginas ObjClsPaginas)
//{
// if (!IsNothing(ObjClsPaginas))
// {
// if (!IsNothing(ObjClsPaginas.GlobalDTMetodosPago.FiltroPrimero(string.Format(" CveMetodoPago ={0}", CveMetodoPago))))
// {
// MetodoPago = ObjClsPaginas.GlobalDTMetodosPago.FiltroPrimero(string.Format(" CveMetodoPago ={0}", CveMetodoPago))("MetodoPago").ToString();
// ClaveMetodoPagoSAT = ObjClsPaginas.GlobalDTMetodosPago.FiltroPrimero(string.Format(" CveMetodoPago ={0}", CveMetodoPago))("ClaveSAT").ToString();
// }
// }
//}
//public void SetSubProyecto(ClsPaginas obj)
//{
// if (CveSubProyecto > 0 && !IsNothing(obj))
// SubProyecto = new Modelos.SubProyectoModel(GlobalDTSubProyectos(-1).FiltroPrimero($"CveSubProyecto = {CveSubProyecto}"));
//}
//public void SetSubProyectoMatriz(ClsPaginas obj)
//{
// if (!IsNothing(obj))
// {
// System.Data.DataRow Row = GlobalDTSubProyectos(-1, CveSubProyecto: -1, CveEmpresa: obj.UsuarioActual.CveEmpresa).FiltroPrimero("TipoSucursal=1");
// if (!Information.IsNothing(Row))
// SubProyectoMatriz = new Modelos.SubProyectoModel(Row);
// }
//}
public int CveClienteSucursal { get; set; }
public SucursalModel ClienteSucursal { get; set; }
public EnviarAModel EnviarA { get; set; }
public string NumeroContrato { get; set; }
public string PedidoContrato { get; set; }
public string OrdenCompra { get; set; } = "-1";
public int CveMetodoPago { get; set; }
public string MetodoPago { get; set; }
public string ClaveMetodoPagoSAT { get; set; }
public int CveMetodoPago33 { get; set; }
public string MetodoPago33 { get; set; }
public int CveFormaPago33 { get; set; }
public string MetodoPagoSAT33 { get; set; }
public string FormaPago33 { get; set; }
public string FormaPagoSAT33 { get; set; }
public string UsoCFDI { get; set; } = "";
public int CveUsoCFDI { get; set; }
public string ClaveUsoCFDI { get; set; } = "";
public int CveTipoRelacion { get; set; } = -1;
public int CveEstatusFactura { get; set; }
public int CveVendedor { get; set; }
public string VendedorCodigo { get; set; }
public int CveSucursalEjecucion { get; set; }
public DateTime FechaEjecucion { get; set; }
public int CveSucursalCobranza { get; set; }
public int CveSubProyectoCobranza { get; set; }
public int CveSubProyectoEjecucion { get; set; }
public int CveOS { get; set; }
public int CveContrato { get; set; }
public int CveVentaPadre { get; set; }
public int CvePrePoliza { get; set; }
public string Entrega { get; set; }
public string TiempoEntrega { get; set; }
public DateTime Vigencia { get; set; }
public int TipoEstatus { get; set; }
public int CveCondicionEntrega { get; set; }
public string CondicionEntrega { get; set; }
public string TipoRelacion { get; set; }
public List<string> UUIDRelacionados { get; set; }
public int CveVentaRelacion { get; set; } = -1;
public decimal ImporteRelacion { get; set; }
public bool EsNCAmortizacion { get; set; }
public decimal Kilometraje { get; set; }
public int CveTipoRetencion { get; set; }
}
[Serializable]
public class ComplementoINE
{
public string INETipoProceso { get; set; } = "";
public string INETipoComite { get; set; } = "";
public string INEEntidad { get; set; } = "";
public int INEIdContabilidad { get; set; } = 0;
}
[Serializable]
public class FemsaFactura
{
public FemsaFactura()
{
}
public bool AplicaFEMSA { get; set; } = false; // AplicaFEMSA
public string FEMSA_NumSociedad { get; set; } // TxtFEMSA_NumSociedad.Text.Trim,
public string FEMSA_NumProveedor { get; set; } // TxtFEMSA_NumProveedor.Text.Trim,
public string FEMSA_Mail { get; set; } // TxtFEMSA_Mail.Text.Trim
public int FEMSA_Version { get; set; } // TxtFEMSA_Version.Text.ToEntero, ClaseDocto,
public long FEMSA_NumPedido { get; set; } // TxtFEMSA_NumPedido.Text.Trim.ToLong,
public string FEMSA_NumEntrada { get; set; } // TxtFEMSA_NumEntrada.Text.Trim,
public string FEMSA_NumRemision { get; set; } // TxtFEMSA_NumRemision.Text.Trim,
public string FEMSA_NumSocio { get; set; } // TxtFEMSA_NumSocio.Text.Trim,
public string FEMSA_CentroCosto { get; set; } // TxtFEMSA_CentroCosto.Text.Trim,
public string FEMSA_IPeriodoLiquidacion { get; set; } // TxtFEMSA_IPeriodoLiquidacion.Text.Trim,
public string FEMSA_FPeriodoLiquidacion { get; set; } // TxtFEMSA_FPeriodoLiquidacion.Text.Trim,
public string FEMSA_CodRetencion1 { get; set; } // TxtFEMSA_CodRetencion1.Text.Trim,
public string FEMSA_CodRetencion2 { get; set; } // TxtFEMSA_CodRetencion2.Text.Trim,
}
[Serializable]
public class SucursalModel
{
protected void SetDefaultValues()
{
Calle = "";
NoExt = "";
NoInt = "";
Colonia = "";
Localidad = "";
Municipio = "";
Estado = "";
Pais = "";
CP = "";
IVA = 0;
Serie = "";
TipoFormato = "";
FormatoFactura = "";
Sucursal = "";
CorreoSucursal = "";
}
public SucursalModel()
{
}
public string LugarExp
{
get
{
var arr = new[] { Calle, NoExt, NoInt, Colonia, Localidad, Municipio, Estado, Pais, CP };
return string.Join(",", arr);
}
}
public int CveSucursal { get; set; }
public string Calle { get; set; }
public string Direccion { get; set; }
public string NoExt { get; set; }
public string NoInt { get; set; }
public string Colonia { get; set; }
public string Localidad { get; set; }
public string Municipio { get; set; }
public string Estado { get; set; }
public string Pais { get; set; }
public string CP { get; set; }
public decimal IVA { get; set; }
public string Serie { get; set; }
public string TipoFormato { get; set; }
public string FormatoFactura { get; set; }
public string Sucursal { get; set; }
public string CorreoSucursal { get; set; }
public string TelefonoSucursal { get; set; }
public string ImprimeNombreSucursal { get; set; }
}
[Serializable]
public class SubProyectoModel
{
protected void SetDefaultValues()
{
Calle = "";
NoExt = "";
NoInt = "";
Colonia = "";
Localidad = "";
Municipio = "";
Estado = "";
Pais = "";
CP = "";
IVA = 0;
Serie = "";
TipoFormato = "";
FormatoFactura = "";
SubProyecto = "";
Correo = "";
Telefono = "";
UTCOffsetVerano = -7;
UTCOffsetInvierno = -7;
}
public SubProyectoModel()
{
SetDefaultValues();
}
//public SubProyectoModel(System.Data.DataRow Row)
//{
// SetDefaultValues();
// if (Row != null)
// this.setValues(Row);
//}
public string LugarExp
{
get
{
var arr = new[] { Calle, NoExt, NoInt, Colonia, Localidad, Municipio, Estado, Pais, CP, SubProyecto };
return string.Join(",", arr);
}
}
public int CveSubProyecto { get; set; }
public string Calle { get; set; }
public string Direccion { get; set; }
public string NoExt { get; set; }
public string NoInt { get; set; }
public string Colonia { get; set; }
public string Localidad { get; set; }
public string Municipio { get; set; }
public string Estado { get; set; }
public string Pais { get; set; }
public string CP { get; set; }
public decimal IVA { get; set; }
public string Serie { get; set; }
public string TipoFormato { get; set; }
public string FormatoFactura { get; set; }
public string SubProyecto { get; set; }
public string Correo { get; set; }
public string Telefono { get; set; }
public string ImprimeNombre { get; set; }
public int UTCOffsetVerano { get; set; }
public int UTCOffsetInvierno { get; set; }
}
[Serializable]
public class ClienteModel
{
protected void SetDefaultValues()
{
CveCliente = -1;
EnviarFactura = "Si";
Estatus = "Activo";
NoExt = "";
NoInt = "";
Direccion = "";
Colonia = "";
Localidad = "";
Ciudad = "";
Estado = "";
Pais = "";
CP = "";
Telefono = "";
AplicaFord = false;
Ford_GSDB = "";
AplicaFEMSA = false;
AplicaDetallista = false;
AplicaComercioExterior = false;
}
public ClienteModel()
{
}
public int CveCliente { get; set; }
public string Nombre { get; set; }
public string NombreComercial { get; set; }
public string Codigo { get; set; }
public string Direccion { get; set; }
public string NoExt { get; set; }
public string NoInt { get; set; }
public string Colonia { get; set; }
public string Localidad { get; set; }
public string Ciudad { get; set; }
public string Estado { get; set; }
public string Pais { get; set; }
public string RFC { get; set; }
public string CP { get; set; }
public string Telefono { get; set; }
public string Contacto { get; set; }
public string Mail { get; set; }
public string MailCotizacion { get; set; }
public string NotificarA { get; set; }
public string Pagina { get; set; }
public string Giro { get; set; }
public int CvePrecioLista { get; set; }
public string EnviarFactura { get; set; }
public int CveSucursal { get; set; }
public decimal RetIVA { get; set; }
public decimal RetISR { get; set; }
public decimal IEPS { get; set; }
public bool RetIVAFletes { get; set; }
public string Estatus { get; set; }
public DateTime Fecha { get; set; }
public string Usuario { get; set; }
public string NombreCorto { get; set; }
public string Vendedor { get; set; }
public int PlazoCobranza { get; set; }
public string Sucursal { get; set; }
public string RecepcionPagos { get; set; }
public string TipoPago { get; set; }
public string CuentaContable { get; set; }
public int IdCtaContClientes { get; set; }
public int IdCtaContMonedaExtranjera { get; set; }
public int IdCtaContComplementaria { get; set; }
public int IdCtaContAnticipos { get; set; }
public int IdCtaContRetIVA { get; set; }
public int IdCtaContRetISR { get; set; }
public int CveCuentaClientes { get; set; }
public int CveCuentaMonedaExtranjera { get; set; }
public int CveCuentaComplementaria { get; set; }
public int CveCuentaAnticipos { get; set; }
public int CveCuentaRetIVA { get; set; }
public int CveCuentaRetISR { get; set; }
public string ConvenioCIE { get; set; }
public string FormaFacturacion { get; set; }
public decimal LimiteCredito { get; set; }
public string NumCtaPago { get; set; }
public int CveMetodoPago { get; set; }
public bool AplicaFEMSA { get; set; }
public string FEMSA_NumSociedad { get; set; }
public string FEMSA_NumProveedor { get; set; }
public string FEMSA_Mail { get; set; }
public bool AplicaDetallista { get; set; }
public string Detallista_GLNComprador { get; set; }
public string Detallista_Departamento { get; set; }
public string Detallista_GLNVendedor { get; set; }
public string Detallista_NumProveedor { get; set; }
public string SevenEleven_NumProveedor { get; set; }
public string Detallista_GLNEnvio { get; set; } = "envio num";
public bool AplicaFord { get; set; }
public string Ford_GSDB { get; set; }
public string ReferenciaFiscal { get; set; }
public string NumRegIdTrib { get; set; }
public string CobranzaTelefono { get; set; }
public bool AplicaComercioExterior { get; set; }
public string ClaveSATPais { get; set; }
public string ClaveSATEstado { get; set; }
public string ClaveSATMunicipio { get; set; }
public string ClaveSATColonia { get; set; }
public string ClaveSATCP { get; set; }
}
[Serializable]
public class EnviarAModel
{
protected void SetDefaultValues()
{
EnvioDireccion = "";
EnvioNoExt = "";
EnvioNoInt = "";
EnvioColonia = "";
EnvioCiudad = "";
EnvioEstado = "";
EnvioContacto = "";
EnvioDepartamento = "";
EnvioPedidoContrato = "";
EnvioCP = "";
EnvioTel = "";
}
public EnviarAModel()
{
}
public string LugarExp
{
get
{
var arr = new[] { EnvioDireccion, EnvioColonia, EnvioCiudad, EnvioEstado, EnvioCP, EnvioTel };
return string.Join(",", arr);
}
}
public int CveDireccionEnvio { get; set; }
public string EnvioDireccion { get; set; }
public string EnvioNoExt { get; set; }
public string EnvioNoInt { get; set; }
public string EnvioColonia { get; set; }
public string EnvioCiudad { get; set; }
public string EnvioEstado { get; set; }
public string EnvioContacto { get; set; }
public string EnvioDepartamento { get; set; }
public string EnvioPedidoContrato { get; set; }
public string EnvioCP { get; set; }
public string EnvioTel { get; set; }
}
}