From 7b35d724c126b3e5c3d25226c5030c48570b180b Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 15 May 2025 06:11:40 -0700 Subject: [PATCH 01/12] --validacion saldo =0 --- Bancos/PopIEVentas.aspx.vb | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/Bancos/PopIEVentas.aspx.vb b/Bancos/PopIEVentas.aspx.vb index 4fd113f60..6130f4ab2 100644 --- a/Bancos/PopIEVentas.aspx.vb +++ b/Bancos/PopIEVentas.aspx.vb @@ -125,11 +125,11 @@ Partial Class Bancos_PopIEVentas End Set End Property - Private Property SaldoVenta As Double + Private Property SaldoVenta As Decimal Get - Return ViewState("SaldoVenta").ToString.ToDouble + Return ViewState("SaldoVenta").ToString.ToDecimal End Get - Set(value As Double) + Set(value As Decimal) ViewState("SaldoVenta") = value End Set End Property @@ -543,27 +543,29 @@ Partial Class Bancos_PopIEVentas TxtImporte.Text = dr("Saldo").ToString.ToDouble.FormatoNumero FechaVenta = dr("Fecha").ToString.ToDate - SaldoVenta = dr("Saldo").ToString.ToDouble + SaldoVenta = dr("Saldo").ToString.ToDecimal - Me.CveCorte = CargaCorteCaja(pCveVenta, UsuarioActual) + 'si ya está pagada, bloquear. + If SaldoVenta <= 0 Then Validada = False - If RFCCliente.ToUpper <> "XAXX010101000" Then - Dim CveProveedor As Integer = GlobalDTCompProveedores(UsuarioActual.CveEmpresa, RFC:=RFCCliente.ToUpper).FiltroPrimeroValor("CveProveedor").ToEntero + If Validada Then + Me.CveCorte = CargaCorteCaja(pCveVenta, UsuarioActual) - If CveProveedor > 0 Then - Dim Mov As New ClsMovimientos - If Mov.GetCxPProveedor(CveProveedor, MinFecha.ToShortDateString, MaxFecha.ToShortDateString, -1, -1, -1, -1, -1, 1, -1, -1, "-1", "-1", "-1") Then - If Mov.DtResultados.FiltraParametros("Saldo > 0", "Fecha,SerieFolio").Rows.Count > 0 Then - RBLContado.Items(4).Enabled = True + If RFCCliente.ToUpper <> "XAXX010101000" Then + Dim CveProveedor As Integer = GlobalDTCompProveedores(UsuarioActual.CveEmpresa, RFC:=RFCCliente.ToUpper).FiltroPrimeroValor("CveProveedor").ToEntero + + If CveProveedor > 0 Then + Dim Mov As New ClsMovimientos + If Mov.GetCxPProveedor(CveProveedor, MinFecha.ToShortDateString, MaxFecha.ToShortDateString, -1, -1, -1, -1, -1, 1, -1, -1, "-1", "-1", "-1") Then + If Mov.DtResultados.FiltraParametros("Saldo > 0", "Fecha,SerieFolio").Rows.Count > 0 Then + RBLContado.Items(4).Enabled = True + End If End If + + Mov.Dispose() End If - - Mov.Dispose() End If - - End If - - If Not Validada Then + Else BtnGuardar.Visible = False End If End If From 2431ba0d059020674e6729b194b84ddb7aeb94e7 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 15 May 2025 06:12:26 -0700 Subject: [PATCH 02/12] -- mejora --- Ventas/ClientesAbonar.aspx.vb | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/Ventas/ClientesAbonar.aspx.vb b/Ventas/ClientesAbonar.aspx.vb index 0a09cd780..dc316c96b 100644 --- a/Ventas/ClientesAbonar.aspx.vb +++ b/Ventas/ClientesAbonar.aspx.vb @@ -816,6 +816,7 @@ Partial Class Ventas_ClientesAbonar If DtSaldo IsNot Nothing AndAlso DtSaldo.Rows.Count = 1 Then Dim ImporteRef As Decimal = DtSaldo.SUM("Saldo", $"CveIE={DdlIngreso.SelectedValue.ToEntero()}") Dim tCveMonedaIE As Integer = DtSaldo.FiltroPrimeroValor("CveMoneda", "").ToEntero + CveMoneda = tCveMonedaIE Dim ImporteAbonar As Decimal = 0 Dim TC As Decimal = 1 'comparativo. @@ -866,18 +867,15 @@ Partial Class Ventas_ClientesAbonar Dim CveIE As Integer = -1 Dim CveVentasPago As New List(Of Integer) Dim SeriesPago As New List(Of String) - Dim MsgError As String = "" Dim NCGeneradas As New List(Of RespuestaNotaCredrito) Dim ListaFacturasGenerarNC As New List(Of Modelos.Factura) Dim ObjFacturaAnt As Modelos.Factura = Nothing Dim RespAnt As Modelos.Factura.MMensajeFactura = Nothing Dim ImporteSeleccionado As Decimal = 0 - '02-05-2018 MANDAMOS CANCELAR EL COMPLEMENTO A SUSTITUIR Dim ErrorCancelarIE As Boolean = False - Dim ObjIE As New ClsBancos() Dim ObjMov As New ClsContabilidad(ObjIE.IniciaTransacSQL) Dim ObjVentasSaldos As New ClsVentas(ObjIE.IniciaTransacSQL) @@ -898,9 +896,7 @@ Partial Class Ventas_ClientesAbonar Dim ConceptoPoliza As String = String.Format("{0} {1}", TxtAboneA.Text, TxtObservaciones.Text) If DdlCuenta.SelectedValue.ToEntero > 0 Then - CveMoneda = GlobalDTBancosCuentas(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveMoneda", $"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveCuenta = {DdlCuenta.SelectedValue.ToEntero}").ToEntero - Else - CveMoneda = IfNull(Request("CveMoneda"), "1").ToString.ToEntero + CveMoneda = GlobalDTBancosCuentas(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveMoneda", $" CveCuenta = {DdlCuenta.SelectedValue.ToEntero}").ToEntero End If CvePrePoliza = ObjMov.AddPrePolizas("Ventas/ClientesAbonar", 11, TxtImporte.Text.Trim.ToDecimal, TxtImporte.Text.Trim.ToDecimal, 1, TxtFechaDocumento.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) @@ -909,9 +905,7 @@ Partial Class Ventas_ClientesAbonar Dim CveCuentaDeposito As Integer = 0 Dim TipoCambio As Decimal = 0 - If DdlCuentaDeposito.Items.Count > 0 Then - CveCuentaDeposito = DdlCuentaDeposito.SelectedValue.ToEntero - End If + If DdlCuentaDeposito.Items.Count > 0 Then CveCuentaDeposito = DdlCuentaDeposito.SelectedValue.ToEntero If CveMoneda = 2 Then If TxtTCDolares.Visible Then @@ -1011,7 +1005,6 @@ Partial Class Ventas_ClientesAbonar MsgError = "No se pudo insertar la póliza" End If End If - End If If TxtPrestamoIntereses.Text.ToDecimal <> 0 AndAlso MsgError = "" Then From 7465a53d6bc95d6d3dcf93972e0d644061f70171 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 15 May 2025 06:12:47 -0700 Subject: [PATCH 03/12] =?UTF-8?q?--=20SMS=20activaci=C3=B3n=20dash,=20en?= =?UTF-8?q?=20roles=20de=20ventas,almacen,tecnico?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Inicio.aspx.vb | 48 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 32 insertions(+), 16 deletions(-) diff --git a/Inicio.aspx.vb b/Inicio.aspx.vb index b18897be0..570085ae2 100644 --- a/Inicio.aspx.vb +++ b/Inicio.aspx.vb @@ -8,7 +8,7 @@ Imports ADSNetLibrary.SIGAPI.Services.CRM Partial Class Inicio Inherits ClsPaginas - Private Dias() As String = {"Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado"} + 'Private Dias() As String = {"Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado"} Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not IsPostBack Then @@ -142,25 +142,18 @@ Partial Class Inicio If UsuarioActual.TienePermisoProceso(343) Then MuestraPsProximosAVencer() If UsuarioActual.TienePermisoProceso(344) Then MuestraRSCOProximosAVencer() - If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso (UsuarioActual.CveUsuario = 3964 OrElse UsuarioActual.CveRol = 1639) Then 'AndAlso UsuarioActual.CveRol.Contiene(1577, 1639, 1573) Then - 'Dim Opcion As Integer = 1 - 'Dim CveVendedor As Integer = -1 - 'Dim CveUsuarioTecnico As Integer = -1 + If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso + (UsuarioActual.CveUsuario.Contiene(3964, 3984) OrElse UsuarioActual.CveRol.Contiene(1639, 1577, 1578, 1582)) Then - 'If UsuarioActual.CveRol = 1577 Then 'vendedor - ' Opcion = 1 - ' CveVendedor = UsuarioActual.CveVendedor - ' CveUsuarioTecnico = UsuarioActual.CveUsuario 'GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveUsuarioTecnico", $"CveVendedor = {CveVendedor}").ToEntero - 'ElseIf UsuarioActual.CveRol.Contiene(1639, 1573) Then ' rol admin. 1573 - ' Opcion = 2 'gerente ventas - 'End If divsms1.Visible = True txtFechaInicioSMS.Text = Now.FirstDayOfMonth.ToString txtFechaFinSMS.Text = Now.LastDayOfMonth.ToString - If UsuarioActual.CveUsuario = 3964 Then + If UsuarioActual.CveUsuario = 3964 Then 'diego de la concha DdlSMSOpciones.SelectedValue = "2" DdlSMSVendedores.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltraParametros($"CveEstatus=1 ") DdlSMSVendedores.DataBind() + DdlSMSTecnico.DataSource = GlobalDTUsuarios(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("CveRol = 1582") + DdlSMSTecnico.DataBind() End If If UsuarioActual.CveRol.Contiene(1639) Then 'gerente ventas DdlSMSOpciones.SelectedValue = "2" @@ -173,7 +166,33 @@ Partial Class Inicio DdlSMSVendedores.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltraParametros($"CveEstatus=1 and CveSuperior = {CveGerenteVendedor} ") DdlSMSVendedores.DataBind() + DdlSMSTecnico.Items.Insert(0, New ListItem("Todos", "-1")) End If + If UsuarioActual.CveRol = 1577 Then 'vendedores + DdlSMSOpciones.SelectedValue = "1" + DdlSMSVendedores.Items.Add(New ListItem(UsuarioActual.Nombre, UsuarioActual.CveVendedor.ToString)) + DdlSMSVendedores.SelectedValue = UsuarioActual.CveVendedor.ToString + DdlSMSVendedores.Enabled = False + DdlSMSOpciones.Enabled = False + End If + If UsuarioActual.CveRol = 1578 Then 'almacenista + DdlSMSOpciones.SelectedValue = "3" + DdlSMSOpciones.Enabled = False + End If + If UsuarioActual.CveUsuario = 3984 Then 'Erick, modalidad de gerente de técnicos + DdlSMSOpciones.SelectedValue = "5" + DdlSMSTecnico.DataSource = GlobalDTUsuarios(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("CveRol = 1582") + DdlSMSTecnico.DataBind() + DdlSMSOpciones.Items.RemoveAt(2) : DdlSMSOpciones.Items.RemoveAt(1) : DdlSMSOpciones.Items.RemoveAt(0) + + ElseIf UsuarioActual.CveRol = 1582 Then 'tecnicos + DdlSMSOpciones.SelectedValue = "4" + DdlSMSOpciones.Enabled = False + DdlSMSTecnico.Items.Add(New ListItem(UsuarioActual.Nombre, UsuarioActual.CveUsuario.ToString)) + DdlSMSTecnico.SelectedValue = UsuarioActual.CveUsuario.ToString + DdlSMSTecnico.Enabled = False + End If + CargaSMSKPI() End If @@ -2551,9 +2570,6 @@ Partial Class Inicio CargaKPICirugias(DdlSMSOpciones.SelectedValue.ToEntero, CveGerenteVendedor:=CveGerenteVendedor) ElseIf DdlSMSOpciones.SelectedValue = "4" Then - DdlSMSTecnico.DataSource = GlobalDTUsuarios(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("CveRol = 1582") - DdlSMSTecnico.DataBind() - DdlSMSTecnico.Items.Insert(0, New ListItem("Todos", "-1")) DdlSMSTecnico.Visible = True DdlSMSVendedores.Visible = False CargaKPICirugias(DdlSMSOpciones.SelectedValue.ToEntero, -1, DdlSMSTecnico.SelectedValue.ToEntero) From 7924558a00d38afe996e682eed59911256514827 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 15 May 2025 14:16:41 -0700 Subject: [PATCH 04/12] =?UTF-8?q?--=20correcci=C3=B3n=20=20bdh-=20factura?= =?UTF-8?q?=20sin=20virtual?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Compras/Compras.aspx.vb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 97a59218f..505f8942e 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -2972,11 +2972,11 @@ Partial Class Compras_Compras CvePrePoliza = dr("CvePrePoliza").ToString.ToEntero EstatusAlmacen = dr("EstatusAlmacen").ToString.ToEntero DdlTipoCompra.SelectedValueExist(dr("CveTipoCompra")) - If DdlTipoCompra.SelectedValue = "16" Then + TipoCompraOriginal = dr("CveTipoCompra").ToString.ToEntero + If TipoCompraOriginal = 16 Then DdlTipoCompra.Items.Add(New ListItem("Apoyo sin virtual", "16")) DdlTipoCompra.SelectedValue = dr("CveTipoCompra").ToString End If - TipoCompraOriginal = dr("CveTipoCompra").ToString.ToEntero CveTipoConcepto = dr("CveTipoConcepto").ToString.ToEntero ChkEsNoDeducible.Checked = dr("NoDeducible").ToString.ToEntero > 0 If ChkEsNoDeducible.Checked Then AplicarNoDeducible() From c0cd10104a0aafeb9e539bca6ee359578a8c3a1f Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 15 May 2025 14:57:05 -0700 Subject: [PATCH 05/12] =?UTF-8?q?--=20correci=C3=B3n=20de=20guardar=20el?= =?UTF-8?q?=20banco!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- RH/Personal.aspx.vb | 142 ++------------------------------------------ 1 file changed, 4 insertions(+), 138 deletions(-) diff --git a/RH/Personal.aspx.vb b/RH/Personal.aspx.vb index 6cc73ef11..89e45b992 100644 --- a/RH/Personal.aspx.vb +++ b/RH/Personal.aspx.vb @@ -6,10 +6,6 @@ Imports System.IO Imports System.Data Imports Microsoft.Reporting.WebForms Imports System.Globalization - - - - Partial Class RH_Personal Inherits ClsPaginas @@ -2137,7 +2133,7 @@ Partial Class RH_Personal If Not ObjCuentasDeposito.AddCuentasDepositos(row("BancoNombre").ToString(), row("Plaza").ToString(), row("Sucursal").ToString(), row("Cuenta").ToString(), row("CLABE").ToString(), row("CIE").ToString(), row("SWIFT").ToString(), row("Referencia").ToString(), row("RefCrediProveedor").ToString(), UsuarioActual.CveUsuario, row("CveMoneda").ToString().ToEntero(), UsuarioActual.CveEmpresa, CvePersonal:=CvePersonal, CveUsuarioModifico:=UsuarioActual.CveUsuario, - BBVAAlias:=row("BBVAAlias").ToString(), EstatusPagoElectronico:=Boolean.Parse(row("EstatusPagoElectronico").ToString), + CveSATBanco:=row("CveSATBanco").ToString.ToEntero, BBVAAlias:=row("BBVAAlias").ToString(), EstatusPagoElectronico:=Boolean.Parse(row("EstatusPagoElectronico").ToString), EstatusPagoElectronicoGrupos:=Boolean.Parse(row("EstatusPagoElectronicoGrupos").ToString), Correo:=row("Correo").ToString(), ConceptoCIE:=row("ConceptoCIE").ToString(), Estatus:=If(row("EstatusTexto").ToString = "Activo", True, False)) Then TieneError = True @@ -3095,8 +3091,6 @@ Partial Class RH_Personal End If End Sub #End Region - - Protected Sub DdlEstatusPersonal_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlEstatusPersonal.SelectedIndexChanged MostrarOcultarFechasEstatus() @@ -3133,8 +3127,6 @@ Partial Class RH_Personal End If - - e.Row.FCLinkButton("LBCancelar").Visible = True e.Row.FCLinkButton("LBCancelar").CommandArgument = e.Row.DBCampo("FolioFiscal") @@ -3153,7 +3145,6 @@ Partial Class RH_Personal e.Row.FCLinkButton("LBCancelar").Visible = True e.Row.FCLinkButton("LBCancelar").CommandArgument = e.Row.DBCampo("FolioFiscal") End If - End If End Sub @@ -3354,11 +3345,8 @@ Partial Class RH_Personal e.Row.FCLabel("LtlC").CssClass = "label label-sm label-warning" e.Row.FCLabel("LtlC").ForeColor = Drawing.Color.White End If - End If - End Sub - Protected Sub BtnCargarCuentas_Click(sender As Object, e As EventArgs) Handles BtnCargarCuentas.Click If DtCuentasContables Is Nothing Then CargaCuentasContables() @@ -3377,10 +3365,6 @@ Partial Class RH_Personal DdlPrestamos.DataSource = DtCuentasContables : DdlPrestamos.DataBind() : DdlPrestamos.SelectedValueExist(SeleccionadoContPrestamos) DdlPrestamos.AutoPostBack = False : DdlPrestamos.Attributes.Remove("onclick") : DdlPrestamos.CssClass &= " select2me" End Select - - - - End Sub #Region "TAB BANCOS" Private Sub CargaMonedas() @@ -3417,10 +3401,6 @@ Partial Class RH_Personal TxtCorreoCuenta.Text = "" TxtBBVAAlias.Text = "" ChkPagoElectronicoGrupos.Checked = False - - - - UpAddBancos.Update() End Sub @@ -3441,6 +3421,7 @@ Partial Class RH_Personal Else If IndexCuentaDepostito > -1 Then Dim Row As DataRow = TempDTCuentasBancos.Rows(IndexCuentaDepostito) + Row("CveSATBanco") = DdlBancoSat.SelectedValue.ToEntero() Row("BancoNombre") = nombrebanco Row("Cuenta") = TxtNumeroCuenta.Text.Trim Row("Sucursal") = TxtNumeroSucursal.Text @@ -3460,7 +3441,6 @@ Partial Class RH_Personal Row("Correo") = TxtCorreoCuenta.Text.Trim Row("ConceptoCIE") = TxtConceptoCIE.Text Row("EstatusTexto") = If(ChkEstatuscuenta.Checked, "Activo", "Inactivo") - End If End If @@ -3504,7 +3484,6 @@ Partial Class RH_Personal Exit Sub End If - If ChkPagoElectronicoGrupos.Checked Then If TxtConvenioCIE.Text.Trim.Length > 0 Then @@ -3518,15 +3497,8 @@ Partial Class RH_Personal Alert("Se debe de especificar el banco.") Exit Sub End If - - - End If - End If - - - ''CUANDO SEA "BBVA" O "BANCOMER" DEBE TENER "CIE" O "CUENTA" 'If EsBancomer AndAlso Not (TxtNumeroCuenta.Text.Trim.Length = 10 Or TxtConvenioCIE.Text.Trim.Length = 6) Then ' Alert("Para cuentas BBVA BANCOMER es obligatorio el Número de Cuenta o CIE.", TipoMensaje.MsgAdvertencia) @@ -3562,8 +3534,6 @@ Partial Class RH_Personal Private Sub AgregarCuentaBanco(NombreBanco As String, NumeroSucursal As String, CLABE As String, SWIFT As String, Plaza As String, NumeroCuenta As String, ConvenioCIE As String, Referencia As String, RefCrediProveedor As String, CveMoneda As Integer, Moneda As String, Estatus As Boolean, Correo As String, BBVAAlias As String, CveSATBanco As Integer, EstatusPagoElectronico As Boolean, EstatusPagoElectronicoGrupos As Boolean, ConceptoCIE As String) - - If CvePersonal > 0 Then Using ObjCuentasBancos As New ClsGenerales() @@ -3582,6 +3552,7 @@ Partial Class RH_Personal If IndexCuentaDepostito > -1 Then Dim Row As DataRow = TempDTCuentasBancos.Rows(IndexCuentaDepostito) + Row("CveSATBanco") = CveSATBanco Row("BancoNombre") = NombreBanco Row("Sucursal") = NumeroSucursal Row("CLABE") = CLABE @@ -3594,7 +3565,6 @@ Partial Class RH_Personal Row("CveMoneda") = CveMoneda Row("Moneda") = Moneda Row("BBVAAlias") = BBVAAlias - Row("CveSATBanco") = CveSATBanco Row("EstatusPagoElectronico") = EstatusPagoElectronico Row("EstatusPagoElectronicoGrupos") = EstatusPagoElectronicoGrupos Row("Correo") = Correo @@ -3603,6 +3573,7 @@ Partial Class RH_Personal Else Dim Row As DataRow = TempDTCuentasBancos.NewRow + Row("CveSATBanco") = CveSATBanco Row("BancoNombre") = NombreBanco Row("Sucursal") = NumeroSucursal Row("CLABE") = CLABE @@ -3615,18 +3586,13 @@ Partial Class RH_Personal Row("CveMoneda") = CveMoneda Row("Moneda") = Moneda Row("BBVAAlias") = BBVAAlias - Row("CveSATBanco") = CveSATBanco Row("EstatusPagoElectronico") = EstatusPagoElectronico Row("EstatusPagoElectronicoGrupos") = EstatusPagoElectronicoGrupos Row("Correo") = Correo Row("ConceptoCIE") = ConceptoCIE TempDTCuentasBancos.Rows.Add(Row) Row("EstatusTexto") = If(ChkEstatuscuenta.Checked, "Activo", "Inactivo") - End If - - - End If LimpiaCuentasBancarias() @@ -3712,9 +3678,7 @@ Partial Class RH_Personal TxtCLABECB.Text = gvrow.DataKey("CLABE") ChkEstatusPagoE.Checked = gvrow.DataKey("EstatusPagoElectronico").ToUpper().Contiene("TRUE", "1") ChkEstatuscuenta.Checked = gvrow.DataKey("EstatusTexto").ToUpper().Contiene("TRUE", "1", "ACTIVO") - 'CveCuentaDeposito,BancoNombre,Sucursal,Cuenta,CLABE,SWIFT,Plaza,CIE,Referencia,RefCrediProveedor,CveMoneda,Estatus,Correo,BBVAAlias,EstatusPagoElectronico,EstatusPagoElectronicoGrupos,CveSATBanco,ConceptoCIE - 'DdlBancoSat TxtNombreBanco.Text = gvrow.DataKey("BancoNombre") TxtNumeroSucursal.Text = gvrow.DataKey("Sucursal") TxtSWIFT.Text = gvrow.DataKey("SWIFT") @@ -3728,18 +3692,10 @@ Partial Class RH_Personal ChkPagoElectronicoGrupos.Checked = Boolean.Parse(gvrow.DataKey("EstatusPagoElectronicoGrupos").ToString) ChkEstatuscuenta.Checked = If(gvrow.DataKey("EstatusTexto").ToString = "Activo", True, False) - - - 'CveCuentaDeposito,BancoNombre,Sucursal,Cuenta,CLABE,SWIFT,Plaza,CIE,Referencia,RefCrediProveedor,CveMoneda,Estatus,Correo,BBVAAlias,EstatusPagoElectronico,EstatusPagoElectronicoGrupos,CveSATBanco,ConceptoCIE,EstatusTexto - - 'asdasd - UpAddBancos.Update() RegistraScript("$('#DivAddCuentasBancarias').modal();") End Sub Protected Sub GvBancosCuentas_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvBancosCuentas.RowEditing - - GvBancosCuentas.EditIndex = e.NewEditIndex CargaGridCuentasBancos("") End Sub @@ -3747,97 +3703,7 @@ Partial Class RH_Personal GvBancosCuentas.EditIndex = -1 CargaGridCuentasBancos("") End Sub - Protected Sub GvBancosCuentas_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvBancosCuentas.RowUpdating - Dim NombreBanco As String = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtNombreBanco").Text.Trim - Dim NumeroSucursal As String = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtNumeroSucursal").Text.Trim - Dim CLABE As String = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtCLABE").Text.Trim - Dim SWIFT As String = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtSWIFT").Text.Trim - Dim Plaza As String = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtPlaza").Text.Trim - Dim NumeroCuenta As String = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtNumeroCuenta").Text.Trim - Dim ConvenioCIE As String = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtConvenioCIE").Text.Trim - Dim Referencia As String = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtReferencia").Text.Trim - Dim CveMoneda As Integer = GvBancosCuentas.Rows(e.RowIndex).FCDropDownList("DdlMoneda").SelectedValue.ToString().ToEntero() - Dim Estatus As Boolean = GvBancosCuentas.Rows(e.RowIndex).FCCheckBox("ChkEstatus").Checked - Dim EstatusPagoElectronico As Boolean = GvBancosCuentas.Rows(e.RowIndex).FCCheckBox("ChkEstatusPagoE").Checked - Dim Moneda As String = GvBancosCuentas.Rows(e.RowIndex).FCDropDownList("DdlMoneda").SelectedItem.Text - Dim BBVAAlias As String = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtBBVAAlias").Text - Dim RefCrediProveedor As String = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtRefCrediProveedor").Text.Trim - Dim EsBancomer As Boolean = False - - If NombreBanco.ToUpper.Contains("BBVA") Or NombreBanco.ToUpper.Contains("BANCOMER") Or (CLABE.Length = 18 AndAlso CLABE.Substring(0, 3) = "012") Then - EsBancomer = True - End If - - If EsBancomer AndAlso (CLABE.Length = 18 AndAlso Not CLABE.Substring(0, 3) = "012") Then - Alert("La CLABE ingresada no pertenece a BANCOMER.", TipoMensaje.MsgAdvertencia) - Exit Sub - End If - - ''CLABE SIEMPRE OBLIGATORIA CUANDO NO ES BANCOMER CON CIE - 'If (CLABE.Trim.Length <> 18 And Not EsBancomer) Or (EsBancomer And ConvenioCIE.Trim.Length <> 6 And CLABE.Trim.Length <> 18) Then - ' Alert("La CLABE es obligatoria y debe tener una longitud de 18 dígitos. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia) - ' Exit Sub - 'End If - - 'CLABE SIEMPRE OBLIGATORIA SI NO ES BANCOMER - If CLABE.Trim.Length <> 18 And CLABE.Trim.Length = 0 And Not EsBancomer Then - Alert("La CLABE es obligatoria y debe tener una longitud de 18 dígitos. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia) - Exit Sub - End If - - 'SI CUENTA TIENE ALGO Y BANCO BANCOMER DEBE TENER UNA LOGITUD EXACTA DE 10 - If NumeroCuenta.Trim.Length <> 0 AndAlso NumeroCuenta.Trim.Length <> 10 AndAlso EsBancomer Then - Alert("El número de cuenta debe tener una longitud de 10 dígitos. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia) - Exit Sub - End If - - 'SI CLABE TIENE ALGO DEBE TENER UNA LOGITUD EXACTA DE 18 - If CLABE.Trim.Length <> 0 AndAlso CLABE.Trim.Length <> 18 Then - Alert("La CLABE debe tener una longitud de 18 dígitos. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia) - Exit Sub - End If - - 'SI CIE TIENE ALGO DEBE TENER UNA LOGITUD EXACTA DE 6 Y REFERENCIA OBLIGATORIA - If (ConvenioCIE.Trim.Length <> 0 And ConvenioCIE.Trim.Length <> 6) Or (ConvenioCIE.Trim.Length = 6 And Referencia.Trim.Length < 3) Then - Alert("El Convenio CIE debe tener una longitud de 6 dígitos y se debe especificar una referencia. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia) - Exit Sub - End If - - 'CUANDO SEA "BBVA" O "BANCOMER" DEBE TENER "CIE" O "CUENTA" - If EsBancomer AndAlso Not (NumeroCuenta.Trim.Length = 10 Or ConvenioCIE.Trim.Length = 6) Then - Alert("Para cuentas BBVA BANCOMER es obligatorio el Número de Cuenta o CIE.", TipoMensaje.MsgAdvertencia) - Exit Sub - End If - Dim ObjCuentasBancos As New ClsGenerales - If CvePersonal > 0 Then - If ObjCuentasBancos.UpdateCuentasDepositos(GvBancosCuentas.DataKeys(e.RowIndex)("CveCuentaDeposito").ToString().ToEntero(), NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, RefCrediProveedor, False, Estatus, CveMoneda, UsuarioActual.CveEmpresa, CveUsuarioModifico:=UsuarioActual.CveUsuario, BBVAAlias:=BBVAAlias, EstatusPagoElectronico:=EstatusPagoElectronico) Then - DTCuentasBancos.Clear() - DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CvePersonal = {0}", CvePersonal))) - Alert("Cuenta actualizada con exito.", TipoMensaje.MsgInformacion) - - End If - Else - Dim index As Integer = GvBancosCuentas.Rows(e.RowIndex).DataKey("CveCuentaDeposito").ToString().ToEntero() - 1 - Dim Row As DataRow = TempDTCuentasBancos.Rows(index) - Row("BancoNombre") = NombreBanco - Row("Sucursal") = NumeroSucursal - Row("CLABE") = CLABE - Row("SWIFT") = SWIFT - Row("Plaza") = Plaza - Row("Cuenta") = NumeroCuenta - Row("CIE") = ConvenioCIE - Row("Referencia") = Referencia - Row("CveMoneda") = CveMoneda - Row("Moneda") = Moneda - TempDTCuentasBancos.AcceptChanges() - End If - ObjCuentasBancos.Dispose() - - GvBancosCuentas.EditIndex = -1 - CargaGridCuentasBancos("") - CargaGvBitacora() - End Sub Protected Sub GvBancosCuentas_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvBancosCuentas.RowDeleting Dim ObjCuentasBancos As New ClsGenerales From 74a64236f376f9068c16c5c4cf4e4b7a190fd72b Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 16 May 2025 08:03:57 -0700 Subject: [PATCH 06/12] - filtro de aplicapronto pago -- filtro gastos, por proyecto/subproyecto --- App_Code/ClsCompProveedores.vb | 25 ++++++------------------- App_Code/ClsContabilidad.vb | 5 +++-- App_Code/ClsMovimientos.vb | 18 ++++++++++-------- Contabilidad/RepGastosCC.aspx | 10 ++++++++++ Contabilidad/RepGastosCC.aspx.vb | 11 +++++++---- 5 files changed, 36 insertions(+), 33 deletions(-) diff --git a/App_Code/ClsCompProveedores.vb b/App_Code/ClsCompProveedores.vb index 3ffbe0066..2b3e7301e 100644 --- a/App_Code/ClsCompProveedores.vb +++ b/App_Code/ClsCompProveedores.vb @@ -66,6 +66,7 @@ Public Class ClsCompProveedores Public Property DIOTNacionalidad As String Public Property CveRegimenFiscal As Integer = -1 Public Property PorcentajeProntoPago As Decimal = 0D + Public Property AplicaProntoPago As Boolean = False Public Property CveTipoFechaVencimiento As Integer = 1 Public ReadOnly Property DtResultados() As DataTable @@ -303,6 +304,7 @@ Public Class ClsCompProveedores Me.DIOTNacionalidad = Data.Rows(0)("DIOTNacionalidad").ToString Me.CveRegimenFiscal = Data.Rows(0)("CveRegimenFiscal").ToString.ToEntero Me.PorcentajeProntoPago = Data.Rows(0)("PorcentajeProntoPago").ToString.ToDecimal + Me.AplicaProntoPago = Data.Rows(0)("AplicaProntoPago").ToString.ToBool Me.CveTipoFechaVencimiento = Data.Rows(0)("CveTipoFechaVencimiento").ToString.ToEntero End If @@ -321,7 +323,7 @@ Public Class ClsCompProveedores CveProveedorClasificacion As Integer, CveUsuarioResponsable As Integer, NotificarA As String, CorreoCobranza As String, FolioDuplicado As Boolean, CveUsuario As Integer, CveEmpresa As Integer, Optional CveTipoProveedor As Integer = 1, Optional CveMonedaPreferente As Integer = 1, Optional UsaLimiteCredito As Boolean = False, Optional DIOTCveTipoTercero As Integer = -1, Optional DIOTCveTipoOperacion As Integer = -1, Optional DIOTNumeroIDFiscal As String = "", Optional AplicarEvaluacion As Boolean = False, Optional FechaEvaluacion As String = "-1", Optional CicloEvaluacion As Integer = -1, Optional DIOTCvePais As Integer = -1, Optional CveUsuarioEvaluador As Integer = -1, Optional CP As Integer = 0, Optional DIOTNacionalidad As String = "", - Optional CveConfianzaProveedor As Integer = -1, Optional CveRegimenFiscal As Integer = -1, Optional PorcentajeProntoPago As Decimal = 0) As Boolean + Optional CveConfianzaProveedor As Integer = -1, Optional CveRegimenFiscal As Integer = -1, Optional PorcentajeProntoPago As Decimal = 0, Optional AplicaProntoPago As Boolean = False) As Boolean Dim Retorno As Boolean = False @@ -372,6 +374,7 @@ Public Class ClsCompProveedores .Add("@CveConfianzaProveedor", SqlDbType.Int).Value = CveConfianzaProveedor .Add("@CveRegimenFiscal", SqlDbType.TinyInt).Value = CveRegimenFiscal .Add("@PorcentajeProntoPago", SqlDbType.Decimal).Value = PorcentajeProntoPago + .Add("@AplicaProntoPago", SqlDbType.Bit).Value = AplicaProntoPago .Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue End With @@ -407,7 +410,7 @@ Public Class ClsCompProveedores CveProveedorClasificacion As Integer, CveUsuarioResponsable As Integer, Estatus As Boolean, NotificarA As String, CorreoCobranza As String, FolioDuplicado As Boolean, CveProveedor As Integer, Optional CveTipoProveedor As Integer = 1, Optional CveMonedaPreferente As Integer = 1, Optional UsaLimiteCredito As Boolean = False, Optional DIOTCveTipoTercero As Integer = -1, Optional DIOTCveTipoOperacion As Integer = -1, Optional DIOTNumeroIDFiscal As String = "", Optional CveUsuarioModifico As Integer = -1, Optional AplicarEvaluacion As Boolean = False, Optional FechaEvaluacion As String = "-1", Optional CicloEvaluacion As Integer = -1, Optional DIOTCvePais As Integer = -1, Optional CveUsuarioEvaluador As Integer = -1, Optional CP As Integer = 0, Optional DIOTNacionalidad As String = "", - Optional CveConfianzaProveedor As Integer = -1, Optional CveRegimenFiscal As Integer = -1, Optional PorcentajeProntoPago As Decimal = 0) As Boolean + Optional CveConfianzaProveedor As Integer = -1, Optional CveRegimenFiscal As Integer = -1, Optional PorcentajeProntoPago As Decimal = 0, Optional AplicaProntoPago As Boolean = False) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Comp_ProveedorUpdate") @@ -457,26 +460,10 @@ Public Class ClsCompProveedores .Add("@FechaEvaluacion", SqlDbType.VarChar).Value = FechaEvaluacion .Add("@CveUsuarioEvaluador", SqlDbType.Int).Value = CveUsuarioEvaluador - .Add("@CveConfianzaProveedor", SqlDbType.Int).Value = CveConfianzaProveedor .Add("@CveRegimenFiscal", SqlDbType.TinyInt).Value = CveRegimenFiscal .Add("@PorcentajeProntoPago", SqlDbType.Decimal).Value = PorcentajeProntoPago - - ''Proveedores - '.Add("@IdCtaContProveedores", SqlDbType.Int).Value = IdCtaContProveedores - '.Add("@CtaContProveedores", SqlDbType.VarChar).Value = CtaContProveedores - '.Add("@IdCtaContExtranjera", SqlDbType.Int).Value = IdCtaContExtranjera - '.Add("@CtaContExtranjera", SqlDbType.VarChar).Value = CtaContExtranjera - '.Add("@IdCtaContComplementaria", SqlDbType.Int).Value = IdCtaContComplementaria - '.Add("@CtaContComplementaria", SqlDbType.VarChar).Value = CtaContComplementaria - - ''Anticipos - '.Add("@IdCtaContAnticipos", SqlDbType.Int).Value = IdCtaContAnticipos - '.Add("@CtaContAnticipos", SqlDbType.VarChar).Value = CtaContAnticipos - '.Add("@IdCtaContAnticiposExtranjera", SqlDbType.Int).Value = IdCtaContAnticiposExtranjera - '.Add("@CtaContAnticiposExtranjera", SqlDbType.VarChar).Value = CtaContAnticiposExtranjera - '.Add("@IdCtaContAnticiposComplementaria", SqlDbType.Int).Value = IdCtaContAnticiposComplementaria - '.Add("@CtaContAnticiposComplementaria", SqlDbType.VarChar).Value = CtaContAnticiposComplementaria + .Add("@AplicaProntoPago", SqlDbType.Bit).Value = AplicaProntoPago End With diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb index 944f482ba..787cf4be5 100644 --- a/App_Code/ClsContabilidad.vb +++ b/App_Code/ClsContabilidad.vb @@ -5488,14 +5488,15 @@ Public Class ClsContabilidad End Function - Public Function GetGastosRepCC(FechaInicio As DateTime, FechaFin As DateTime, CveEmpresa As Integer) As Boolean + Public Function GetGastosRepCC(FechaInicio As DateTime, FechaFin As DateTime, CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Conta_ReporteGastos") - With SqlAdapter.SelectCommand.Parameters .Add("@FechaInicio", SqlDbType.DateTime).Value = FechaInicio .Add("@FechaFin", SqlDbType.DateTime).Value = FechaFin + .Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto + .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa End With diff --git a/App_Code/ClsMovimientos.vb b/App_Code/ClsMovimientos.vb index 373a3253f..cdc27bcdb 100644 --- a/App_Code/ClsMovimientos.vb +++ b/App_Code/ClsMovimientos.vb @@ -596,7 +596,7 @@ Public Class ClsMovimientos Public Function GetCxPEmpresa(CveProveedor As Integer, FechaVencimientoInicio As String, FechaVencimientoFin As String, CveSubProyecto As Integer, DiasVencidos As Integer, CveUsuarioRegistro As Integer, CveUsuarioProgramo As Integer, CveUsuarioResponsable As Integer, CveClasificacion As Integer, CveMoneda As Integer, CveTipoPagoProgramo As Integer, CveEstatusFactura As Integer, CveAplicaNC As Integer, CveEmpresa As Integer, Optional FechaVI As String = "-1", Optional FechaVF As String = "-1", Optional CodigoProgramacion As String = "-1", Optional CveTipoProveedor As Integer = 0, - Optional AgrupadoPorSubProyecto As Boolean = False, Optional VerEnPesos As Boolean = False) As Boolean + Optional AgrupadoPorSubProyecto As Boolean = False, Optional VerEnPesos As Boolean = False, Optional AplicaProntoPago As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Banc_Proveedores") With SqlAdapter.SelectCommand.Parameters @@ -620,6 +620,7 @@ Public Class ClsMovimientos .Add("@CveTipoProveedor", SqlDbType.TinyInt).Value = CveTipoProveedor .Add("@AgrupadoPorSubProyecto", SqlDbType.Bit).Value = AgrupadoPorSubProyecto .Add("@VerEnPesos", SqlDbType.Bit).Value = VerEnPesos + .Add("@AplicaProntoPago", SqlDbType.Int).Value = AplicaProntoPago End With Try @@ -662,8 +663,6 @@ Public Class ClsMovimientos End With - - Try SqlAdapter.SelectCommand.CommandTimeout = 0 @@ -709,7 +708,8 @@ Public Class ClsMovimientos Optional FechaVI As String = "-1", Optional FechaVF As String = "-1", Optional FechaCorte As Date = Nothing, Optional CveUsuarioConsulta As Integer = -1, Optional CveTipoProveedor As Integer = -1, Optional Comprobaciones As Integer = -1, - Optional TipoDocto As String = "-1", Optional TipoAgrupacion As Integer = -1, Optional CveProyecto As Integer = -1) As Boolean + Optional TipoDocto As String = "-1", Optional TipoAgrupacion As Integer = -1, + Optional CveProyecto As Integer = -1, Optional AplicaProntoPago As Integer = -1) As Boolean Dim Retorno As Boolean = False If FechaCorte = Nothing Then FechaCorte = ClsPaginas.NowADS() @@ -739,8 +739,8 @@ Public Class ClsMovimientos .Add("@Comprobaciones", SqlDbType.Int).Value = Comprobaciones .Add("@TipoDocto", SqlDbType.VarChar).Value = TipoDocto .Add("@TipoAgrupacion", SqlDbType.Int).Value = TipoAgrupacion - .Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto - + .Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto + .Add("@AplicaProntoPago", SqlDbType.Int).Value = AplicaProntoPago End With Try @@ -1338,7 +1338,8 @@ Public Class ClsMovimientos CveEstatusFactura As Integer, Fecha As String, Agrupador As Integer, Opcion As String, CveEmpresa As Integer, CveSucursal As Integer, TipoCambio As Integer, Optional TCEspecifico As Double = -1, Optional FechaVI As String = "-1", Optional FechaVF As String = "1", Optional FechaCorte As Date = Nothing, Optional CveUsuarioConsulta As Integer = -1, Optional CveTipoProveedor As Integer = -1, - Optional Comprobaciones As Integer = -1, Optional AplicaNC As Integer = -1, Optional TipoDocto As String = "-1", Optional CveProyecto As Integer = -1) As Boolean + Optional Comprobaciones As Integer = -1, Optional AplicaNC As Integer = -1, Optional TipoDocto As String = "-1", + Optional CveProyecto As Integer = -1, Optional AplicaProntoPago As Integer = -1) As Boolean Dim Retorno As Boolean = False If FechaCorte = Nothing Then FechaCorte = ClsPaginas.NowADS() @@ -1373,7 +1374,8 @@ Public Class ClsMovimientos .Add("@Comprobaciones", SqlDbType.Int).Value = Comprobaciones .Add("@AplicaNC", SqlDbType.Int).Value = AplicaNC .Add("@TipoDocto", SqlDbType.VarChar).Value = TipoDocto - .Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto + .Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto + .Add("@AplicaProntoPago", SqlDbType.Int).Value = AplicaProntoPago End With Try diff --git a/Contabilidad/RepGastosCC.aspx b/Contabilidad/RepGastosCC.aspx index 9f918e6a6..05c33dbc7 100644 --- a/Contabilidad/RepGastosCC.aspx +++ b/Contabilidad/RepGastosCC.aspx @@ -206,6 +206,16 @@ table.adssigscroll { + Proyecto: +
+ +
+ SubProyecto: +
+ + + +
diff --git a/Contabilidad/RepGastosCC.aspx.vb b/Contabilidad/RepGastosCC.aspx.vb index 90d6291b3..75d8893d6 100644 --- a/Contabilidad/RepGastosCC.aspx.vb +++ b/Contabilidad/RepGastosCC.aspx.vb @@ -21,20 +21,23 @@ Partial Class RepGastosCC #End Region Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not Page.IsPostBack Then - - txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString() txtFechaF.Text = NowADS().ToShortDateString OrdenaDatos() - + CargaCombos() End If End Sub + Private Sub CargaCombos() + CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyecto, divProyecto:=DivProyecto, VisualizacionReporte:=1) + + End Sub + #Region " C A R G A - D A T O S " Public Sub CargaDatos() Dim Obj As New ClsContabilidad - If Obj.GetGastosRepCC(txtFechaI.Text.Trim.ToDate, txtFechaF.Text.Trim().ToDate, UsuarioActual.CveEmpresa) Then + If Obj.GetGastosRepCC(txtFechaI.Text.Trim.ToDate, txtFechaF.Text.Trim().ToDate, DdlProyecto.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then Dim dt As DataTable = Obj.DtResultados If DdlOpcionCuenta.SelectedValue = "2" Then dt = dt.FiltraParametros("Total > 0") From b3659923f0f5dd28c997bdb1b7e0e627370dc09e Mon Sep 17 00:00:00 2001 From: rakcsle Date: Fri, 16 May 2025 09:14:25 -0700 Subject: [PATCH 07/12] VyA Calendario actualziacion de contratos modal no se cierra tras actualizar, ClsContPAQi addProveedor obtenecion de codigo de persona se cambia a obtener de maenra independiente del de Proveedor. --- App_Code/ClsContPAQi.vb | 10 +++++++--- Transportes/RepContratosCalendario.aspx.vb | 7 ++++--- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/App_Code/ClsContPAQi.vb b/App_Code/ClsContPAQi.vb index e905fcd03..438987e7e 100644 --- a/App_Code/ClsContPAQi.vb +++ b/App_Code/ClsContPAQi.vb @@ -776,18 +776,22 @@ Public Class ClsContPAQi StrSQL.Clear() StrSQL.Append(" BEGIN ") StrSQL.Append(" Declare @Tmp INT = 0, @IdPersona INT, @IdDatoExtra INT, ") - StrSQL.Append(" @Codigo VARCHAR(10) = '', @CodigoCuenta VARCHAR(20), @CodigoExtra VARCHAR(20)= ''; ") + StrSQL.Append(" @Codigo VARCHAR(10) = '', @CodigoPersona VARCHAR(10) = '', @CodigoCuenta VARCHAR(20), @CodigoExtra VARCHAR(20)= ''; ") StrSQL.Append(" SELECT @Tmp = MAX(Id) FROM Proveedores P WHERE P.RFC = @RFC; ") StrSQL.Append(" IF ISNULL(@Tmp,0) <= 0 ") StrSQL.Append(" BEGIN ") StrSQL.Append(" SELECT @Codigo = MAX(CAST(Codigo AS INT)) FROM Proveedores WHERE CAST(Codigo AS INT) < 9999; ") StrSQL.Append(" SET @Codigo = CONCAT(replicate(' ',6-Len((@Codigo + 1))),(@Codigo + 1)); ") + StrSQL.Append(" Select @CodigoCuenta = Codigo from Cuentas WHERE Id = @IdCuentaContable; ") StrSQL.Append(" SET @IdProveedor = dbo.FNC_GetCounter ('Id_Proveedor'); ") + StrSQL.Append(" SELECT @CodigoPersona = MAX(CAST(Codigo AS INT)) FROM Personas WHERE CAST(Codigo AS INT) < 9999; ") + StrSQL.Append(" SET @CodigoPersona = CONCAT(replicate(' ',6-Len((@CodigoPersona + 1))),(@CodigoPersona + 1)); ") + StrSQL.Append(" INSERT INTO Proveedores (Id,RowVersion,Codigo,Nombre, RFC,CURP,TipoOperacion,IdCuenta,TimeStamp,TasaIVA15,TasaIVA10,TasaIVA0,TasaIVAExento,TasaIVAOtra1,TasaIVAOtra2,TasaOtra1,TasaOtra2,TasaAsumida,RetencionIVA,RetencionISR,TipoTercero,IdFiscal,NomExtranjero,Pais,Nacionalidad,IdConceptoIETU,TasaIVA16,TasaIVA11,CodigoPersona, CodigoCuenta,EsParaAbonoCta,CodigoCtaComplementaria,CodigoPrepoliza,IdSegNeg,ClaveBanco,Sucursal,CuentaClabe,Referencia) ") - StrSQL.Append(" VALUES (@IdProveedor,555555,@Codigo,@Nombre,@RFC,@CURP,85,@IdCuentaContable,'',0,0,0,0,0,0,0,0,7,0,0,4,'','','','Mexicana',1,1,0, @Codigo, @CodigoCuenta,0,'','',0,'','','',''); ") + StrSQL.Append(" VALUES (@IdProveedor,555555,@Codigo,@Nombre,@RFC,@CURP,85,@IdCuentaContable,'',0,0,0,0,0,0,0,0,7,0,0,4,'','','','Mexicana',1,1,0, @CodigoPersona, @CodigoCuenta,0,'','',0,'','','',''); ") StrSQL.Append(" EXEC PA_UpdateId 'Id_Proveedor';") StrSQL.Append(" ") @@ -800,7 +804,7 @@ Public Class ClsContPAQi StrSQL.Append(" SET @IdPersona = dbo.FNC_GetCounter ('Id_Persona'); ") StrSQL.Append(" INSERT INTO Personas (Id,RowVersion,Codigo,Nombre,RFC,CURP,FechaRegistro,EsCliente,EsProveedor,EsEmpleado,EsAgente,EsPersona,EsBaja,Telefono1,Telefono2,Telefono3,Fax,eMail,PaginaWeb,IdDatoExtra,GenerarPolizaAuto,PosibilidadPago,SistOrig,CodigoAdminPAQ,EsResponsableGasto,CtaContableGasto,PagarDoctosAMismoRFC,GeneraContraCuentaDeudor,IdCategoria,IdSubCategoria) ") - StrSQL.Append(" VALUES (@IdPersona,555555, @Codigo,@Nombre,@RFC,@CURP,GETDATE(),0,1,0,0,0,0,'','','','','','',@IdDatoExtra,0,0,11,'',0,'',0,0,0,0); ") + StrSQL.Append(" VALUES (@IdPersona,555555, @CodigoPersona,@Nombre,@RFC,@CURP,GETDATE(),0,1,0,0,0,0,'','','','','','',@IdDatoExtra,0,0,11,'',0,'',0,0,0,0); ") StrSQL.Append(" EXEC PA_UpdateId 'Id_Persona';") StrSQL.Append(" ") diff --git a/Transportes/RepContratosCalendario.aspx.vb b/Transportes/RepContratosCalendario.aspx.vb index ad0243b62..18c209d4e 100644 --- a/Transportes/RepContratosCalendario.aspx.vb +++ b/Transportes/RepContratosCalendario.aspx.vb @@ -667,9 +667,7 @@ Partial Class RepContratosCalendario resp = ObjFacturaCancelacion.CancelarFactura(0, CancelacionPagos:=CancelacionPagos, ValidarSAT:=False) If resp.HuboError Then TieneError = True - Else - RegistraScript("$('#ModalActualizar').modal('hide');") - Alert("Actualizado Correctamente.") + Alert("Se presento un error al Actualizar el contrato (Cancelación de factura).") End If End If End If @@ -679,8 +677,11 @@ Partial Class RepContratosCalendario If TieneError Then ObjContratos.RollBack() + Alert("Se presento un error al Actualizar el contrato.") Else ObjContratos.Commit() + RegistraScript("$('#ModalActualizar').modal('hide');") + Alert("Contrato Actualizado Correctamente.") End If ObjContratos.Dispose() objGenerales.Dispose() From 57ea78dc4ebf5ee1cbc97c9d3e27762ff3d4aca9 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 16 May 2025 10:51:01 -0700 Subject: [PATCH 08/12] cambios aplicaprontopago --- Bancos/RepProveedoresPagos.aspx.vb | 2 -- Compras/Proveedores.aspx | 1 + Compras/Proveedores.aspx.vb | 6 +++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Bancos/RepProveedoresPagos.aspx.vb b/Bancos/RepProveedoresPagos.aspx.vb index f6b4d7def..7711cb3a5 100644 --- a/Bancos/RepProveedoresPagos.aspx.vb +++ b/Bancos/RepProveedoresPagos.aspx.vb @@ -23,8 +23,6 @@ Partial Class Bancos_RepProveedoresPagos 'DdlUsuarioProgramo.DataBind() CargaUsuariosProgramaron() - - CargaDatos() If UsuarioActual.TienePermisoProceso(84) Then diff --git a/Compras/Proveedores.aspx b/Compras/Proveedores.aspx index 4c7dd8fa6..55ea06663 100644 --- a/Compras/Proveedores.aspx +++ b/Compras/Proveedores.aspx @@ -362,6 +362,7 @@
+
diff --git a/Compras/Proveedores.aspx.vb b/Compras/Proveedores.aspx.vb index cc1892977..6f0088ed6 100644 --- a/Compras/Proveedores.aspx.vb +++ b/Compras/Proveedores.aspx.vb @@ -967,7 +967,7 @@ Partial Class Compras_Proveedores Retorno = True TxtPorcentajeProntoPago.Text = (100 * ObjProveedor.PorcentajeProntoPago).ToString("###.00") - + chkAplicaProntoPago.Checked = ObjProveedor.AplicaProntoPago ' enviaractivacion() CargaEventoBitacora() @@ -1437,7 +1437,7 @@ Partial Class Compras_Proveedores DdlCveClasificacionProveedor.SelectedValue.ToEntero, DdlCveUsuarioResponsable.SelectedValue.ToEntero, TxtNotificarA.Text.Trim, TxtCorreoCobranza.Text.Trim, ChkFolioDuplicado.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlCveTipoProveedor.SelectedValue.ToEntero, DdlMonedaPrefente.SelectedValue.ToEntero, UsaLimiteCredito:=ChkUsaLimiteCredito.Checked, DIOTCveTipoTercero:=DDlDIOTTipoTercero.SelectedValue.ToEntero, DIOTCveTipoOperacion:=DdlDIOTTipoOperacion.SelectedValue.ToEntero, DIOTNumeroIDFiscal:=TxtDIOTNumIDFiscal.Text, AplicarEvaluacion:=AplicarEvaluacion, FechaEvaluacion:=FechaEvaluacion, CicloEvaluacion:=CicloEvaluacion, DIOTCvePais:=DdlDIOTPais.SelectedValue.ToEntero, CveUsuarioEvaluador:=DdlUsuarioEvaluador.SelectedValue.ToEntero(), CP:=TxtCP.Text.ToEntero, DIOTNacionalidad:=TxtDIOTNacionalidad.Text, - CveConfianzaProveedor:=DdlConfianzaProveedor.SelectedValue.ToEntero(), CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero, PorcentajeProntoPago:=PorcentajeProntoPago) Then + CveConfianzaProveedor:=DdlConfianzaProveedor.SelectedValue.ToEntero(), CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero, PorcentajeProntoPago:=PorcentajeProntoPago, AplicaProntoPago:=chkAplicaProntoPago.Checked) Then Dim NuevoCveProveedor As Integer = ObjProveedores.CveProveedor @@ -1548,7 +1548,7 @@ Partial Class Compras_Proveedores DdlCveClasificacionProveedor.SelectedValue.ToEntero, DdlCveUsuarioResponsable.SelectedValue.ToEntero, ChkEstado.Checked, TxtNotificarA.Text.Trim, TxtCorreoCobranza.Text.Trim, ChkFolioDuplicado.Checked, CveProveedor, DdlCveTipoProveedor.SelectedValue.ToEntero, DdlMonedaPrefente.SelectedValue.ToEntero, UsaLimiteCredito:=ChkUsaLimiteCredito.Checked, DIOTCveTipoTercero:=DDlDIOTTipoTercero.SelectedValue.ToEntero, DIOTCveTipoOperacion:=DdlDIOTTipoOperacion.SelectedValue.ToEntero, DIOTNumeroIDFiscal:=TxtDIOTNumIDFiscal.Text, CveUsuarioModifico:=UsuarioActual.CveUsuario, DIOTCvePais:=DdlDIOTPais.SelectedValue.ToEntero, AplicarEvaluacion:=ChkAplicarEvaluacion.Checked, FechaEvaluacion:=FechaEvaluacion, CicloEvaluacion:=CicloEvaluacion, CveUsuarioEvaluador:=DdlUsuarioEvaluador.SelectedValue.ToEntero(), CP:=TxtCP.Text.ToEntero, DIOTNacionalidad:=TxtDIOTNacionalidad.Text, - CveConfianzaProveedor:=DdlConfianzaProveedor.SelectedValue.ToEntero(), CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero, PorcentajeProntoPago:=PorcentajeProntoPago) Then + CveConfianzaProveedor:=DdlConfianzaProveedor.SelectedValue.ToEntero(), CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero, PorcentajeProntoPago:=PorcentajeProntoPago, AplicaProntoPago:=chkAplicaProntoPago.Checked) Then GlobalDTCompProveedores(UsuarioActual.CveEmpresa) = Nothing From b41ab76107219a9bb89a49602d0fa1e6f37a0948 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Fri, 16 May 2025 12:38:05 -0700 Subject: [PATCH 09/12] Correcion Rep Contatos Calendario, CatAF ajuestes, AF esatatus duplciados en ddl, cat AFG impresion con imagen --- AF/AF.aspx.vb | 7 +++--- AF/CatAF.aspx | 26 +++++++++++++++++----- AF/CatAF.aspx.vb | 21 +++++++++++++---- Transportes/RepContratosCalendario.aspx.vb | 3 ++- 4 files changed, 43 insertions(+), 14 deletions(-) diff --git a/AF/AF.aspx.vb b/AF/AF.aspx.vb index 608f2bbdf..03cc2db05 100644 --- a/AF/AF.aspx.vb +++ b/AF/AF.aspx.vb @@ -376,8 +376,8 @@ Partial Class AF_AF InicializaValores() - CargaCombos() - + + If Request("CveActivoFijo") IsNot Nothing AndAlso IsNumeric(Request("CveActivoFijo")) AndAlso Request("CveActivoFijo").ToEntero > 0 Then ViewState("CveActivoFijo") = Request("CveActivoFijo") CargaDatos() @@ -396,7 +396,8 @@ Partial Class AF_AF HlEvento.Visible = True HlEvento.NavigateUrl = String.Format("/OI/PopUpAgenda.aspx?CveTipoEvento=2&CveActivoFijo=" & CveActivoFijo & "&TB_iframe=true&height=370&width=600;") LtlTareaNueva.Text = String.Format(" Tarea", CveActivoFijo) - Else + Else + CargaCombos() ViewState("CveActivoFijo") = -1 diff --git a/AF/CatAF.aspx b/AF/CatAF.aspx index 2e8c340f9..a957b310d 100644 --- a/AF/CatAF.aspx +++ b/AF/CatAF.aspx @@ -205,10 +205,26 @@ -
- " style="display: inline-block; margin-right: -20px; width: 150px;" /> - " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> +
+
+
+ + + Encontrados: + + +
+
+
+
+ " style="display: inline-block; margin-right: -20px; width: 150px;" /> + " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> +
+
+
+ +
@@ -251,9 +267,7 @@ -
- Encontrados: -
+ diff --git a/AF/CatAF.aspx.vb b/AF/CatAF.aspx.vb index 3a448d15c..e348643a4 100644 --- a/AF/CatAF.aspx.vb +++ b/AF/CatAF.aspx.vb @@ -56,7 +56,7 @@ Partial Class AF_CatAF CargaCaracteristicas() If UsuarioActual.CveEmpresa = 13 Then - ChkUltimaImagen.Checked = True + 'ChkUltimaImagen.Checked = True ChkMarcaActivoFijo.Checked = True ChkModeloActivoFijo.Checked = True ChkNoSerie.Checked = True @@ -328,6 +328,7 @@ Partial Class AF_CatAF End If UpGV.Update() + UpTotalRegistros.Update() OrdenaDatos() End Sub @@ -557,10 +558,22 @@ Partial Class AF_CatAF If Archivo.Exists Then Ruta = UsuarioActual.Empresa.Ruta & "Formatos/CatAF.rdlc" - If Not DtActivosFijos.Columns.Contains("UltimaImagen") Then - 'DTAFCaracteristicas. + If Not DtActivosFijos.Columns.Contains("UltimaImagenByte") Then + DtActivosFijos.Columns.Add("UltimaImagenByte", GetType(Byte())) End If + For Each dRow As DataRow In DtActivosFijos.Rows + Dim RutaUltimaImagen As String = dRow("RutaUltimaImagen").ToString() + Dim bytes As Byte() = Nothing + If RutaUltimaImagen.Length > 0 Then + Dim rutaArchivo As System.IO.FileInfo = New IO.FileInfo($"{UsuarioActual.Empresa.Ruta}\{RutaUltimaImagen}") + If rutaArchivo.Exists Then + bytes = System.IO.File.ReadAllBytes(rutaArchivo.FullName) + End If + End If + dRow("UltimaImagenByte") = bytes + Next + Else Ruta = "Empresas/Grales/Formatos/CatAF.rdlc" End If @@ -689,7 +702,7 @@ Partial Class AF_CatAF ChkUltimaImagen.Checked = False If UsuarioActual.CveEmpresa = 13 Then - ChkUltimaImagen.Checked = True + 'ChkUltimaImagen.Checked = True ChkMarcaActivoFijo.Checked = True ChkModeloActivoFijo.Checked = True ChkNoSerie.Checked = True diff --git a/Transportes/RepContratosCalendario.aspx.vb b/Transportes/RepContratosCalendario.aspx.vb index 18c209d4e..0c058efca 100644 --- a/Transportes/RepContratosCalendario.aspx.vb +++ b/Transportes/RepContratosCalendario.aspx.vb @@ -677,12 +677,13 @@ Partial Class RepContratosCalendario If TieneError Then ObjContratos.RollBack() - Alert("Se presento un error al Actualizar el contrato.") + Alert("Se Presento un Error al Actualizar el Contrato.", TipoMensaje.MsgError) Else ObjContratos.Commit() RegistraScript("$('#ModalActualizar').modal('hide');") Alert("Contrato Actualizado Correctamente.") End If + ObjContratos.Dispose() objGenerales.Dispose() ObjVentas.Dispose() From 717db87527ea9ae871159954ca48170345f4320b Mon Sep 17 00:00:00 2001 From: Jorge Luis caudillo esparza Date: Fri, 16 May 2025 13:06:39 -0700 Subject: [PATCH 10/12] ajustes --- Empresas/153/Formatos/Factura.rdlc | 24 +++--- Nomina/Nomina.aspx | 18 +++++ Nomina/Nomina.aspx.cs | 119 ++++++++++++++++++++-------- Nomina/RepMovtosPermanentes.aspx | 12 +++ Nomina/RepMovtosPermanentes.aspx.cs | 6 ++ Nomina/ReportePTU.aspx | 3 +- 6 files changed, 135 insertions(+), 47 deletions(-) diff --git a/Empresas/153/Formatos/Factura.rdlc b/Empresas/153/Formatos/Factura.rdlc index 55e1051f3..985845267 100644 --- a/Empresas/153/Formatos/Factura.rdlc +++ b/Empresas/153/Formatos/Factura.rdlc @@ -1482,6 +1482,18 @@ CP: 83180, Hermosillo,Sonora, México + + + - - -