From a9f51b248326ac5847e50948d94f1f3611ea8b4f Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Mon, 2 Sep 2024 09:37:16 -0700 Subject: [PATCH] =?UTF-8?q?Puntos=20GDiaz:=20--En=20la=20generaci=C3=B3n?= =?UTF-8?q?=20de=20la=20p=C3=B3liza=20de=20dep=C3=B3sito=20de=20caja,=20in?= =?UTF-8?q?cluir=20en=20el=20concepto=20de=20tipo=20de=20dep=C3=B3sito.=20?= =?UTF-8?q?--Notificar=20los=20facturas=20pendientes=20de=20timbrar,=20en?= =?UTF-8?q?=20cajas.=20--Permitir=20facturar=20sin=20bloqueo=20de=20vencim?= =?UTF-8?q?ientos/saldo=20excedido=20a=20clientes=20que=20son=20parte=20re?= =?UTF-8?q?lacionada.=20--No=20agregar=20en=20autom=C3=A1tica=20la=20parti?= =?UTF-8?q?da=20en=20cotizaci=C3=B3n/ventas.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App_Code/ClsSubProyectos.vb | 6 +- Bancos/DepositosCaja.aspx.vb | 4 +- Inicio.aspx.vb | 2 +- Ventas/PVCobranza.aspx | 124 ++++++++++++++++++++++++++--------- Ventas/PVCobranza.aspx.vb | 18 +++++ Ventas/Ventas.aspx.vb | 39 +++++++++-- 6 files changed, 153 insertions(+), 40 deletions(-) diff --git a/App_Code/ClsSubProyectos.vb b/App_Code/ClsSubProyectos.vb index bf6419ecc..7d7763425 100644 --- a/App_Code/ClsSubProyectos.vb +++ b/App_Code/ClsSubProyectos.vb @@ -309,11 +309,13 @@ Public Class ClsSubProyectos disposedValue = True End Sub - Public Function GetNoTimbradasCentroCosto(CveEmpresa As Integer) As Boolean + Public Function GetNoTimbradasCentroCosto(CveEmpresa As Integer, CveUsuario As Integer, Optional CveSubProyecto As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_NoTimbradasCentroCostoGet") With SqlAdapter.SelectCommand.Parameters - .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto End With Try SqlAdapter.Fill(Data) diff --git a/Bancos/DepositosCaja.aspx.vb b/Bancos/DepositosCaja.aspx.vb index e59d1b23d..34dea6f3a 100644 --- a/Bancos/DepositosCaja.aspx.vb +++ b/Bancos/DepositosCaja.aspx.vb @@ -269,7 +269,7 @@ Partial Class Bancos_DepositosCaja CveMoneda = drDestino("CveMoneda").ToString.ToEntero End If - NuevaCvePrePoliza = ObjConta.AddPrePolizas("DepCaja", 13, TotalImportePrePoliza, TotalImportePrePoliza, CveMoneda, Fecha, "Depósito Bancario", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=1) + NuevaCvePrePoliza = ObjConta.AddPrePolizas("DepCaja", 13, TotalImportePrePoliza, TotalImportePrePoliza, CveMoneda, Fecha, $"Depósito Bancario - {DdlTipoDeposito.SelectedItem.Text}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=1) Dim IntermediarioFactura As Boolean = False If UsuarioActual.CveEmpresa = 145 Then IntermediarioFactura = True @@ -348,7 +348,7 @@ Partial Class Bancos_DepositosCaja documentos += String.Format("Depósito: {1}    
", CveIEOrigen, FolioIE) - If Not OcurrioError AndAlso ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, False, TotalImporte, TotalImporte * TipoCambio, 30, "Depósito Bancario", "Depósito Bancario", CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, CveIE:=CveIEOrigen) Then + If Not OcurrioError AndAlso ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, False, TotalImporte, TotalImporte * TipoCambio, 30, $"Depósito Bancario - {DdlTipoDeposito.SelectedItem.Text}", $"Depósito Bancario - {DdlTipoDeposito.SelectedItem.Text}", CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, CveIE:=CveIEOrigen) Then If ChkFaltante.Checked Then CveSubProyectoComision = DdlSubProyectoDeposito.SelectedValue.ToEntero diff --git a/Inicio.aspx.vb b/Inicio.aspx.vb index e394067ca..f59cc163f 100644 --- a/Inicio.aspx.vb +++ b/Inicio.aspx.vb @@ -314,7 +314,7 @@ Partial Class Inicio Private Sub MuestraNoTimbradasCentroCosto() Dim ObjSub As New ClsSubProyectos - If ObjSub.GetNoTimbradasCentroCosto(UsuarioActual.CveEmpresa) Then + If ObjSub.GetNoTimbradasCentroCosto(UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then If ObjSub.DtResultados.Rows.Count > 0 Then LblNoTimbradas.Text = ObjSub.DtResultados.Rows.Count.ToString GvNoTimbradasCentroCosto.DataSource = ObjSub.DtResultados diff --git a/Ventas/PVCobranza.aspx b/Ventas/PVCobranza.aspx index 6a5f1b790..06009d13d 100644 --- a/Ventas/PVCobranza.aspx +++ b/Ventas/PVCobranza.aspx @@ -192,16 +192,16 @@
  • - Estado de Caja + Estado de Caja
  • - Ingreso de Efectivo + Ingreso de Efectivo
  • - Retiro de Efectivo + Retiro de Efectivo
  • - Cobros en Transcurso + Cobros en Transcurso
  • @@ -303,26 +303,90 @@
    - - - - - - - - - -   - - - - - + +
    +
    +
    + Ventas pendientes de pago +
    + +
    +
    +
    +
    + " style="display: inline-block; margin-right: -20px; width: 150px;" /> + " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> +
    +
    +
    +
    + +
    +
    +
    +
    + + + + + + + + + +   + + + + + +
    +
    +
    +
    +
    +
    +
    +
    + Facturas No Timbradas +
    +
    +
    +
    +
    + " style="display: inline-block; margin-right: -20px; width: 150px;" /> + " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> +
    +
    +
    +
    + +
    +
    +
    +
    + + + + + + + + + + + + +
    +
    +
    +
    @@ -514,12 +578,12 @@
    -
    - $ - - -
    -
    +
    + $ + + +
    +
    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