diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 31cc18ddf..e1ea7800e 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -9171,10 +9171,16 @@ Partial Class Ventas End If If e.Row.DBCampo("CvePromocionDetalle").ToEntero() > 0 Then - If DtPromociones IsNot Nothing Then - Dim NombrePromo As String = DtPromociones.FiltroPrimeroValor("NombrePromocion", $"CvePromocionDetalle={e.Row.DBCampo("CvePromocionDetalle")}") + If CveVenta > 0 Then + Dim NombrePromo As String = e.Row.DBCampo("Promocion") ' DtPromociones.FiltroPrimeroValor("NombrePromocion", $"CvePromocionDetalle={e.Row.DBCampo("CvePromocionDetalle")}") e.Row.FCHtmlGenericControl("TagPromocion").Attributes.Add("title", NombrePromo) + Else + If DtPromociones IsNot Nothing Then + Dim NombrePromo As String = DtPromociones.FiltroPrimeroValor("NombrePromocion", $"CvePromocionDetalle={e.Row.DBCampo("CvePromocionDetalle")}") + e.Row.FCHtmlGenericControl("TagPromocion").Attributes.Add("title", NombrePromo) + End If End If + End If If DdlTipoComprobante.SelectedValue.Contiene("Cot") Then @@ -41478,6 +41484,10 @@ Partial Class Ventas Protected Sub DdlVendedor_SelectedIndexChanged(sender As Object, e As EventArgs) 'RECARGAR PROMOCIONES + CargarDTPromociones() + End Sub + + Private Sub CargarDTPromociones() Dim ObjVentas As New ClsVentas If ObjVentas.GetPromocionesPS(-1, TxtFecha.Text.ToDateTime, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveCliente, DdlVendedor.SelectedValue.ToEntero(), 1, UsuarioActual.CveEmpresa) Then DtPromociones = ObjVentas.DtResultados.Copy()