From 0276ac75b8142500f6210ec29a412e5b5277d1dd Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 20 Dec 2023 06:22:43 -0700 Subject: [PATCH] =?UTF-8?q?--=20correcci=C3=B3n=20manejo=20de=20cuenta?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ventas/Ventas.aspx.vb | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 0a5af52db..f3f3c291f 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -13147,10 +13147,10 @@ Partial Class Ventas End If End If - If UsuarioActual.CveEmpresa.Contiene(186) AndAlso EsVentaMedica AndAlso RBLTipoVenta.SelectedValue.ToEntero <> 2 Then + If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso EsVentaMedica AndAlso RBLTipoVenta.SelectedValue.ToEntero <> 2 Then If CveAlmacenAsignado <= 0 Then - ErrorList.Add("Ocurrió un error al seleccionar el almacen de entrega por adelantado de la sucursal.") + ErrorList.Add("Ocurrió un error al seleccionar el almacen de resguardo del cliente.") Else CveAlmacenTraspasoDestino = CveAlmacenAsignado End If @@ -18120,7 +18120,8 @@ Partial Class Ventas CvePrecioListaPS = Me.CvePrecioLista PrecioListaPS = DdlPrecioLista.SelectedItem.Text Else - Alert("La lista de precios del producto no coincide con la seleccionada", TipoMensaje.MsgAdvertencia) + 'sino es la seleccionada se recalcula de nuevo + CargaPrecioLista(DdlPS.SelectedValue.ToEntero) Exit Sub End If Else @@ -35781,16 +35782,21 @@ Partial Class Ventas Protected Sub DdlPrecioLista_SelectedIndexChanged(sender As Object, e As EventArgs) If DivPrecioLista.Visible AndAlso DdlPrecioLista.SelectedValue.ToEntero() > 0 Then - Dim drPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlPS.SelectedValue.ToEntero()).FiltroPrimero("") + CargaPrecioLista(DdlPS.SelectedValue.ToEntero) + End If + End Sub + Private Sub CargaPrecioLista(CvePS As Integer) + Dim drPS As DataRow = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("") + + If drPS IsNot Nothing Then Dim ObjPrecioSugerido As Modelos.MPrecioSugerido = CalculaPrecioSugerido(drPS("CvePS").ToString().ToEntero(), drPS("CveClasificacion").ToString().ToEntero(), CvePrecioListaSugerido:=DdlPrecioLista.SelectedValue.ToEntero()) If ObjPrecioSugerido.PrecioSugerido > 0 Then TxtPrecio.Text = ObjPrecioSugerido.PrecioSugerido.ToString("#,###.####") Else - Alert("No se encontro un precio para este producto en la lista de precios seleccionada") + Alert("El Producto no tiene especificado precio en la lista de precio.") End If - End If End Sub