예제 #1
0
        /// <summary> Inserta el movimiento contable. </summary>
        /// <param name="tstrCodigoPar"> Codigo del par a trabajar. </param>
        /// <param name="tdecValor"> Valor del movimiento. </param>
        /// <param name="tintCodigoRec"> Código del recibo de ingreso o egreso. </param>
        public void gmtdInsertarMvtoContable(string tstrCodigoPar, decimal tdecValor, int tintCodigoRec)
        {
            using (dbExequial2010DataContext recibos = new dbExequial2010DataContext())
            {
                List <cuentaValores>[] cuotasValores = new blCuentaPar().gmtdCalcularValores(tstrCodigoPar, tdecValor);

                List <cuentaValores> cuentasDebito = cuotasValores[0];
                for (int a = 0; a < cuentasDebito.Count; a++)
                {
                    tblCuentasOperacionesContabilidad operacion = new tblCuentasOperacionesContabilidad();
                    operacion.decValor         = cuentasDebito[a].decValor;
                    operacion.dtmFecha         = DateTime.Now;
                    operacion.intCodigoRec     = tintCodigoRec;
                    operacion.intTipodeIngreso = 1;
                    operacion.strCuenta        = cuentasDebito[a].strCuenta;
                    operacion.strDescripcion   = cuentasDebito[a].strCuenta;
                    recibos.tblCuentasOperacionesContabilidads.InsertOnSubmit(operacion);
                }

                List <cuentaValores> cuentasCredito = cuotasValores[1];
                for (int a = 0; a < cuentasCredito.Count; a++)
                {
                    tblCuentasOperacionesContabilidad operacion = new tblCuentasOperacionesContabilidad();
                    operacion.decValor         = cuentasCredito[a].decValor;
                    operacion.dtmFecha         = DateTime.Now;
                    operacion.intCodigoRec     = tintCodigoRec;
                    operacion.intTipodeIngreso = 2;
                    operacion.strCuenta        = cuentasCredito[a].strCuenta;
                    operacion.strDescripcion   = cuentasCredito[a].strCuenta;
                    recibos.tblCuentasOperacionesContabilidads.InsertOnSubmit(operacion);
                }
            }
        }
        /// <summary> Elimina la liquidación de una cuenta de ahorro navideño. </summary>
        /// <param name="tobjCuentaLiquidad"> Un objeto con el código de la cuenta a eliminar. </param>
        /// <returns> Un string que indica si se ejecuto o no la operación. </returns>
        public string gmtdEliminarLiquidaciondeCuenta(LiquidacionAhorroNavideno tobjCuentaLiquidad)
        {
            String   strResultado;
            DateTime dtmFechaActual      = new blConfiguracion().gmtdCapturarFechadelServidor();
            decimal  decValorLiquidacion = 0;
            decimal  decValorMulta       = 0;
            string   strNombre           = "";
            string   strApellido         = "";

            try
            {
                using (TransactionScope ts = new TransactionScope())
                {
                    using (dbExequial2010DataContext reciboEgreso = new dbExequial2010DataContext())
                    {
                        tblEgreso egre_old = reciboEgreso.tblEgresos.SingleOrDefault(p => p.intCodigoEgr == tobjCuentaLiquidad.intCodigoEgr);
                        egre_old.bitAnulado  = true;
                        egre_old.dtmFechaAnu = dtmFechaActual;
                        decValorLiquidacion  = egre_old.decTotal;
                        strNombre            = egre_old.strNombre;
                        strApellido          = egre_old.strApellido;
                        reciboEgreso.tblLogdeActividades.InsertOnSubmit(metodos.gmtdLog("Elimino el egreso " + tobjCuentaLiquidad.intCodigoEgr.ToString(), "FrmAhorrosaFuturoLiquidacion"));
                        reciboEgreso.SubmitChanges();

                        #region Mvto ingreso x anular liquidación de ahorro navideño
                        List <cuentaValores>[] cuotasValores = new blCuentaPar().gmtdCalcularValores("0001", decValorLiquidacion);
                        List <cuentaValores>   cuentasDebito = cuotasValores[0];
                        for (int a = 0; a < cuentasDebito.Count; a++)
                        {
                            reciboEgreso.tblCuentasOperacionesContabilidads.InsertOnSubmit(new blRecibosIngresos().gmtdMvtoContableIngresos(cuentasDebito[a].decValor, 0, cuentasDebito[a].strCuenta, "Recibo de ingreso x Anular liquidación de ahorro navideño", 1, tobjCuentaLiquidad.strCedulaAho, strNombre + " " + strApellido, dtmFechaActual));
                        }
                        List <cuentaValores> cuentasCredito = cuotasValores[1];
                        for (int a = 0; a < cuentasCredito.Count; a++)
                        {
                            reciboEgreso.tblCuentasOperacionesContabilidads.InsertOnSubmit(new blRecibosIngresos().gmtdMvtoContableIngresos(cuentasCredito[a].decValor, 0, cuentasCredito[a].strCuenta, "Recibo de ingreso x Anular liquidación de ahorro navideño", 2, tobjCuentaLiquidad.strCedulaAho, strNombre + " " + strApellido, dtmFechaActual));
                        }
                        #endregion
                    }

                    if (tobjCuentaLiquidad.intCodigoIng > 0)
                    {
                        using (dbExequial2010DataContext reciboEgreso = new dbExequial2010DataContext())
                        {
                            tblIngreso ing_old = reciboEgreso.tblIngresos.SingleOrDefault(p => p.intCodigoIng == tobjCuentaLiquidad.intCodigoIng);
                            ing_old.bitAnulado  = true;
                            ing_old.dtmFechaAnu = dtmFechaActual;
                            decValorMulta       = ing_old.decTotalIng;
                            reciboEgreso.tblLogdeActividades.InsertOnSubmit(metodos.gmtdLog("Elimino el ingreso " + tobjCuentaLiquidad.intCodigoIng.ToString(), "FrmAhorrosaFuturoLiquidacion"));
                            reciboEgreso.SubmitChanges();

                            #region Mvto egreso x anular liquidación de ahorro navideño
                            List <cuentaValores>[] cuotasValores = new blCuentaPar().gmtdCalcularValores("0001", decValorMulta);
                            List <cuentaValores>   cuentasDebito = cuotasValores[0];
                            for (int a = 0; a < cuentasDebito.Count; a++)
                            {
                                reciboEgreso.tblCuentasOperacionesContabilidads.InsertOnSubmit(new blRecibosIngresos().gmtdMvtoContableIngresos(cuentasDebito[a].decValor, 0, cuentasDebito[a].strCuenta, "Recibo de egreso x Anular liquidación de ahorro a futuro", 2, tobjCuentaLiquidad.strCedulaAho, strNombre + " " + strApellido, dtmFechaActual));
                            }
                            List <cuentaValores> cuentasCredito = cuotasValores[1];
                            for (int a = 0; a < cuentasCredito.Count; a++)
                            {
                                reciboEgreso.tblCuentasOperacionesContabilidads.InsertOnSubmit(new blRecibosIngresos().gmtdMvtoContableIngresos(cuentasCredito[a].decValor, 0, cuentasCredito[a].strCuenta, "Recibo de egreso x Anular liquidación de ahorro a futuro", 1, tobjCuentaLiquidad.strCedulaAho, strNombre + " " + strApellido, dtmFechaActual));
                            }
                            #endregion
                        }
                    }

                    using (dbExequial2010DataContext ahorro = new dbExequial2010DataContext())
                    {
                        tblAhorrosNavideno aho_old = ahorro.tblAhorrosNavidenos.SingleOrDefault(p => p.strCuenta == tobjCuentaLiquidad.strCuenta);
                        aho_old.bitLiquidada      = false;
                        aho_old.dtmFechaLiquidada = Convert.ToDateTime("1900/01/01");
                        ahorro.tblLogdeActividades.InsertOnSubmit(tobjCuentaLiquidad.log);
                        ahorro.SubmitChanges();
                        strResultado = "Registro Anulado";
                    }

                    ts.Complete();
                }
            }
            catch (Exception ex)
            {
                new dao().gmtdInsertarError(ex);
                strResultado = "- Ocurrió un error al Actualizar el registro";
            }
            return(strResultado);
        }
