--SMS. solo sugerir datos de venta en dev.
This commit is contained in:
@@ -1250,10 +1250,12 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
|
|
||||||
If Boolean.Parse(e.Row.DataKey("AplicaLote")) Or Boolean.Parse(e.Row.DataKey("AplicaCaducidad")) Then
|
If Boolean.Parse(e.Row.DataKey("AplicaLote")) Or Boolean.Parse(e.Row.DataKey("AplicaCaducidad")) Then
|
||||||
Dim ValorAsignado As String = ""
|
Dim ValorAsignado As String = ""
|
||||||
|
Dim DtDatosDevolucion As DataTable = Nothing
|
||||||
If GvDatos.Columns(8).Visible AndAlso EsDevolucionVenta = 1 Then
|
If GvDatos.Columns(8).Visible AndAlso EsDevolucionVenta = 1 Then
|
||||||
ValorAsignado = $"{e.Row.DBCampo("Lote").ToString}|{e.Row.DBCampo("FechaCaducidad").ToDate.ToString("dd/MM/yyyy")}"
|
ValorAsignado = $"{e.Row.DBCampo("Lote").ToString}|{e.Row.DBCampo("FechaCaducidad").ToDate.ToString("dd/MM/yyyy")}"
|
||||||
|
DtDatosDevolucion = DtDatos.Copy()
|
||||||
End If
|
End If
|
||||||
CargarCaducidadProducto(e.Row.DataKey("CvePS").ToEntero, e.Row.FCDropDownList("DdlCaducidadProducto"), ValorAsignado)
|
CargarCaducidadProducto(e.Row.DataKey("CvePS").ToEntero, e.Row.FCDropDownList("DdlCaducidadProducto"), ValorAsignado, DtDatosDevolucion)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
@@ -1286,7 +1288,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargarCaducidadProducto(CvePS As Integer, ByRef DdlLoteFechaCaducidad As DropDownList, ValorAsignado As String)
|
Private Sub CargarCaducidadProducto(CvePS As Integer, ByRef DdlLoteFechaCaducidad As DropDownList, ValorAsignado As String, DtDatosDevolucion As DataTable)
|
||||||
DdlLoteFechaCaducidad.Items.Clear()
|
DdlLoteFechaCaducidad.Items.Clear()
|
||||||
DdlLoteFechaCaducidad.Items.Add(New ListItem("-", "|"))
|
DdlLoteFechaCaducidad.Items.Add(New ListItem("-", "|"))
|
||||||
|
|
||||||
@@ -1295,13 +1297,20 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
almacenes = "-1"
|
almacenes = "-1"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim ObjInventarios As New ClsInventarios
|
If DtDatosDevolucion IsNot Nothing Then
|
||||||
If ObjInventarios.GetExistenciasCaducidad(CvePS, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, almacenes) Then
|
For Each dr As DataRow In DtDatosDevolucion.FiltraParametros($"CvePS = {CvePS}", DistinctColumns:={"Lote", "FechaCaducidad"}).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")}"))
|
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
|
Next
|
||||||
|
Else
|
||||||
|
Dim ObjInventarios As New ClsInventarios
|
||||||
|
If ObjInventarios.GetExistenciasCaducidad(CvePS, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, almacenes) Then
|
||||||
|
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()
|
||||||
End If
|
End If
|
||||||
ObjInventarios.Dispose()
|
|
||||||
|
|
||||||
If Not String.IsNullOrEmpty(ValorAsignado) Then
|
If Not String.IsNullOrEmpty(ValorAsignado) Then
|
||||||
DdlLoteFechaCaducidad.SelectedValueExist(ValorAsignado)
|
DdlLoteFechaCaducidad.SelectedValueExist(ValorAsignado)
|
||||||
|
|||||||
Reference in New Issue
Block a user