Filtros de código inicial y final.
This commit is contained in:
@@ -125,12 +125,14 @@ Partial Class Inventarios_ReporteEntradasSalidas
|
||||
GvM.Columns(14).Visible = TienePermisoImportes
|
||||
GvM.Columns(15).Visible = TienePermisoImportes
|
||||
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
GvM.Columns(9).Visible = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(574).ToEntero = 1 Then
|
||||
DVFiltroCodigo.Visible = True
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Private Sub CargaCombos()
|
||||
|
||||
@@ -254,10 +256,13 @@ Partial Class Inventarios_ReporteEntradasSalidas
|
||||
CveMarca = DdlMarca.SelectedValue.ToEntero
|
||||
End If
|
||||
|
||||
Dim CodigoInicio As String = If(TxtCodigoInicio.Text.Trim.Length = 0, "-1", TxtCodigoInicio.Text.Trim)
|
||||
Dim CodigoFin As String = If(TxtCodigoFinal.Text.Trim.Length = 0, "-1", TxtCodigoFinal.Text.Trim)
|
||||
|
||||
If Reporte.RepMovimientos(UsuarioActual.CveEmpresa, DdlMoneda.SelectedValue.ToEntero, FechaInicial, FechaFinal, DdlTipoMovimiento.SelectedValue.ToEntero, DdlProveedor.SelectedValue.ToEntero,
|
||||
Almacenes, DdlCategoria.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero, DdlPS.SelectedValue.ToEntero,
|
||||
DdlMovs.SelectedValue.ToEntero, CveMarca:=Marcas, CvePersonal:=DdlPersonal.SelectedValue.ToEntero, CveClasificacion2:=DdlClasificacion2.SelectedValue.ToEntero, CveTipoAlmacen:=TipoAlmacen,
|
||||
Modalidad:=DdlModalidadFiltro.SelectedValue.ToEntero) Then
|
||||
Modalidad:=DdlModalidadFiltro.SelectedValue.ToEntero, CodigoInicio:=CodigoInicio, CodigoFin:=CodigoFin) Then
|
||||
dt = Reporte.DtResultados
|
||||
|
||||
|
||||
@@ -571,6 +576,69 @@ Partial Class Inventarios_ReporteEntradasSalidas
|
||||
UpBitacora.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub LnkPSAntyerior_Click(sender As Object, e As EventArgs)
|
||||
NavegacionPS(Siguiente:=False)
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkPSSiguiente_Click(sender As Object, e As EventArgs)
|
||||
NavegacionPS(Siguiente:=True)
|
||||
End Sub
|
||||
Private Sub NavegacionPS(Siguiente As Boolean)
|
||||
Dim CvePS As Integer = DdlPS.SelectedValue.ToEntero
|
||||
|
||||
If Not CvePS > 0 Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim dt As DataTable = New DataTable
|
||||
|
||||
Dim Entrada As Boolean = True
|
||||
Dim Salida As Boolean = True
|
||||
|
||||
Dim FechaI As String = If(TxtFechaI.Text <> "" AndAlso TxtFechaI.Text <> "__/__/____", TxtFechaI.Text, "-1")
|
||||
Dim FechaF As String = If(TxtFechaF.Text <> "" AndAlso TxtFechaF.Text <> "__/__/____", TxtFechaF.Text, "-1")
|
||||
Dim CveAlmacen As Integer = If(DdlAlmacen.SelectedValue.ToEntero = 0, -1, DdlAlmacen.SelectedValue.ToEntero)
|
||||
Dim CveAlmacenes As String = DdlAlmacen.GetSelectedValues()
|
||||
If CveAlmacenes.Contains(",") Then
|
||||
CveAlmacen = -1
|
||||
End If
|
||||
If CvePS > 0 Then
|
||||
Dim dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
|
||||
If dr IsNot Nothing Then
|
||||
DdlPS.SelectedText = dr("PSCodigo").ToString
|
||||
DdlPS.SelectedValue = CvePS.ToString
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
'Dim CveTiposAlmacen As String = "-1"
|
||||
'For Each item As ListItem In CBLTiposAlmacen.Items
|
||||
' CveTiposAlmacen += If(item.Selected, $"{item.Value},", "")
|
||||
'Next
|
||||
|
||||
Dim CodigoInicio As String = If(TxtCodigoInicio.Text.Trim.Length = 0, "-1", TxtCodigoInicio.Text.Trim)
|
||||
Dim CodigoFin As String = If(TxtCodigoFinal.Text.Trim.Length = 0, "-1", TxtCodigoFinal.Text.Trim)
|
||||
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
If ObjInventarios.GetKardexPSNavegacion(Entrada, Salida, CvePS, FechaI, FechaF, CveAlmacen, "-1", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
|
||||
CveAlmacenes, Siguiente:=Siguiente, CodigoInicio:=CodigoInicio, CodigoFin:=CodigoFin) Then
|
||||
dt = ObjInventarios.DtResultados.Copy
|
||||
End If
|
||||
ObjInventarios.Dispose()
|
||||
|
||||
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
||||
DdlPS.SelectedValue = dt.Rows(0)("CvePS").ToString
|
||||
DdlPS.SelectedText = dt.Rows(0)("CodigoPS").ToString
|
||||
DdlPS.txtValue.Value = dt.Rows(0)("CvePS").ToString
|
||||
DdlPS.txtText.Value = dt.Rows(0)("CodigoPS").ToString
|
||||
CargaDatos()
|
||||
'UPFiltros.Update()
|
||||
UPPMov.Update()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
'Protected Sub Lnkcompuxlsinventarios_Click(sender As Object, e As EventArgs)
|
||||
' Dim continuar = True
|
||||
' Try
|
||||
|
||||
Reference in New Issue
Block a user