From f2e3b8f5106df7cf390de0c1754ff3eccc48f555 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Wed, 1 Dec 2021 16:41:58 -0700 Subject: [PATCH] Validacion de registro de compra proveniente de OC --- Ventas/Ventas.aspx.vb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 02ce47bf7..9bc1a43b5 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -21854,7 +21854,7 @@ Partial Class Ventas Dim tDT As DataTable = Nothing Dim ObjOC As New ClsOC If ObjOC.GetOCFacturacion(CveOC, UsuarioActual.CveEmpresa) Then - tDT = ObjOC.DtResultados + tDT = ObjOC.DtResultados.Copy() 'tTmpDT.Columns.Add("TipoDocto", GetType(String)) 'tTmpDT.Columns.Add("CveMovimientoDetallePedido", GetType(Integer)) 'tTmpDT.Columns.Add("CantidadFacturadaRem", GetType(Decimal)) @@ -21867,10 +21867,14 @@ Partial Class Ventas If tDT IsNot Nothing AndAlso tDT.Rows.Count > 0 Then - ViewState("CveCliente") = ObjOC.DtResultados.Rows(0)("CveCliente") + ViewState("CveCliente") = tDT.Rows(0)("CveCliente") HdnCveCliente.Value = CveCliente.ToString() CargaCliente(CveCliente) + If (DdlTipoComprobante.Items.FindByValue("Rem") IsNot Nothing) Then + DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Rem")) + End If + For Each Dr As DataRow In tDT.Rows AgregarProductoServicio(Dr("Cantidad").ToString().ToDecimal, Dr("CveUM").ToString().ToEntero(), Dr("UM").ToString(), Dr("CveClasificacion").ToString().ToEntero(), Dr("Clasificacion").ToString(),