Beispiel #1
0
 public IActionResult CrearFactura()
 {
     ViewData["usuarios"] = userService.GetAllByIdEmpresa((int)HttpContext.Session.GetInt32("idEmpresa"));
     ViewData["clientes"] = contactoService.GetAllClientes();
     return(View("CrearEditarFactura", new FacturaViewModel {
         Estado = "Enviada", FechaFactura = DateTime.Now, FechaCreacion = DateTime.Now, FechaVencimiento = DateTime.Now.AddDays(30), IdMoneda = 1
     }));
 }
Beispiel #2
0
 public IActionResult CrearPuntoVenta()
 {
     ViewData["tipoPrecios"] = precioService.GetPreciosSinAnular();
     ViewData["moneda"]      = monedaService.GetAll();
     ViewData["cliente"]     = contactoService.GetAllClientes();
     ViewData["bodega"]      = bodegaService.GetAllActivas();
     ViewBag.tipoPrecio      = new TbPrPrecios();
     return(View("CrearEditarPuntoVenta", new PuntoVentaViewModel()));
 }
 public IActionResult GetAllClientes()
 {
     try
     {
         return(Ok(contactoService.GetAllClientes()));
     }
     catch (Exception ex)
     {
         AltivaLog.Log.Insertar(ex.ToString(), "Error");
         return(BadRequest());
     }
 }
Beispiel #4
0
        public IActionResult Index()
        {
            ViewData["Cliente"]    = IClienteService.GetAllClientes();
            ViewData["Inventario"] = IInventarioService.GetAllInventario();

            var conf = service.GetRebajaConfig();

            if (conf != null)
            {
                return(View(map.DomainToViewModel(conf)));
            }
            else
            {
                map.CreateConfig();
                return(View());
            }
        }