コード例 #1
0
        public void UpdateRow_cta_rubros_x_provision(ro_Config_Param_contable_Info info_det)
        {
            var ls = get_list_cta_rubros();

            ct_plancta_Bus bus_plancta = new ct_plancta_Bus();
            ro_Config_Param_contable_Info edited_info = get_list_cta_rubros().Where(m => m.Secuencia == info_det.Secuencia).First();
            var cta = bus_plancta.get_info(Convert.ToInt32(SessionFixed.IdEmpresa), info_det.IdCtaCble_prov_credito);

            if (cta != null)
            {
                info_det.pc_Cuenta_prov_credito = cta.IdCtaCble + " - " + cta.pc_Cuenta;
            }

            var cta_deb = bus_plancta.get_info(Convert.ToInt32(SessionFixed.IdEmpresa), info_det.IdCtaCble_prov_debito);

            if (cta_deb != null)
            {
                info_det.pc_Cuenta_prov_debito = cta_deb.IdCtaCble + " - " + cta_deb.pc_Cuenta;
            }

            edited_info.IdCtaCble_prov_credito = info_det.IdCtaCble_prov_credito;
            edited_info.IdCtaCble_prov_debito  = info_det.IdCtaCble_prov_debito;

            edited_info.pc_Cuenta_prov_credito = info_det.pc_Cuenta_prov_credito;
            edited_info.pc_Cuenta_prov_debito  = info_det.pc_Cuenta_prov_debito;
        }
コード例 #2
0
        public ActionResult EditingAddNew([ModelBinder(typeof(DevExpressEditorsBinder))] ro_empleado_x_CuentaContable_Info info_det)
        {
            int IdEmpresa = Convert.ToInt32(SessionFixed.IdEmpresa);

            if (info_det != null)
            {
                if (info_det.IdCuentacon != "")
                {
                    ct_plancta_Info    info_cuenta = bus_plancta.get_info(IdEmpresa, info_det.IdCuentacon);
                    ro_rubro_tipo_Info info_rubro  = bus_rubro.get_info(IdEmpresa, info_det.IdRubro);
                    if (info_cuenta != null)
                    {
                        info_det.pc_Cuenta = info_det.IdCuentacon + " - " + info_cuenta.pc_Cuenta;
                    }
                    if (info_rubro != null)
                    {
                        info_det.ru_descripcion = info_det.IdRubro + " - " + info_rubro.ru_descripcion;
                    }
                }
            }
            if (ModelState.IsValid)
            {
                List_Det.AddRow(info_det, Convert.ToDecimal(SessionFixed.IdTransaccionSessionActual));
            }
            var model = List_Det.get_list(Convert.ToDecimal(SessionFixed.IdTransaccionSessionActual));

            carga_combo();
            return(PartialView("_GridViewPartial_Emp_CtaCont", model));
        }
コード例 #3
0
        public ActionResult Consultar(int IdEmpresa = 0, string IdCtaCble = "", bool Exito = false)
        {
            ct_plancta_Info model = bus_plancta.get_info(IdEmpresa, IdCtaCble);

            model.IdClasificacionEBIT = (model.IdClasificacionEBIT == null ? 0 : model.IdClasificacionEBIT);
            model.IdTipo_Gasto        = (model.IdTipo_Gasto == null ? 0 : model.IdTipo_Gasto);
            if (model == null)
            {
                return(RedirectToAction("Index"));
            }

            #region Permisos
            seg_Menu_x_Empresa_x_Usuario_Info info = bus_permisos.get_list_menu_accion(Convert.ToInt32(SessionFixed.IdEmpresa), SessionFixed.IdUsuario, "Contabilidad", "PlanDeCuentas", "Index");
            if (model.pc_Estado == "I")
            {
                info.Modificar = false;
                info.Anular    = false;
            }
            ViewBag.Nuevo     = info.Nuevo;
            ViewBag.Modificar = info.Modificar;
            ViewBag.Anular    = info.Anular;
            #endregion

            if (Exito)
            {
                ViewBag.MensajeSuccess = MensajeSuccess;
            }

            cargar_combos(model.IdEmpresa);
            return(View(model));
        }
