diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb
index 7259b1ff1..9a00cc7e7 100644
--- a/Ventas/Ventas.aspx.vb
+++ b/Ventas/Ventas.aspx.vb
@@ -6151,6 +6151,23 @@ Partial Class Ventas
End Sub
Private Sub CargaRestriccionesCreditoCliente(Optional Alertas As Boolean = False, Optional CveVenta As Integer = -1)
+ 'RMF. validacion temporal
+ 'verifica si tiene autorizaciones de Nota de crédito autorizadas
+ If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then ' si es empresa de acumuladores
+ Dim ObjVentas As New ClsVentas
+
+ If ObjVentas.GetAutorizacionLimite(UsuarioActual.CveEmpresa, CveCliente, -1, CveEstatus:=1) Then
+ Dim RowAutorizacion As DataRow = ObjVentas.DtResultados.FiltroPrimero($"CveVenta IS NULL AND CveTipoDocumento='Egs'", Orderby:="TipoAutorizacion")
+
+ If RowAutorizacion IsNot Nothing Then
+ DdlTipoComprobante.SelectedValueExistInsert("Egs", "Egresos")
+ End If
+
+ End If
+
+ ObjVentas.Dispose()
+ End If
+
If UsuarioActual.Empresa.Funcionalidad(570) = "1" AndAlso Me.PermiteCredito = False AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem") AndAlso CveVenta < 1 Then
RBLPago.SelectedValue = "2"
RBLPago.Items(0).Enabled = False
@@ -6182,7 +6199,6 @@ Partial Class Ventas
If PorcentajeCredito > 80 Then TrPorcentajeCredito.Visible = True : LblPorcentajeCredito.Text = $"{PorcentajeCredito.FormatoNumero}%"
If UsuarioActual.Empresa.Funcionalidad(597) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(268) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem", "PA") Then
- 'If LblRFC.Text.Trim <> "XAXX010101000" Then
Dim Vta As New ClsVentas
Dim Opcion As Integer = Vta.ObtenerClienteLimitesVenta(CveCliente, UsuarioActual.CveEmpresa)
@@ -6271,7 +6287,25 @@ Partial Class Ventas
LnkOCs.Visible = False
Else
- If Alertas AndAlso UsuarioActual.Empresa.Funcionalidad(518) = "1" Then Alert("El cliente tiene su límite de crédito agotado.", TipoMensaje.MsgAdvertencia)
+ 'RMF. codigo temporal para pruebas
+ If Alertas AndAlso UsuarioActual.CveEmpresa = 140 AndAlso UsuarioActual.CveUsuario.Contiene(100, 1937, 2275) AndAlso Now.Hour > 5 AndAlso Now.Hour < 9 Then
+ Dim Vta As New ClsVentas
+ Dim Opcion As Integer = Vta.ObtenerClienteLimitesVenta(CveCliente, UsuarioActual.CveEmpresa)
+ Dim OpcionMsg As String = String.Format("El Cliente se encuentra bloqueado por la siguiente razón:
{0}", Vta.SerieVenta)
+ Vta.Dispose()
+ If Opcion > 0 Then
+ LnkSolicitarCredito.Visible = True
+ Alert(OpcionMsg, TipoMensaje.MsgAdvertencia)
+ End If
+ Else
+ 'este codigo no es temporal
+ If Alertas AndAlso UsuarioActual.Empresa.Funcionalidad(518) = "1" Then Alert("El cliente tiene su límite de crédito agotado.", TipoMensaje.MsgAdvertencia)
+ If UsuarioActual.CveEmpresa = 140 Then
+ LnkSolicitarCredito.Visible = True
+ DdlTipoAutorizacion.SelectedValueExist("1")
+ End If
+
+ End If
End If
End If
UPPCreditoDisponible.Update()