--FIX. valores duplicados de lote y caducidad

This commit is contained in:
2024-05-15 13:31:59 -07:00
parent 098d22035e
commit 75e8c54f41

View File

@@ -1287,6 +1287,8 @@ Partial Class Inventarios_EntregaAlmacen
End Sub
Private Sub CargarCaducidadProducto(CvePS As Integer, ByRef DdlLoteFechaCaducidad As DropDownList, ValorAsignado As String)
DdlLoteFechaCaducidad.Items.Clear()
DdlLoteFechaCaducidad.Items.Add(New ListItem("-", "|"))
Dim almacenes As String = DdlAlmacen.SelectedValue
If almacenes = "" Then
@@ -1294,13 +1296,10 @@ Partial Class Inventarios_EntregaAlmacen
End If
Dim ObjInventarios As New ClsInventarios
If ObjInventarios.GetExistenciasCaducidad(CvePS, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, almacenes) Then
For Each dr As DataRow In ObjInventarios.DtResultados.Rows
For Each dr As DataRow In ObjInventarios.DtResultados.FiltraParametros("", DistinctColumns:={"Lote", "FechaCaducidad"}).Rows
DdlLoteFechaCaducidad.Items.Add(New ListItem($"Lote: {dr("Lote").ToString} - Cad: {dr("FechaCaducidad").ToString.ToDate.ToString("dd/MM/yyyy")}", $"{dr("Lote").ToString}|{dr("FechaCaducidad").ToString.ToDate.ToString("dd/MM/yyyy")}"))
Next
End If
ObjInventarios.Dispose()