Beispiel #1
0
        public ActionResult BuscarComprobantes(Cliente factura)
        {
            var bllempresa = new BLLEmpresa();

            ViewData["Cliente"] = bllempresa.AllCliente();
            var fac = new BLLFactura();

            ViewData["ListaFacturas"] = fac.VW_FACTURA_SALDO(factura).ToList();
            var cob = new BLLCobranza();

            ViewData["ListaCobranzas"]       = cob.BuscarCobranza_View(factura).ToList();
            ViewData["SaldoCuentaCorriente"] = cob.SaldoCuentaCorriente(factura).ToList();
            return(View());
        }
Beispiel #2
0
        public ActionResult Create(Cobranza cobranza)
        {
            try
            {
                var bll  = new BLLCobranza();
                var user = User.Identity.Name;

                bll.CrearCobranzaCabecera(cobranza, user);
                ViewBag.Mesagge = "lala";
                return(RedirectToAction("CreateDetalle", new { id = cobranza.IdCobranzaCabecera }));
            }
            catch
            {
                return(View());
            }
        }
Beispiel #3
0
        // GET: Cobranza/Create/Detalle
        public ActionResult GenerarCobranza(FormCollection form)
        {
            var idmedios           = form["IdMedioPago"].Split(new char[] { ',' }).Select(x => Convert.ToInt32(x)).ToList();
            var identidadbancarias = form["IdEntidadBancaria"].Split(new char[] { ',' }).Select(x => Convert.ToInt32(x)).ToList();
            var numerorecibos      = form["NumeroRecibo"].Split(new char[] { ',' }).Select(x => Convert.ToInt32(x)).ToList();
            var fechas             = form["FechaRecibo"].Split(new char[] { ',' }).Select(x => Convert.ToDateTime(x)).ToList();
            var plazos             = form["PlazoRecibo"].Split(new char[] { ',' }).Select(x => Convert.ToInt32(x)).ToList();
            var endosables         = form["Endosable"].Split(new char[] { ',' }).Select(x => Convert.ToBoolean(x)).ToList();
            var directos           = form["Directo"].Split(new char[] { ',' }).Select(x => Convert.ToBoolean(x)).ToList();
            var docs        = form["DocLibrador"].Split(new char[] { ',' }).Select(x => Convert.ToInt32(x)).ToList();
            var idcobranzas = form["idcobranza"].Split(new char[] { ',' }).Select(x => Convert.ToInt32(x)).ToList();
            var montos      = form["Monto"].Split(new char[] { ',' }).Select(x => Convert.ToDouble(x)).ToList();
            var lista       = new List <Recibo>();
            int len         = idmedios.Count();

            for (int i = 0; i < len; i++)
            {
                lista.Add(new Recibo
                {
                    IdMedioPago       = idmedios[i],
                    IdEntidadBancaria = identidadbancarias[i],
                    NumeroRecibo      = numerorecibos[i],
                    FechaRecibo       = fechas[i],
                    PlazoRecibo       = plazos[i],
                    Endosable         = endosables[i],
                    Directo           = directos[i],
                    DocLibrador       = docs[i],
                    idcobranza        = idcobranzas[i],
                    Monto             = montos[i],
                });
            }
            var bll  = new BLLCobranza();
            var user = User.Identity.Name;

            bll.CrearCobranzaDetalle(lista, user);


            return(RedirectToAction("Create"));
        }