コード例 #4
0
        public ActionResult Modificar(int IdEmpresa = 0, string IdCtaCble = "")
        {
            ct_plancta_Info model = bus_plancta.get_info(IdEmpresa, IdCtaCble);

            if (model == null)
            {
                return(RedirectToAction("Index"));
            }
            cargar_combos(model.IdEmpresa);
            return(View(model));
        }
コード例 #5
0
        public ActionResult Modificar(string IdCtaCble = "")
        {
            int             IdEmpresa = Convert.ToInt32(Session["IdEmpresa"]);
            ct_plancta_Info model     = bus_plancta.get_info(IdEmpresa, IdCtaCble);

            if (model == null)
            {
                return(RedirectToAction("Index"));
            }
            cargar_combos();
            return(View(model));
        }
コード例 #6
0
        public void AddRow(ct_cbtecble_det_Info info_det, decimal IdTransaccionSession)
        {
            int IdEmpresa = string.IsNullOrEmpty(SessionFixed.IdEmpresa) ? 0 : Convert.ToInt32(SessionFixed.IdEmpresa);

            List <ct_cbtecble_det_Info> list = get_list(IdTransaccionSession);

            info_det.secuencia = list.Count == 0 ? 1 : list.Max(q => q.secuencia) + 1;
            info_det.dc_Valor  = info_det.dc_Valor_debe > 0 ? info_det.dc_Valor_debe : info_det.dc_Valor_haber * -1;
            if (info_det.IdCtaCble != null)
            {
                var cta = bus_plancta.get_info(IdEmpresa, info_det.IdCtaCble);
                if (cta != null)
                {
                    info_det.pc_Cuenta = cta.IdCtaCble + " - " + cta.pc_Cuenta;
                }
            }

            #region Centro de costo
            if (string.IsNullOrEmpty(info_det.IdCentroCosto))
            {
                info_det.cc_Descripcion = string.Empty;
            }
            else
            {
                var cc = bus_cc.get_info(Convert.ToInt32(SessionFixed.IdEmpresa), info_det.IdCentroCosto);
                if (cc != null)
                {
                    info_det.cc_Descripcion = cc.cc_Descripcion;
                }
            }
            #endregion

            #region Punto de cargo
            if (info_det.IdPunto_cargo == null || info_det.IdPunto_cargo == 0)
            {
                info_det.nom_punto_cargo = string.Empty;
            }
            else
            {
                var pc = bus_pc.GetInfo(Convert.ToInt32(SessionFixed.IdEmpresa), Convert.ToInt32(info_det.IdPunto_cargo));
                if (pc != null)
                {
                    info_det.nom_punto_cargo = pc.nom_punto_cargo;
                }
            }
            #endregion
            list.Add(info_det);
        }
コード例 #7
0
        public JsonResult buscar_diarios(string tipo_documento)
        {
            try
            {
                int IdEmpresa            = Convert.ToInt32(SessionFixed.IdEmpresa);
                var IdTransaccionSession = Convert.ToDecimal(SessionFixed.IdTransaccionSession);
                var model = bus_ImporacionDiarios.get_list(tipo_documento);

                foreach (var item in model)
                {
                    var info_cta = bus_plancta.get_info(IdEmpresa, item.IdCtaCble);
                    if (info_cta == null)
                    {
                        item.IdCtaCble = "";
                        item.pc_Cuenta = "";
                        item.dc_Valor  = item.dc_ValorDebe > 0 ? item.dc_ValorDebe : item.dc_ValorHaber;
                    }
                    else
                    {
                        item.IdCtaCble = info_cta.IdCtaCble;
                        item.pc_Cuenta = info_cta.IdCtaCble + " - " + info_cta.pc_Cuenta;
                        item.dc_Valor  = item.dc_ValorDebe > 0 ? item.dc_ValorDebe : item.dc_ValorHaber;
                    }
                }

                ImportacionDiarios_Lista.set_list(model, IdTransaccionSession);

                return(Json(model, JsonRequestBehavior.AllowGet));
            }
            catch (Exception)
            {
                throw;
            }
        }
