diff --git a/Ventas/PVCobranza.aspx.vb b/Ventas/PVCobranza.aspx.vb
index 11ac0dd96..a9a2cd176 100644
--- a/Ventas/PVCobranza.aspx.vb
+++ b/Ventas/PVCobranza.aspx.vb
@@ -69,12 +69,18 @@ Partial Class Ventas_PVCobranza
CveCorte = 0
CargaFiltros()
CargaDdlPagos()
+
If UsuarioActual.TienePermisoProceso(371) Then
CargaCorteCaja()
End If
+
If UsuarioActual.CveEmpresa = 189 Then
DivDatosCheque.Visible = True
End If
+
+ If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
+ DivNoTimbradas.Visible = True
+ End If
End If
End Sub
@@ -278,6 +284,16 @@ Partial Class Ventas_PVCobranza
End Sub
+ Private Sub MuestraNoTimbradasCentroCosto()
+ Dim ObjSub As New ClsSubProyectos
+ If ObjSub.GetNoTimbradasCentroCosto(UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
+ If ObjSub.DtResultados.Rows.Count > 0 Then
+ GvPendientesTimbrar.DataSource = ObjSub.DtResultados.FiltraParametros($"Fecha = '{Now.ToString("dd/MM/yyyy")}'")
+ End If
+ End If
+ ObjSub.Dispose()
+ GvPendientesTimbrar.DataBind()
+ End Sub
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
@@ -291,6 +307,8 @@ Partial Class Ventas_PVCobranza
CargaDatos()
End If
+ MuestraNoTimbradasCentroCosto()
+
End Sub
diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb
index 571d29650..c745fccfa 100644
--- a/Ventas/Ventas.aspx.vb
+++ b/Ventas/Ventas.aspx.vb
@@ -2072,6 +2072,15 @@ Partial Class Ventas
End Set
End Property
+ Private Property EsFilial As Boolean
+ Get
+ Return CBool(IfNull(ViewState("EsFilial"), False))
+ End Get
+ Set(value As Boolean)
+ ViewState("EsFilial") = value
+ End Set
+ End Property
+
Private Property VentaDesglosaIEPS As Boolean
Get
Return CBool(IfNull(ViewState("VentaDesglosaIEPS"), "False", ViewState("VentaDesglosaIEPS")))
@@ -6836,6 +6845,7 @@ Partial Class Ventas
ViewState("RequiereOC") = ObjCliente.RequiereOC
EnviarCorreoCliente = ObjCliente.EnviarFactura
EstatusCliente = ObjCliente.Estatus
+ EsFilial = ObjCliente.EsFilial
Me.PermiteCredito = ObjCliente.PermiteCredito
LnkAgregarCliente.Visible = False
@@ -7649,7 +7659,7 @@ Partial Class Ventas
Dim ValorAutorizacion As String = UsuarioActual.Empresa.Funcionalidad(595)
'OBLIGAR PAGO DE CONTADO SI EL CLIENTE NO PERMITE CREDITO
- If (Not UsuarioActual.Empresa.Funcionalidad(702).Contiene("1")) AndAlso Me.PermiteCredito = False AndAlso ((DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem", "Cot") AndAlso CveVenta < 1) OrElse (DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem", "Cot", "PA") AndAlso EsCreaApartirDe) OrElse (DdlTipoComprobante.SelectedValue.Contiene("Cot") AndAlso CveVenta > 0)) Then
+ If Not EsFilial AndAlso (Not UsuarioActual.Empresa.Funcionalidad(702).Contiene("1")) AndAlso Me.PermiteCredito = False AndAlso ((DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem", "Cot") AndAlso CveVenta < 1) OrElse (DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem", "Cot", "PA") AndAlso EsCreaApartirDe) OrElse (DdlTipoComprobante.SelectedValue.Contiene("Cot") AndAlso CveVenta > 0)) Then
RBLPago.SelectedValue = "2"
RBLPago.Items(0).Enabled = False
RBLPago_SelectedIndexChanged(Nothing, Nothing)
@@ -7686,7 +7696,7 @@ Partial Class Ventas
' RBLPago.SelectedValue = "2"
'End If
- If ((DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem", "Cot", "PA") AndAlso CveVenta <= 0) OrElse (DdlTipoComprobante.SelectedValue.Contiene("Cot") AndAlso CveVenta > 0)) AndAlso RBLPago.SelectedValue = "1" AndAlso PermiteCredito Then
+ If Not EsFilial AndAlso (((DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem", "Cot", "PA") AndAlso CveVenta <= 0) OrElse (DdlTipoComprobante.SelectedValue.Contiene("Cot") AndAlso CveVenta > 0)) AndAlso RBLPago.SelectedValue = "1" AndAlso PermiteCredito) Then
'FUNCIONALIDAD 702 - NO VERIFICAR LIMITE DE CRÉDITO Y CANDADOS DE VENTA
If Not UsuarioActual.Empresa.Funcionalidad(702) = "1" Then
If UsuarioActual.Empresa.Funcionalidad(589) = "1" Then
@@ -8005,7 +8015,7 @@ Partial Class Ventas
Else
'VERIFICAR RESTRICCIONES DEL CLIENTE
- If Not UsuarioActual.Empresa.Funcionalidad(702).ToEntero() > 0 Then
+ If Not EsFilial AndAlso UsuarioActual.Empresa.Funcionalidad(702).ToEntero() > 0 Then
Dim ValidaRemision As Boolean = False
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
@@ -8116,7 +8126,7 @@ Partial Class Ventas
UPPCreditoDisponible.Update()
'SOLO VERIFICA VENCIMIENTOS
- If UsuarioActual.Empresa.Funcionalidad(702).Contiene("2") Then
+ If Not EsFilial AndAlso UsuarioActual.Empresa.Funcionalidad(702).Contiene("2") Then
Dim ValidaCliente As Boolean = False
@@ -8148,6 +8158,17 @@ Partial Class Ventas
End If
End If
+ If EsFilial AndAlso Alertas 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
+ Alert(OpcionMsg, TipoMensaje.MsgAdvertencia)
+ End If
+ End If
+
'Puede hacer pedido
If CveVenta <= 0 Then
If Not UsuarioActual.TienePermisoProceso(177) And Not EsVentaMedica Then
@@ -8169,7 +8190,6 @@ Partial Class Ventas
LblEnviarMail.Visible = True
End If
-
End Sub
@@ -18169,8 +18189,17 @@ Partial Class Ventas
End If
End If
+ Dim AgregarPSAutomaticamente As Boolean = False
If UsuarioActual.Empresa.Funcionalidad(109) = "1" AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("Egs", "Ant") Then
+ AgregarPSAutomaticamente = True
+ End If
+
+ If UsuarioActual.CveEmpresa = 189 Then
+ AgregarPSAutomaticamente = False
+ End If
+
+ If AgregarPSAutomaticamente Then
AgregarPS()
End If