예제 #3
0
        /// <summary> Migra los recibos anteriores </summary>
        /// <param name="tobjIngreso"> el recibo </param>
        /// <returns> Un string que indica si se ejecuto o no la operación. </returns>
        public string gmtdMigrarRecibos(tblIngreso tobjIngreso)
        {
            string strRetornar = "";

            try
            {
                using (dbExequial2010DataContext recibosIngresos = new dbExequial2010DataContext())
                {
                    #region Mvto Ingreso Cuota
                    if (tobjIngreso.ingresoCuota != null)
                    {
                        List <cuentaValores>[] cuotasValores = new blCuentaPar().gmtdCalcularValores(tobjIngreso.ingresoCuota.strCodigoPar, tobjIngreso.ingresoCuota.intTotal);

                        List <cuentaValores> cuentasDebito = cuotasValores[1];
                        for (int a = 0; a < cuentasDebito.Count; a++)
                        {
                            recibosIngresos.tblCuentasOperacionesContabilidads.InsertOnSubmit(new blRecibosIngresos().gmtdMvtoContableIngresos(cuentasDebito[a].decValor, tobjIngreso.intCodigoIng, cuentasDebito[a].strCuenta, "Cuota exequial", 1, tobjIngreso.strCedulaIng, tobjIngreso.strNombreIng + " " + tobjIngreso.strApellidoIng, tobjIngreso.dtmFechaRec));
                        }

                        List <cuentaValores> cuentasCredito = cuotasValores[0];
                        for (int a = 0; a < cuentasCredito.Count; a++)
                        {
                            recibosIngresos.tblCuentasOperacionesContabilidads.InsertOnSubmit(new blRecibosIngresos().gmtdMvtoContableIngresos(cuentasCredito[a].decValor, tobjIngreso.intCodigoIng, cuentasCredito[a].strCuenta, "Cuota exequial.", 2, tobjIngreso.strCedulaIng, tobjIngreso.strNombreIng + " " + tobjIngreso.strApellidoIng, tobjIngreso.dtmFechaRec));
                        }
                    }
                    #endregion

                    #region Mvto Ingreso Prestamo
                    if (tobjIngreso.ingresoPrestamo != null)
                    {
                        for (int b = 0; b < tobjIngreso.ingresoPrestamo.Count; b++)
                        {
                            List <cuentaValores>[] cuotasValores = new blCuentaPar().gmtdCalcularValores(tobjIngreso.ingresoPrestamo[0].strParCapital, tobjIngreso.ingresoPrestamo[b].decCapital);
                            List <cuentaValores>   cuentasDebito = cuotasValores[0];
                            for (int a = 0; a < cuentasDebito.Count; a++)
                            {
                                recibosIngresos.tblCuentasOperacionesContabilidads.InsertOnSubmit(new blRecibosIngresos().gmtdMvtoContableIngresos(cuentasDebito[a].decValor, tobjIngreso.intCodigoIng, cuentasDebito[a].strCuenta, "Credito Capital.", 1, tobjIngreso.strCedulaIng, tobjIngreso.strNombreIng + " " + tobjIngreso.strApellidoIng, tobjIngreso.dtmFechaRec));
                            }
                            List <cuentaValores> cuentasCredito = cuotasValores[1];
                            for (int a = 0; a < cuentasCredito.Count; a++)
                            {
                                recibosIngresos.tblCuentasOperacionesContabilidads.InsertOnSubmit(new blRecibosIngresos().gmtdMvtoContableIngresos(cuentasCredito[a].decValor, tobjIngreso.intCodigoIng, cuentasCredito[a].strCuenta, "Credito Capital.", 2, tobjIngreso.strCedulaIng, tobjIngreso.strNombreIng + " " + tobjIngreso.strApellidoIng, tobjIngreso.dtmFechaRec));
                            }

                            cuotasValores = new blCuentaPar().gmtdCalcularValores(tobjIngreso.ingresoPrestamo[0].strParCapital, tobjIngreso.ingresoPrestamo[b].decInteres);
                            cuentasDebito = cuotasValores[0];
                            for (int a = 0; a < cuentasDebito.Count; a++)
                            {
                                recibosIngresos.tblCuentasOperacionesContabilidads.InsertOnSubmit(new blRecibosIngresos().gmtdMvtoContableIngresos(cuentasDebito[a].decValor, tobjIngreso.intCodigoIng, cuentasDebito[a].strCuenta, "Credito Intereses.", 1, tobjIngreso.strCedulaIng, tobjIngreso.strNombreIng + " " + tobjIngreso.strApellidoIng, tobjIngreso.dtmFechaRec));
                            }
                            cuentasCredito = cuotasValores[1];
                            for (int a = 0; a < cuentasCredito.Count; a++)
                            {
                                recibosIngresos.tblCuentasOperacionesContabilidads.InsertOnSubmit(new blRecibosIngresos().gmtdMvtoContableIngresos(cuentasCredito[a].decValor, tobjIngreso.intCodigoIng, cuentasCredito[a].strCuenta, "Credito Intereses.", 2, tobjIngreso.strCedulaIng, tobjIngreso.strNombreIng + " " + tobjIngreso.strApellidoIng, tobjIngreso.dtmFechaRec));
                            }

                            cuotasValores = new blCuentaPar().gmtdCalcularValores(tobjIngreso.ingresoPrestamo[0].strParCapital, tobjIngreso.ingresoPrestamo[b].decMora);
                            cuentasDebito = cuotasValores[0];
                            for (int a = 0; a < cuentasDebito.Count; a++)
                            {
                                recibosIngresos.tblCuentasOperacionesContabilidads.InsertOnSubmit(new blRecibosIngresos().gmtdMvtoContableIngresos(cuentasDebito[a].decValor, tobjIngreso.intCodigoIng, cuentasDebito[a].strCuenta, "Credito Mora.", 1, tobjIngreso.strCedulaIng, tobjIngreso.strNombreIng + " " + tobjIngreso.strApellidoIng, tobjIngreso.dtmFechaRec));
                            }
                            cuentasCredito = cuotasValores[1];
                            for (int a = 0; a < cuentasCredito.Count; a++)
                            {
                                recibosIngresos.tblCuentasOperacionesContabilidads.InsertOnSubmit(new blRecibosIngresos().gmtdMvtoContableIngresos(cuentasCredito[a].decValor, tobjIngreso.intCodigoIng, cuentasCredito[a].strCuenta, "Credito Mora.", 2, tobjIngreso.strCedulaIng, tobjIngreso.strNombreIng + " " + tobjIngreso.strApellidoIng, tobjIngreso.dtmFechaRec));
                            }
                        }
                    }
                    #endregion

                    #region Mvto Ingreso Ahorro a la Vista
                    if (tobjIngreso.ingresoAhorro != null)
                    {
                        List <cuentaValores>[] cuotasValores = new blCuentaPar().gmtdCalcularValores(tobjIngreso.ingresoAhorro.strCodigoPar, tobjIngreso.ingresoAhorro.decAhorro);
                        List <cuentaValores>   cuentasDebito = cuotasValores[0];
                        for (int a = 0; a < cuentasDebito.Count; a++)
                        {
                            recibosIngresos.tblCuentasOperacionesContabilidads.InsertOnSubmit(new blRecibosIngresos().gmtdMvtoContableIngresos(cuentasDebito[a].decValor, tobjIngreso.intCodigoIng, cuentasDebito[a].strCuenta, "Ahorro a la vista.", 1, tobjIngreso.strCedulaIng, tobjIngreso.strNombreIng + " " + tobjIngreso.strApellidoIng, tobjIngreso.dtmFechaRec));
                        }
                        List <cuentaValores> cuentasCredito = cuotasValores[1];
                        for (int a = 0; a < cuentasCredito.Count; a++)
                        {
                            recibosIngresos.tblCuentasOperacionesContabilidads.InsertOnSubmit(new blRecibosIngresos().gmtdMvtoContableIngresos(cuentasCredito[a].decValor, tobjIngreso.intCodigoIng, cuentasCredito[a].strCuenta, "Ahorro a la vista.", 2, tobjIngreso.strCedulaIng, tobjIngreso.strNombreIng + " " + tobjIngreso.strApellidoIng, tobjIngreso.dtmFechaRec));
                        }
                    }
                    #endregion

                    #region Mvto Ingreso Ahorro Estudiantil
                    if (tobjIngreso.ingresoAhorroEstudiantil != null)
                    {
                        List <cuentaValores>[] cuotasValores = new blCuentaPar().gmtdCalcularValores(tobjIngreso.ingresoAhorroEstudiantil.strCodigoPar, tobjIngreso.ingresoAhorroEstudiantil.decAhorro);
                        List <cuentaValores>   cuentasDebito = cuotasValores[0];
                        for (int a = 0; a < cuentasDebito.Count; a++)
                        {
                            recibosIngresos.tblCuentasOperacionesContabilidads.InsertOnSubmit(new blRecibosIngresos().gmtdMvtoContableIngresos(cuentasDebito[a].decValor, tobjIngreso.intCodigoIng, cuentasDebito[a].strCuenta, "Ahorro estudiantil", 1, tobjIngreso.strCedulaIng, tobjIngreso.strNombreIng + " " + tobjIngreso.strApellidoIng, tobjIngreso.dtmFechaRec));
                        }
                        List <cuentaValores> cuentasCredito = cuotasValores[1];
                        for (int a = 0; a < cuentasCredito.Count; a++)
                        {
                            recibosIngresos.tblCuentasOperacionesContabilidads.InsertOnSubmit(new blRecibosIngresos().gmtdMvtoContableIngresos(cuentasCredito[a].decValor, tobjIngreso.intCodigoIng, cuentasCredito[a].strCuenta, "Ahorro estudiantil", 2, tobjIngreso.strCedulaIng, tobjIngreso.strNombreIng + " " + tobjIngreso.strApellidoIng, tobjIngreso.dtmFechaRec));
                        }
                    }
                    #endregion

                    #region Mvto Ingreso Ahorro Fijo
                    if (tobjIngreso.ingresoAhorroFijo != null)
                    {
                        List <cuentaValores>[] cuotasValores = new blCuentaPar().gmtdCalcularValores(tobjIngreso.ingresoAhorroFijo.strCodigoPar, tobjIngreso.ingresoAhorroFijo.decAhorro);
                        List <cuentaValores>   cuentasDebito = cuotasValores[0];
                        for (int a = 0; a < cuentasDebito.Count; a++)
                        {
                            recibosIngresos.tblCuentasOperacionesContabilidads.InsertOnSubmit(new blRecibosIngresos().gmtdMvtoContableIngresos(cuentasDebito[a].decValor, tobjIngreso.intCodigoIng, cuentasDebito[a].strCuenta, "Ahorro Fijo.", 1, tobjIngreso.strCedulaIng, tobjIngreso.strNombreIng + " " + tobjIngreso.strApellidoIng, tobjIngreso.dtmFechaRec));
                        }
                        List <cuentaValores> cuentasCredito = cuotasValores[1];
                        for (int a = 0; a < cuentasCredito.Count; a++)
                        {
                            recibosIngresos.tblCuentasOperacionesContabilidads.InsertOnSubmit(new blRecibosIngresos().gmtdMvtoContableIngresos(cuentasCredito[a].decValor, tobjIngreso.intCodigoIng, cuentasCredito[a].strCuenta, "Ahorro Fijo.", 2, tobjIngreso.strCedulaIng, tobjIngreso.strNombreIng + " " + tobjIngreso.strApellidoIng, tobjIngreso.dtmFechaRec));
                        }
                    }
                    #endregion

                    #region Mvto Ingreso Ahorro CDT
                    if (tobjIngreso.ingresoAhorroCdt != null)
                    {
                        List <cuentaValores>[] cuotasValores = new blCuentaPar().gmtdCalcularValores(tobjIngreso.ingresoAhorroCdt.strCodigoPar, tobjIngreso.ingresoAhorroFijo.decAhorro);
                        List <cuentaValores>   cuentasDebito = cuotasValores[0];
                        for (int a = 0; a < cuentasDebito.Count; a++)
                        {
                            recibosIngresos.tblCuentasOperacionesContabilidads.InsertOnSubmit(new blRecibosIngresos().gmtdMvtoContableIngresos(cuentasDebito[a].decValor, tobjIngreso.intCodigoIng, cuentasDebito[a].strCuenta, "Ahorro CDT", 1, tobjIngreso.strCedulaIng, tobjIngreso.strNombreIng + " " + tobjIngreso.strApellidoIng, tobjIngreso.dtmFechaRec));
                        }
                        List <cuentaValores> cuentasCredito = cuotasValores[1];
                        for (int a = 0; a < cuentasCredito.Count; a++)
                        {
                            recibosIngresos.tblCuentasOperacionesContabilidads.InsertOnSubmit(new blRecibosIngresos().gmtdMvtoContableIngresos(cuentasCredito[a].decValor, tobjIngreso.intCodigoIng, cuentasCredito[a].strCuenta, "Ahorro CDT", 2, tobjIngreso.strCedulaIng, tobjIngreso.strNombreIng + " " + tobjIngreso.strApellidoIng, tobjIngreso.dtmFechaRec));
                        }
                    }
                    #endregion

                    #region Mvto Ingreso Ahorro Navideño
                    if (tobjIngreso.ingresoAhorroNavideño != null)
                    {
                        for (int b = 0; b < tobjIngreso.ingresoAhorroNavideño.Count; b++)
                        {
                            List <cuentaValores>[] cuotasValores = new blCuentaPar().gmtdCalcularValores(tobjIngreso.ingresoAhorroNavideño[b].strCodigoPar, tobjIngreso.ingresoAhorroNavideño[b].decValorCuo);
                            List <cuentaValores>   cuentasDebito = cuotasValores[0];
                            for (int a = 0; a < cuentasDebito.Count; a++)
                            {
                                recibosIngresos.tblCuentasOperacionesContabilidads.InsertOnSubmit(new blRecibosIngresos().gmtdMvtoContableIngresos(cuentasDebito[a].decValor, tobjIngreso.intCodigoIng, cuentasDebito[a].strCuenta, "Ahorro Navideño.", 1, tobjIngreso.strCedulaIng, tobjIngreso.strNombreIng + " " + tobjIngreso.strApellidoIng, tobjIngreso.dtmFechaRec));
                            }
                            List <cuentaValores> cuentasCredito = cuotasValores[1];
                            for (int a = 0; a < cuentasCredito.Count; a++)
                            {
                                recibosIngresos.tblCuentasOperacionesContabilidads.InsertOnSubmit(new blRecibosIngresos().gmtdMvtoContableIngresos(cuentasCredito[a].decValor, tobjIngreso.intCodigoIng, cuentasCredito[a].strCuenta, "Ahorro Navideño.", 2, tobjIngreso.strCedulaIng, tobjIngreso.strNombreIng + " " + tobjIngreso.strApellidoIng, tobjIngreso.dtmFechaRec));
                            }
                        }
                    }
                    #endregion

                    #region Mvto Ingreso Ahorro a futuro
                    if (tobjIngreso.ingresoAhorroaFuturo != null)
                    {
                        for (int b = 0; b < tobjIngreso.ingresoAhorroaFuturo.Count; b++)
                        {
                            List <cuentaValores>[] cuotasValores = new blCuentaPar().gmtdCalcularValores(tobjIngreso.ingresoAhorroaFuturo[b].strCodigoPar, tobjIngreso.ingresoAhorroaFuturo[b].decValorCuo);
                            List <cuentaValores>   cuentasDebito = cuotasValores[0];
                            for (int a = 0; a < cuentasDebito.Count; a++)
                            {
                                recibosIngresos.tblCuentasOperacionesContabilidads.InsertOnSubmit(new blRecibosIngresos().gmtdMvtoContableIngresos(cuentasDebito[a].decValor, tobjIngreso.intCodigoIng, cuentasDebito[a].strCuenta, "Ahorro a futuro.", 1, tobjIngreso.strCedulaIng, tobjIngreso.strNombreIng + " " + tobjIngreso.strApellidoIng, tobjIngreso.dtmFechaRec));
                            }
                            List <cuentaValores> cuentasCredito = cuotasValores[1];
                            for (int a = 0; a < cuentasCredito.Count; a++)
                            {
                                recibosIngresos.tblCuentasOperacionesContabilidads.InsertOnSubmit(new blRecibosIngresos().gmtdMvtoContableIngresos(cuentasCredito[a].decValor, tobjIngreso.intCodigoIng, cuentasCredito[a].strCuenta, "Ahorro a futuro.", 2, tobjIngreso.strCedulaIng, tobjIngreso.strNombreIng + " " + tobjIngreso.strApellidoIng, tobjIngreso.dtmFechaRec));
                            }
                        }
                    }
                    #endregion

                    #region Mvto Ingreso Otros Ingresos
                    if (tobjIngreso.ingresoOtrosIngresos != null)
                    {
                        for (int b = 0; b < tobjIngreso.ingresoOtrosIngresos.Count; b++)
                        {
                            List <cuentaValores>[] cuotasValores = new blCuentaPar().gmtdCalcularValores(tobjIngreso.ingresoOtrosIngresos[b].strCodigoPar, tobjIngreso.ingresoOtrosIngresos[b].decValor);
                            List <cuentaValores>   cuentasDebito = cuotasValores[0];
                            for (int a = 0; a < cuentasDebito.Count; a++)
                            {
                                recibosIngresos.tblCuentasOperacionesContabilidads.InsertOnSubmit(new blRecibosIngresos().gmtdMvtoContableIngresos(cuentasDebito[a].decValor, tobjIngreso.intCodigoIng, cuentasDebito[a].strCuenta, "Ing Otro " + tobjIngreso.ingresoOtrosIngresos[b].strCodOtrosIngresos, 1, tobjIngreso.strCedulaIng, tobjIngreso.strNombreIng + " " + tobjIngreso.strApellidoIng, tobjIngreso.dtmFechaRec));
                            }
                            List <cuentaValores> cuentasCredito = cuotasValores[1];
                            for (int a = 0; a < cuentasCredito.Count; a++)
                            {
                                recibosIngresos.tblCuentasOperacionesContabilidads.InsertOnSubmit(new blRecibosIngresos().gmtdMvtoContableIngresos(cuentasCredito[a].decValor, tobjIngreso.intCodigoIng, cuentasCredito[a].strCuenta, "Ing Otro " + tobjIngreso.ingresoOtrosIngresos[b].strCodOtrosIngresos, 2, tobjIngreso.strCedulaIng, tobjIngreso.strNombreIng + " " + tobjIngreso.strApellidoIng, tobjIngreso.dtmFechaRec));
                            }
                        }
                    }
                    #endregion

                    #region Mvto Ingreso Abono a Prestamos
                    if (tobjIngreso.ingresoAbonoaPrestamo != null)
                    {
                        List <cuentaValores>[] cuotasValores = new blCuentaPar().gmtdCalcularValores(tobjIngreso.ingresoAbonoaPrestamo.strCodigoPar, tobjIngreso.ingresoAbonoaPrestamo.decAbonoPrestamo);
                        List <cuentaValores>   cuentasDebito = cuotasValores[0];
                        for (int a = 0; a < cuentasDebito.Count; a++)
                        {
                            recibosIngresos.tblCuentasOperacionesContabilidads.InsertOnSubmit(new blRecibosIngresos().gmtdMvtoContableIngresos(cuentasDebito[a].decValor, tobjIngreso.intCodigoIng, cuentasDebito[a].strCuenta, "Abono a préstamo", 1, tobjIngreso.strCedulaIng, tobjIngreso.strNombreIng + " " + tobjIngreso.strApellidoIng, tobjIngreso.dtmFechaRec));
                        }
                        List <cuentaValores> cuentasCredito = cuotasValores[1];
                        for (int a = 0; a < cuentasCredito.Count; a++)
                        {
                            recibosIngresos.tblCuentasOperacionesContabilidads.InsertOnSubmit(new blRecibosIngresos().gmtdMvtoContableIngresos(cuentasCredito[a].decValor, tobjIngreso.intCodigoIng, cuentasCredito[a].strCuenta, "Abono a préstamo", 2, tobjIngreso.strCedulaIng, tobjIngreso.strNombreIng + " " + tobjIngreso.strApellidoIng, tobjIngreso.dtmFechaRec));
                        }
                    }
                    #endregion

                    #region Mvto Ingreso Abono a Venta
                    if (tobjIngreso.ingresoAbonoaVenta != null)
                    {
                        List <cuentaValores>[] cuotasValores = new blCuentaPar().gmtdCalcularValores(tobjIngreso.ingresoAbonoaVenta.strCodigoPar, tobjIngreso.ingresoAbonoaVenta.decAbona);
                        List <cuentaValores>   cuentasDebito = cuotasValores[0];
                        for (int a = 0; a < cuentasDebito.Count; a++)
                        {
                            recibosIngresos.tblCuentasOperacionesContabilidads.InsertOnSubmit(new blRecibosIngresos().gmtdMvtoContableIngresos(cuentasDebito[a].decValor, tobjIngreso.intCodigoIng, cuentasDebito[a].strCuenta, "Abono a venta.", 1, tobjIngreso.strCedulaIng, tobjIngreso.strNombreIng + " " + tobjIngreso.strApellidoIng, tobjIngreso.dtmFechaRec));
                        }
                        List <cuentaValores> cuentasCredito = cuotasValores[1];
                        for (int a = 0; a < cuentasCredito.Count; a++)
                        {
                            recibosIngresos.tblCuentasOperacionesContabilidads.InsertOnSubmit(new blRecibosIngresos().gmtdMvtoContableIngresos(cuentasCredito[a].decValor, tobjIngreso.intCodigoIng, cuentasCredito[a].strCuenta, "Abono a venta.", 2, tobjIngreso.strCedulaIng, tobjIngreso.strNombreIng + " " + tobjIngreso.strApellidoIng, tobjIngreso.dtmFechaRec));
                        }
                    }
                    #endregion

                    #region Mvto Ingreso Abono a Deuda
                    if (tobjIngreso.ingresoAbonoaDeuda != null)
                    {
                        for (int b = 0; b < tobjIngreso.ingresoAbonoaDeuda.Count; b++)
                        {
                            List <cuentaValores>[] cuotasValores = new blCuentaPar().gmtdCalcularValores(tobjIngreso.ingresoAbonoaDeuda[b].strCodigoPar, tobjIngreso.ingresoAbonoaDeuda[b].decAbona);
                            List <cuentaValores>   cuentasDebito = cuotasValores[0];
                            for (int a = 0; a < cuentasDebito.Count; a++)
                            {
                                recibosIngresos.tblCuentasOperacionesContabilidads.InsertOnSubmit(new blRecibosIngresos().gmtdMvtoContableIngresos(cuentasDebito[a].decValor, tobjIngreso.intCodigoIng, cuentasDebito[a].strCuenta, "Abono a deuda.", 1, tobjIngreso.strCedulaIng, tobjIngreso.strNombreIng + " " + tobjIngreso.strApellidoIng, tobjIngreso.dtmFechaRec));
                            }
                            List <cuentaValores> cuentasCredito = cuotasValores[1];
                            for (int a = 0; a < cuentasCredito.Count; a++)
                            {
                                recibosIngresos.tblCuentasOperacionesContabilidads.InsertOnSubmit(new blRecibosIngresos().gmtdMvtoContableIngresos(cuentasCredito[a].decValor, tobjIngreso.intCodigoIng, cuentasCredito[a].strCuenta, "Abono a deuda.", 2, tobjIngreso.strCedulaIng, tobjIngreso.strNombreIng + " " + tobjIngreso.strApellidoIng, tobjIngreso.dtmFechaRec));
                            }
                        }
                    }
                    #endregion

                    recibosIngresos.SubmitChanges();

                    strRetornar = "Registro Guardado. ";
                }
            }
            catch (Exception ex)
            {
                new dao().gmtdInsertarError(ex);
                strRetornar = "- Ocurrió un error al insertar el registro. ::: " + tobjIngreso.intCodigoIng.ToString() + " ::: Mensaje " + ex.Message;
            }
            return(strRetornar);
        }