コード例 #8
0
        public void AddRow(ct_cbtecble_det_Info info_det, decimal IdTransaccionSession)
        {
            int IdEmpresa = Convert.ToInt32(SessionFixed.IdEmpresa);
            List <ct_cbtecble_det_Info> list = get_list(IdTransaccionSession);

            info_det.secuencia = list.Count == 0 ? 1 : list.Max(q => q.secuencia) + 1;
            info_det.dc_Valor  = Math.Round((info_det.dc_Valor_debe), 2) > 0 ? Math.Round((info_det.dc_Valor_debe), 2) : Math.Round((info_det.dc_Valor_haber * -1), 2);

            if (!string.IsNullOrEmpty(info_det.IdCtaCble))
            {
                var cta = bus_plancta.get_info(IdEmpresa, info_det.IdCtaCble);
                if (cta != null)
                {
                    info_det.pc_Cuenta = cta.IdCtaCble + " - " + cta.pc_Cuenta;
                }
            }
            list.Add(info_det);
        }
コード例 #9
0
        public ActionResult EditingAddNew([ModelBinder(typeof(DevExpressEditorsBinder))] Af_Activo_fijo_CtaCble_Info info_det)
        {
            var cuenta = bus_plancta.get_info(Convert.ToInt32(SessionFixed.IdEmpresa), info_det.IdCtaCble);

            if (cuenta != null)
            {
                info_det.pc_Cuenta = cuenta.pc_Cuenta;
            }
            if (ModelState.IsValid)
            {
                List_det.AddRow(info_det, Convert.ToDecimal(SessionFixed.IdTransaccionSessionActual));
            }
            Af_Activo_fijo_Info model = new Af_Activo_fijo_Info();

            model.LstDet = List_det.get_list(Convert.ToDecimal(SessionFixed.IdTransaccionSessionActual));
            cargar_combos_Detalle();
            return(PartialView("_GridViewPartial_activo_fijo_ctacble", model));
        }
コード例 #10
0
        public ActionResult EditingAddNew([ModelBinder(typeof(DevExpressEditorsBinder))] ct_cbtecble_Plantilla_det_Info info_det)
        {
            int IdEmpresa = Convert.ToInt32(Session["IdEmpresa"]);

            if (info_det != null)
            {
                if (info_det.IdCtaCble != "")
                {
                    ct_plancta_Info info_Cuenta = bus_plancta.get_info(IdEmpresa, info_det.IdCtaCble);
                    if (info_Cuenta != null)
                    {
                        info_det.pc_Cuenta = info_Cuenta.pc_Cuenta;
                    }
                }
            }

            CbteCble_PlantillaDet_Lista.AddRow(info_det, Convert.ToDecimal(SessionFixed.IdTransaccionSessionActual));
            var model = CbteCble_PlantillaDet_Lista.get_list(Convert.ToDecimal(SessionFixed.IdTransaccionSessionActual));

            return(PartialView("_GridViewPartial_ComprobanteContablePlantillaDet", model));
        }
コード例 #11
0
        public static void FileUploadComplete(object sender, DevExpress.Web.FileUploadCompleteEventArgs e)
        {
            #region Variables
            ct_plancta_Bus              bus_ctacble = new ct_plancta_Bus();
            ct_cbtecble_det_List        ListaDet    = new ct_cbtecble_det_List();
            List <ct_cbtecble_det_Info> Lista_Det   = new List <ct_cbtecble_det_Info>();

            int     cont = 0;
            decimal IdTransaccionSession = Convert.ToDecimal(SessionFixed.IdTransaccionSessionActual);
            int     IdEmpresa            = Convert.ToInt32(SessionFixed.IdEmpresa);
            #endregion


            Stream stream = new MemoryStream(e.UploadedFile.FileBytes);
            if (stream.Length > 0)
            {
                IExcelDataReader reader = null;
                reader = ExcelReaderFactory.CreateOpenXmlReader(stream);

                var SecDet = 1;
                #region Presupuesto
                while (reader.Read())
                {
                    if (!reader.IsDBNull(0) && cont > 0)
                    {
                        var             IdCtaCble   = Convert.ToString(reader.GetValue(1));
                        ct_plancta_Info infoCtaCble = bus_ctacble.get_info(IdEmpresa, IdCtaCble);

                        if (infoCtaCble != null)
                        {
                            ct_cbtecble_det_Info info = new ct_cbtecble_det_Info
                            {
                                IdEmpresa      = IdEmpresa,
                                secuencia      = SecDet++,
                                IdCtaCble      = IdCtaCble,
                                Descripcion    = infoCtaCble.pc_Cuenta,
                                dc_Valor       = Convert.ToDouble(reader.GetValue(2)) > 0 ? Convert.ToDouble(reader.GetValue(2)) : (Convert.ToDouble(reader.GetValue(3)) * -1),
                                dc_Valor_debe  = Convert.ToDouble(reader.GetValue(2)),
                                dc_Valor_haber = Convert.ToDouble(reader.GetValue(3))
                            };
                            Lista_Det.Add(info);
                        }
                    }
                    else
                    {
                        cont++;
                    }
                }
                ListaDet.set_list(Lista_Det, IdTransaccionSession);
                #endregion
            }
        }
