-
diff --git a/Ventas/FacturacionGlobal.aspx.vb b/Ventas/FacturacionGlobal.aspx.vb
index 794f72424..136e80b0f 100644
--- a/Ventas/FacturacionGlobal.aspx.vb
+++ b/Ventas/FacturacionGlobal.aspx.vb
@@ -230,6 +230,7 @@ Partial Class Ventas_FacturacionGlobal
If Math.Abs(ObjFactura.Total.RoundSQL(2) - DtPagosFacturaGlobal.SUMD("Importe").RoundSQL(2)) > 0.01D Then
Alert($"Los pagos no coinciden con el total de la factura [{ObjFactura.Total.RoundSQL(2)}-{ DtPagosFacturaGlobal.SUMD("Importe").RoundSQL(2)}]", TipoMensaje.MsgError)
+ GuardaLog($"Los pagos no coinciden con el total de la factura [{ObjFactura.Total.RoundSQL(2)}-{ DtPagosFacturaGlobal.SUMD("Importe").RoundSQL(2)}] Remisiones: " + SbRemisiones.ToString())
Exit Sub
End If
diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx
index 1440d98b4..311924897 100644
--- a/Ventas/Ventas.aspx
+++ b/Ventas/Ventas.aspx
@@ -8588,7 +8588,6 @@
-
diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb
index d4001e38b..9cedf95a1 100644
--- a/Ventas/Ventas.aspx.vb
+++ b/Ventas/Ventas.aspx.vb
@@ -9711,8 +9711,17 @@ Partial Class Ventas
End If
Me.CveAutorizacion = -1
+ Dim PermiteAutorizacion As Boolean = False
+
+ If DdlTipoComprobante.SelectedValue.Contiene("Ing") Then
+ PermiteAutorizacion = True
+ End If
+ If DdlTipoComprobante.SelectedValue.Contiene("Rem") AndAlso UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
+ PermiteAutorizacion = True
+ End If
+
'SI ES A CREDITO DEBE VERIFICAR SI TIENE AUTORIZACIONES
- If UsuarioActual.Empresa.Funcionalidad(595) = "2" AndAlso CveCliente > 0 AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing") AndAlso RBLPago.SelectedValue = "1" Then
+ If UsuarioActual.Empresa.Funcionalidad(595) = "2" AndAlso CveCliente > 0 AndAlso PermiteAutorizacion AndAlso RBLPago.SelectedValue = "1" Then
Dim TipoDocumentoAutorizacion As String = ""
Dim ImporteAutorizacion As Decimal = 0
Dim TipoAutorizacion As Integer = 0
@@ -31890,6 +31899,11 @@ Partial Class Ventas
Exit Sub
End If
+ If Not UsuarioActual.TienePermisoProceso(60) Then
+ Alert("El usuario no tiene permiso para facturar.", TipoMensaje.MsgAdvertencia)
+ Exit Sub
+ End If
+
'MARCA LAS SELECCIONADAS
VerificaCotizaciones(DtCotizaciones)
@@ -32417,6 +32431,11 @@ Partial Class Ventas
Exit Sub
End If
+ If Not UsuarioActual.TienePermisoProceso(60) Then
+ Alert("El usuario no tiene permiso para facturar.", TipoMensaje.MsgAdvertencia)
+ Exit Sub
+ End If
+
'Checa las facturas selecionadas
If Not VerificaRemisiones(DTRemisiones) Then
Alert("La cantidad/total debe ser mayor que 0", TipoMensaje.MsgAdvertencia)
@@ -32994,6 +33013,11 @@ Partial Class Ventas
Exit Sub
End If
+ If Not UsuarioActual.TienePermisoProceso(60) Then
+ Alert("El usuario no tiene permiso para facturar.", TipoMensaje.MsgAdvertencia)
+ Exit Sub
+ End If
+
'MARCA LAS SELECCIONADAS
VerificaPedidos2(DtPedidos2)
Dim DTSeleccionadas As DataTable = DtPedidos2.FiltraParametros("Aplicado = True")