public ActionResult CONTA_004()
        {
            cl_filtros_contabilidad_Info model = new cl_filtros_contabilidad_Info
            {
                IdEmpresa    = string.IsNullOrEmpty(SessionFixed.IdEmpresa) ? 0 : Convert.ToInt32(SessionFixed.IdEmpresa),
                IdSucursal   = Convert.ToInt32(SessionFixed.IdSucursal),
                IdNivel      = 6,
                balance      = "ER",
                IdPeriodoFin = Convert.ToInt32(DateTime.Now.Year.ToString() + DateTime.Now.Month.ToString("00")),
                IdPeriodoIni = Convert.ToInt32(DateTime.Now.AddMonths(-1).Year.ToString() + DateTime.Now.AddMonths(-1).Month.ToString("00")),
                IntArray     = new int[] { Convert.ToInt32(SessionFixed.IdSucursal) }
            };

            cargar_sucursal_check(model.IdEmpresa, model.IntArray);
            model.IdAnio = Convert.ToInt32(model.IdPeriodoFin.ToString().Substring(0, 4));
            model.MostrarSaldoAcumulado = false;
            CONTA_004_ER_Rpt report = new CONTA_004_ER_Rpt();

            report.IntArray                 = model.IntArray;
            report.p_IdEmpresa.Value        = model.IdEmpresa;
            report.p_IdAnio.Value           = model.IdAnio;
            report.p_IdPeriodoIni.Value     = model.IdPeriodoIni;
            report.p_IdPeriodoFin.Value     = model.IdPeriodoFin;
            report.p_IdUsuario.Value        = model.IdUsuario;
            report.p_IdNivel.Value          = model.IdNivel;
            report.p_mostrarSaldo0.Value    = model.mostrar_saldos_en_0;
            report.p_balance.Value          = model.balance;
            report.p_mostrarAcumulado.Value = model.MostrarSaldoAcumulado;
            report.usuario = SessionFixed.IdUsuario;
            report.empresa = SessionFixed.NomEmpresa;
            ViewBag.Report = report;

            cargar_nivel_CONTA006();
            return(View(model));
        }
 public ActionResult CONTA_004(cl_filtros_contabilidad_Info model)
 {
     cargar_sucursal_check(model.IdEmpresa, model.IntArray);
     model.IdAnio = Convert.ToInt32(model.IdPeriodoFin.ToString().Substring(0, 4));
     if (model.balance == "BG")
     {
         CONTA_004_BG_Rpt report = new CONTA_004_BG_Rpt();
         report.IntArray                 = model.IntArray;
         report.p_IdEmpresa.Value        = model.IdEmpresa;
         report.p_IdAnio.Value           = model.IdAnio;
         report.p_IdPeriodoIni.Value     = model.IdPeriodoIni;
         report.p_IdPeriodoFin.Value     = model.IdPeriodoFin;
         report.p_IdUsuario.Value        = model.IdUsuario;
         report.p_IdNivel.Value          = model.IdNivel;
         report.p_mostrarSaldo0.Value    = model.mostrar_saldos_en_0;
         report.p_balance.Value          = model.balance;
         report.p_mostrarAcumulado.Value = model.MostrarSaldoAcumulado;
         report.usuario = SessionFixed.IdUsuario;
         report.empresa = SessionFixed.NomEmpresa;
         ViewBag.Report = report;
     }
     if (model.balance == "ER")
     {
         CONTA_004_ER_Rpt report = new CONTA_004_ER_Rpt();
         report.IntArray                 = model.IntArray;
         report.p_IdEmpresa.Value        = model.IdEmpresa;
         report.p_IdAnio.Value           = model.IdAnio;
         report.p_IdPeriodoIni.Value     = model.IdPeriodoIni;
         report.p_IdPeriodoFin.Value     = model.IdPeriodoFin;
         report.p_IdUsuario.Value        = model.IdUsuario;
         report.p_IdNivel.Value          = model.IdNivel;
         report.p_mostrarSaldo0.Value    = model.mostrar_saldos_en_0;
         report.p_balance.Value          = model.balance;
         report.p_mostrarAcumulado.Value = model.MostrarSaldoAcumulado;
         report.usuario = SessionFixed.IdUsuario;
         report.empresa = SessionFixed.NomEmpresa;
         ViewBag.Report = report;
     }
     cargar_nivel_CONTA006();
     return(View(model));
 }