コード例 #12
0
        public void UpdateRow(ct_cbtecble_Plantilla_det_Info info_det, decimal IdTransaccionSession)
        {
            int IdEmpresa = Convert.ToInt32(SessionFixed.IdEmpresa);
            ct_cbtecble_Plantilla_det_Info edited_info = get_list(IdTransaccionSession).Where(m => m.secuencia == info_det.secuencia).First();

            edited_info.dc_Valor       = info_det.dc_Valor_debe > 0 ? info_det.dc_Valor_debe : info_det.dc_Valor_haber * -1;
            edited_info.dc_Valor_debe  = info_det.dc_Valor_debe;
            edited_info.dc_Valor_haber = info_det.dc_Valor_haber;
            edited_info.dc_Observacion = info_det.dc_Observacion;

            #region Cuenta
            edited_info.IdCtaCble = info_det.IdCtaCble;
            ct_plancta_Info info_Cuenta = bus_plancta.get_info(IdEmpresa, info_det.IdCtaCble);
            if (info_Cuenta != null)
            {
                edited_info.pc_Cuenta = info_Cuenta.pc_Cuenta;
            }
            #endregion

            #region Centro de costo
            edited_info.IdCentroCosto = info_det.IdCentroCosto;
            if (string.IsNullOrEmpty(info_det.IdCentroCosto))
            {
                edited_info.cc_Descripcion = string.Empty;
            }
            else
            {
                var cc = bus_cc.get_info(Convert.ToInt32(SessionFixed.IdEmpresa), info_det.IdCentroCosto);
                if (cc != null)
                {
                    edited_info.cc_Descripcion = cc.cc_Descripcion;
                }
            }
            #endregion

            #region Punto Cargo
            edited_info.IdPunto_cargo       = info_det.IdPunto_cargo;
            edited_info.IdPunto_cargo_grupo = info_det.IdPunto_cargo_grupo;
            if (info_det.IdPunto_cargo == null || info_det.IdPunto_cargo == 0)
            {
                edited_info.nom_punto_cargo = string.Empty;
            }
            else
            {
                var pc = bus_pc.GetInfo(Convert.ToInt32(SessionFixed.IdEmpresa), Convert.ToInt32(info_det.IdPunto_cargo));
                if (pc != null)
                {
                    edited_info.nom_punto_cargo = pc.nom_punto_cargo;
                }
            }
            #endregion
        }
コード例 #13
0
        public void AddRow(ct_cbtecble_det_Info info_det, decimal IdTransaccionSession)
        {
            int IdEmpresa = string.IsNullOrEmpty(SessionFixed.IdEmpresa) ? 0 : Convert.ToInt32(SessionFixed.IdEmpresa);

            List <ct_cbtecble_det_Info> list = get_list(IdTransaccionSession);

            info_det.secuencia          = list.Count == 0 ? 1 : list.Max(q => q.secuencia) + 1;
            info_det.dc_Valor           = info_det.dc_Valor_debe > 0 ? info_det.dc_Valor_debe : info_det.dc_Valor_haber * -1;
            info_det.IdGrupoPresupuesto = info_det.IdGrupoPresupuesto;
            info_det.Descripcion        = info_det.Descripcion;
            if (info_det.IdCtaCble != null)
            {
                var cta = bus_plancta.get_info(IdEmpresa, info_det.IdCtaCble);
                if (cta != null)
                {
                    info_det.pc_Cuenta = cta.IdCtaCble + " - " + cta.pc_Cuenta;
                }
            }


            list.Add(info_det);
        }
