ReportosCE.vb 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271
  1. Public Class ReportosCE
  2. Private _CodigoInversion As String
  3. Private _CodigoCasa As String
  4. Private _Nombre As String
  5. Private _FechaDeCompra As Date
  6. Private _ValorTransado As Double
  7. Private _Dias As Integer
  8. Private _FechaVencimiento As Date
  9. Private _Rendimiento As Double
  10. Private _Impuestos As Double
  11. Private _OtrosCostos As Double
  12. Private _TotalCostos As Double
  13. Private _MontoALiquidar As Double
  14. Private _InteresAGenerar As Double
  15. Private _CostoDeTransferencia As Double
  16. Private _RendimientoNetoAntesDeImpuestos As Double
  17. Private _ValorReCompra As Double
  18. Private _ImpuestosLiquidacion As Double
  19. Private _IngresoNeto As Double
  20. Private _ValorNeto As Double
  21. Private _RendimientoNetoDespuesDeImpuestos As Double
  22. Public Property CodigoInversion As String
  23. Get
  24. Return _CodigoInversion
  25. End Get
  26. Set(value As String)
  27. _CodigoInversion = value
  28. End Set
  29. End Property
  30. Public Property CodigoCasa As String
  31. Get
  32. Return _CodigoCasa
  33. End Get
  34. Set(value As String)
  35. _CodigoCasa = value
  36. End Set
  37. End Property
  38. Public Property Nombre As String
  39. Get
  40. Return _Nombre
  41. End Get
  42. Set(value As String)
  43. _Nombre = value
  44. End Set
  45. End Property
  46. Public Property FechaDeCompra As Date
  47. Get
  48. Return _FechaDeCompra
  49. End Get
  50. Set(value As Date)
  51. _FechaDeCompra = value
  52. End Set
  53. End Property
  54. Public Property ValorTransado As Double
  55. Get
  56. Return _ValorTransado
  57. End Get
  58. Set(value As Double)
  59. _ValorTransado = value
  60. Calcular_MontoALiquidar()
  61. Calcular_InteresAGenerar()
  62. Caluclar_RendimientoNetoAntesImpuestos()
  63. Calcular_ValorRecompra()
  64. Calcular_ValorNeto()
  65. Calcular_RendimientoNetoDespuesImpuestos()
  66. End Set
  67. End Property
  68. Public Property Dias As Integer
  69. Get
  70. Return _Dias
  71. End Get
  72. Set(value As Integer)
  73. _Dias = value
  74. Calcular_InteresAGenerar()
  75. Caluclar_RendimientoNetoAntesImpuestos()
  76. Calcular_RendimientoNetoDespuesImpuestos()
  77. End Set
  78. End Property
  79. Public Property FechaVencimiento As Date
  80. Get
  81. Return _FechaVencimiento
  82. End Get
  83. Set(value As Date)
  84. _FechaVencimiento = value
  85. End Set
  86. End Property
  87. Public Property Rendimiento As Double
  88. Get
  89. Return _Rendimiento
  90. End Get
  91. Set(value As Double)
  92. _Rendimiento = value
  93. Calcular_InteresAGenerar()
  94. End Set
  95. End Property
  96. Public Property Impuestos As Double
  97. Get
  98. Return _Impuestos
  99. End Get
  100. Set(value As Double)
  101. _Impuestos = value
  102. End Set
  103. End Property
  104. Public Property OtrosCostos As Double
  105. Get
  106. Return _OtrosCostos
  107. End Get
  108. Set(value As Double)
  109. _OtrosCostos = value
  110. End Set
  111. End Property
  112. Public ReadOnly Property TotalCostos As Double
  113. Get
  114. Return _TotalCostos
  115. End Get
  116. End Property
  117. Public Property MontoALiquidar As Double
  118. Get
  119. Return _MontoALiquidar
  120. End Get
  121. Set(value As Double)
  122. _MontoALiquidar = value
  123. End Set
  124. End Property
  125. Public ReadOnly Property InteresAGenerar As Double
  126. Get
  127. Return _InteresAGenerar
  128. End Get
  129. End Property
  130. Public Property CostoDeTransferencia As Double
  131. Get
  132. Return _CostoDeTransferencia
  133. End Get
  134. Set(value As Double)
  135. _CostoDeTransferencia = value
  136. Calcular_ValorNeto()
  137. End Set
  138. End Property
  139. Public ReadOnly Property RendimientoNetoAntesDeImpuestos As Double
  140. Get
  141. Return _RendimientoNetoAntesDeImpuestos
  142. End Get
  143. End Property
  144. Public Property ValorReCompra As Double
  145. Get
  146. Return _ValorReCompra
  147. End Get
  148. Set(value As Double)
  149. _ValorReCompra = value
  150. End Set
  151. End Property
  152. Public Property ImpuestosLiquidacion As Double
  153. Get
  154. Return _ImpuestosLiquidacion
  155. End Get
  156. Set(value As Double)
  157. _ImpuestosLiquidacion = value
  158. End Set
  159. End Property
  160. Public ReadOnly Property IngresoNeto As Double
  161. Get
  162. Return _IngresoNeto
  163. End Get
  164. End Property
  165. Public Property ValorNeto As Double
  166. Get
  167. Return _ValorNeto
  168. End Get
  169. Set(value As Double)
  170. _ValorNeto = value
  171. End Set
  172. End Property
  173. Public ReadOnly Property RendimientoNetoDespuesDeImpuestos As Double
  174. Get
  175. Return _RendimientoNetoDespuesDeImpuestos
  176. End Get
  177. End Property
  178. Private Sub Calcular_TotalCostos()
  179. Dim valor As Double
  180. valor = 0
  181. _TotalCostos = valor
  182. Calcular_MontoALiquidar()
  183. Caluclar_RendimientoNetoAntesImpuestos()
  184. Calcular_RendimientoNetoDespuesImpuestos()
  185. End Sub
  186. Private Sub Calcular_MontoALiquidar()
  187. Dim valor As Double
  188. valor = _ValorTransado + _TotalCostos
  189. _MontoALiquidar = valor
  190. End Sub
  191. Private Sub Calcular_InteresAGenerar()
  192. Dim valor As Double
  193. valor = _ValorTransado * (_Rendimiento / 100) * _Dias / 365
  194. _InteresAGenerar = valor
  195. Caluclar_RendimientoNetoAntesImpuestos()
  196. Calcular_ValorRecompra()
  197. Calcular_ISR()
  198. Calcular_IngresoNeto()
  199. End Sub
  200. Private Sub Caluclar_RendimientoNetoAntesImpuestos()
  201. Dim valor As Double
  202. valor = ((_InteresAGenerar - _TotalCostos) / _ValorTransado) * (365 / _Dias)
  203. _RendimientoNetoAntesDeImpuestos = valor * 100
  204. End Sub
  205. Private Sub Calcular_ValorRecompra()
  206. Dim valor As Double
  207. valor = _ValorTransado + _InteresAGenerar
  208. _ValorReCompra = valor
  209. End Sub
  210. Private Sub Calcular_ISR()
  211. Dim valor As Double
  212. valor = _InteresAGenerar * 0.1
  213. _ImpuestosLiquidacion = valor
  214. Calcular_IngresoNeto()
  215. End Sub
  216. Private Sub Calcular_IngresoNeto()
  217. Dim valor As Double
  218. valor = _InteresAGenerar - _ImpuestosLiquidacion
  219. _IngresoNeto = valor
  220. Calcular_ValorNeto()
  221. Calcular_RendimientoNetoDespuesImpuestos()
  222. End Sub
  223. Private Sub Calcular_ValorNeto()
  224. Dim valor As Double
  225. valor = _ValorTransado + _IngresoNeto - _CostoDeTransferencia
  226. _ValorNeto = valor
  227. End Sub
  228. Private Sub Calcular_RendimientoNetoDespuesImpuestos()
  229. Dim valor As Double
  230. valor = (_IngresoNeto - _TotalCostos) / _ValorTransado * 365 / _Dias
  231. _RendimientoNetoDespuesDeImpuestos = valor * 100
  232. End Sub
  233. End Class