| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970 |
- Public Class frmReporto
- Dim oDAOGeneral As New DAOGeneral
- Dim Aniobase As Integer = 365
- Dim PorcentajeComisionCasa As Double = 0.2825
- Dim PorcentajeComisionBolsa As Double = 0.2825
- Dim PorcentajeComisionIOF As Double = 0.25
- Dim PorcentajeISR As Double = 10
- Dim oCEReporto As ReportosCE
- Dim oDAOReportos As ReportosDAO
- Private CodigoInversion As String
- Private _Modo As String
- Private _IdDocumento As Integer
- Private _TipoDocumento As String
- Public Property Modo As String
- Get
- Return _Modo
- End Get
- Set(value As String)
- _Modo = value
- End Set
- End Property
- Private Property IdDocumento As Integer
- Get
- Return _IdDocumento
- End Get
- Set(value As Integer)
- _IdDocumento = value
- End Set
- End Property
- Private Property TipoDocumento As String
- Get
- Return _TipoDocumento
- End Get
- Set(value As String)
- _TipoDocumento = value
- End Set
- End Property
- Private Sub frmReporto_Load(sender As Object, e As EventArgs) Handles MyBase.Load
- Call CargarCasaCorredoras()
- ValoresPredefinidos()
- If Modo = "C" Then
- Call CargarRegistroBD()
- End If
- End Sub
- 'GETS
- Function GetFechaCompra() As Date
- Dim valor As Date
- valor = dtpFechaCompra.Value
- Return valor
- End Function
- Function GetDias() As Integer
- Dim valor As Integer
- If Me.txtDias.Text.Length = 0 Then
- valor = 0
- Else
- Try
- valor = Me.txtDias.Text
- Catch ex As Exception
- valor = 0
- End Try
- End If
- Return valor
- End Function
- Function GetPorcentajeBolsa() As Double
- Dim valor As Double
- If Me.txtPorcentajeBolsa.Text.Length = 0 Then
- valor = 0
- Else
- Try
- valor = Me.txtPorcentajeBolsa.Text
- valor = valor / 100
- Catch ex As Exception
- valor = 0
- End Try
- End If
- Return valor
- End Function
- Function GetPorcentajeCasa() As Double
- Dim valor As Double
- If Me.txtPorcentajeCasa.Text.Length = 0 Then
- valor = 0
- Else
- Try
- valor = Me.txtPorcentajeCasa.Text
- valor = valor / 100
- Catch ex As Exception
- valor = 0
- End Try
- End If
- Return valor
- End Function
- Function GetValorTransado() As Double
- Dim valor As Double
- If Me.txtValorTransado.Text.Length = 0 Then
- valor = 0
- Else
- Try
- valor = Me.txtValorTransado.Text
- Catch ex As Exception
- valor = 0
- End Try
- End If
- Return valor
- End Function
- Function GetComisionCasa() As Double
- Dim valor As Double
- If Me.txtComisionCasa.Text.Length = 0 Then
- valor = 0
- Else
- Try
- valor = Me.txtComisionCasa.Text
- Catch ex As Exception
- valor = 0
- End Try
- End If
- Return valor
- End Function
- Function GetComisionBolsa() As Double
- Dim valor As Double
- If Me.txtComisionBolsa.Text.Length = 0 Then
- valor = 0
- Else
- Try
- valor = Me.txtComisionBolsa.Text
- Catch ex As Exception
- valor = 0
- End Try
- End If
- Return valor
- End Function
- Function GetPorcentajeIOF() As Double
- Dim valor As Double
- If Me.txtPorcentajeIOF.Text.Length = 0 Then
- valor = 0
- Else
- Try
- valor = Me.txtPorcentajeIOF.Text
- valor = valor / 100
- Catch ex As Exception
- valor = 0
- End Try
- End If
- Return valor
- End Function
- Function GetIOF() As Double
- Dim valor As Double
- If Me.txtIOF.Text.Length = 0 Then
- valor = 0
- Else
- Try
- valor = Me.txtIOF.Text
- Catch ex As Exception
- valor = 0
- End Try
- End If
- Return valor
- End Function
- Function GetOtrosCostos() As Double
- Dim valor As Double
- If Me.txtOtrosCostos.Text.Length = 0 Then
- valor = 0
- Else
- Try
- valor = Me.txtOtrosCostos.Text
- Catch ex As Exception
- valor = 0
- End Try
- End If
- Return valor
- End Function
- Function GetTotalCostos() As Double
- Dim valor As Double
- If Me.txtTotalCostos.Text.Length = 0 Then
- valor = 0
- Else
- Try
- valor = Me.txtTotalCostos.Text
- Catch ex As Exception
- valor = 0
- End Try
- End If
- Return valor
- End Function
- Function GetRendimiento() As Double
- Dim valor As Double
- If Me.txtRendimiento.Text.Length = 0 Then
- valor = 0
- Else
- Try
- valor = Me.txtRendimiento.Text
- valor = valor / 100
- Catch ex As Exception
- valor = 0
- End Try
- End If
- Return valor
- End Function
- Function GetInteresesAGenerar() As Double
- Dim valor As Double
- If Me.txtInteresesAGenerar.Text.Length = 0 Then
- valor = 0
- Else
- Try
- valor = Me.txtInteresesAGenerar.Text
- Catch ex As Exception
- valor = 0
- End Try
- End If
- Return valor
- End Function
- Function GetPorcentajeISR() As Double
- Dim valor As Double
- Try
- valor = PorcentajeISR / 100
- Catch ex As Exception
- valor = 0
- End Try
- Return valor
- End Function
- Function GetISR() As Double
- Dim valor As Double
- If Me.txtISR.Text.Length = 0 Then
- valor = 0
- Else
- Try
- valor = Me.txtISR.Text
- Catch ex As Exception
- valor = 0
- End Try
- End If
- Return valor
- End Function
- Function GetIngresoNeto() As Double
- Dim valor As Double
- If Me.txtIngresoNeto.Text.Length = 0 Then
- valor = 0
- Else
- Try
- valor = Me.txtIngresoNeto.Text
- Catch ex As Exception
- valor = 0
- End Try
- End If
- Return valor
- End Function
- Function GetCostoDeTransferencia() As Double
- Dim valor As Double
- If Me.txtCostoDeTransferencia.Text.Length = 0 Then
- valor = 0
- Else
- Try
- valor = Me.txtCostoDeTransferencia.Text
- Catch ex As Exception
- valor = 0
- End Try
- End If
- Return valor
- End Function
- Function GetCasa() As String
- Dim valor As String
- If Me.cboCasaCorredora.SelectedIndex = -1 Then
- valor = ""
- Else
- valor = Me.cboCasaCorredora.SelectedValue
- End If
- Return valor
- End Function
- Function GetCodigoTitulo() As String
- Dim valor As String
- If Me.txtCodigoTitulo.Text.Length = 0 Then
- valor = ""
- Else
- Try
- valor = Me.txtCodigoTitulo.Text
- Catch ex As Exception
- valor = ""
- End Try
- End If
- Return valor
- End Function
- Function GetFechaVencimiento() As Date
- Dim valor As Date
- valor = Me.dtpFechaVencimiento.Value
- Return valor
- End Function
- Function GetMontoALiquidar() As Double
- Dim valor As Double
- If Me.txtMontoALiquidar.Text.Length = 0 Then
- valor = 0
- Else
- Try
- valor = Me.txtMontoALiquidar.Text
- Catch ex As Exception
- valor = 0
- End Try
- End If
- Return valor
- End Function
- Function GetRendimientoNetoAntesDeImpuestos() As Double
- Dim valor As Double
- If Me.txtRendimientoNetoAntesISR.Text.Length = 0 Then
- valor = 0
- Else
- Try
- valor = Me.txtRendimientoNetoAntesISR.Text
- Catch ex As Exception
- valor = 0
- End Try
- End If
- Return valor
- End Function
- Function GetValorRecompra() As Double
- Dim valor As Double
- If Me.txtValorReCompra.Text.Length = 0 Then
- valor = 0
- Else
- Try
- valor = Me.txtValorReCompra.Text
- Catch ex As Exception
- valor = 0
- End Try
- End If
- Return valor
- End Function
- Function GetValorNeto() As Double
- Dim valor As Double
- If Me.txtValorNeto.Text.Length = 0 Then
- valor = 0
- Else
- Try
- valor = Me.txtValorNeto.Text
- Catch ex As Exception
- valor = 0
- End Try
- End If
- Return valor
- End Function
- Function GetRendimientoNetoDespuesDeImpuestos() As Double
- Dim valor As Double
- If Me.txtRendimientoNetoDespuesISR.Text.Length = 0 Then
- valor = 0
- Else
- Try
- valor = Me.txtRendimientoNetoDespuesISR.Text
- Catch ex As Exception
- valor = 0
- End Try
- End If
- Return valor
- End Function
- 'CALCULOS
- Function CalcularFechaVencimiento() As Date
- Dim valor As Date
- Dim FechaCompra As Date = Me.dtpFechaCompra.Value
- Dim Dias As Integer = GetDias()
- valor = FechaCompra
- valor = valor.AddDays(Dias)
- Return valor
- End Function
- Function CalcularComisionCasa() As Double
- Dim valor As Double
- Dim vValorTransado As Double = GetValorTransado()
- Dim vDias As Integer = GetDias()
- Dim vPorcentajeCasa As Double = GetPorcentajeCasa()
- Dim vAnioBase As Integer = Utilidades.CalcularDiasDelAnio(GetFechaCompra)
- Try
- valor = vValorTransado * vDias * vPorcentajeCasa / vAnioBase
- Catch ex As Exception
- valor = 0
- End Try
- Return valor
- End Function
- Function CalcularComisionBolsa() As Double
- Dim valor As Double
- Dim vValorTransado As Double = GetValorTransado()
- Dim vDias As Integer = GetDias()
- Dim vPorcentajeBolsa As Double = GetPorcentajeBolsa()
- Dim vAnioBase As Integer = Utilidades.CalcularDiasDelAnio(GetFechaCompra)
- Try
- valor = vValorTransado * vDias * vPorcentajeBolsa / vAnioBase
- Catch ex As Exception
- valor = 0
- End Try
- Return valor
- End Function
- Function CalcularIOF() As Double
- Dim valor As Double
- Dim vValorTransado As Double = GetValorTransado()
- Dim vComisionCasa As Double = GetComisionCasa()
- Dim vComisionBolsa As Double = GetComisionBolsa()
- Dim vDias As Integer = GetDias()
- Dim vPorcentajeIOF As Double = GetPorcentajeIOF()
- Dim vAnioBase As Integer = Utilidades.CalcularDiasDelAnio(GetFechaCompra)
- Try
- valor = (vValorTransado + vComisionCasa + vComisionBolsa) * vDias * vPorcentajeIOF / vAnioBase
- Catch ex As Exception
- valor = 0
- End Try
- Return valor
- End Function
- Function CalcularOtrosCostos() As Double
- Dim valor As Double
- valor = 0
- Return valor
- End Function
- Function CalcularTotalCostos() As Double
- Dim valor As Double
- Dim vComisionCasa As Double = GetComisionCasa()
- Dim vComisionBolsa As Double = GetComisionBolsa()
- Dim vIOF As Double = GetIOF()
- Dim vOtrosCostos As Double = GetOtrosCostos()
- Try
- valor = vComisionCasa + vComisionBolsa + vIOF + vOtrosCostos
- Catch ex As Exception
- valor = 0
- End Try
- Return valor
- End Function
- Function CalcularMontoALiquidar() As Double
- Dim valor As Double
- Dim vValorTransado As Double = GetValorTransado()
- Dim vTotalCostos As Double = GetTotalCostos()
- Try
- valor = vValorTransado + vTotalCostos
- Catch ex As Exception
- valor = 0
- End Try
- Return valor
- End Function
- Function CalcularInteresAGenerar() As Double
- Dim valor As Double
- Dim vValorTransado As Double = GetValorTransado()
- Dim vRendimiento As Double = GetRendimiento()
- Dim vDias As Integer = GetDias()
- Dim vAnioBase As Integer = Utilidades.CalcularDiasDelAnio(GetFechaCompra)
- Try
- valor = vValorTransado * vRendimiento * vDias / vAnioBase
- Catch ex As Exception
- valor = 0
- End Try
- Return valor
- End Function
- Function CalcularRendimientoNetoAntesISR() As Double
- Dim valor As Double
- Dim vInteresesAgenerar As Double = GetInteresesAGenerar()
- Dim vTotalCostos As Double = GetTotalCostos()
- Dim vValorTransado As Double = GetValorTransado()
- Dim vDias As Integer = GetDias()
- Dim vAnioBase As Integer = Utilidades.CalcularDiasDelAnio(GetFechaCompra)
- Try
- valor = ((vInteresesAgenerar - vTotalCostos) / vValorTransado) * (vAnioBase / vDias)
- valor = valor * 100
- Catch ex As Exception
- valor = 0
- End Try
- Return valor
- End Function
- Function CalcularValorRecompra() As Double
- Dim valor As Double
- Dim vValorTransado As Double = GetValorTransado()
- Dim vInteresesAGenerar As Double = GetInteresesAGenerar()
- Try
- valor = vValorTransado - vInteresesAGenerar
- Catch ex As Exception
- valor = 0
- End Try
- Return valor
- End Function
- Function CalcularISR() As Double
- Dim valor As Double
- Dim vInteresesAGenerar As Double = GetInteresesAGenerar()
- Dim vPorcentajeISR As Double = GetPorcentajeISR()
- Try
- valor = vInteresesAGenerar * vPorcentajeISR
- Catch ex As Exception
- valor = 0
- End Try
- Return valor
- End Function
- Function CalcularIngresoNeto() As Double
- Dim valor As Double
- Dim vInteresesAgenerar As Double = GetInteresesAGenerar()
- Dim vISR As Double = GetISR()
- Try
- valor = vInteresesAgenerar - vISR
- Catch ex As Exception
- valor = 0
- End Try
- Return valor
- End Function
- Function CalcularValorNeto() As Double
- Dim valor As Double
- Dim vValorTransado As Double = GetValorTransado()
- Dim vIngresoNeto As Double = GetIngresoNeto()
- Dim vCostoDeTransferencia As Double = GetCostoDeTransferencia()
- Try
- valor = vValorTransado + vIngresoNeto - vCostoDeTransferencia
- Catch ex As Exception
- valor = 0
- End Try
- Return valor
- End Function
- Function CalcularRendimientoNetoDespuesISR() As Double
- Dim valor As Double
- Dim vIngresoNeto As Double = GetIngresoNeto()
- Dim vTotalCostos As Double = GetTotalCostos()
- Dim vValorTransado As Double = GetValorTransado()
- Dim vAnioBase As Integer = Utilidades.CalcularDiasDelAnio(GetFechaCompra)
- Dim vDias As Integer = GetDias()
- Try
- valor = (vIngresoNeto - vTotalCostos) / vValorTransado * vAnioBase / vDias
- valor = valor * 100
- Catch ex As Exception
- valor = 0
- End Try
- Return valor
- End Function
- 'AUTOMATICO
- Sub ValoresPredefinidos()
- Me.txtPorcentajeCasa.Text = PorcentajeComisionCasa
- Me.txtPorcentajeBolsa.Text = PorcentajeComisionBolsa
- Me.txtPorcentajeIOF.Text = PorcentajeComisionIOF
- End Sub
- Sub RefrescarFechaVencimiento()
- Me.dtpFechaVencimiento.Value = CalcularFechaVencimiento()
- End Sub
- Sub RefrescarComisionCasa()
- Me.txtComisionCasa.Text = CalcularComisionCasa()
- End Sub
- Sub RefrescarComisionBolsa()
- Me.txtComisionBolsa.Text = CalcularComisionBolsa()
- End Sub
- Sub RefrescarIOF()
- Me.txtIOF.Text = CalcularIOF()
- End Sub
- Sub RefrescarOtrosCostos()
- Me.txtOtrosCostos.Text = CalcularOtrosCostos()
- End Sub
- Sub RefrescarTotalCostos()
- Me.txtTotalCostos.Text = CalcularTotalCostos()
- End Sub
- Sub RefrescarMontoALiquidar()
- Me.txtMontoALiquidar.Text = CalcularMontoALiquidar()
- End Sub
- Sub RefrescarInteresAGenerar()
- Me.txtInteresesAGenerar.Text = CalcularInteresAGenerar()
- End Sub
- Sub RefrescarRendimientoNetoAntesISR()
- Me.txtRendimientoNetoAntesISR.Text = CalcularRendimientoNetoAntesISR()
- End Sub
- Sub RefrescarValorDeRecompra()
- Me.txtValorReCompra.Text = CalcularValorRecompra()
- End Sub
- Sub RefrescarValorRecompra()
- Me.txtValorReCompra.Text = CalcularValorRecompra()
- End Sub
- Sub RefrescarISR()
- Me.txtISR.Text = CalcularISR()
- End Sub
- Sub RefrescarIngresoNeto()
- Me.txtIngresoNeto.Text = CalcularIngresoNeto()
- End Sub
- Sub RefrescarValorNeto()
- Me.txtValorNeto.Text = CalcularValorNeto()
- End Sub
- Sub RefrescarRendimientoNetoDespuesISR()
- Me.txtRendimientoNetoDespuesISR.Text = CalcularRendimientoNetoDespuesISR()
- End Sub
- 'EVENTOS
- Private Sub txtPorcentajeCasa_TextChanged(sender As Object, e As EventArgs) Handles txtPorcentajeCasa.TextChanged
- If Modo = "N" Then
- RefrescarComisionCasa()
- End If
- End Sub
- Private Sub txtPorcentajeBolsa_TextChanged(sender As Object, e As EventArgs) Handles txtPorcentajeBolsa.TextChanged
- If Modo = "N" Then
- RefrescarComisionBolsa()
- End If
- End Sub
- Private Sub txtPorcentajeIOF_TextChanged(sender As Object, e As EventArgs) Handles txtPorcentajeIOF.TextChanged
- If Modo = "N" Then
- RefrescarIOF()
- End If
- End Sub
- Private Sub txtDias_TextChanged(sender As Object, e As EventArgs) Handles txtDias.TextChanged
- If Modo = "N" Then
- RefrescarFechaVencimiento()
- RefrescarComisionCasa()
- RefrescarComisionBolsa()
- RefrescarInteresAGenerar()
- RefrescarRendimientoNetoAntesISR()
- RefrescarRendimientoNetoDespuesISR()
- End If
- End Sub
- Private Sub dtpFechaCompra_ValueChanged(sender As Object, e As EventArgs) Handles dtpFechaCompra.ValueChanged
- If Modo = "N" Then
- RefrescarFechaVencimiento()
- End If
- End Sub
- Private Sub txtComisionCasa_TextChanged(sender As Object, e As EventArgs) Handles txtComisionCasa.TextChanged
- If Modo = "N" Then
- RefrescarIOF()
- RefrescarTotalCostos()
- End If
- End Sub
- Private Sub TxtComisionBolsa_TextChanged(sender As Object, e As EventArgs) Handles txtComisionBolsa.TextChanged
- If Modo = "N" Then
- RefrescarIOF()
- RefrescarTotalCostos()
- End If
- End Sub
- Private Sub txtIOF_TextChanged(sender As Object, e As EventArgs) Handles txtIOF.TextChanged
- If Modo = "N" Then
- RefrescarTotalCostos()
- End If
- End Sub
- Private Sub txtOtrosCostos_TextChanged(sender As Object, e As EventArgs) Handles txtOtrosCostos.TextChanged
- If Modo = "N" Then
- RefrescarTotalCostos()
- End If
- End Sub
- Private Sub txtValorTransado_TextChanged(sender As Object, e As EventArgs) Handles txtValorTransado.TextChanged
- If Modo = "N" Then
- RefrescarComisionCasa()
- RefrescarComisionBolsa()
- RefrescarIOF()
- RefrescarMontoALiquidar()
- RefrescarInteresAGenerar()
- RefrescarRendimientoNetoAntesISR()
- RefrescarValorDeRecompra()
- RefrescarValorNeto()
- RefrescarRendimientoNetoDespuesISR()
- End If
- End Sub
- Private Sub txtTotalCostos_TextChanged(sender As Object, e As EventArgs) Handles txtTotalCostos.TextChanged
- If Modo = "N" Then
- RefrescarMontoALiquidar()
- RefrescarRendimientoNetoAntesISR()
- RefrescarRendimientoNetoDespuesISR()
- End If
- End Sub
- Private Sub txtRendimiento_TextChanged(sender As Object, e As EventArgs) Handles txtRendimiento.TextChanged
- If Modo = "N" Then
- RefrescarInteresAGenerar()
- End If
- End Sub
- Private Sub txtInteresesAGenerar_TextChanged(sender As Object, e As EventArgs) Handles txtInteresesAGenerar.TextChanged
- If Modo = "N" Then
- RefrescarRendimientoNetoAntesISR()
- RefrescarValorDeRecompra()
- RefrescarISR()
- RefrescarIngresoNeto()
- End If
- End Sub
- Private Sub txtISR_TextChanged(sender As Object, e As EventArgs) Handles txtISR.TextChanged
- If Modo = "N" Then
- RefrescarIngresoNeto()
- End If
- End Sub
- Private Sub txtIngresoNeto_TextChanged(sender As Object, e As EventArgs) Handles txtIngresoNeto.TextChanged
- If Modo = "N" Then
- RefrescarValorNeto()
- RefrescarRendimientoNetoDespuesISR()
- End If
- End Sub
- Private Sub txtCostoDeTransferencia_TextChanged(sender As Object, e As EventArgs) Handles txtCostoDeTransferencia.TextChanged
- If Modo = "N" Then
- RefrescarValorNeto()
- End If
- End Sub
- 'CARGAR DATOS DE CONTROLES
- Sub CargarCasaCorredoras()
- Me.cboCasaCorredora.DataSource = oDAOGeneral.ListaCasasCorredoras.Tables("CasasCorredoras")
- Me.cboCasaCorredora.DisplayMember = "Descripciom"
- Me.cboCasaCorredora.ValueMember = "Codigo"
- Me.cboCasaCorredora.SelectedIndex = -1
- End Sub
- Private Sub btnAceptar_Click(sender As Object, e As EventArgs) Handles btnAceptar.Click
- If Modo = "N" Then
- oCEReporto = New ReportosCE
- oCEReporto.CodigoCasa = Me.GetCasa
- oCEReporto.Nombre = Me.GetCodigoTitulo
- oCEReporto.FechaDeCompra = Me.GetFechaCompra
- oCEReporto.ValorTransado = Me.GetValorTransado
- oCEReporto.Dias = Me.GetDias
- oCEReporto.FechaVencimiento = Me.GetFechaVencimiento
- oCEReporto.Rendimiento = Me.GetRendimiento
- 'oCEReporto.Impuestos As Double
- oCEReporto.OtrosCostos = Me.GetOtrosCostos
- 'oCEReporto.TotalCostos = Me.GetTotalCostos
- oCEReporto.MontoALiquidar = Me.GetMontoALiquidar
- 'oCEReporto.InteresAGenerar = Me.GetInteresesAGenerar
- oCEReporto.CostoDeTransferencia = Me.GetCostoDeTransferencia
- 'oCEReporto.RendimientoNetoAntesDeImpuestos = Me.GetRendimientoNetoAntesDeImpuestos
- oCEReporto.ValorReCompra = Me.GetValorRecompra
- oCEReporto.ImpuestosLiquidacion = Me.GetISR
- 'oCEReporto.IngresoNeto = Me.GetIngresoNeto
- oCEReporto.ValorNeto = Me.GetValorNeto
- 'oCEReporto.RendimientoNetoDespuesDeImpuestos = Me.GetRendimientoNetoDespuesDeImpuestos
- Else
- Me.Close()
- End If
- End Sub
- Function RetornarObjeto()
- Return oCEReporto
- End Function
- Private Sub CargarRegistroBD()
- oCEReporto = New ReportosCE
- oDAOReportos = New ReportosDAO
- 'oDAOReportos.CargarRegistro(oCEReporto, TipoDocumento, IdDocumento)
- oCEReporto = oDAOReportos.CargarRegistro(CodigoInversion)
- Dim vCodigoCasa As String = oCEReporto.CodigoCasa
- Dim vNombre As String = oCEReporto.Nombre
- Dim vFechaDeCompra As Date = oCEReporto.FechaDeCompra
- Dim vValorTransado As Double = oCEReporto.ValorTransado
- Dim vDias As Integer = oCEReporto.Dias
- Dim vFechaVencimiento As Date = oCEReporto.FechaVencimiento
- Dim vRendimiento As Double = oCEReporto.Rendimiento
- Dim vImpuestos As Double = oCEReporto.Impuestos
- Dim vOtrosCostos As Double = oCEReporto.OtrosCostos
- Dim vTotalCostos As Double = oCEReporto.TotalCostos
- Dim vMontoALiquidar As Double = oCEReporto.MontoALiquidar
- Dim vInteresAGenerar As Double = oCEReporto.InteresAGenerar
- Dim vCostoDeTransferencia As Double = oCEReporto.CostoDeTransferencia
- Dim vRendimientoNetoAntesDeImpuestos As Double = oCEReporto.RendimientoNetoAntesDeImpuestos
- Dim vValorReCompra As Double = oCEReporto.ValorReCompra
- Dim vImpuestosLiquidacion As Double = oCEReporto.ImpuestosLiquidacion
- Dim vIngresoNeto As Double = oCEReporto.IngresoNeto
- Dim vValorNeto As Double = oCEReporto.ValorNeto
- Dim vRendimientoNetoDespuesDeImpuestos As Double = oCEReporto.RendimientoNetoDespuesDeImpuestos
- 'Me.cboCasaCorredora.SelectedValue = vCodigoCasa
- Me.txtCodigoTitulo.Text = vNombre
- Me.dtpFechaCompra.Value = vFechaDeCompra
- Me.txtValorTransado.Text = vValorTransado.ToString(Configuraciones.CodigoTXTMontos)
- Me.txtDias.Text = vDias
- Me.dtpFechaVencimiento.Value = vFechaVencimiento
- Me.txtRendimiento.Text = (vRendimiento / 100).ToString(Configuraciones.CodigoTXTPorcentaje)
- 'IMPUESTOS
- Me.txtOtrosCostos.Text = vOtrosCostos
- Me.txtTotalCostos.Text = vTotalCostos
- Me.txtMontoALiquidar.Text = vMontoALiquidar.ToString(Configuraciones.CodigoTXTMontos)
- Me.txtInteresesAGenerar.Text = vInteresAGenerar.ToString(Configuraciones.CodigoTXTMontos)
- Me.txtCostoDeTransferencia.Text = vCostoDeTransferencia.ToString(Configuraciones.CodigoTXTMontos)
- Me.txtRendimientoNetoAntesISR.Text = (vRendimientoNetoAntesDeImpuestos / 100).ToString(Configuraciones.CodigoTXTPorcentaje)
- Me.txtValorReCompra.Text = vValorReCompra.ToString(Configuraciones.CodigoTXTMontos)
- Me.txtISR.Text = vImpuestosLiquidacion.ToString(Configuraciones.CodigoTXTMontos)
- Me.txtIngresoNeto.Text = vIngresoNeto.ToString(Configuraciones.CodigoTXTMontos)
- Me.txtValorNeto.Text = vValorNeto.ToString(Configuraciones.CodigoTXTMontos)
- Me.txtRendimientoNetoDespuesISR.Text = (vRendimientoNetoDespuesDeImpuestos / 100).ToString(Configuraciones.CodigoTXTPorcentaje)
- End Sub
- Public Sub CargarRegistro(vId As Integer, vTipo As String)
- Modo = "C"
- IdDocumento = vId
- TipoDocumento = vTipo
- End Sub
- Private Sub cboCasaCorredora_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboCasaCorredora.SelectedIndexChanged
- End Sub
- Private Sub txtCodigoTitulo_TextChanged(sender As Object, e As EventArgs) Handles txtCodigoTitulo.TextChanged
- End Sub
- Private Sub txtCodigoTitulo_LostFocus(sender As Object, e As EventArgs) Handles txtCodigoTitulo.LostFocus
- End Sub
- Private Sub Control_CodigoTitulo()
- Dim valor As String
- End Sub
- Private Sub dtpFechaVencimiento_ValueChanged(sender As Object, e As EventArgs) Handles dtpFechaVencimiento.ValueChanged
- End Sub
- Private Sub txtMontoALiquidar_TextChanged(sender As Object, e As EventArgs) Handles txtMontoALiquidar.TextChanged
- End Sub
- Private Sub txtRendimientoNetoAntesISR_TextChanged(sender As Object, e As EventArgs) Handles txtRendimientoNetoAntesISR.TextChanged
- End Sub
- Private Sub txtValorReCompra_TextChanged(sender As Object, e As EventArgs) Handles txtValorReCompra.TextChanged
- End Sub
- Private Sub txtValorNeto_TextChanged(sender As Object, e As EventArgs) Handles txtValorNeto.TextChanged
- End Sub
- Private Sub txtRendimientoNetoDespuesISR_TextChanged(sender As Object, e As EventArgs) Handles txtRendimientoNetoDespuesISR.TextChanged
- End Sub
- Public Sub CargarRegistro(ByVal vCodigoInversion As String)
- Modo = "C"
- Me.CodigoInversion = vCodigoInversion
- End Sub
- End Class
|