コード例 #14
0
        public void AddRow(ImportacionDiarios_Info info_det, decimal IdTransaccionSession)
        {
            int IdEmpresa = string.IsNullOrEmpty(SessionFixed.IdEmpresa) ? 0 : Convert.ToInt32(SessionFixed.IdEmpresa);

            List <ImportacionDiarios_Info> list = get_list(IdTransaccionSession);

            info_det.Secuencial    = list.Count == 0 ? 1 : list.Max(q => q.Secuencial) + 1;
            info_det.dc_Valor      = info_det.dc_ValorDebe > 0 ? info_det.dc_ValorDebe : info_det.dc_ValorHaber;
            info_det.dc_ValorDebe  = info_det.dc_ValorDebe;
            info_det.dc_ValorHaber = info_det.dc_ValorHaber;

            if (info_det.IdCtaCble != null)
            {
                var cta = bus_plancta.get_info(IdEmpresa, info_det.IdCtaCble);
                if (cta != null)
                {
                    info_det.pc_Cuenta = cta.IdCtaCble + " - " + cta.pc_Cuenta;
                }
            }


            list.Add(info_det);
        }
コード例 #15
0
        public void UpdateRow_cta_sueldo_x_pagar(ro_parametro_contable_x_Nomina_Tipoliqui_Sueldo_x_Pagar_Info info_det)
        {
            ct_plancta_Bus bus_plancta = new ct_plancta_Bus();
            var            cta         = bus_plancta.get_info(Convert.ToInt32(SessionFixed.IdEmpresa), info_det.IdCtaCble_sueldo);
            ro_parametro_contable_x_Nomina_Tipoliqui_Sueldo_x_Pagar_Info edited_info = get_list_sueldo_x_pagar().Where(m => m.Secuencia == info_det.Secuencia).First();

            if (cta != null)
            {
                info_det.pc_Cuenta = cta.IdCtaCble + " - " + cta.pc_Cuenta;
            }
            edited_info.IdCtaCble_sueldo = info_det.IdCtaCble_sueldo;
            edited_info.IdNomina         = info_det.IdNomina;
            edited_info.IdNominaTipo     = info_det.IdNominaTipo;
            edited_info.pc_Cuenta        = info_det.pc_Cuenta;
        }
コード例 #16
0
        public ActionResult EditingUpdate([ModelBinder(typeof(DevExpressEditorsBinder))] in_producto_x_tb_bodega_Info info_det)
        {
            int IdEmpresa = Convert.ToInt32(SessionFixed.IdEmpresa);
            var lst       = Lis_in_producto_x_tb_bodega_Info_List.get_list(Convert.ToDecimal(SessionFixed.IdTransaccionSessionActual)).ToList();
            in_producto_x_tb_bodega_Info edited_info = lst.Where(m => m.Secuencia == info_det.Secuencia).FirstOrDefault();

            if (edited_info != null)
            {
                var suc       = bus_sucursal.get_info(IdEmpresa, edited_info.IdSucursal);
                var bod       = bus_bodega.get_info(IdEmpresa, edited_info.IdSucursal, edited_info.IdBodega);
                var cta       = bus_plancta.get_info(IdEmpresa, info_det.IdCtaCble_Costo);
                var cta_inven = bus_plancta.get_info(IdEmpresa, info_det.IdCtaCble_Inven);

                if (suc != null && bod != null)
                {
                    info_det.IdSucursal     = edited_info.IdSucursal;
                    info_det.Su_Descripcion = suc.Su_Descripcion;
                    info_det.IdBodega       = edited_info.IdBodega;
                    info_det.bo_Descripcion = bod.bo_Descripcion;
                }

                edited_info.IdCtaCble_Costo = info_det.IdCtaCble_Costo;
                edited_info.pc_Cuenta       = cta.IdCtaCble + " - " + cta.pc_Cuenta;
                info_det.pc_Cuenta          = cta.IdCtaCble + " - " + cta.pc_Cuenta;

                edited_info.IdCtaCble_Inven = info_det.IdCtaCble_Inven;
                edited_info.pc_Cuenta_inven = cta_inven.IdCtaCble + " - " + cta_inven.pc_Cuenta;
                info_det.pc_Cuenta_inven    = cta_inven.IdCtaCble + " - " + cta_inven.pc_Cuenta;

                bus_producto_x_tbbodega.modificarDB(edited_info);
            }

            List <in_producto_x_tb_bodega_Info> model = Lis_in_producto_x_tb_bodega_Info_List.get_list(Convert.ToDecimal(SessionFixed.IdTransaccionSessionActual));

            return(PartialView("_GridViewPartial_ParametrizacionContableProducto", model));
        }
