|
@@ -1,35 +1,24 @@
|
|
|
Public Class frmReporto
|
|
Public Class frmReporto
|
|
|
Dim oDAOGeneral As New DAOGeneral
|
|
Dim oDAOGeneral As New DAOGeneral
|
|
|
- Dim Aniobase As Integer = 365
|
|
|
|
|
Const PorcentajeComisionCasa As Double = 0.2825
|
|
Const PorcentajeComisionCasa As Double = 0.2825
|
|
|
Const PorcentajeComisionBolsa As Double = 0.2825
|
|
Const PorcentajeComisionBolsa As Double = 0.2825
|
|
|
- Const PorcentajeComisionIOF As Double = 0.25
|
|
|
|
|
- Dim PorcentajeISR As Double = 10
|
|
|
|
|
Dim oCEReporto As ReportosCE
|
|
Dim oCEReporto As ReportosCE
|
|
|
Dim oDAOReportos As ReportosDAO
|
|
Dim oDAOReportos As ReportosDAO
|
|
|
Dim Reporto As New ReportosCE
|
|
Dim Reporto As New ReportosCE
|
|
|
Dim ReportoConsula As New ReportosDAO
|
|
Dim ReportoConsula As New ReportosDAO
|
|
|
- Private CodigoInversion As String
|
|
|
|
|
Dim Estado As String = String.Empty
|
|
Dim Estado As String = String.Empty
|
|
|
Dim CargarUnaVez As Boolean = True
|
|
Dim CargarUnaVez As Boolean = True
|
|
|
Dim Operaciones As New Operaciones
|
|
Dim Operaciones As New Operaciones
|
|
|
- Dim NombreTitulo As New Dictionary(Of String, String)
|
|
|
|
|
Dim Modificado As Boolean = False
|
|
Dim Modificado As Boolean = False
|
|
|
Dim InstrumentoFinanciero As String = oDAOGeneral.ObtenerInstrumento(Variables.Codigo)
|
|
Dim InstrumentoFinanciero As String = oDAOGeneral.ObtenerInstrumento(Variables.Codigo)
|
|
|
Dim CodigoRotar As Integer = 0
|
|
Dim CodigoRotar As Integer = 0
|
|
|
Private _Modo As String
|
|
Private _Modo As String
|
|
|
- Private _IdDocumento As Integer
|
|
|
|
|
- Private _TipoDocumento As String
|
|
|
|
|
Private Cargado As Boolean = False
|
|
Private Cargado As Boolean = False
|
|
|
Private Procesado As Boolean = False
|
|
Private Procesado As Boolean = False
|
|
|
Private Tabla As String = String.Empty
|
|
Private Tabla As String = String.Empty
|
|
|
Private Base As Integer = 0
|
|
Private Base As Integer = 0
|
|
|
- Private IOFEstado As Integer = 0
|
|
|
|
|
- Private RentaEstado As Integer = 0
|
|
|
|
|
- Private TipoOperacionRepo As String = String.Empty
|
|
|
|
|
- Private CodigoRepo As String = String.Empty
|
|
|
|
|
Private CodigoProveniente As String = String.Empty
|
|
Private CodigoProveniente As String = String.Empty
|
|
|
- Dim CodigoCheque As String = String.Empty
|
|
|
|
|
|
|
+
|
|
|
Sub New()
|
|
Sub New()
|
|
|
|
|
|
|
|
' Esta llamada es exigida por el diseñador.
|
|
' Esta llamada es exigida por el diseñador.
|
|
@@ -131,7 +120,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
dgvReportos.Columns.Add(Correlativo)
|
|
dgvReportos.Columns.Add(Correlativo)
|
|
|
-
|
|
|
|
|
dgvReportos.Columns.Add(ValTrans)
|
|
dgvReportos.Columns.Add(ValTrans)
|
|
|
dgvReportos.Columns.Add(Dias)
|
|
dgvReportos.Columns.Add(Dias)
|
|
|
dgvReportos.Columns.Add(FVen)
|
|
dgvReportos.Columns.Add(FVen)
|
|
@@ -162,11 +150,6 @@
|
|
|
dgvReportos.Columns.Add(EstadoIOF)
|
|
dgvReportos.Columns.Add(EstadoIOF)
|
|
|
dgvReportos.Columns.Add(EstadoRenta)
|
|
dgvReportos.Columns.Add(EstadoRenta)
|
|
|
|
|
|
|
|
-
|
|
|
|
|
- Dim CodImp, code As New DataGridViewTextBoxColumn
|
|
|
|
|
- CodImp.Name = "CodImp"
|
|
|
|
|
- code.Name = "codigo"
|
|
|
|
|
-
|
|
|
|
|
End If
|
|
End If
|
|
|
End Sub
|
|
End Sub
|
|
|
|
|
|
|
@@ -175,7 +158,6 @@
|
|
|
Dim Index As Integer = dgvReportos.Rows.Count - 2
|
|
Dim Index As Integer = dgvReportos.Rows.Count - 2
|
|
|
Base = cboAnioBase.SelectedIndex
|
|
Base = cboAnioBase.SelectedIndex
|
|
|
Dim i As Integer = 0
|
|
Dim i As Integer = 0
|
|
|
-
|
|
|
|
|
While i <= Index
|
|
While i <= Index
|
|
|
dgvReportos.Rows(i).Cells("Base").Value = Base
|
|
dgvReportos.Rows(i).Cells("Base").Value = Base
|
|
|
i += 1
|
|
i += 1
|
|
@@ -185,289 +167,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
Sub IngresarDatos()
|
|
Sub IngresarDatos()
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
If Cargado Then
|
|
If Cargado Then
|
|
|
If Procesado Then
|
|
If Procesado Then
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
If Not dgvReportos.CurrentRow Is Nothing Then
|
|
If Not dgvReportos.CurrentRow Is Nothing Then
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
Dim Index As Integer = dgvReportos.CurrentRow.Index
|
|
Dim Index As Integer = dgvReportos.CurrentRow.Index
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- dgvReportos.Rows(Index).Cells("Nombre").Value = txtCodigoTitulo.Text
|
|
|
|
|
|
|
+ dgvReportos.Rows(Index).Cells("Nombre").Value = txtCodigoTitulo.Text.ToString
|
|
|
dgvReportos.Rows(Index).Cells("FCompra").Value = dtpFechaCompra.Value
|
|
dgvReportos.Rows(Index).Cells("FCompra").Value = dtpFechaCompra.Value
|
|
|
-
|
|
|
|
|
- If txtComisionCasa.Text.ToString.Trim("%") = 0 Then
|
|
|
|
|
- dgvReportos.Rows(Index).Cells("ComisionCasa").Value = "0.0"
|
|
|
|
|
- Else
|
|
|
|
|
- dgvReportos.Rows(Index).Cells("ComisionCasa").Value = CDec(txtComisionCasa.Text.ToString.Trim("%")) / 100
|
|
|
|
|
- End If
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- If txtComisionBolsa.Text.ToString.Trim("%") = 0 Then
|
|
|
|
|
- dgvReportos.Rows(Index).Cells("ComisionBolsa").Value = "0.0"
|
|
|
|
|
- Else
|
|
|
|
|
- dgvReportos.Rows(Index).Cells("ComisionBolsa").Value = CDec(txtComisionBolsa.Text.ToString.Trim("%")) / 100
|
|
|
|
|
- End If
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- If Variables.Codigo.IndexOf("REPO") > -1 Or Variables.Codigo.IndexOf("REPOVENTA") > -1 Then
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- dgvReportos.Rows(Index).Cells("Casa").Value = cboCasaCorredora.SelectedValue
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- End If
|
|
|
|
|
-
|
|
|
|
|
- End If
|
|
|
|
|
|
|
+ dgvReportos.Rows(Index).Cells("ComisionCasa").Value = Operaciones.ConvertirDecimal(txtComisionCasa.Text.ToString) / 100
|
|
|
|
|
+ dgvReportos.Rows(Index).Cells("ComisionBolsa").Value = Operaciones.ConvertirDecimal(txtComisionBolsa.Text.ToString) / 100
|
|
|
|
|
+ dgvReportos.Rows(Index).Cells("Casa").Value = cboCasaCorredora.SelectedValue
|
|
|
End If
|
|
End If
|
|
|
|
|
+ End If
|
|
|
End If
|
|
End If
|
|
|
End Sub
|
|
End Sub
|
|
|
Sub IngresarDatosReves()
|
|
Sub IngresarDatosReves()
|
|
|
Procesado = False
|
|
Procesado = False
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
If Cargado Then
|
|
If Cargado Then
|
|
|
|
|
|
|
|
|
|
+ If Not dgvReportos.CurrentRow Is Nothing Then
|
|
|
|
|
|
|
|
- If Not dgvReportos.CurrentRow Is Nothing Then
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- Dim Index As Integer = dgvReportos.CurrentRow.Index
|
|
|
|
|
- Dim Nombre = dgvReportos.Rows(Index).Cells("Nombre").Value
|
|
|
|
|
- Dim FCompra = dgvReportos.Rows(Index).Cells("FCompra").Value
|
|
|
|
|
- Dim ComisionCasa = dgvReportos.Rows(Index).Cells("ComisionCasa").Value
|
|
|
|
|
- Dim ComisionBolsa = dgvReportos.Rows(Index).Cells("ComisionBolsa").Value
|
|
|
|
|
- Dim EstadoIOF = dgvReportos.Rows(Index).Cells("EstadoIOF").Value
|
|
|
|
|
- Dim EstadoRenta = dgvReportos.Rows(Index).Cells("EstadoRenta").Value
|
|
|
|
|
- Dim Casa = dgvReportos.Rows(Index).Cells("Casa").Value
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- If Not Nombre Is DBNull.Value Then
|
|
|
|
|
-
|
|
|
|
|
- If Not Nombre Is Nothing Then
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- If Not String.IsNullOrEmpty(Nombre) Then
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- txtCodigoTitulo.Text = Nombre
|
|
|
|
|
-
|
|
|
|
|
- Else
|
|
|
|
|
- txtCodigoTitulo.Text = String.Empty
|
|
|
|
|
- End If
|
|
|
|
|
- Else
|
|
|
|
|
- txtCodigoTitulo.Text = String.Empty
|
|
|
|
|
- End If
|
|
|
|
|
- Else
|
|
|
|
|
- txtCodigoTitulo.Text = String.Empty
|
|
|
|
|
- End If
|
|
|
|
|
- If Not FCompra Is DBNull.Value Then
|
|
|
|
|
- If Not FCompra Is Nothing Then
|
|
|
|
|
- If Not String.IsNullOrEmpty(FCompra) Then
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- dtpFechaCompra.Value = FCompra
|
|
|
|
|
- Else
|
|
|
|
|
- dtpFechaCompra.Value = Date.Now.Date
|
|
|
|
|
- End If
|
|
|
|
|
- Else
|
|
|
|
|
- dtpFechaCompra.Value = Date.Now.Date
|
|
|
|
|
- End If
|
|
|
|
|
- Else
|
|
|
|
|
- dtpFechaCompra.Value = Date.Now.Date
|
|
|
|
|
- End If
|
|
|
|
|
-
|
|
|
|
|
- If Not ComisionCasa Is DBNull.Value Then
|
|
|
|
|
- If Not ComisionCasa Is Nothing Then
|
|
|
|
|
- If Not String.IsNullOrEmpty(ComisionCasa.ToString.Trim("%")) Then
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- txtComisionCasa.Text = ComisionCasa.ToString.Trim("%") * 100
|
|
|
|
|
- Else
|
|
|
|
|
- txtComisionCasa.Text = "0.2825%"
|
|
|
|
|
- End If
|
|
|
|
|
- Else
|
|
|
|
|
- txtComisionCasa.Text = "0.2825%"
|
|
|
|
|
- End If
|
|
|
|
|
-
|
|
|
|
|
- Else
|
|
|
|
|
- txtComisionCasa.Text = "0.2825%"
|
|
|
|
|
- End If
|
|
|
|
|
|
|
|
|
|
|
|
+ Dim Index As Integer = dgvReportos.CurrentRow.Index
|
|
|
|
|
+ Dim Nombre As String = CStr(dgvReportos.Rows(Index).Cells("Nombre").Value)
|
|
|
|
|
+ Dim FCompra As Date = Operaciones.ConvertirFecha(dgvReportos.Rows(Index).Cells("FCompra").Value)
|
|
|
|
|
+ Dim ComisionCasa As Double = Operaciones.ConvertirDecimal(dgvReportos.Rows(Index).Cells("ComisionCasa").Value) * 100
|
|
|
|
|
+ Dim ComisionBolsa As Double = Operaciones.ConvertirDecimal(dgvReportos.Rows(Index).Cells("ComisionBolsa").Value) * 100
|
|
|
|
|
+ Dim EstadoIOF As Boolean = Operaciones.ConvertirBoolNum(dgvReportos.Rows(Index).Cells("EstadoIOF").Value)
|
|
|
|
|
+ Dim EstadoRenta As Boolean = Operaciones.ConvertirBoolNum(dgvReportos.Rows(Index).Cells("EstadoRenta").Value)
|
|
|
|
|
+ Dim Casa As String = Operaciones.ConvertirCadena(dgvReportos.Rows(Index).Cells("Casa").Value)
|
|
|
|
|
|
|
|
|
|
|
|
|
- If Not ComisionBolsa Is DBNull.Value Then
|
|
|
|
|
- If Not ComisionBolsa Is Nothing Then
|
|
|
|
|
- If Not String.IsNullOrEmpty(ComisionBolsa.ToString.Trim("%")) Then
|
|
|
|
|
|
|
|
|
|
|
|
+ txtCodigoTitulo.Text = Nombre
|
|
|
|
|
+ dtpFechaCompra.Value = FCompra
|
|
|
|
|
+ txtComisionCasa.Text = ComisionCasa
|
|
|
|
|
+ txtComisionBolsa.Text = ComisionBolsa
|
|
|
|
|
|
|
|
- txtComisionBolsa.Text = ComisionBolsa.ToString.Trim("%") * 100
|
|
|
|
|
- Else
|
|
|
|
|
- txtComisionBolsa.Text = "0.2825%"
|
|
|
|
|
-
|
|
|
|
|
- End If
|
|
|
|
|
- Else
|
|
|
|
|
- txtComisionBolsa.Text = "0.2825%"
|
|
|
|
|
- End If
|
|
|
|
|
- Else
|
|
|
|
|
- txtComisionBolsa.Text = "0.2825%"
|
|
|
|
|
- End If
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- If Not EstadoIOF Is DBNull.Value Then
|
|
|
|
|
- If Not EstadoIOF Is Nothing Then
|
|
|
|
|
- If Not String.IsNullOrEmpty(EstadoIOF) Then
|
|
|
|
|
- If Index = 0 Then
|
|
|
|
|
- If EstadoIOF = 1 Then
|
|
|
|
|
- ChkIOF.Checked = True
|
|
|
|
|
- Else
|
|
|
|
|
- ChkIOF.Checked = False
|
|
|
|
|
- End If
|
|
|
|
|
- Else
|
|
|
|
|
- Dim EstadoIOFAnt = dgvReportos.Rows(Index - 1).Cells("EstadoIOF").Value
|
|
|
|
|
- If EstadoIOFAnt = 1 Then
|
|
|
|
|
- ChkIOF.Checked = True
|
|
|
|
|
- Else
|
|
|
|
|
- ChkIOF.Checked = False
|
|
|
|
|
- End If
|
|
|
|
|
- End If
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- Else
|
|
|
|
|
- If Not Index = 0 Then
|
|
|
|
|
- Dim EstadoIOFAnt = dgvReportos.Rows(Index - 1).Cells("EstadoIOF").Value
|
|
|
|
|
- If EstadoIOFAnt = 1 Then
|
|
|
|
|
- ChkIOF.Checked = True
|
|
|
|
|
- Else
|
|
|
|
|
- ChkIOF.Checked = False
|
|
|
|
|
- End If
|
|
|
|
|
- End If
|
|
|
|
|
-
|
|
|
|
|
- End If
|
|
|
|
|
- Else
|
|
|
|
|
- If Not Index = 0 Then
|
|
|
|
|
- Dim EstadoIOFAnt = dgvReportos.Rows(Index - 1).Cells("EstadoIOF").Value
|
|
|
|
|
- If EstadoIOFAnt = 1 Then
|
|
|
|
|
- ChkIOF.Checked = True
|
|
|
|
|
- Else
|
|
|
|
|
- ChkIOF.Checked = False
|
|
|
|
|
- End If
|
|
|
|
|
- End If
|
|
|
|
|
- End If
|
|
|
|
|
|
|
+ If Index = 0 Then
|
|
|
|
|
+ ChkIOF.Checked = EstadoIOF
|
|
|
Else
|
|
Else
|
|
|
- If Not Index = 0 Then
|
|
|
|
|
- Dim EstadoIOFAnt = dgvReportos.Rows(Index - 1).Cells("EstadoIOF").Value
|
|
|
|
|
- If EstadoIOFAnt = 1 Then
|
|
|
|
|
- ChkIOF.Checked = True
|
|
|
|
|
- Else
|
|
|
|
|
- ChkIOF.Checked = False
|
|
|
|
|
- End If
|
|
|
|
|
- End If
|
|
|
|
|
|
|
+ Dim EstadoIOFAnt = Operaciones.ConvertirBoolNum(dgvReportos.Rows(Index - 1).Cells("EstadoIOF").Value)
|
|
|
|
|
+ ChkIOF.Checked = EstadoIOFAnt
|
|
|
End If
|
|
End If
|
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- If Not EstadoRenta Is DBNull.Value Then
|
|
|
|
|
- If Not EstadoRenta Is Nothing Then
|
|
|
|
|
- If Not String.IsNullOrEmpty(EstadoRenta) Then
|
|
|
|
|
-
|
|
|
|
|
- If Index = 0 Then
|
|
|
|
|
- If EstadoRenta = 1 Then
|
|
|
|
|
- ChkRenta.Checked = True
|
|
|
|
|
- Else
|
|
|
|
|
- ChkRenta.Checked = False
|
|
|
|
|
- End If
|
|
|
|
|
- Else
|
|
|
|
|
- Dim EstadoRentaAnt = dgvReportos.Rows(Index - 1).Cells("EstadoRenta").Value
|
|
|
|
|
- If EstadoRentaAnt = 1 Then
|
|
|
|
|
- ChkRenta.Checked = True
|
|
|
|
|
- Else
|
|
|
|
|
- ChkRenta.Checked = False
|
|
|
|
|
- End If
|
|
|
|
|
- End If
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- Else
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- If Not Index = 0 Then
|
|
|
|
|
- Dim EstadoRentaAnt = dgvReportos.Rows(Index - 1).Cells("EstadoRenta").Value
|
|
|
|
|
- If EstadoRentaAnt = 1 Then
|
|
|
|
|
- ChkRenta.Checked = True
|
|
|
|
|
- Else
|
|
|
|
|
- ChkRenta.Checked = False
|
|
|
|
|
- End If
|
|
|
|
|
- End If
|
|
|
|
|
- End If
|
|
|
|
|
- Else
|
|
|
|
|
- If Not Index = 0 Then
|
|
|
|
|
- Dim EstadoRentaAnt = dgvReportos.Rows(Index - 1).Cells("EstadoRenta").Value
|
|
|
|
|
- If EstadoRentaAnt = 1 Then
|
|
|
|
|
- ChkRenta.Checked = True
|
|
|
|
|
- Else
|
|
|
|
|
- ChkRenta.Checked = False
|
|
|
|
|
- End If
|
|
|
|
|
- End If
|
|
|
|
|
- End If
|
|
|
|
|
|
|
+ If Index = 0 Then
|
|
|
|
|
+ ChkRenta.Checked = EstadoRenta
|
|
|
Else
|
|
Else
|
|
|
- If Not Index = 0 Then
|
|
|
|
|
- Dim EstadoRentaAnt = dgvReportos.Rows(Index - 1).Cells("EstadoRenta").Value
|
|
|
|
|
- If EstadoRentaAnt = 1 Then
|
|
|
|
|
- ChkRenta.Checked = True
|
|
|
|
|
- Else
|
|
|
|
|
- ChkRenta.Checked = False
|
|
|
|
|
- End If
|
|
|
|
|
- End If
|
|
|
|
|
- End If
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
+ Dim EstadoRentaAnt = dgvReportos.Rows(Index - 1).Cells("EstadoRenta").Value
|
|
|
|
|
+ ChkRenta.Checked = EstadoRentaAnt
|
|
|
|
|
|
|
|
- If Not Casa Is DBNull.Value Then
|
|
|
|
|
- If Not Casa Is Nothing Then
|
|
|
|
|
- If Not String.IsNullOrEmpty(Casa) Then
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- cboCasaCorredora.SelectedValue = Casa
|
|
|
|
|
- Else
|
|
|
|
|
- cboCasaCorredora.SelectedIndex = -1
|
|
|
|
|
- End If
|
|
|
|
|
- Else
|
|
|
|
|
- cboCasaCorredora.SelectedIndex = -1
|
|
|
|
|
- End If
|
|
|
|
|
- Else
|
|
|
|
|
- cboCasaCorredora.SelectedIndex = -1
|
|
|
|
|
End If
|
|
End If
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- End If
|
|
|
|
|
|
|
+ cboCasaCorredora.SelectedValue = Casa
|
|
|
End If
|
|
End If
|
|
|
-
|
|
|
|
|
|
|
+ End If
|
|
|
Procesado = True
|
|
Procesado = True
|
|
|
End Sub
|
|
End Sub
|
|
|
|
|
|
|
@@ -484,38 +237,7 @@
|
|
|
dgvReportos.Rows(Index).Cells("Comision CB").Value = Operaciones.ConvertirDecimal(Reporto.Comision(ValorTrasado, Dias, por, Fecha1, Fecha2, Base).ToString)
|
|
dgvReportos.Rows(Index).Cells("Comision CB").Value = Operaciones.ConvertirDecimal(Reporto.Comision(ValorTrasado, Dias, por, Fecha1, Fecha2, Base).ToString)
|
|
|
End Sub
|
|
End Sub
|
|
|
|
|
|
|
|
- Function ComisionCasaCargar(ByVal Index As Integer)
|
|
|
|
|
- Dim ValorTrasado As Double = 0
|
|
|
|
|
- Dim Dias As Integer = 0
|
|
|
|
|
- Dim por As Double = 0
|
|
|
|
|
-
|
|
|
|
|
- If Not String.IsNullOrEmpty(dgvReportos.Rows(Index).Cells("Valor Trasado").Value) Then
|
|
|
|
|
- ValorTrasado = dgvReportos.Rows(Index).Cells("Valor Trasado").Value
|
|
|
|
|
- End If
|
|
|
|
|
-
|
|
|
|
|
|
|
|
|
|
- If Not String.IsNullOrEmpty(dgvReportos.Rows(Index).Cells("Dias").Value) Then
|
|
|
|
|
- Dias = dgvReportos.Rows(Index).Cells("Dias").Value
|
|
|
|
|
- End If
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- If (String.IsNullOrEmpty(txtComisionCasa.Text.ToString.Trim("%"))) Then
|
|
|
|
|
- txtComisionCasa.Text = "0.2825%"
|
|
|
|
|
-
|
|
|
|
|
- Else
|
|
|
|
|
- por = CDec(txtComisionCasa.Text.ToString.Trim("%")) / 100
|
|
|
|
|
- End If
|
|
|
|
|
- Dim Fecha1 As Date = dgvReportos.Rows(Index).Cells("FCompra").Value
|
|
|
|
|
- Dim Fecha2 As Date = dgvReportos.Rows(Index).Cells("Fecha de Vencimiento").Value
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- Dim Com = Reporto.Comision(ValorTrasado, Dias, por, Fecha1, Fecha2, Base)
|
|
|
|
|
-
|
|
|
|
|
- dgvReportos.Rows(Index).Cells("Comision CB").Value = Com
|
|
|
|
|
-
|
|
|
|
|
- Return Com
|
|
|
|
|
- End Function
|
|
|
|
|
|
|
|
|
|
Sub ComisionBolsa(ByVal ComisionBolsa As Double, ByVal Index As Integer)
|
|
Sub ComisionBolsa(ByVal ComisionBolsa As Double, ByVal Index As Integer)
|
|
|
Dim ValorTrasado As Double = 0
|
|
Dim ValorTrasado As Double = 0
|
|
@@ -697,23 +419,10 @@
|
|
|
Dim Index As Integer = dgvReportos.CurrentRow.Index
|
|
Dim Index As Integer = dgvReportos.CurrentRow.Index
|
|
|
Dim Fecha As Date = dtpFechaCompra.Value
|
|
Dim Fecha As Date = dtpFechaCompra.Value
|
|
|
Dim Fecha2 As Date = Date.Now.Date
|
|
Dim Fecha2 As Date = Date.Now.Date
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- If Not String.IsNullOrEmpty(dgvReportos.Rows(Index).Cells("Fecha de Vencimiento").Value) Then
|
|
|
|
|
- Fecha2 = dgvReportos.Rows(Index).Cells("Fecha de Vencimiento").Value
|
|
|
|
|
- End If
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
+ Fecha2 = Operaciones.ConvertirFecha(dgvReportos.Rows(Index).Cells("Fecha de Vencimiento").Value)
|
|
|
End Sub
|
|
End Sub
|
|
|
Private Sub CargarCasaCorredora()
|
|
Private Sub CargarCasaCorredora()
|
|
|
If cboCasaCorredora.Items.Count = 0 Or cboCasaCorredora.Items.Count = 1 Then
|
|
If cboCasaCorredora.Items.Count = 0 Or cboCasaCorredora.Items.Count = 1 Then
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
Me.cboCasaCorredora.DataSource = oDAOGeneral.ListaTiposImpuesto
|
|
Me.cboCasaCorredora.DataSource = oDAOGeneral.ListaTiposImpuesto
|
|
|
Me.cboCasaCorredora.DisplayMember = "Descripcion"
|
|
Me.cboCasaCorredora.DisplayMember = "Descripcion"
|
|
|
Me.cboCasaCorredora.ValueMember = "Codigo"
|
|
Me.cboCasaCorredora.ValueMember = "Codigo"
|
|
@@ -724,8 +433,6 @@
|
|
|
|
|
|
|
|
Sub CargarBase()
|
|
Sub CargarBase()
|
|
|
If cboAnioBase.Items.Count = 0 Or cboAnioBase.Items.Count = 1 Then
|
|
If cboAnioBase.Items.Count = 0 Or cboAnioBase.Items.Count = 1 Then
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
Me.cboAnioBase.DataSource = oDAOGeneral.ListaBase
|
|
Me.cboAnioBase.DataSource = oDAOGeneral.ListaBase
|
|
|
Me.cboAnioBase.DisplayMember = "Descripcion"
|
|
Me.cboAnioBase.DisplayMember = "Descripcion"
|
|
|
Me.cboAnioBase.ValueMember = "Codigo"
|
|
Me.cboAnioBase.ValueMember = "Codigo"
|
|
@@ -734,11 +441,6 @@
|
|
|
End Sub
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
Private Sub frmReporto_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
|
Private Sub frmReporto_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
|
|
|
|
|
|
|
Titulo.TabPages.Remove(TbImpuestos)
|
|
Titulo.TabPages.Remove(TbImpuestos)
|
|
@@ -923,32 +625,9 @@
|
|
|
End While
|
|
End While
|
|
|
End Sub
|
|
End Sub
|
|
|
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- Sub ActualizarImpuestos(ByVal Valor As Integer)
|
|
|
|
|
-
|
|
|
|
|
- CargarReporto(Tabla)
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- End Sub
|
|
|
|
|
-
|
|
|
|
|
Sub Calculos()
|
|
Sub Calculos()
|
|
|
|
|
|
|
|
-
|
|
|
|
|
- If Variables.Codigo.IndexOf("REPO") > -1 Or Variables.Codigo.IndexOf("REPOVENTA") > -1 Then
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- Dim Cantidad As Integer = dgvReportos.Rows.Count - 2
|
|
|
|
|
|
|
+ Dim Cantidad As Integer = dgvReportos.Rows.Count - 2
|
|
|
Dim Index As Integer = 0
|
|
Dim Index As Integer = 0
|
|
|
|
|
|
|
|
While Index <= Cantidad
|
|
While Index <= Cantidad
|
|
@@ -974,21 +653,15 @@
|
|
|
Index += 1
|
|
Index += 1
|
|
|
End While
|
|
End While
|
|
|
|
|
|
|
|
-
|
|
|
|
|
- Else
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- End If
|
|
|
|
|
End Sub
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
|
|
|
Sub NuevaFila()
|
|
Sub NuevaFila()
|
|
|
|
|
|
|
|
|
|
|
|
|
- If Variables.Codigo.IndexOf("REPO") > -1 Or Variables.Codigo.IndexOf("REPOVENTA") > -1 Then
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- Dim i As Integer = dgvReportos.CurrentRow.Index
|
|
|
|
|
|
|
+ Dim i As Integer = dgvReportos.CurrentRow.Index
|
|
|
Dim IndexAnterior As Integer = dgvReportos.CurrentRow.Index - 1
|
|
Dim IndexAnterior As Integer = dgvReportos.CurrentRow.Index - 1
|
|
|
|
|
|
|
|
If (String.IsNullOrEmpty(dgvReportos.Rows(i).Cells("Codigo").Value)) Then
|
|
If (String.IsNullOrEmpty(dgvReportos.Rows(i).Cells("Codigo").Value)) Then
|
|
@@ -1085,14 +758,11 @@
|
|
|
If (String.IsNullOrEmpty(dgvReportos.Rows(i).Cells("R% Neto (Despues de Impuesto)").Value)) Then
|
|
If (String.IsNullOrEmpty(dgvReportos.Rows(i).Cells("R% Neto (Despues de Impuesto)").Value)) Then
|
|
|
dgvReportos.Rows(i).Cells("R% Neto (Despues de Impuesto)").Value = 0
|
|
dgvReportos.Rows(i).Cells("R% Neto (Despues de Impuesto)").Value = 0
|
|
|
End If
|
|
End If
|
|
|
- End If
|
|
|
|
|
|
|
+
|
|
|
End Sub
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
|
|
|
Sub QuitarFila()
|
|
Sub QuitarFila()
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
Dim result As Integer = MsgBox("¿Está seguro que desea eliminar la fila?", MsgBoxStyle.OkCancel)
|
|
Dim result As Integer = MsgBox("¿Está seguro que desea eliminar la fila?", MsgBoxStyle.OkCancel)
|
|
|
' Test result.
|
|
' Test result.
|
|
|
Dim codigo As String = Variables.Codigo
|
|
Dim codigo As String = Variables.Codigo
|
|
@@ -1104,15 +774,7 @@
|
|
|
Catch ex As Exception
|
|
Catch ex As Exception
|
|
|
MsgBox("No ha seleccionado una fila")
|
|
MsgBox("No ha seleccionado una fila")
|
|
|
End Try
|
|
End Try
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
End If
|
|
End If
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
End Sub
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1145,7 +807,7 @@
|
|
|
Dim IndexCantidad As Integer = dgvReportos.Rows.Count - 2
|
|
Dim IndexCantidad As Integer = dgvReportos.Rows.Count - 2
|
|
|
Dim NumeroMayor As Integer = 0
|
|
Dim NumeroMayor As Integer = 0
|
|
|
While Index <= IndexCantidad
|
|
While Index <= IndexCantidad
|
|
|
- Dim Numero As Integer = dgvReportos.Rows(Index).Cells("codigo").Value
|
|
|
|
|
|
|
+ Dim Numero As Integer = Operaciones.ConvertirEntero(dgvReportos.Rows(Index).Cells("codigo").Value)
|
|
|
If Numero > NumeroMayor Then
|
|
If Numero > NumeroMayor Then
|
|
|
NumeroMayor = Numero
|
|
NumeroMayor = Numero
|
|
|
End If
|
|
End If
|
|
@@ -1158,91 +820,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
Sub CargarReporto(ByVal Tabla As String)
|
|
Sub CargarReporto(ByVal Tabla As String)
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- Dim ConvertirString As String
|
|
|
|
|
|
|
+ Dim FechaVencimientoFormatoCadena As String
|
|
|
Dim Activo = 0.0, ActivoRenta = 0.0
|
|
Dim Activo = 0.0, ActivoRenta = 0.0
|
|
|
Dim EstadoIOF, EstadoRenta
|
|
Dim EstadoIOF, EstadoRenta
|
|
|
-
|
|
|
|
|
Dim dr = ReportoConsula.CargarReporto(Codigo, Tabla)
|
|
Dim dr = ReportoConsula.CargarReporto(Codigo, Tabla)
|
|
|
- If Tabla = "REP0" Or Tabla = "REP0VENTA" Then
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- If (Not dr Is Nothing) Then
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- While dr.Read
|
|
|
|
|
- If dr("EstadoIOF") Then
|
|
|
|
|
- EstadoIOF = 1
|
|
|
|
|
- ChkIOF.Checked = True
|
|
|
|
|
- Else
|
|
|
|
|
- EstadoIOF = 0
|
|
|
|
|
- ChkIOF.Checked = False
|
|
|
|
|
-
|
|
|
|
|
- End If
|
|
|
|
|
-
|
|
|
|
|
- If dr("EstadoRenta") Then
|
|
|
|
|
- EstadoRenta = 1
|
|
|
|
|
- ChkRenta.Checked = True
|
|
|
|
|
- Else
|
|
|
|
|
- EstadoRenta = 0
|
|
|
|
|
- ChkRenta.Checked = False
|
|
|
|
|
-
|
|
|
|
|
- End If
|
|
|
|
|
|
|
+ Dim ValorTransado As Double = 0
|
|
|
|
|
+ Dim Rendimiento As Double = 0
|
|
|
|
|
+ Dim CostoTransferencia As Double = 0
|
|
|
|
|
+ Dim Nombre As String = String.Empty
|
|
|
|
|
+ Dim FechaCompra As Date = Date.Now.Date
|
|
|
|
|
+ Dim CasaCorredora As String = String.Empty
|
|
|
|
|
+ Dim Correlativo As Integer = 0
|
|
|
|
|
|
|
|
|
|
+ If (Not dr Is Nothing) Then
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- Dim FechaVencimiento As Date = dr("FCompra")
|
|
|
|
|
- Dim Dias As Integer = dr("Dias")
|
|
|
|
|
- FechaVencimiento = FechaVencimiento.AddDays(Dias)
|
|
|
|
|
|
|
|
|
|
|
|
+ While dr.Read
|
|
|
|
|
+ If dr("EstadoIOF") Then
|
|
|
|
|
+ EstadoIOF = 1
|
|
|
|
|
+ ChkIOF.Checked = True
|
|
|
|
|
+ Else
|
|
|
|
|
+ EstadoIOF = 0
|
|
|
|
|
+ ChkIOF.Checked = False
|
|
|
|
|
|
|
|
|
|
+ End If
|
|
|
|
|
|
|
|
- ConvertirString = Format(FechaVencimiento, "dd/MM/yyyy")
|
|
|
|
|
- dtpFechaCompra.Value = dr("FCompra")
|
|
|
|
|
- If (dr("IOF")) Then
|
|
|
|
|
- Activo = 1
|
|
|
|
|
- Else
|
|
|
|
|
- Activo = 0
|
|
|
|
|
- End If
|
|
|
|
|
- If (dr("Renta")) Then
|
|
|
|
|
- ActivoRenta = 1
|
|
|
|
|
- Else
|
|
|
|
|
- ActivoRenta = 0
|
|
|
|
|
- End If
|
|
|
|
|
- Dim ComisionCasa As Double = 0
|
|
|
|
|
- Dim ComisionBolsa As Double = 0
|
|
|
|
|
- If Not String.IsNullOrEmpty(dr("ComisionCasa").ToString) Then
|
|
|
|
|
- ComisionCasa = dr("ComisionCasa")
|
|
|
|
|
- End If
|
|
|
|
|
|
|
+ If dr("EstadoRenta") Then
|
|
|
|
|
+ EstadoRenta = 1
|
|
|
|
|
+ ChkRenta.Checked = True
|
|
|
|
|
+ Else
|
|
|
|
|
+ EstadoRenta = 0
|
|
|
|
|
+ ChkRenta.Checked = False
|
|
|
|
|
|
|
|
- If Not String.IsNullOrEmpty(dr("ComisionBolsa").ToString) Then
|
|
|
|
|
- ComisionBolsa = dr("ComisionBolsa")
|
|
|
|
|
- End If
|
|
|
|
|
- If Tabla = "REP0VENTA" Then
|
|
|
|
|
|
|
+ End If
|
|
|
|
|
|
|
|
|
|
|
|
|
- dgvReportos.Rows.Add("", dr("ValTrans"), dr("Dias"), ConvertirString, (dr("Rend")), 0, 0, 0, 0, 0, 0, 0, 0, 0, dr("CostoTransfr"), ActivoRenta, "", "", "", dr("Nombre"), dr("FCompra"), ComisionCasa, ComisionBolsa, dr("Casa"), dr("codigo"), "", EstadoIOF, EstadoRenta)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- End If
|
|
|
|
|
|
|
+ Dim FechaVencimiento As Date = Operaciones.ConvertirFecha(dr("FCompra").ToString)
|
|
|
|
|
+ Dim Dias As Integer = Operaciones.ConvertirEntero(dr("Dias").ToString)
|
|
|
|
|
+ FechaVencimiento = FechaVencimiento.AddDays(Dias)
|
|
|
|
|
+ FechaVencimientoFormatoCadena = Format(FechaVencimiento, "dd/MM/yyyy")
|
|
|
|
|
+ dtpFechaCompra.Value = Operaciones.ConvertirFecha(dr("FCompra").ToString)
|
|
|
|
|
|
|
|
|
|
+ If (dr("IOF")) Then
|
|
|
|
|
+ Activo = 1
|
|
|
|
|
+ Else
|
|
|
|
|
+ Activo = 0
|
|
|
|
|
+ End If
|
|
|
|
|
+ If (dr("Renta")) Then
|
|
|
|
|
+ ActivoRenta = 1
|
|
|
|
|
+ Else
|
|
|
|
|
+ ActivoRenta = 0
|
|
|
|
|
+ End If
|
|
|
|
|
|
|
|
- End While
|
|
|
|
|
- End If
|
|
|
|
|
|
|
|
|
|
- Else
|
|
|
|
|
|
|
+ Dim ComisionCasa As Double = 0
|
|
|
|
|
+ Dim ComisionBolsa As Double = 0
|
|
|
|
|
|
|
|
|
|
+ ComisionCasa = Operaciones.ConvertirDecimal(dr("ComisionCasa").ToString)
|
|
|
|
|
+ ComisionBolsa = Operaciones.ConvertirDecimal(dr("ComisionBolsa").ToString)
|
|
|
|
|
+ ValorTransado = Operaciones.ConvertirDecimal(dr("ValTrans").ToString)
|
|
|
|
|
+ CostoTransferencia = Operaciones.ConvertirDecimal(dr("CostoTransfr").ToString)
|
|
|
|
|
+ Nombre = dr("Nombre").ToString
|
|
|
|
|
+ FechaCompra = Operaciones.ConvertirFecha(dr("FCompra").ToString)
|
|
|
|
|
+ CasaCorredora = dr("Casa").ToString
|
|
|
|
|
+ Correlativo = Operaciones.ConvertirEntero(dr("codigo").ToString)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+ If Tabla = "REP0VENTA" Then
|
|
|
|
|
+ dgvReportos.Rows.Add("", ValorTransado, Dias,
|
|
|
|
|
+ FechaVencimientoFormatoCadena, Rendimiento, 0, 0, 0,
|
|
|
|
|
+ 0, 0, 0, 0, 0, 0, CostoTransferencia, ActivoRenta, "",
|
|
|
|
|
+ "", "", Nombre, FechaCompra, ComisionCasa,
|
|
|
|
|
+ ComisionBolsa, CasaCorredora, Correlativo, "", EstadoIOF, EstadoRenta)
|
|
|
|
|
+ End If
|
|
|
|
|
+ End While
|
|
|
End If
|
|
End If
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
End Sub
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1308,12 +964,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
coleccion.Add(Nombre)
|
|
coleccion.Add(Nombre)
|
|
|
- coleccion.Add(CDate(FCompra))
|
|
|
|
|
- coleccion.Add(CDec(ValTrans))
|
|
|
|
|
- coleccion.Add(CInt(Dias))
|
|
|
|
|
- coleccion.Add(CDate(FVenc))
|
|
|
|
|
- coleccion.Add(CDec(Rend))
|
|
|
|
|
- coleccion.Add(CDec(CostoTransfr))
|
|
|
|
|
|
|
+ coleccion.Add(FCompra)
|
|
|
|
|
+ coleccion.Add(ValTrans)
|
|
|
|
|
+ coleccion.Add(Dias)
|
|
|
|
|
+ coleccion.Add(FVenc)
|
|
|
|
|
+ coleccion.Add(Rend)
|
|
|
|
|
+ coleccion.Add(CostoTransfr)
|
|
|
coleccion.Add(codigo)
|
|
coleccion.Add(codigo)
|
|
|
coleccion.Add(ComisionCasa)
|
|
coleccion.Add(ComisionCasa)
|
|
|
coleccion.Add(ComisionBolsa)
|
|
coleccion.Add(ComisionBolsa)
|
|
@@ -1321,7 +977,6 @@
|
|
|
coleccion.Add(IOF)
|
|
coleccion.Add(IOF)
|
|
|
coleccion.Add(Renta)
|
|
coleccion.Add(Renta)
|
|
|
coleccion.Add(Base)
|
|
coleccion.Add(Base)
|
|
|
-
|
|
|
|
|
coleccion.Add(ComisionCasaValor)
|
|
coleccion.Add(ComisionCasaValor)
|
|
|
coleccion.Add(ComisionBolsaValor)
|
|
coleccion.Add(ComisionBolsaValor)
|
|
|
coleccion.Add(IOFValor)
|
|
coleccion.Add(IOFValor)
|
|
@@ -1334,7 +989,6 @@
|
|
|
coleccion.Add(ImpLiq)
|
|
coleccion.Add(ImpLiq)
|
|
|
coleccion.Add(IngrNet)
|
|
coleccion.Add(IngrNet)
|
|
|
coleccion.Add(ValorNet)
|
|
coleccion.Add(ValorNet)
|
|
|
-
|
|
|
|
|
coleccion.Add(EstadoIOF)
|
|
coleccion.Add(EstadoIOF)
|
|
|
coleccion.Add(EstadoRenta)
|
|
coleccion.Add(EstadoRenta)
|
|
|
|
|
|
|
@@ -1357,11 +1011,6 @@
|
|
|
Private Sub dtpFechaCompra_ValueChanged(sender As Object, e As EventArgs) Handles dtpFechaCompra.ValueChanged
|
|
Private Sub dtpFechaCompra_ValueChanged(sender As Object, e As EventArgs) Handles dtpFechaCompra.ValueChanged
|
|
|
Formato()
|
|
Formato()
|
|
|
IngresarDatos()
|
|
IngresarDatos()
|
|
|
- If Variables.Codigo.IndexOf("REPOVENTA") > -1 Then
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- End If
|
|
|
|
|
Modificado = True
|
|
Modificado = True
|
|
|
Calculos()
|
|
Calculos()
|
|
|
End Sub
|
|
End Sub
|
|
@@ -1369,17 +1018,10 @@
|
|
|
Private Sub dgvReportos_CellClick(sender As Object, e As DataGridViewCellEventArgs) Handles dgvReportos.CellClick
|
|
Private Sub dgvReportos_CellClick(sender As Object, e As DataGridViewCellEventArgs) Handles dgvReportos.CellClick
|
|
|
IOFRentaEstado()
|
|
IOFRentaEstado()
|
|
|
IngresarDatosReves()
|
|
IngresarDatosReves()
|
|
|
-
|
|
|
|
|
NuevaFila()
|
|
NuevaFila()
|
|
|
- If Variables.Codigo.IndexOf("REPO") > -1 Or Variables.Codigo.IndexOf("REPOVENTA") > -1 Then
|
|
|
|
|
- Dim Index = dgvReportos.CurrentRow.Cells("codigo").Value
|
|
|
|
|
-
|
|
|
|
|
- CargarFecha()
|
|
|
|
|
-
|
|
|
|
|
- Calculos()
|
|
|
|
|
-
|
|
|
|
|
- End If
|
|
|
|
|
-
|
|
|
|
|
|
|
+ Dim Index = Operaciones.ConvertirEntero(dgvReportos.CurrentRow.Cells("codigo").Value)
|
|
|
|
|
+ CargarFecha()
|
|
|
|
|
+ Calculos()
|
|
|
Formato()
|
|
Formato()
|
|
|
End Sub
|
|
End Sub
|
|
|
Private Sub dgvReportos_CellContentClick(sender As Object, e As DataGridViewCellEventArgs) Handles dgvReportos.CellContentClick
|
|
Private Sub dgvReportos_CellContentClick(sender As Object, e As DataGridViewCellEventArgs) Handles dgvReportos.CellContentClick
|
|
@@ -1416,9 +1058,6 @@
|
|
|
i = Cantidad
|
|
i = Cantidad
|
|
|
While i <= Index
|
|
While i <= Index
|
|
|
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
Dim coleccion = ObtenerDatos(i)
|
|
Dim coleccion = ObtenerDatos(i)
|
|
|
If ReportoConsula.Nuevo(coleccion, Codigo, Tabla) Is Nothing Then
|
|
If ReportoConsula.Nuevo(coleccion, Codigo, Tabla) Is Nothing Then
|
|
|
|
|
|
|
@@ -1439,9 +1078,6 @@
|
|
|
|
|
|
|
|
While i <= Index
|
|
While i <= Index
|
|
|
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
Dim coleccion = ObtenerDatos(i)
|
|
Dim coleccion = ObtenerDatos(i)
|
|
|
diccionario.Add(i, coleccion)
|
|
diccionario.Add(i, coleccion)
|
|
|
i += 1
|
|
i += 1
|
|
@@ -1450,34 +1086,18 @@
|
|
|
|
|
|
|
|
End Function
|
|
End Function
|
|
|
|
|
|
|
|
-
|
|
|
|
|
- Function CanRegistros(ByVal Tabla As String)
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- Dim Codigo = Variables.Codigo
|
|
|
|
|
- Dim Cantidad As Integer = oDAOGeneral.CantidadRegistros(Codigo, Tabla)
|
|
|
|
|
-
|
|
|
|
|
- Return Cantidad
|
|
|
|
|
- End Function
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
Private Sub btnAccion_Click(sender As Object, e As EventArgs) Handles btnAccion.Click
|
|
Private Sub btnAccion_Click(sender As Object, e As EventArgs) Handles btnAccion.Click
|
|
|
LlenarBase()
|
|
LlenarBase()
|
|
|
|
|
|
|
|
Dim Codigo = Variables.Codigo
|
|
Dim Codigo = Variables.Codigo
|
|
|
Dim diccionario As Dictionary(Of String, Collection) = NuevoIngresoColeccion()
|
|
Dim diccionario As Dictionary(Of String, Collection) = NuevoIngresoColeccion()
|
|
|
If (Estado = "N") Then
|
|
If (Estado = "N") Then
|
|
|
-
|
|
|
|
|
ReportoConsula.ProcesoDatos(diccionario, Codigo, Tabla)
|
|
ReportoConsula.ProcesoDatos(diccionario, Codigo, Tabla)
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
ValidarExistencia()
|
|
ValidarExistencia()
|
|
|
ElseIf Not ExisteValidacion() Then
|
|
ElseIf Not ExisteValidacion() Then
|
|
|
Variables.ColeccionREPO = diccionario
|
|
Variables.ColeccionREPO = diccionario
|
|
|
Me.Close()
|
|
Me.Close()
|
|
|
ElseIf (Estado = "M") Then
|
|
ElseIf (Estado = "M") Then
|
|
|
-
|
|
|
|
|
ReportoConsula.ProcesoDatos(diccionario, Codigo, Tabla)
|
|
ReportoConsula.ProcesoDatos(diccionario, Codigo, Tabla)
|
|
|
ValidarExistencia()
|
|
ValidarExistencia()
|
|
|
ElseIf (Estado = "B") Then
|
|
ElseIf (Estado = "B") Then
|
|
@@ -1485,21 +1105,15 @@
|
|
|
ValidarExistencia()
|
|
ValidarExistencia()
|
|
|
End If
|
|
End If
|
|
|
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
End Sub
|
|
End Sub
|
|
|
|
|
|
|
|
Private Sub navNuevo_Click(sender As Object, e As EventArgs) Handles navNuevo.Click
|
|
Private Sub navNuevo_Click(sender As Object, e As EventArgs) Handles navNuevo.Click
|
|
|
btnAccion.Text = "Agregar"
|
|
btnAccion.Text = "Agregar"
|
|
|
-
|
|
|
|
|
Estado = "N"
|
|
Estado = "N"
|
|
|
End Sub
|
|
End Sub
|
|
|
|
|
|
|
|
Private Sub navEliminar_Click(sender As Object, e As EventArgs) Handles navEliminar.Click
|
|
Private Sub navEliminar_Click(sender As Object, e As EventArgs) Handles navEliminar.Click
|
|
|
btnAccion.Text = "Eliminar"
|
|
btnAccion.Text = "Eliminar"
|
|
|
-
|
|
|
|
|
Estado = "B"
|
|
Estado = "B"
|
|
|
End Sub
|
|
End Sub
|
|
|
|
|
|
|
@@ -1602,11 +1216,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
IngresarDatos()
|
|
IngresarDatos()
|
|
|
- If (InstrumentoFinanciero = "REPOVENTA") Then
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- End If
|
|
|
|
|
Modificado = True
|
|
Modificado = True
|
|
|
Calculos()
|
|
Calculos()
|
|
|
|
|
|
|
@@ -1616,11 +1225,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
IngresarDatos()
|
|
IngresarDatos()
|
|
|
- If (InstrumentoFinanciero = "REPOVENTA") Then
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- End If
|
|
|
|
|
Modificado = True
|
|
Modificado = True
|
|
|
Calculos()
|
|
Calculos()
|
|
|
End Sub
|
|
End Sub
|
|
@@ -1690,12 +1294,10 @@
|
|
|
Dim Existe As Boolean = General.ExisteTitulo(Codigo, Tabla)
|
|
Dim Existe As Boolean = General.ExisteTitulo(Codigo, Tabla)
|
|
|
If (Existe) Then
|
|
If (Existe) Then
|
|
|
navNuevo.Enabled = False
|
|
navNuevo.Enabled = False
|
|
|
-
|
|
|
|
|
navModificar.Enabled = True
|
|
navModificar.Enabled = True
|
|
|
navEliminar.Enabled = True
|
|
navEliminar.Enabled = True
|
|
|
Else
|
|
Else
|
|
|
navNuevo.Enabled = True
|
|
navNuevo.Enabled = True
|
|
|
-
|
|
|
|
|
navModificar.Enabled = False
|
|
navModificar.Enabled = False
|
|
|
navEliminar.Enabled = False
|
|
navEliminar.Enabled = False
|
|
|
End If
|
|
End If
|
|
@@ -1713,8 +1315,6 @@
|
|
|
ElseIf Variables.Codigo.IndexOf("REPO") > -1 Then
|
|
ElseIf Variables.Codigo.IndexOf("REPO") > -1 Then
|
|
|
Tabla = "REP0"
|
|
Tabla = "REP0"
|
|
|
End If
|
|
End If
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
Dim Existe As Boolean = General.ExisteTitulo(Codigo, Tabla)
|
|
Dim Existe As Boolean = General.ExisteTitulo(Codigo, Tabla)
|
|
|
Return Existe
|
|
Return Existe
|
|
|
End Function
|
|
End Function
|
|
@@ -1739,13 +1339,7 @@
|
|
|
|
|
|
|
|
Private Sub cboAnioBase_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboAnioBase.SelectedIndexChanged
|
|
Private Sub cboAnioBase_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboAnioBase.SelectedIndexChanged
|
|
|
LlenarBase()
|
|
LlenarBase()
|
|
|
-
|
|
|
|
|
IngresarDatos()
|
|
IngresarDatos()
|
|
|
- If (InstrumentoFinanciero = "REPOVENTA") Then
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- End If
|
|
|
|
|
Modificado = True
|
|
Modificado = True
|
|
|
Calculos()
|
|
Calculos()
|
|
|
End Sub
|
|
End Sub
|