Exemple #1
0
 /// <summary>
 /// Busqueda de venta por folio
 /// </summary>
 /// <param name="folio"></param>
 /// <param name="esDevolucion"></param>
 /// <returns>Venta correspondiente</returns>
 public ResponseBussiness <VentaResponse> BuscarVentaPorFolio(string folio, int esDevolucion)
 {
     return(tryCatch.SafeExecutor(() =>
     {
         VentaResponse ventaResponse = repository.ObtenerVentaPorFolio(folio, esDevolucion);
         if (ventaResponse.NumeroNominaVentaEmpleado != 0)
         {
             ventaResponse.InformacionEmpleadoMilano = new AdministracionVentaEmpleadoBusiness().Buscar(ventaResponse.NumeroNominaVentaEmpleado.ToString(), this.token.CodeStore.ToString(), this.token.CodeBox.ToString());
         }
         else if (ventaResponse.CodigoMayorista != 0)
         {
             BusquedaMayoristaRequest busquedaMayorista = new BusquedaMayoristaRequest();
             busquedaMayorista.CodigoMayorista = ventaResponse.CodigoMayorista;
             busquedaMayorista.Nombre = "";
             busquedaMayorista.SoloActivos = true;
             ventaResponse.InformacionMayorista = new MayoristasBusiness(this.token).BusquedaMayorista(busquedaMayorista);
         }
         if (ventaResponse.CodigoEmpleadoVendedor > 0)
         {
             EmployeeRequest employeeRequest = new EmployeeRequest();
             employeeRequest.Code = ventaResponse.CodigoEmpleadoVendedor;
             employeeRequest.Name = "";
             ventaResponse.InformacionEmpleadoVendedor = new EmployeeBusiness(this.token).SearchEmployee(employeeRequest).Data[0];
         }
         return ventaResponse;
     }));
 }
Exemple #2
0
 /// <summary>
 ///Busqueda de mayorista
 /// </summary>
 /// <param name="request"></param>
 /// <returns></returns>
 public ResponseBussiness <BusquedaMayoristaResponse> BusquedaMayorista(BusquedaMayoristaRequest request)
 {
     return(tryCatch.SafeExecutor(() =>
     {
         BusquedaMayoristaResponse respuesta = new BusquedaMayoristaResponse();
         Inspector inspector = new Inspector();
         ProxyMayoristas.InfoMayorista info = wsVentaMayoristaSoapClient.ConsultaMayorista(token.CodeStore, token.CodeBox, token.CodeEmployee, request.CodigoMayorista, request.Nombre, request.SoloActivos);
         respuesta.Calle = info.Calle;
         respuesta.CodigoMayorista = info.NumeroMayorista;
         respuesta.Ciudad = info.Ciudad;
         respuesta.CodigoPostal = info.CodigoPostal;
         respuesta.CodigoTienda = info.codigoTienda;
         respuesta.Colonia = info.Colonia;
         respuesta.CreditoDisponible = inspector.TruncarValor(info.CreditoDisponible);
         respuesta.Error = info.sError;
         respuesta.Estado = info.Estado;
         respuesta.Estatus = info.Estatus;
         respuesta.FechaUltimoPago = info.FechaUltimoPago.ToString();
         respuesta.LimiteCredito = inspector.TruncarValor(info.LimiteCredito);
         respuesta.Mensaje = info.sMensaje;
         respuesta.Municipio = info.Municipio;
         respuesta.Nombre = info.Nombre;
         respuesta.NumeroExterior = info.NumeroExterior;
         respuesta.NumeroInterior = info.NumeroInterior;
         respuesta.PagosPeriodoActual = inspector.TruncarValor(info.PagosPeriodoActual);
         respuesta.PorcentajeComision = inspector.TruncarValor(info.PorcentajeComision);
         respuesta.RFC = info.RFC;
         respuesta.Saldo = inspector.TruncarValor(info.Saldo);
         respuesta.Telefono = info.Telefono;
         respuesta.EstadoCuentaMayorista = new EstadoCuentaMayorista();
         respuesta.EstadoCuentaMayorista.Existe = info.estadoCuenta.bExiste;
         respuesta.EstadoCuentaMayorista.FechaCorte = info.estadoCuenta.FechaCorte.ToString();
         respuesta.EstadoCuentaMayorista.Anio = info.estadoCuenta.Año;
         respuesta.EstadoCuentaMayorista.Periodo = info.estadoCuenta.Periodo;
         respuesta.EstadoCuentaMayorista.FechaInicial = info.estadoCuenta.FechaInicial.ToString();
         respuesta.EstadoCuentaMayorista.FechaFinal = info.estadoCuenta.FechaFinal.ToString();
         respuesta.EstadoCuentaMayorista.FechaLimitePago = info.estadoCuenta.FechaLimitePago.ToString();
         respuesta.EstadoCuentaMayorista.LimiteCredito = info.estadoCuenta.LimiteCredito;
         respuesta.EstadoCuentaMayorista.SaldoAnterior = info.estadoCuenta.SaldoAnterior;
         respuesta.EstadoCuentaMayorista.Compras = info.estadoCuenta.Compras;
         respuesta.EstadoCuentaMayorista.Pagos = info.estadoCuenta.Pagos;
         respuesta.EstadoCuentaMayorista.NotasDeCredito = info.estadoCuenta.NotasDeCredito;
         respuesta.EstadoCuentaMayorista.NotasDeCargo = info.estadoCuenta.NotasDeCargo;
         respuesta.EstadoCuentaMayorista.SaldoActual = info.estadoCuenta.SaldoActual;
         respuesta.EstadoCuentaMayorista.PagoQuincenal = info.estadoCuenta.PagoQuincenal;
         respuesta.EstadoCuentaMayorista.PagoMinimo = info.estadoCuenta.PagoMinimo;
         respuesta.EstadoCuentaMayorista.PagoVencido = info.estadoCuenta.PagoVencido;
         respuesta.EstadoCuentaMayorista.CreditoDisponible = info.estadoCuenta.CreditoDisponible;
         respuesta.EstadoCuentaMayorista.NumeroAtrasos = info.estadoCuenta.NumeroAtrasos;
         return respuesta;
     }));
 }
Exemple #3
0
        public ResponseBussiness <BusquedaMayoristaResponse> BusquedaMayorista(BusquedaMayoristaRequest request)
        {
            TokenDto token = new TokenService().Get();

            return(new MayoristasBusiness(token).BusquedaMayorista(request));
        }