コード例 #17
0
        public void UpdateRow_prov(ct_cbtecble_det_Info info_det, decimal IdTransaccionSession)
        {
            var ls = get_list(IdTransaccionSession);

            ct_plancta_Bus       bus_plancta = new ct_plancta_Bus();
            var                  cta         = bus_plancta.get_info(Convert.ToInt32(SessionFixed.IdEmpresa), info_det.IdCtaCble);
            ct_cbtecble_det_Info edited_info = get_list(IdTransaccionSession).Where(m => m.secuencia == info_det.secuencia).First();

            if (cta != null)
            {
                info_det.IdCtaCble = cta.IdCtaCble;
                info_det.pc_Cuenta = cta.pc_Cuenta;
            }

            edited_info.pc_Cuenta = info_det.pc_Cuenta;
            edited_info.IdCtaCble = info_det.IdCtaCble;
        }
コード例 #18
0
        public JsonResult ArmarDiario(int IdEmpresa = 0, decimal IdTransaccionSession = 0, int IdBanco = 0)
        {
            List <ct_cbtecble_det_Info> Lista = new List <ct_cbtecble_det_Info>();
            var ListaD    = List_det.get_list(IdTransaccionSession);
            var banco     = bus_banco_cuenta.get_info(IdEmpresa, IdBanco);
            int Secuencia = 1;

            if (banco != null)
            {
                var LG = ListaD.GroupBy(q => new { q.IdCtaCble, q.pc_Cuenta }).Select(q => new
                {
                    IdCtaCble = q.Key.IdCtaCble,
                    pc_Cuenta = q.Key.pc_Cuenta,
                    Valor     = q.Sum(g => g.Valor)
                });

                #region Cuentas proveedores
                foreach (var item in LG)
                {
                    Lista.Add(new ct_cbtecble_det_Info
                    {
                        secuencia     = Secuencia++,
                        IdCtaCble     = item.IdCtaCble,
                        pc_Cuenta     = item.pc_Cuenta,
                        dc_Valor      = Math.Round(item.Valor, 2, MidpointRounding.AwayFromZero),
                        dc_Valor_debe = Math.Round(item.Valor, 2, MidpointRounding.AwayFromZero)
                    });
                }
                #endregion

                #region Cuenta banco
                var cuenta = bus_plancta.get_info(IdEmpresa, banco.IdCtaCble);
                Lista.Add(new ct_cbtecble_det_Info
                {
                    secuencia         = Secuencia++,
                    IdCtaCble         = banco == null ? string.Empty : banco.IdCtaCble,
                    pc_Cuenta         = cuenta == null ? string.Empty : cuenta.pc_Cuenta,
                    dc_Valor          = Math.Round(ListaD.Sum(q => q.Valor), 2, MidpointRounding.AwayFromZero) * -1,
                    dc_Valor_haber    = Math.Round(ListaD.Sum(q => q.Valor), 2, MidpointRounding.AwayFromZero),
                    dc_para_conciliar = true
                });
                #endregion
            }
            List_Cbte.set_list(Lista, IdTransaccionSession);
            return(Json("", JsonRequestBehavior.AllowGet));
        }
