public ActionResult Anular(int IdEmpresa = 0, decimal IdGuiaRemision = 0) { bus_guia = new fa_guia_remision_Bus(); #region Validar Session if (string.IsNullOrEmpty(SessionFixed.IdTransaccionSession)) { return(RedirectToAction("Login", new { Area = "", Controller = "Account" })); } SessionFixed.IdTransaccionSession = (Convert.ToDecimal(SessionFixed.IdTransaccionSession) + 1).ToString(); SessionFixed.IdTransaccionSessionActual = SessionFixed.IdTransaccionSession; #endregion fa_guia_remision_Info model = bus_guia.get_info(IdEmpresa, IdGuiaRemision); if (model == null) { return(RedirectToAction("Index")); } model.IdTransaccionSession = Convert.ToDecimal(SessionFixed.IdTransaccionSession); detalle_info.set_list(bus_detalle.get_list(IdEmpresa, IdGuiaRemision), model.IdTransaccionSession); List_rel.set_list(bus_detalle_x_factura.get_list(IdEmpresa, IdGuiaRemision), model.IdTransaccionSession); cargar_combos(model); #region Validacion Periodo ViewBag.MostrarBoton = true; if (!bus_periodo.ValidarFechaTransaccion(IdEmpresa, model.gi_fecha, cl_enumeradores.eModulo.FAC, model.IdSucursal, ref mensaje)) { ViewBag.mensaje = mensaje; ViewBag.MostrarBoton = false; } #endregion return(View(model)); }
public ActionResult Modificar(int IdEmpresa = 0, decimal IdGuiaRemision = 0, bool Exito = false) { bus_guia = new fa_guia_remision_Bus(); #region Validar Session if (string.IsNullOrEmpty(SessionFixed.IdTransaccionSession)) { return(RedirectToAction("Login", new { Area = "", Controller = "Account" })); } SessionFixed.IdTransaccionSession = (Convert.ToDecimal(SessionFixed.IdTransaccionSession) + 1).ToString(); SessionFixed.IdTransaccionSessionActual = SessionFixed.IdTransaccionSession; #endregion fa_guia_remision_Info model = bus_guia.get_info(IdEmpresa, IdGuiaRemision); model.GenerarFactura = false; if (model == null) { return(RedirectToAction("Index")); } model.IdTransaccionSession = Convert.ToDecimal(SessionFixed.IdTransaccionSessionActual); model.lst_detalle = bus_detalle.get_list(IdEmpresa, IdGuiaRemision); detalle_info.set_list(model.lst_detalle, model.IdTransaccionSession); List_rel.set_list(bus_detalle_x_factura.get_list(IdEmpresa, IdGuiaRemision), model.IdTransaccionSession); cargar_combos(model); if (Exito) { ViewBag.MensajeSuccess = MensajeSuccess; } #region Validacion Periodo ViewBag.MostrarBoton = true; /*if (!bus_periodo.ValidarFechaTransaccion(IdEmpresa, model.gi_fecha, cl_enumeradores.eModulo.FAC, model.IdSucursal, ref mensaje)) * { * ViewBag.mensaje = mensaje; * ViewBag.MostrarBoton = false; * }*/ #endregion #region Permisos seg_Menu_x_Empresa_x_Usuario_Info info = bus_permisos.get_list_menu_accion(Convert.ToInt32(SessionFixed.IdEmpresa), SessionFixed.IdUsuario, "Facturacion", "GuiaSinPrecios", "Index"); if (!info.Modificar) { return(RedirectToAction("Index")); } #endregion return(View(model)); }
public ActionResult Anular(int IdEmpresa = 0, decimal IdGuiaRemision = 0) { bus_guia = new fa_guia_remision_Bus(); #region Validar Session if (string.IsNullOrEmpty(SessionFixed.IdTransaccionSession)) { return(RedirectToAction("Login", new { Area = "", Controller = "Account" })); } SessionFixed.IdTransaccionSession = (Convert.ToDecimal(SessionFixed.IdTransaccionSession) + 1).ToString(); SessionFixed.IdTransaccionSessionActual = SessionFixed.IdTransaccionSession; #endregion fa_guia_remision_Info model = bus_guia.get_info(IdEmpresa, IdGuiaRemision); if (model == null) { return(RedirectToAction("Index")); } model.IdTransaccionSession = Convert.ToDecimal(SessionFixed.IdTransaccionSession); detalle_info.set_list(bus_detalle.get_list(IdEmpresa, IdGuiaRemision), model.IdTransaccionSession); List_rel.set_list(bus_detalle_x_factura.get_list(IdEmpresa, IdGuiaRemision), model.IdTransaccionSession); cargar_combos(model); return(View(model)); }