/// <summary> /// Deprecated Method for adding a new object to the aportaciones_socio EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToaportaciones_socio(aportacion_socio aportacion_socio) { base.AddObject("aportaciones_socio", aportacion_socio); }
/// <summary> /// Inserta la transacción del retiro aportación en la tabla de aportaciones como salida (retiro). /// </summary> /// <param name="RetiroDeAportaciones"></param> /// <param name="db"></param> public void InsertarTransaccionAportacionesDeSocio(retiro_aportaciones RetiroDeAportaciones, colinasEntities db) { try { reporte_total_aportaciones_por_socio asocInventory = this.GetAportacionesXSocio(RetiroDeAportaciones.SOCIOS_ID); decimal saldo_aportaciones_ordinaria = asocInventory == null ? 0 : asocInventory.APORTACIONES_ORDINARIA_SALDO; decimal saldo_aportaciones_extraordinaria = asocInventory == null ? 0 : asocInventory.APORTACIONES_EXTRAORDINARIA_SALDO; decimal saldo_aportaciones_capitalizacion_retencion = asocInventory == null ? 0 : asocInventory.APORTACIONES_CAPITALIZACION_RETENCION_SALDO; decimal saldo_aportaciones_intereses_aportaciones = asocInventory == null ? 0 : asocInventory.APORTACIONES_INTERESES_S_APORTACION_SALDO; decimal saldo_aportaciones_excedente_periodo = asocInventory == null ? 0 : asocInventory.APORTACIONES_EXCEDENTE_PERIODO_SALDO; decimal saldo_aportaciones_total = asocInventory == null ? 0 : asocInventory.APORTACIONES_SALDO_TOTAL; decimal liquidacion_aportacion_extraordinaria = RetiroDeAportaciones.RETIROS_AP_EXTRAORDINARIA; aportacion_socio aportacionDeSocio = new aportacion_socio(); aportacionDeSocio.SOCIOS_ID = RetiroDeAportaciones.SOCIOS_ID; aportacionDeSocio.DOCUMENTO_ID = RetiroDeAportaciones.RETIROS_AP_ID; aportacionDeSocio.DOCUMENTO_TIPO = "SALIDA";//Los retiros de aportaciones son tomadas como salidas para las aportaciones aportacionDeSocio.APORTACIONES_ORDINARIA_SALDO = saldo_aportaciones_ordinaria - RetiroDeAportaciones.RETIROS_AP_ORDINARIA; aportacionDeSocio.APORTACIONES_EXTRAORDINARIA_SALDO = saldo_aportaciones_extraordinaria - liquidacion_aportacion_extraordinaria; aportacionDeSocio.APORTACIONES_CAPITALIZACION_RETENCION_SALDO = saldo_aportaciones_capitalizacion_retencion - RetiroDeAportaciones.RETIROS_AP_CAPITALIZACION_RETENCION; aportacionDeSocio.APORTACIONES_INTERESES_S_APORTACION_SALDO = saldo_aportaciones_intereses_aportaciones + RetiroDeAportaciones.RETIROS_AP_INTERESES_S_APORTACION; aportacionDeSocio.APORTACIONES_EXCEDENTE_PERIODO_SALDO = saldo_aportaciones_excedente_periodo + RetiroDeAportaciones.RETIROS_AP_EXCEDENTE_PERIODO; aportacionDeSocio.APORTACIONES_CANTIDAD = - RetiroDeAportaciones.RETIROS_AP_TOTAL_RETIRADO; aportacionDeSocio.APORTACIONES_SALDO_TOTAL = saldo_aportaciones_total + aportacionDeSocio.APORTACIONES_CANTIDAD; aportacionDeSocio.CREADO_POR = RetiroDeAportaciones.CREADO_POR; aportacionDeSocio.FECHA_CREACION = RetiroDeAportaciones.FECHA_CREACION; db.aportaciones_socio.AddObject(aportacionDeSocio); db.SaveChanges(); } catch (Exception ex) { log.Fatal("Error fatal al insertar transaccion de aportaciones de socio. Retiro de Aportaciones.", ex); throw; } }
/// <summary> /// Create a new aportacion_socio object. /// </summary> /// <param name="tRANSACCION_NUMERO">Initial value of the TRANSACCION_NUMERO property.</param> /// <param name="sOCIOS_ID">Initial value of the SOCIOS_ID property.</param> /// <param name="dOCUMENTO_ID">Initial value of the DOCUMENTO_ID property.</param> /// <param name="dOCUMENTO_TIPO">Initial value of the DOCUMENTO_TIPO property.</param> /// <param name="aPORTACIONES_CANTIDAD">Initial value of the APORTACIONES_CANTIDAD property.</param> /// <param name="aPORTACIONES_ORDINARIA_SALDO">Initial value of the APORTACIONES_ORDINARIA_SALDO property.</param> /// <param name="aPORTACIONES_EXTRAORDINARIA_SALDO">Initial value of the APORTACIONES_EXTRAORDINARIA_SALDO property.</param> /// <param name="aPORTACIONES_CAPITALIZACION_RETENCION_SALDO">Initial value of the APORTACIONES_CAPITALIZACION_RETENCION_SALDO property.</param> /// <param name="aPORTACIONES_INTERESES_S_APORTACION_SALDO">Initial value of the APORTACIONES_INTERESES_S_APORTACION_SALDO property.</param> /// <param name="aPORTACIONES_EXCEDENTE_PERIODO_SALDO">Initial value of the APORTACIONES_EXCEDENTE_PERIODO_SALDO property.</param> /// <param name="aPORTACIONES_SALDO_TOTAL">Initial value of the APORTACIONES_SALDO_TOTAL property.</param> /// <param name="cREADO_POR">Initial value of the CREADO_POR property.</param> /// <param name="fECHA_CREACION">Initial value of the FECHA_CREACION property.</param> public static aportacion_socio Createaportacion_socio(global::System.Int32 tRANSACCION_NUMERO, global::System.String sOCIOS_ID, global::System.Int32 dOCUMENTO_ID, global::System.String dOCUMENTO_TIPO, global::System.Decimal aPORTACIONES_CANTIDAD, global::System.Decimal aPORTACIONES_ORDINARIA_SALDO, global::System.Decimal aPORTACIONES_EXTRAORDINARIA_SALDO, global::System.Decimal aPORTACIONES_CAPITALIZACION_RETENCION_SALDO, global::System.Decimal aPORTACIONES_INTERESES_S_APORTACION_SALDO, global::System.Decimal aPORTACIONES_EXCEDENTE_PERIODO_SALDO, global::System.Decimal aPORTACIONES_SALDO_TOTAL, global::System.String cREADO_POR, global::System.DateTime fECHA_CREACION) { aportacion_socio aportacion_socio = new aportacion_socio(); aportacion_socio.TRANSACCION_NUMERO = tRANSACCION_NUMERO; aportacion_socio.SOCIOS_ID = sOCIOS_ID; aportacion_socio.DOCUMENTO_ID = dOCUMENTO_ID; aportacion_socio.DOCUMENTO_TIPO = dOCUMENTO_TIPO; aportacion_socio.APORTACIONES_CANTIDAD = aPORTACIONES_CANTIDAD; aportacion_socio.APORTACIONES_ORDINARIA_SALDO = aPORTACIONES_ORDINARIA_SALDO; aportacion_socio.APORTACIONES_EXTRAORDINARIA_SALDO = aPORTACIONES_EXTRAORDINARIA_SALDO; aportacion_socio.APORTACIONES_CAPITALIZACION_RETENCION_SALDO = aPORTACIONES_CAPITALIZACION_RETENCION_SALDO; aportacion_socio.APORTACIONES_INTERESES_S_APORTACION_SALDO = aPORTACIONES_INTERESES_S_APORTACION_SALDO; aportacion_socio.APORTACIONES_EXCEDENTE_PERIODO_SALDO = aPORTACIONES_EXCEDENTE_PERIODO_SALDO; aportacion_socio.APORTACIONES_SALDO_TOTAL = aPORTACIONES_SALDO_TOTAL; aportacion_socio.CREADO_POR = cREADO_POR; aportacion_socio.FECHA_CREACION = fECHA_CREACION; return aportacion_socio; }
/// <summary> /// Inserta la transacción de la hoja de liquidacion en la tabla de aportaciones como entrada (ahorro). /// </summary> /// <param name="HojaDeLiquidacion"></param> /// <param name="db"></param> public void InsertarTransaccionAportacionesDeSocio(liquidacion HojaDeLiquidacion,colinasEntities db) { try { reporte_total_aportaciones_por_socio asocInventory = this.GetAportacionesXSocio(HojaDeLiquidacion.SOCIOS_ID); decimal saldo_aportaciones_ordinaria = asocInventory == null ? 0 : asocInventory.APORTACIONES_ORDINARIA_SALDO; decimal saldo_aportaciones_extraordinaria = asocInventory == null ? 0 : asocInventory.APORTACIONES_EXTRAORDINARIA_SALDO; decimal saldo_aportaciones_capitalizacion_retencion = asocInventory == null ? 0 : asocInventory.APORTACIONES_CAPITALIZACION_RETENCION_SALDO; decimal saldo_aportaciones_intereses_aportaciones = asocInventory == null ? 0 : asocInventory.APORTACIONES_INTERESES_S_APORTACION_SALDO; decimal saldo_aportaciones_excedente_periodo = asocInventory == null ? 0 : asocInventory.APORTACIONES_EXCEDENTE_PERIODO_SALDO; decimal saldo_aportaciones_total = asocInventory == null ? 0 : asocInventory.APORTACIONES_SALDO_TOTAL; decimal liquidacion_aportacion_extraordinaria = (HojaDeLiquidacion.LIQUIDACIONES_D_APORTACION_EXTRAORD_COOP == true ? HojaDeLiquidacion.LIQUIDACIONES_D_APORTACION_EXTRAORDINARIA : 0); aportacion_socio aportacionDeSocio = new aportacion_socio(); aportacionDeSocio.SOCIOS_ID = HojaDeLiquidacion.SOCIOS_ID; aportacionDeSocio.DOCUMENTO_ID = HojaDeLiquidacion.LIQUIDACIONES_ID; aportacionDeSocio.DOCUMENTO_TIPO = "ENTRADA";//Las hojas de liquidaciones son tomadas como entradas para las aportaciones aportacionDeSocio.APORTACIONES_ORDINARIA_SALDO = saldo_aportaciones_ordinaria + HojaDeLiquidacion.LIQUIDACIONES_D_APORTACION_ORDINARIO; aportacionDeSocio.APORTACIONES_EXTRAORDINARIA_SALDO = saldo_aportaciones_extraordinaria + liquidacion_aportacion_extraordinaria; aportacionDeSocio.APORTACIONES_CAPITALIZACION_RETENCION_SALDO = saldo_aportaciones_capitalizacion_retencion + HojaDeLiquidacion.LIQUIDACIONES_D_CAPITALIZACION_RETENCION_CANTIDAD; aportacionDeSocio.APORTACIONES_INTERESES_S_APORTACION_SALDO = saldo_aportaciones_intereses_aportaciones + HojaDeLiquidacion.LIQUIDACIONES_D_INTERESES_S_APORTACIONES; aportacionDeSocio.APORTACIONES_EXCEDENTE_PERIODO_SALDO = saldo_aportaciones_excedente_periodo + HojaDeLiquidacion.LIQUIDACIONES_D_EXCEDENTE_PERIODO; aportacionDeSocio.APORTACIONES_CANTIDAD = Convert.ToDecimal (HojaDeLiquidacion.LIQUIDACIONES_D_APORTACION_ORDINARIO + liquidacion_aportacion_extraordinaria + HojaDeLiquidacion.LIQUIDACIONES_D_CAPITALIZACION_RETENCION_CANTIDAD + HojaDeLiquidacion.LIQUIDACIONES_D_INTERESES_S_APORTACIONES + HojaDeLiquidacion.LIQUIDACIONES_D_EXCEDENTE_PERIODO); aportacionDeSocio.APORTACIONES_SALDO_TOTAL = saldo_aportaciones_total + aportacionDeSocio.APORTACIONES_CANTIDAD; aportacionDeSocio.CREADO_POR = HojaDeLiquidacion.CREADO_POR; aportacionDeSocio.FECHA_CREACION = HojaDeLiquidacion.FECHA_CREACION; db.aportaciones_socio.AddObject(aportacionDeSocio); db.SaveChanges(); } catch (Exception ex) { log.Fatal("Error fatal al insertar transaccion de aportaciones de socio. Liquidacion.", ex); throw; } }