コード例 #19
0
        public void NewRow_cta_sueldo_x_pagar(ro_parametro_contable_x_Nomina_Tipoliqui_Sueldo_x_Pagar_Info info_det)
        {
            List <ro_parametro_contable_x_Nomina_Tipoliqui_Sueldo_x_Pagar_Info> list = get_list_sueldo_x_pagar();

            info_det.Secuencia = list.Count == 0 ? 1 : list.Max(q => q.Secuencia) + 1;

            ct_plancta_Bus bus_plancta = new ct_plancta_Bus();
            var            cta         = bus_plancta.get_info(Convert.ToInt32(SessionFixed.IdEmpresa), info_det.IdCtaCble_sueldo);

            if (cta != null)
            {
                info_det.pc_Cuenta = cta.IdCtaCble + " - " + cta.pc_Cuenta;
            }



            list.Add(info_det);
        }
コード例 #20
0
        public void UpdateRow_cta_rubros(ro_Config_Param_contable_Info info_det, decimal IdTransaccionSession)
        {
            var ls = get_list_cta_rubros(IdTransaccionSession);

            ct_plancta_Bus bus_plancta = new ct_plancta_Bus();
            ro_Config_Param_contable_Info edited_info = get_list_cta_rubros(IdTransaccionSession).Where(m => m.Secuencia == info_det.Secuencia).First();
            var cta = bus_plancta.get_info(Convert.ToInt32(SessionFixed.IdEmpresa), info_det.IdCtaCble);

            if (cta != null)
            {
                info_det.pc_Cuenta = cta.IdCtaCble + " - " + cta.pc_Cuenta;
                edited_info.pc_Cuenta_prov_debito = info_det.pc_Cuenta_prov_debito;
            }

            edited_info.IdCtaCble = info_det.IdCtaCble;
            edited_info.pc_Cuenta = info_det.pc_Cuenta;

            edited_info.IdCtaCble_prov_credito = info_det.IdCtaCble_prov_credito;
            edited_info.DebCre = info_det.DebCre;
        }
コード例 #21
0
        public ActionResult EditingUpdate([ModelBinder(typeof(DevExpressEditorsBinder))] ct_cbtecble_det_Info info_det)
        {
            ct_plancta_Bus bus_plancta = new ct_plancta_Bus();
            var            cta         = bus_plancta.get_info(Convert.ToInt32(SessionFixed.IdEmpresa), info_det.IdCtaCble);

            if (info_det != null)
            {
                if (cta != null)
                {
                    info_det.pc_Cuenta = cta.pc_Cuenta;
                    info_det.IdCtaCble = cta.IdCtaCble;
                }
            }
            if (ModelState.IsValid)
            {
                list_det.UpdateRow(info_det, Convert.ToDecimal(SessionFixed.IdTransaccionSessionActual));
            }
            var model = list_det.get_list_cta(Convert.ToDecimal(SessionFixed.IdTransaccionSessionActual));

            return(PartialView("_GridViewPartial_sueldo_x_pagar", model));
        }
コード例 #22
0
        public ActionResult EditingAddNew([ModelBinder(typeof(DevExpressEditorsBinder))] cxc_MotivoLiquidacionTarjeta_x_tb_sucursal_Info info_det)
        {
            int IdEmpresa = Convert.ToInt32(SessionFixed.IdEmpresa);

            if (info_det != null)
            {
                if (info_det.IdCtaCble != "")
                {
                    ct_plancta_Info info_cuenta = bus_plancta.get_info(IdEmpresa, info_det.IdCtaCble);
                    if (info_cuenta != null)
                    {
                        info_det.pc_Cuenta = info_cuenta.pc_Cuenta;
                    }
                }
            }
            if (ModelState.IsValid)
            {
                List_Det.AddRow(info_det, Convert.ToDecimal(SessionFixed.IdTransaccionSessionActual));
            }
            var model = List_Det.get_list(Convert.ToDecimal(SessionFixed.IdTransaccionSessionActual));

            cargar_combos_Detalle();
            return(PartialView("_GridViewPartial_motivo_x_sucursal", model));
        }