@@ -285,7 +285,7 @@
-
+
diff --git a/Ventas/ActualizarPrecios.aspx.vb b/Ventas/ActualizarPrecios.aspx.vb
index f1c53bda8..f9dc35076 100644
--- a/Ventas/ActualizarPrecios.aspx.vb
+++ b/Ventas/ActualizarPrecios.aspx.vb
@@ -114,37 +114,35 @@ Partial Class Ventas_ActualizarPrecios
If UsuarioActual.Empresa.Funcionalidad(404).ToEntero > 0 Then 'si manneja precios de lista
- Dim ObjVta As New ClsVentas
- Dim primerItem As String = ""
- If ObjVta.GetPrecioListas(UsuarioActual.CveEmpresa) Then
- DtListasPrecios = ObjVta.DtResultados.Copy()
- DdlPrecioLista.DataSource = DtListasPrecios
- DdlPrecioListaCarga.DataSource = DtListasPrecios
- DdlMultiplePrecioLista.DataSource = DtListasPrecios
- primerItem = ObjVta.DtResultados.FiltroPrimeroValor("CvePrecioLista")
- End If
- ObjVta.Dispose()
-
-
+ Dim primerItem As String = ""
+
+ DtListasPrecios = GlobalDTPrecioListas(UsuarioActual.CveEmpresa).Copy()
+ DdlPrecioLista.DataSource = DtListasPrecios
+ DdlPrecioListaCarga.DataSource = DtListasPrecios
+ DdlMultiplePrecioLista.DataSource = DtListasPrecios
+ primerItem = DtListasPrecios.FiltroPrimeroValor("CvePrecioLista")
+
DdlPrecioLista.DataBind()
DdlPrecioListaCarga.DataBind()
DdlMultiplePrecioLista.DataBind()
Dim SeleccionMaxima As Integer = 14
- If (DtListasPrecios.Rows.Count - 1) < 14 Then
- SeleccionMaxima = DtListasPrecios.Rows.Count - 1
- End If
-
- Dim sbMultiple As New StringBuilder
- For Each Row As DataRow In DtListasPrecios.FiltraPorIndices(0, SeleccionMaxima).Rows
- sbMultiple.AppendFormat("{0},", Row("CvePrecioLista"))
- Next
+ If DtListasPrecios IsNot Nothing Then
+ If (DtListasPrecios.Rows.Count - 1) < 14 Then
+ SeleccionMaxima = DtListasPrecios.Rows.Count - 1
+ End If
+
+ Dim sbMultiple As New StringBuilder
+ For Each Row As DataRow In DtListasPrecios.FiltraPorIndices(0, SeleccionMaxima).Rows
+ sbMultiple.AppendFormat("{0},", Row("CvePrecioLista"))
+ Next
+ DdlMultiplePrecioLista.SelectedValuesIfExistM(sbMultiple.ToString(), True)
+
+ If (DdlPrecioLista.Items.Count = 1) Then
+ DdlPrecioLista.Items.FindByValue(primerItem).Selected = True
+ End If
+ End If
- DdlMultiplePrecioLista.SelectedValuesIfExistM(sbMultiple.ToString(), True)
-
- If (DdlPrecioLista.Items.Count = 1) Then
- DdlPrecioLista.Items.FindByValue(primerItem).Selected = True
- End If
Else
DdlPrecioLista.Items.Insert(0, New ListItem("Sin Precio Lista", "-2"))
DdlPrecioListaCarga.Items.Insert(0, New ListItem("Sin Precio Lista", "-2"))