From 57cf5de1748daa686f4dc45a7a9bcced7119ac98 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Fri, 26 Apr 2024 17:06:17 -0700 Subject: [PATCH] =?UTF-8?q?--SMS=20sugerir=20los=20lote/cad,=20en=20devolu?= =?UTF-8?q?ci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Inventarios/EntregaAlmacen.aspx.vb | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/Inventarios/EntregaAlmacen.aspx.vb b/Inventarios/EntregaAlmacen.aspx.vb index d6bd61c1d..d1ff5c083 100644 --- a/Inventarios/EntregaAlmacen.aspx.vb +++ b/Inventarios/EntregaAlmacen.aspx.vb @@ -1204,8 +1204,8 @@ Partial Class Inventarios_EntregaAlmacen End If Else e.Row.FCTextBox("TxtLote").Visible = False - End If - + End If + e.Row.FCButton("BtnDividir").Attributes.Add("onclick", String.Format("Dividir('{0}');", e.Row.FCTextBox("TxtDividir").ClientID)) e.Row.FCButton("BtnDividir").CommandArgument = e.Row.RowIndex.ToString() e.Row.FCTextBox("TxtDividir").Attributes.Add("onkeyup", String.Format("LimitaCantidad({0},this,'{1}');", e.Row.DBCampo("CantidadF"), e.Row.FCButton("BtnDividir").ClientID)) @@ -1249,7 +1249,11 @@ Partial Class Inventarios_EntregaAlmacen If Boolean.Parse(e.Row.DataKey("AplicaLote")) Or Boolean.Parse(e.Row.DataKey("AplicaCaducidad")) Then - CargarCaducidadProducto(e.Row.DataKey("CvePS").ToEntero, e.Row.FCDropDownList("DdlCaducidadProducto")) + Dim ValorAsignado As String = "" + If GvDatos.Columns(8).Visible AndAlso EsDevolucionVenta = 1 Then + ValorAsignado = $"{e.Row.DBCampo("Lote").ToString}|{e.Row.DBCampo("FechaCaducidad").ToDate.ToString("dd/MM/yyyy")}" + End If + CargarCaducidadProducto(e.Row.DataKey("CvePS").ToEntero, e.Row.FCDropDownList("DdlCaducidadProducto"), ValorAsignado) End If @@ -1282,7 +1286,7 @@ Partial Class Inventarios_EntregaAlmacen End Sub - Private Sub CargarCaducidadProducto(CvePS As Integer, ByRef DdlLoteFechaCaducidad As DropDownList) + Private Sub CargarCaducidadProducto(CvePS As Integer, ByRef DdlLoteFechaCaducidad As DropDownList, ValorAsignado As String) Dim almacenes As String = DdlAlmacen.SelectedValue If almacenes = "" Then @@ -1300,6 +1304,10 @@ Partial Class Inventarios_EntregaAlmacen End If ObjInventarios.Dispose() + If Not String.IsNullOrEmpty(ValorAsignado) Then + DdlLoteFechaCaducidad.SelectedValueExist(ValorAsignado) + End If + End Sub Private Sub CargaDocumentos(tCveVenta As Integer)