Public Class ReportosCE Private _CodigoInversion As String Private _CodigoCasa As String Private _Nombre As String Private _FechaDeCompra As Date Private _ValorTransado As Double Private _Dias As Integer Private _FechaVencimiento As Date Private _Rendimiento As Double Private _Impuestos As Double Private _OtrosCostos As Double Private _TotalCostos As Double Private _MontoALiquidar As Double Private _InteresAGenerar As Double Private _CostoDeTransferencia As Double Private _RendimientoNetoAntesDeImpuestos As Double Private _ValorReCompra As Double Private _ImpuestosLiquidacion As Double Private _IngresoNeto As Double Private _ValorNeto As Double Private _RendimientoNetoDespuesDeImpuestos As Double Public Property CodigoInversion As String Get Return _CodigoInversion End Get Set(value As String) _CodigoInversion = value End Set End Property Public Property CodigoCasa As String Get Return _CodigoCasa End Get Set(value As String) _CodigoCasa = value End Set End Property Public Property Nombre As String Get Return _Nombre End Get Set(value As String) _Nombre = value End Set End Property Public Property FechaDeCompra As Date Get Return _FechaDeCompra End Get Set(value As Date) _FechaDeCompra = value End Set End Property Public Property ValorTransado As Double Get Return _ValorTransado End Get Set(value As Double) _ValorTransado = value Calcular_MontoALiquidar() Calcular_InteresAGenerar() Caluclar_RendimientoNetoAntesImpuestos() Calcular_ValorRecompra() Calcular_ValorNeto() Calcular_RendimientoNetoDespuesImpuestos() End Set End Property Public Property Dias As Integer Get Return _Dias End Get Set(value As Integer) _Dias = value Calcular_InteresAGenerar() Caluclar_RendimientoNetoAntesImpuestos() Calcular_RendimientoNetoDespuesImpuestos() End Set End Property Public Property FechaVencimiento As Date Get Return _FechaVencimiento End Get Set(value As Date) _FechaVencimiento = value End Set End Property Public Property Rendimiento As Double Get Return _Rendimiento End Get Set(value As Double) _Rendimiento = value Calcular_InteresAGenerar() End Set End Property Public Property Impuestos As Double Get Return _Impuestos End Get Set(value As Double) _Impuestos = value End Set End Property Public Property OtrosCostos As Double Get Return _OtrosCostos End Get Set(value As Double) _OtrosCostos = value End Set End Property Public ReadOnly Property TotalCostos As Double Get Return _TotalCostos End Get End Property Public Property MontoALiquidar As Double Get Return _MontoALiquidar End Get Set(value As Double) _MontoALiquidar = value End Set End Property Public ReadOnly Property InteresAGenerar As Double Get Return _InteresAGenerar End Get End Property Public Property CostoDeTransferencia As Double Get Return _CostoDeTransferencia End Get Set(value As Double) _CostoDeTransferencia = value Calcular_ValorNeto() End Set End Property Public ReadOnly Property RendimientoNetoAntesDeImpuestos As Double Get Return _RendimientoNetoAntesDeImpuestos End Get End Property Public Property ValorReCompra As Double Get Return _ValorReCompra End Get Set(value As Double) _ValorReCompra = value End Set End Property Public Property ImpuestosLiquidacion As Double Get Return _ImpuestosLiquidacion End Get Set(value As Double) _ImpuestosLiquidacion = value End Set End Property Public ReadOnly Property IngresoNeto As Double Get Return _IngresoNeto End Get End Property Public Property ValorNeto As Double Get Return _ValorNeto End Get Set(value As Double) _ValorNeto = value End Set End Property Public ReadOnly Property RendimientoNetoDespuesDeImpuestos As Double Get Return _RendimientoNetoDespuesDeImpuestos End Get End Property Private Sub Calcular_TotalCostos() Dim valor As Double valor = 0 _TotalCostos = valor Calcular_MontoALiquidar() Caluclar_RendimientoNetoAntesImpuestos() Calcular_RendimientoNetoDespuesImpuestos() End Sub Private Sub Calcular_MontoALiquidar() Dim valor As Double valor = _ValorTransado + _TotalCostos _MontoALiquidar = valor End Sub Private Sub Calcular_InteresAGenerar() Dim valor As Double valor = _ValorTransado * (_Rendimiento / 100) * _Dias / 365 _InteresAGenerar = valor Caluclar_RendimientoNetoAntesImpuestos() Calcular_ValorRecompra() Calcular_ISR() Calcular_IngresoNeto() End Sub Private Sub Caluclar_RendimientoNetoAntesImpuestos() Dim valor As Double valor = ((_InteresAGenerar - _TotalCostos) / _ValorTransado) * (365 / _Dias) _RendimientoNetoAntesDeImpuestos = valor * 100 End Sub Private Sub Calcular_ValorRecompra() Dim valor As Double valor = _ValorTransado + _InteresAGenerar _ValorReCompra = valor End Sub Private Sub Calcular_ISR() Dim valor As Double valor = _InteresAGenerar * 0.1 _ImpuestosLiquidacion = valor Calcular_IngresoNeto() End Sub Private Sub Calcular_IngresoNeto() Dim valor As Double valor = _InteresAGenerar - _ImpuestosLiquidacion _IngresoNeto = valor Calcular_ValorNeto() Calcular_RendimientoNetoDespuesImpuestos() End Sub Private Sub Calcular_ValorNeto() Dim valor As Double valor = _ValorTransado + _IngresoNeto - _CostoDeTransferencia _ValorNeto = valor End Sub Private Sub Calcular_RendimientoNetoDespuesImpuestos() Dim valor As Double valor = (_IngresoNeto - _TotalCostos) / _ValorTransado * 365 / _Dias _RendimientoNetoDespuesDeImpuestos = valor * 100 End Sub End Class