diff --git a/Ventas/CatMetasVendedores.aspx.vb b/Ventas/CatMetasVendedores.aspx.vb index f7e55c204..22cad0f55 100644 --- a/Ventas/CatMetasVendedores.aspx.vb +++ b/Ventas/CatMetasVendedores.aspx.vb @@ -284,7 +284,7 @@ Partial Class CatMetasVendedores Dim Correcto As Boolean = True ObjMetas.IniciaTransacSQL() Try - Dim DtVendedores As DataTable = GlobalDTVendedores(UsuarioActual.CveEmpresa) + Dim DtVendedores As DataTable = GlobalDTVendedores(UsuarioActual.CveEmpresa, Estatus:=-1, VendedorTipo:=-1) Dim DtClasificaciones As DataTable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa) Dim DtClasificaciones2 As DataTable = GlobalDTClasificaciones2(UsuarioActual.CveEmpresa) @@ -293,7 +293,7 @@ Partial Class CatMetasVendedores If Correcto Then Dim TieneError As Boolean = False - Dim CveVendedor As Integer = DtVendedores.FiltroPrimeroValor("CveVendedor", String.Format("trim(Vendedor) LIKE '%{0}%'", row("Vendedor").ToString().TrimStart().TrimEnd())).ToEntero + Dim CveVendedor As Integer = DtVendedores.FiltroPrimeroValor("CveVendedor", String.Format("trim(Vendedor) LIKE '%{0}%'", row("Vendedor").ToString().TrimStart().TrimEnd().ToUpper)).ToEntero Dim CveClasificacion As Integer = DtClasificaciones.FiltroPrimeroValor("CveClasificacion", String.Format("trim(Clasificacion)='{0}'", row("Clasificación Superior").ToString().TrimStart().TrimEnd())).ToEntero Dim CveClasificacion2 As Integer = DtClasificaciones2.FiltroPrimeroValor("CveClasificacion", String.Format("trim(Clasificacion)='{0}'", row("Clasificación").ToString().TrimStart().TrimEnd())).ToEntero Dim CveMarca As Integer = DtMarcas.FiltroPrimeroValor("CveMarca", String.Format("Marca='{0}'", row("Marca").ToString().TrimStart().TrimEnd())).ToEntero @@ -309,6 +309,8 @@ Partial Class CatMetasVendedores If Correcto Then RowsCargados += 1 End If + Else + Correcto = False End If If Not Correcto Then @@ -318,7 +320,7 @@ Partial Class CatMetasVendedores Next Catch ex As Exception - OnError("Ocurrió un error al cargar los precios.", ex) + OnError("Ocurrió un error al cargar las metas.", ex) Finally Dim MensajeFinal As New StringBuilder()