From 0213d4a945ed175839205d557466f0d9ebc4d4d9 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Tue, 10 Sep 2019 18:09:30 -0700 Subject: [PATCH] Verificar estatus de devolucion --- Ventas/Ventas.aspx.vb | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index fc07aca1c..fdc5e0ec5 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -16526,18 +16526,24 @@ Partial Class Ventas End Sub Protected Sub LBDevolucionAlmacen_Click(sender As Object, e As EventArgs) Dim ObjVentas As New ClsVentas + If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa) Then + If ObjVentas.DtResultados.Rows.Count > 0 Then + Dim DbRowVenta As DataRow = ObjVentas.DtResultados.Rows(0) + Me.DevolucionAlmacen = DbRowVenta("EsDevolucionVenta").ToString.ToEntero + End If + End If - Dim EstatusDevolucion = If(DevolucionAlmacen = 0, 1, 0) + Dim EstatusDevolucion = If(Me.DevolucionAlmacen = 0, 1, 0) If ObjVentas.UpdateVentasDevolucionAlmacen(EstatusDevolucion, CveVenta) Then Alert("La solicitud de Devolución de Almacén se guardó correctamente") End If + ObjVentas.Dispose() - DevolucionAlmacen = EstatusDevolucion + Me.DevolucionAlmacen = EstatusDevolucion InicializaDevolucionAlmacen() UpnTools.Update() - ObjVentas.Dispose() End Sub #End Region