diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index 758c175b2..3fb93897b 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -8454,7 +8454,7 @@ TxtImporte.value = FormatoNumero(Saldo, 2); } } else { - if (SaldoMaximoUtilizable > 0) { + if (SaldoMaximoUtilizable <= 0) { TxtImporte.value = ""; Chk.checked = false; } else { @@ -8498,7 +8498,7 @@ if (Importe > 0) { } else { - if (SaldoMaximoUtilizable > 0) { + if (SaldoMaximoUtilizable <= 0) { Importe = 0; Chk.checked = false; } else { @@ -8565,7 +8565,7 @@ if (Importe > 0) { } else { - if (SaldoMaximoUtilizable > 0) { + if (SaldoMaximoUtilizable <= 0) { Importe = 0; Chk.checked = false; } else { @@ -8632,7 +8632,7 @@ if (Importe > 0) { } else { - if (SaldoMaximoUtilizable > 0) { + if (SaldoMaximoUtilizable <= 0) { Importe = 0; Chk.checked = false; } else { @@ -8862,7 +8862,7 @@ TxtImporte.value = FormatoNumero(Saldo, 2); } } else { - if (SaldoMaximoUtilizable > 0) { + if (SaldoMaximoUtilizable <= 0) { TxtImporte.value = ""; Chk.checked = false; } else { diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 4b27113f2..85c6acfb6 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -14758,8 +14758,8 @@ Partial Class Ventas 'se excluyen las clasificaciones anteriores para que se asignen las de ingreso If Not TmpDTDetalle(i)("CveClasificacion").ToString().Contiene("19958", "19933", "18097") Then - If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDT.MAX("PorcentajeIVA").ToDouble).Rows.Count > 0 Then - TmpDTDetalle(i)("CveClasificacion") = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDT.MAX("PorcentajeIVA").ToDouble).Rows(0)("CveClasificacion").ToString() + If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDTDetalle(i)("PorcentajeIVA").ToString().ToDouble).Rows.Count > 0 Then + TmpDTDetalle(i)("CveClasificacion") = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDTDetalle(i)("PorcentajeIVA").ToString().ToDouble).Rows(0)("CveClasificacion").ToString() End If End If @@ -17640,12 +17640,14 @@ Partial Class Ventas CvePrecioListaPS = GlobalDTSubProyectos(-1, CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero(), CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePrecioLista", "").ToEntero() If CvePrecioListaPS <= 0 Then CvePrecioListaPS = Me.CvePrecioListaCliente 'GlobalDTCliente(UsuarioActual.CveEmpresa, Estatus:=-1, CveCliente:=CveCliente).FiltroPrimeroValor("CvePrecioLista").ToEntero() - End If - 'SI EL CLIENTE TIENE LISTA DE PRECIO DEBE TOMAR DE ESTE - If UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso Me.CvePrecioListaCliente > 0 Then - CvePrecioListaPS = Me.CvePrecioListaCliente + If Me.CvePrecioListaCliente > 0 Then + Dim ArrayClientes As String() = UsuarioActual.Empresa.Funcionalidad(711).Split(",".ToCharArray()) + 'VERIFICA SI EL CLIENTE ACTUAL DEBE TENER PRIORIDAD SU LISTA DE PRECIOS + If ArrayClientes.Length > 0 AndAlso ArrayClientes.Count(Function(cliente) cliente.Trim() = Me.CveCliente.ToString()) > 0 Then + CvePrecioListaPS = Me.CvePrecioListaCliente + End If End If End If @@ -36156,9 +36158,12 @@ Partial Class Ventas CvePrecioListaPS = Me.CvePrecioListaCliente 'GlobalDTCliente(UsuarioActual.CveEmpresa, Estatus:=-1, CveCliente:=CveCliente).FiltroPrimeroValor("CvePrecioLista").ToEntero() End If - 'SI EL CLIENTE TIENE LISTA DE PRECIO DEBE TOMAR DE ESTE - If UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso Me.CvePrecioListaCliente > 0 Then - CvePrecioListaPS = Me.CvePrecioListaCliente + If Me.CvePrecioListaCliente > 0 Then + Dim ArrayClientes As String() = UsuarioActual.Empresa.Funcionalidad(711).Split(",".ToCharArray()) + 'VERIFICA SI EL CLIENTE ACTUAL DEBE TENER PRIORIDAD SU LISTA DE PRECIOS + If ArrayClientes.Length > 0 AndAlso ArrayClientes.Count(Function(cliente) cliente.Trim() = Me.CveCliente.ToString()) > 0 Then + CvePrecioListaPS = Me.CvePrecioListaCliente + End If End If End If