From 0bd4086b097d6ff2cf57798b532f487d8745f0b4 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 10 Jun 2020 17:09:50 -0700 Subject: [PATCH] -- seccion/serie/lote/caducidad --- Inventarios/ResguardoMaterial.aspx | 4 +- Inventarios/ResguardoMaterial.aspx.vb | 76 +++++++++++++++++---------- 2 files changed, 52 insertions(+), 28 deletions(-) diff --git a/Inventarios/ResguardoMaterial.aspx b/Inventarios/ResguardoMaterial.aspx index c53ce3ca7..0bb034a04 100644 --- a/Inventarios/ResguardoMaterial.aspx +++ b/Inventarios/ResguardoMaterial.aspx @@ -278,7 +278,9 @@ - + + + <%-- diff --git a/Inventarios/ResguardoMaterial.aspx.vb b/Inventarios/ResguardoMaterial.aspx.vb index c384fe179..2f32ebb86 100644 --- a/Inventarios/ResguardoMaterial.aspx.vb +++ b/Inventarios/ResguardoMaterial.aspx.vb @@ -184,10 +184,13 @@ Partial Class Inventarios_ResguardoMaterial dt.Columns.Add("Estatus") dt.Columns.Add("Codigo") dt.Columns.Add("Serie") + dt.Columns.Add("Lote") + dt.Columns.Add("FechaCaducidad", Type.GetType("System.DateTime")) + dt.Columns.Add("CveSeccionAlmacen", Type.GetType("System.Int32")) dt.Columns.Add("Observaciones") dt.Columns.Add("CvePersonal", Type.GetType("System.Int32")) dt.Columns.Add("Checado", Type.GetType("System.Boolean")) - dt.Columns.Add("CveSeccionAlmacen", Type.GetType("System.Int32")) + dt.Columns.Add("SeccionAlmacen") DtMovimientos = dt @@ -334,15 +337,26 @@ Partial Class Inventarios_ResguardoMaterial End Sub Private Sub VerificaProducto() If DdlProducto2.SelectedValue.ToEntero > 0 Then - If GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlProducto2.SelectedValue.ToEntero).FiltraParametros("Inv_CveMetodoInventario = 5", "PS").Rows.Count > 0 Then - ThSerie.Visible = True - TrSerie.Visible = True - TxtnSerie.Visible = True + Dim drp As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlProducto2.SelectedValue.ToEntero).FiltroPrimero("") + + If drp IsNot Nothing Then + 'activa Serie + If CBool(drp("AplicaSerie")) Then + ThSerie.Visible = True + TrSerie.Visible = True + TxtnSerie.Visible = True + End If + + 'activa seccion + If CBool(drp("AplicaSeccion")) Then + ThSeccion.Visible = True + TrSeccion.Visible = True + End If + 'activa lote + + 'activa caducidad - ThSeccion.Visible = True - TrSeccion.Visible = True - GvM.Columns(4).Visible = True Else TxtnSerie.Visible = False End If @@ -447,28 +461,36 @@ Partial Class Inventarios_ResguardoMaterial #Region " GvM " Private Sub CargaGvM() - ThSerie.Visible = False - TrSerie.Visible = False - TxtnSerie.Visible = False - GvM.Columns(5).Visible = False - GvM.Columns(4).Visible = False + If DtMovimientos IsNot Nothing Then + GvM.Columns(4).Visible = DtMovimientos.MAX("CveSeccionAlmacen").ToString.ToEntero > 0 + GvM.Columns(5).Visible = DtMovimientos.MAX("Serie").ToString <> "" + GvM.Columns(6).Visible = DtMovimientos.MAX("Lote").ToString <> "" + GvM.Columns(7).Visible = DtMovimientos.MAX("FechaCaducidad").ToString.ToDate > MinFecha + End If - Dim Contador As Integer = 0 - Dim UltimoRenglon As Integer = DtMovimientos.Rows.Count - 1 - Dim MostrarSerie As Boolean = False - Dim MostrarSeccion As Boolean = False - While Contador <= UltimoRenglon And (Not MostrarSerie And Not MostrarSeccion) - Dim Dr As DataRow = DtMovimientos.Rows(Contador) - MostrarSerie = If(Not MostrarSerie, Dr("Serie").ToString <> "", True) - MostrarSeccion = If(Not MostrarSerie, Dr("SeccionAlmacen").ToString <> "", True) - Contador += 1 - End While - ThSerie.Visible = MostrarSerie - TrSerie.Visible = MostrarSerie - GvM.Columns(5).Visible = MostrarSerie + 'ThSerie.Visible = False + 'TrSerie.Visible = False + 'TxtnSerie.Visible = False + 'GvM.Columns(5).Visible = False + 'GvM.Columns(4).Visible = False - GvM.Columns(4).Visible = MostrarSeccion + 'Dim Contador As Integer = 0 + 'Dim UltimoRenglon As Integer = DtMovimientos.Rows.Count - 1 + 'Dim MostrarSerie As Boolean = False + 'Dim MostrarSeccion As Boolean = False + 'While Contador <= UltimoRenglon And (Not MostrarSerie And Not MostrarSeccion) + ' Dim Dr As DataRow = DtMovimientos.Rows(Contador) + ' MostrarSerie = If(Not MostrarSerie, Dr("Serie").ToString <> "", True) + ' MostrarSeccion = If(Not MostrarSerie, Dr("SeccionAlmacen").ToString <> "", True) + ' Contador += 1 + 'End While + + 'ThSerie.Visible = MostrarSerie + 'TrSerie.Visible = MostrarSerie + 'GvM.Columns(5).Visible = MostrarSerie + + 'GvM.Columns(4).Visible = MostrarSeccion 'For Each Dr As DataRow In DtMovimientos.Rows ' If Dr("Serie").ToString <> "" Then