Esempio n. 1
0
        // GET: Users/Edit/5
        public ActionResult Edit(long id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            expense exp = _repo.ExpenseGet(id);

            ExpenseCreateVM model = new ExpenseCreateVM()
            {
                id                  = exp.id,
                name                = exp.name,
                description         = exp.description,
                expense_id          = exp.expense_id,
                date_expense        = (DateTime)exp.date_expense,
                amount_money        = exp.amount_money,
                selling_point       = exp.selling_point,
                tipo_comprobante_id = exp.tipo_comprobante_id,
                nro_comprobante     = exp.nro_comprobante,
                cuit_cuil           = exp.cuit_cuil,
                nro_cuit_cuil       = exp.nro_cuit_cuil,
                denominacion_emisor = exp.denominacion_emisor,
                imp_neto_gravado    = exp.imp_neto_gravado,
                imp_neto_no_gravado = exp.imp_neto_no_gravado,
                imp_op_exentas      = exp.imp_op_exentas,
                iva                 = exp.iva,
                importe_total       = exp.importe_total,
                proveedor_id        = exp.proveedor_id,
                periodo             = exp.periodo,
                pay_state           = exp.pay_state,
                pay_date            = exp.pay_date
            };

            if (exp == null)
            {
                return(HttpNotFound());
            }

            ViewBagCreate(model.expense_id);
            ViewBagCreateTipoComprobante(model.tipo_comprobante_id);
            GetComboCC();
            GetComboProv();
            GetComboPeriodo();
            return(View(model));
        }