From a35f348cbbaaac26e805f9cf99a39b457bd2ca6f Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 20 Jun 2025 19:56:41 -0700 Subject: [PATCH 01/42] =?UTF-8?q?-=20limitar=20100=20facturas=20-=20SMS=20?= =?UTF-8?q?--=20comentar=20c=C3=B3digo=20corte?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ventas/ClientesAbonar.aspx.vb | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/Ventas/ClientesAbonar.aspx.vb b/Ventas/ClientesAbonar.aspx.vb index 9fea22034..8a24e0da2 100644 --- a/Ventas/ClientesAbonar.aspx.vb +++ b/Ventas/ClientesAbonar.aspx.vb @@ -439,7 +439,9 @@ Partial Class Ventas_ClientesAbonar TmpCxCAux = Mov.DtResultados.FiltraParametros("Saldo > 0", "Fecha,SerieFolio") SumDescuentoProntoPago = TmpCxCAux.SUM("DescuentoProntoPago") - GvCxC.DataSource = Mov.DtResultados.FiltraParametros("Saldo > 0", "Fecha,SerieFolio") + If UsuarioActual.CveEmpresa = 186 Then TmpCxCAux = TmpCxCAux.AsEnumerable.Take(200).CopyToDataTable() 'Limitar a 100 registros para evitar problemas de rendimiento + + GvCxC.DataSource = TmpCxCAux.FiltraParametros("Saldo > 0", "Fecha,SerieFolio") CveMoneda = pCveMoneda End If @@ -698,20 +700,21 @@ Partial Class Ventas_ClientesAbonar Protected Sub BtnIEGuardar_Click(sender As Object, e As EventArgs) Handles BtnIEGuardar.Click + GenerarPago() 'VERIFICA SI HAY CORTE ANTES DE HACER EL PAGO - If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso CveCorte <= 0 Then - Dim ObjPVenta As New ClsPuntoVenta - If ObjPVenta.GetVta_Cortes(TxtFechaDocumento.Text, TxtFechaDocumento.Text, -1, -1, UsuarioActual.CveEmpresa, -1) Then - DdlCorteCaja.DataSource = ObjPVenta.DtResultados.FiltraParametros($"CveSubProyecto={CveSubProyecto}") - DdlCorteCaja.DataBind() - End If - ObjPVenta.Dispose() - DdlCorteCaja.Items.Insert(0, New ListItem("Seleccione", "-1")) - UpModalCorte.Update() - RegistraScript("$('#ModalCorte').modal({backdrop: 'static', keyboard: false}, 'show')") - Else - GenerarPago() - End If + 'If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso CveCorte <= 0 Then + ' Dim ObjPVenta As New ClsPuntoVenta + ' If ObjPVenta.GetVta_Cortes(TxtFechaDocumento.Text, TxtFechaDocumento.Text, -1, -1, UsuarioActual.CveEmpresa, -1) Then + ' DdlCorteCaja.DataSource = ObjPVenta.DtResultados.FiltraParametros($"CveSubProyecto={CveSubProyecto}") + ' DdlCorteCaja.DataBind() + ' End If + ' ObjPVenta.Dispose() + ' DdlCorteCaja.Items.Insert(0, New ListItem("Seleccione", "-1")) + ' UpModalCorte.Update() + ' RegistraScript("$('#ModalCorte').modal({backdrop: 'static', keyboard: false}, 'show')") + 'Else + ' GenerarPago() + 'End If End Sub Protected Sub BtnGenerarPago_Click(sender As Object, e As EventArgs) Handles BtnGenerarPago.Click From b3d8d5f77879da2f4c6f1a584140eb3d7a7ba048 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 20 Jun 2025 19:59:42 -0700 Subject: [PATCH 02/42] -- filtro proveedor --- Ventas/RepVentasUtilidad.aspx | 22 ++++++++++++------- Ventas/RepVentasUtilidad.aspx.vb | 20 ++++++++++++----- Ventas/RepVentasUtilidadDetalle.aspx | 7 +++++- Ventas/RepVentasUtilidadDetalle.aspx.vb | 29 ++++++++++++++++++------- Ventas/RepVentasUtilidadPadre.aspx | 9 +++++++- Ventas/RepVentasUtilidadPadre.aspx.vb | 14 +++++++----- 6 files changed, 73 insertions(+), 28 deletions(-) diff --git a/Ventas/RepVentasUtilidad.aspx b/Ventas/RepVentasUtilidad.aspx index 1f1d3c39f..6c1579866 100644 --- a/Ventas/RepVentasUtilidad.aspx +++ b/Ventas/RepVentasUtilidad.aspx @@ -201,6 +201,12 @@
+
+ Proveedor: +
+
+ +
@@ -256,15 +262,15 @@ - - - - - - + + + + + + - - + + diff --git a/Ventas/RepVentasUtilidad.aspx.vb b/Ventas/RepVentasUtilidad.aspx.vb index 687557038..220472136 100644 --- a/Ventas/RepVentasUtilidad.aspx.vb +++ b/Ventas/RepVentasUtilidad.aspx.vb @@ -73,6 +73,11 @@ Partial Class Ventas_RepVentasUtilidad 'Carga Productos DdlPS.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1") + DdlProveedores.setEsWebService(True) + DdlProveedores.Attributes.Add("data-metodo", "getproveedores") + DdlProveedores.SelectedText = "Todos" + DdlProveedores.SelectedValue = "-1" + If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then DdlPS.ddlWS.Attributes.Add("data-cveclasificacion", DdlClasificacion.SelectedValue) DdlPS.SelectedText = "Todos" @@ -99,6 +104,7 @@ Partial Class Ventas_RepVentasUtilidad Dim CveCategoria As String = If(Request("CveCategoria") IsNot Nothing AndAlso Request("CveCategoria") <> "", Request("CveCategoria"), "-1").ToString Dim CvePS As String = If(Request("CvePS") IsNot Nothing AndAlso Request("CvePS") <> "", Request("CvePS"), "-1").ToString Dim CveMarca As String = If(Request("CveMarca") IsNot Nothing AndAlso Request("CveMarca") <> "", Request("CveMarca"), "-1").ToString + Dim CveProveedorCompra As Integer = If(Request("CveProveedorCompra") IsNot Nothing AndAlso Request("CveProveedorCompra") <> "", Request("CveProveedorCompra"), "-1").ToString.ToEntero DdlSubProyecto.SelectedValuesIfExistM(CveSubProyecto) DdlVendedor.SelectedValuesIfExistM(CveVendedor) @@ -117,6 +123,11 @@ Partial Class Ventas_RepVentasUtilidad DdlMarcas.SelectedValueExist(CveMarca) + If CveProveedorCompra > 0 Then + DdlProveedores.SelectedValue = CveProveedorCompra.ToString + DdlProveedores.SelectedText = GlobalDTCompProveedores(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedorCompra).FiltroPrimeroValor("RazonSocial", "").ToString + End If + txtFechaI.Text = FechaI txtFechaF.Text = FechaF @@ -164,7 +175,7 @@ Partial Class Ventas_RepVentasUtilidad Dim Sucursales As String = IIf(DdlSubProyecto.GetSelectedValuesM = "", "-1", DdlSubProyecto.GetSelectedValuesM).ToString Dim Vendedores As String = IIf(DdlVendedor.GetSelectedValuesM = "", "-1", DdlVendedor.GetSelectedValuesM).ToString - If ObjVentas.GetReporteVentasUtilidad(Vendedores, DdlClientes.SelectedValue.ToEntero, Sucursales, FechaI, FechaF, UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero, DdlCategoria.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero, DdlMarcas.SelectedValue.ToEntero, -1) Then + If ObjVentas.GetReporteVentasUtilidad(Vendedores, DdlClientes.SelectedValue.ToEntero, Sucursales, FechaI, FechaF, UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero, DdlCategoria.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero, DdlMarcas.SelectedValue.ToEntero, -1, DdlProveedores.SelectedValue.ToEntero) Then DtVentas = ObjVentas.DtResultados GvDatos.DataSource = ObjVentas.DtResultados GvDatos.DataBind() @@ -244,9 +255,8 @@ Partial Class Ventas_RepVentasUtilidad e.Row.Cells(15).ToolTip = "Factura sin pago registrado" End If - - Dim Liga As String = String.Format("/Ventas/RepVentasUtilidadDetalle.aspx?CveVenta={0}&CveVendedor={1}&FechaI={2:d}&FechaF={3:d}&CveCliente={4}&Orden={5}&CveSubProyecto={6}&CvePS={7}&CveClasificacion={8}", - e.Row.DBCampo("CveVenta"), e.Row.DBCampo("CveVendedor"), e.Row.DBCampo("FechaI").ToDate, e.Row.DBCampo("FechaF").ToDate, e.Row.DBCampo("CveCliente"), e.Row.DBCampo("Orden"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CvePS"), e.Row.DBCampo("CveClasificacion")) + Dim Liga As String = String.Format("/Ventas/RepVentasUtilidadDetalle.aspx?CveVenta={0}&CveVendedor={1}&FechaI={2:d}&FechaF={3:d}&CveCliente={4}&Orden={5}&CveSubProyecto={6}&CvePS={7}&CveClasificacion={8}&CveMarca={9}&CveProveedorCompra={10}", + e.Row.DBCampo("CveVenta"), e.Row.DBCampo("CveVendedor"), e.Row.DBCampo("FechaI").ToDate, e.Row.DBCampo("FechaF").ToDate, e.Row.DBCampo("CveCliente"), e.Row.DBCampo("Orden"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CvePS"), e.Row.DBCampo("CveClasificacion"), -1, e.Row.DBCampo("CveProveedorCompra")) e.Row.FCHyperLink("HLCosto").NavigateUrl = Liga e.Row.FCHyperLink("HlGanancia").NavigateUrl = Liga e.Row.FCHyperLink("HlPorGanancia").NavigateUrl = Liga @@ -316,7 +326,7 @@ Partial Class Ventas_RepVentasUtilidad Dim Sucursales As String = IIf(DdlSubProyecto.GetSelectedValuesM = "", "-1", DdlSubProyecto.GetSelectedValuesM).ToString Dim Vendedores As String = IIf(DdlVendedor.GetSelectedValuesM = "", "-1", DdlVendedor.GetSelectedValuesM).ToString - If ObjVentas.GetReporteVentasUtilidad(Vendedores, DdlClientes.SelectedValue.ToEntero, Sucursales, FechaI, FechaF, UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero, DdlCategoria.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero, DdlMarcas.SelectedValue.ToEntero, -1) Then + If ObjVentas.GetReporteVentasUtilidad(Vendedores, DdlClientes.SelectedValue.ToEntero, Sucursales, FechaI, FechaF, UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero, DdlCategoria.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero, DdlMarcas.SelectedValue.ToEntero, -1, DdlProveedores.SelectedValue.ToEntero) Then Dim FechaInicio As String = txtFechaI.Text Dim FechaFin As String = txtFechaF.Text diff --git a/Ventas/RepVentasUtilidadDetalle.aspx b/Ventas/RepVentasUtilidadDetalle.aspx index dc2597cf4..0c916ed82 100644 --- a/Ventas/RepVentasUtilidadDetalle.aspx +++ b/Ventas/RepVentasUtilidadDetalle.aspx @@ -216,7 +216,12 @@
- +
+ Proveedor: +
+
+ +
diff --git a/Ventas/RepVentasUtilidadDetalle.aspx.vb b/Ventas/RepVentasUtilidadDetalle.aspx.vb index dda14fbed..82d5ab49d 100644 --- a/Ventas/RepVentasUtilidadDetalle.aspx.vb +++ b/Ventas/RepVentasUtilidadDetalle.aspx.vb @@ -98,6 +98,7 @@ Partial Class Ventas_RepVentasUtilidadDetalle Orden = IfNull(Request("Orden"), "-1").ToString.ToEntero CvePS = IfNull(Request("CvePS"), "-1").ToString.ToEntero CveClasificacion = IfNull(Request("CveClasificacion"), "-1").ToString.ToEntero + CargaCombos() CargaDatos() @@ -122,9 +123,9 @@ Partial Class Ventas_RepVentasUtilidadDetalle Private Sub CargaCombos() 'Carga Clientes - DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa) - DdlClientes.DataBind() - If CveCliente > 0 Then DdlClientes.SelectedValueExist(CveCliente) + 'DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa) + 'DdlClientes.DataBind() + 'If CveCliente > 0 Then DdlClientes.SelectedValueExist(CveCliente) 'CargaSubProyectos DdlSubProyecto.DataSource = GlobalDTSubProyectos(UsuarioActual.CveEmpresa) @@ -140,6 +141,11 @@ Partial Class Ventas_RepVentasUtilidadDetalle DdlVendedor.Enabled = False End If + DdlProveedores.setEsWebService(True) + DdlProveedores.Attributes.Add("data-metodo", "getproveedores") + DdlProveedores.SelectedText = "Todos" + DdlProveedores.SelectedValue = "-1" + 'Carga Productos DdlPS.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1") @@ -158,14 +164,21 @@ Partial Class Ventas_RepVentasUtilidadDetalle DdlMarcas.DataBind() DdlMarcas.Items.Insert(0, New ListItem("Todas", "-1")) + Dim CveProveedorCompra As Integer = If(Request("CveProveedorCompra") IsNot Nothing AndAlso Request("CveProveedorCompra") <> "", Request("CveProveedorCompra"), "-1").ToString.ToEntero + + If CveProveedorCompra > 0 Then + DdlProveedores.SelectedValue = CveProveedorCompra.ToString + DdlProveedores.SelectedText = GlobalDTCompProveedores(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedorCompra).FiltroPrimeroValor("RazonSocial", "").ToString + End If + 'Cargo Clasificaciones DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa) DdlClasificacion.DataBind() DdlClasificacion.SelectedValueExist(CveClasificacion) DdlPS.SelectedValue = CvePS.ToString - If CvePS.ToEntero > 0 AndAlso GlobalDTPS(UsuarioActual.CveEmpresa, CvePS.ToEntero).Rows.Count > 0 Then - DdlPS.SelectedText = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS.ToEntero).Rows(0)("PSCodigo").ToString + If CvePS.ToEntero > 0 AndAlso GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS.ToEntero).Rows.Count > 0 Then + DdlPS.SelectedText = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS.ToEntero).Rows(0)("PSCodigo").ToString Else DdlPS.SelectedText = "Todos" End If @@ -178,7 +191,7 @@ Partial Class Ventas_RepVentasUtilidadDetalle Dim Vendedores As String = IIf(DdlVendedor.GetSelectedValuesM = "", "-1", DdlVendedor.GetSelectedValuesM).ToString If ObjVentas.GetReporteVentasUtilidadDetalle(Vendedores, If(CveVenta = -1, Orden, CveVenta), DdlClientes.SelectedValue.ToEntero, Sucursales, - FechaI, FechaF, UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero, -1, DdlClasificacion.SelectedValue.ToEntero, DdlMarcas.SelectedValue.ToEntero, -1) Then + FechaI, FechaF, UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero, -1, DdlClasificacion.SelectedValue.ToEntero, DdlMarcas.SelectedValue.ToEntero, -1, DdlProveedores.SelectedValue.ToEntero) Then DtVentas = ObjVentas.DtResultados GvDatos.DataSource = ObjVentas.DtResultados GvDatos.DataBind() @@ -299,7 +312,7 @@ Partial Class Ventas_RepVentasUtilidadDetalle Dim Sucursales As String = IIf(DdlSubProyecto.GetSelectedValuesM = "", "-1", DdlSubProyecto.GetSelectedValuesM).ToString Dim Vendedores As String = IIf(DdlVendedor.GetSelectedValuesM = "", "-1", DdlVendedor.GetSelectedValuesM).ToString If ObjVentas.GetReporteVentasUtilidadDetalle(Vendedores, CveVenta, DdlClientes.SelectedValue.ToEntero, Sucursales, - FechaI, FechaF, UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero, -1, DdlClasificacion.SelectedValue.ToEntero, DdlMarcas.SelectedValue.ToEntero, -1) Then + FechaI, FechaF, UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero, -1, DdlClasificacion.SelectedValue.ToEntero, DdlMarcas.SelectedValue.ToEntero, -1, DdlProveedores.SelectedValue.ToEntero) Then Dim FechaInicio As String = txtFechaI.Text Dim FechaFin As String = txtFechaF.Text @@ -357,7 +370,7 @@ Partial Class Ventas_RepVentasUtilidadDetalle Dim Sucursales As String = IIf(DdlSubProyecto.GetSelectedValuesM = "", "-1", DdlSubProyecto.GetSelectedValuesM).ToString Dim Vendedores As String = IIf(DdlVendedor.GetSelectedValuesM = "", "-1", DdlVendedor.GetSelectedValuesM).ToString If ObjVentas.GetReporteVentasUtilidadDetalle(Vendedores, CveVenta, DdlClientes.SelectedValue.ToEntero, Sucursales, - FechaI, FechaF, UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero, -1, DdlClasificacion.SelectedValue.ToEntero, DdlMarcas.SelectedValue.ToEntero, -1) Then + FechaI, FechaF, UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero, -1, DdlClasificacion.SelectedValue.ToEntero, DdlMarcas.SelectedValue.ToEntero, -1, DdlProveedores.SelectedValue.ToEntero) Then Dim FechaInicio As String = txtFechaI.Text Dim FechaFin As String = txtFechaF.Text diff --git a/Ventas/RepVentasUtilidadPadre.aspx b/Ventas/RepVentasUtilidadPadre.aspx index f46aebd0c..f73dec580 100644 --- a/Ventas/RepVentasUtilidadPadre.aspx +++ b/Ventas/RepVentasUtilidadPadre.aspx @@ -136,6 +136,7 @@ + @@ -200,6 +201,12 @@ +
+ Proveedor: +
+
+ +
@@ -243,7 +250,7 @@ DataKeyNames="" CssClass="table table-advance table-hover Widthall ScrollAD" data-sort="true" GridLines="None" Width="100%" OnRowDataBound="GvDatos_RowDataBound"> - + <%-- diff --git a/Ventas/RepVentasUtilidadPadre.aspx.vb b/Ventas/RepVentasUtilidadPadre.aspx.vb index 9b41dca55..0ca159b91 100644 --- a/Ventas/RepVentasUtilidadPadre.aspx.vb +++ b/Ventas/RepVentasUtilidadPadre.aspx.vb @@ -2,7 +2,6 @@ Option Strict On Imports System.Data -Imports System.Drawing Imports Extensiones Imports Microsoft.Reporting.WebForms Partial Class Ventas_RepVentasUtilidadPadre @@ -82,6 +81,11 @@ Partial Class Ventas_RepVentasUtilidadPadre DdlSubProyecto.DataSource = GlobalDTSubProyectos(UsuarioActual.CveEmpresa) DdlSubProyecto.DataBind() + DdlProveedores.setEsWebService(True) + DdlProveedores.Attributes.Add("data-metodo", "getproveedores") + DdlProveedores.SelectedText = "Todos" + DdlProveedores.SelectedValue = "-1" + 'Carga Vendedor DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa) DdlVendedor.DataBind() @@ -161,7 +165,7 @@ Partial Class Ventas_RepVentasUtilidadPadre If ObjVentas.GetReportePadreVentasUtilidad(If(DdlVendedor.GetSelectedValuesM = "", "-1", DdlVendedor.GetSelectedValuesM), DdlClientesWS.SelectedValue.ToEntero, If(DdlSubProyecto.GetSelectedValuesM = "", "-1", DdlSubProyecto.GetSelectedValuesM), txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, DdlPS.SelectedValue.ToEntero, DdlCategoria.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero, - DdlMarcas.SelectedValue.ToEntero, DdlGarantia.SelectedValue.ToEntero, DdlFilial.SelectedValue.ToEntero) Then + DdlMarcas.SelectedValue.ToEntero, DdlGarantia.SelectedValue.ToEntero, DdlFilial.SelectedValue.ToEntero, DdlProveedores.SelectedValue.ToEntero) Then GvDatos.DataSource = ObjVentas.DtResultados DtDatos = ObjVentas.DtResultados End If @@ -276,9 +280,9 @@ Partial Class Ventas_RepVentasUtilidadPadre e.Row.CssClass = "Totales" e.Row.Cells(0).Text = "Total" Dim Css As String = "Texto" - Dim Liga As String = String.Format("/Ventas/RepVentasUtilidad.aspx?FechaI={0}&FechaF={1}&CveSubProyecto={2}&CveCliente={3}&CveVendedor={4}&Gpo={5}&CveGpo={6}&CvePS={7}&CveClasificacion={8}&CveMarca={9}&CveCategoria={10}", + Dim Liga As String = String.Format("/Ventas/RepVentasUtilidad.aspx?FechaI={0}&FechaF={1}&CveSubProyecto={2}&CveCliente={3}&CveVendedor={4}&Gpo={5}&CveGpo={6}&CvePS={7}&CveClasificacion={8}&CveMarca={9}&CveCategoria={10}&CveProveedorCompra={11}", e.Row.DBCampo("FechaI"), e.Row.DBCampo("FechaF"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveVendedor"), - e.Row.DBCampo("Grupo"), e.Row.DBCampo("GPO"), e.Row.DBCampo("CvePS"), e.Row.DBCampo("CveClasificacion"), e.Row.DBCampo("CveMarca"), e.Row.DBCampo("CveCategoria")) + e.Row.DBCampo("Grupo"), e.Row.DBCampo("GPO"), e.Row.DBCampo("CvePS"), e.Row.DBCampo("CveClasificacion"), e.Row.DBCampo("CveMarca"), e.Row.DBCampo("CveCategoria"), e.Row.DBCampo("CveProveedorCompra")) e.Row.Cells(0).Text = String.Format("{2}", Css, Liga, e.Row.Cells(0).Text) 'e.Row.Cells(3).Text = @@ -358,7 +362,7 @@ Partial Class Ventas_RepVentasUtilidadPadre If TxtModalFechaInicio.Text = "" Then FechaI = MinFecha If TxtModalFechaFin.Text = "" Then FechaF = MaxFecha - If ObjVentas.GetReporteVentasUtilidad("-1", -1, "-1", FechaI, FechaF, UsuarioActual.CveEmpresa, -1, -1, -1, -1, -1) Then + If ObjVentas.GetReporteVentasUtilidad("-1", -1, "-1", FechaI, FechaF, UsuarioActual.CveEmpresa, -1, -1, -1, -1, -1, -1) Then GvPorcentajes.DataSource = ObjVentas.DtResultados.FiltraParametros($" CveVenta > 0 AND PorNeto <= {TxtModalPorcentaje.Text.ToDecimal} AND TipoDocto = 'Ing' AND CveEstatusFactura IN(2,3) ") End If From 550c35ab5c9bdffed6ad4e9a3956b28f0ad47dc5 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 20 Jun 2025 20:00:12 -0700 Subject: [PATCH 03/42] - --- App_Code/ClsVentas.vb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index f6abba49c..68f28fc66 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -3431,7 +3431,7 @@ Public Class ClsVentas Return Retorno End Function - Public Function GetReporteVentasUtilidad(CveVendedor As String, CveCliente As Integer, CveSubProyecto As String, FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, CvePS As Integer, CveCategoria As Integer, CveClasificacion As Integer, CveMarca As Integer, EsGarantia As Integer) As Boolean + Public Function GetReporteVentasUtilidad(CveVendedor As String, CveCliente As Integer, CveSubProyecto As String, FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, CvePS As Integer, CveCategoria As Integer, CveClasificacion As Integer, CveMarca As Integer, EsGarantia As Integer, CveProveedorCompra As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_VentasUtilidadGet") @@ -3447,6 +3447,7 @@ Public Class ClsVentas .Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion .Add("@CveMarca", SqlDbType.Int).Value = CveMarca .Add("@EsGarantia", SqlDbType.Int).Value = EsGarantia + .Add("@CveProveedorCompra", SqlDbType.Int).Value = CveProveedorCompra End With Try @@ -3461,7 +3462,7 @@ Public Class ClsVentas Return Retorno End Function - Public Function GetReporteVentasUtilidadDetalle(CveVendedor As String, CveVenta As Integer, CveCliente As Integer, CveSubProyecto As String, FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, CvePS As Integer, CveCategoria As Integer, CveClasificacion As Integer, CveMarca As Integer, EsGarantia As Integer) As Boolean + Public Function GetReporteVentasUtilidadDetalle(CveVendedor As String, CveVenta As Integer, CveCliente As Integer, CveSubProyecto As String, FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, CvePS As Integer, CveCategoria As Integer, CveClasificacion As Integer, CveMarca As Integer, EsGarantia As Integer, CveProveedorCompra As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_VentasUtilidadDetalleGet") With SqlAdapter.SelectCommand.Parameters @@ -3477,6 +3478,7 @@ Public Class ClsVentas .Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion .Add("@CveMarca", SqlDbType.Int).Value = CveMarca .Add("@EsGarantia", SqlDbType.Int).Value = EsGarantia + .Add("@CveProveedorCompra", SqlDbType.Int).Value = CveProveedorCompra End With Try @@ -3495,7 +3497,7 @@ Public Class ClsVentas Return Retorno End Function Public Function GetReportePadreVentasUtilidad(CveVendedor As String, CveCliente As Integer, CveSubProyecto As String, FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, Gpo As Integer, - CvePS As Integer, CveCategoria As Integer, CveClasificacion As Integer, CveMarca As Integer, EsGarantia As Integer, EsFilial As Integer) As Boolean + CvePS As Integer, CveCategoria As Integer, CveClasificacion As Integer, CveMarca As Integer, EsGarantia As Integer, EsFilial As Integer, CveProveedorCompra As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_RepVentasUtilidadGet") @@ -3513,6 +3515,7 @@ Public Class ClsVentas .Add("@CveMarca", SqlDbType.Int).Value = CveMarca .Add("@EsGarantia", SqlDbType.Int).Value = EsGarantia .Add("@EsFilial", SqlDbType.Int).Value = EsFilial + .Add("@CveProveedorCompra", SqlDbType.Int).Value = CveProveedorCompra End With Try SqlAdapter.SelectCommand.CommandTimeout = 0 From 16c960d83f4f5d7146dd560a67ed92296d94136f Mon Sep 17 00:00:00 2001 From: JPerez Date: Sat, 21 Jun 2025 11:37:03 -0700 Subject: [PATCH 04/42] --Aumentar fecha de pago 2 dias --- Ventas/ClientesAbonar.aspx.vb | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/Ventas/ClientesAbonar.aspx.vb b/Ventas/ClientesAbonar.aspx.vb index 9fea22034..0d45e4dd2 100644 --- a/Ventas/ClientesAbonar.aspx.vb +++ b/Ventas/ClientesAbonar.aspx.vb @@ -241,7 +241,12 @@ Partial Class Ventas_ClientesAbonar Me.CveCorte = CargaCorteCaja(-1, UsuarioActual) End If - RVTxtFechaDocumento.MaximumValue = NowADS().ToString("dd/MM/yyyy") + If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then + RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(2).ToString("dd/MM/yyyy") + Else + RVTxtFechaDocumento.MaximumValue = NowADS().ToString("dd/MM/yyyy") + End If + If UsuarioActual.CveEmpresa.Contiene(13, 83, 158) Then LnkAccionesModalSeleccionLayout.Visible = True End If @@ -2893,9 +2898,13 @@ Partial Class Ventas_ClientesAbonar End Sub Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init - RVTxtFechaDocumento.MaximumValue = NowADS().ToShortDateString - Calendario.EndDate = NowADS() - + If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then + RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(2).ToShortDateString + Calendario.EndDate = NowADS().AddDays(2) + Else + RVTxtFechaDocumento.MaximumValue = NowADS().ToShortDateString + Calendario.EndDate = NowADS() + End If End Sub From e08203f92d437f96b19059e219bcfa50ed14c1fe Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 21 Jun 2025 13:40:19 -0700 Subject: [PATCH 05/42] -- activar para seleccionar AF --- Contabilidad/RegPrePolizaS.aspx | 11 ++++++++++- Contabilidad/RegPrePolizaS.aspx.vb | 30 ++++++++++++++++++++++++++---- 2 files changed, 36 insertions(+), 5 deletions(-) diff --git a/Contabilidad/RegPrePolizaS.aspx b/Contabilidad/RegPrePolizaS.aspx index 10eedf997..fc6eca015 100644 --- a/Contabilidad/RegPrePolizaS.aspx +++ b/Contabilidad/RegPrePolizaS.aspx @@ -436,7 +436,7 @@
+ DataKeyNames="CvePrePolizaDetalle,CvePrePoliza,IdMov, CveConceptoContable, CveSubProyecto, CveTipoGasto,Referencia,CveVenta,CveCompra, CveProveedor, CveCliente, CvePersonal, CveCuenta, PorcentajeImpuesto,TipoMovto,EsComplementaria,EsMonedaExtranjera,Concepto,CveClasificacion,ContadoCuenta,ContadoTipoTransaccion,ContadoNumeroFolio,ContadoBeneficiario,ContadoObservaciones,ContadoImporte,TC,ImporteME,ImporteMN,Cargo,Abono,CveIE,CveActivoFijo,Modificado" Width="100%" > Movimiento @@ -744,6 +744,15 @@
+
+
Activo Fijo:
+
+ + + +
+
+
Venta:
diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb index 3df41ca1e..4c510b87b 100644 --- a/Contabilidad/RegPrePolizaS.aspx.vb +++ b/Contabilidad/RegPrePolizaS.aspx.vb @@ -392,6 +392,7 @@ Partial Class ContabilidadC_RegPrePolizaS .Add("CveCompra", Type.GetType("System.Int32")) .Add("CveCliente", Type.GetType("System.Int32")) .Add("CveVenta", Type.GetType("System.Int32")) + .Add("CveActivoFijo", Type.GetType("System.Int32")) .Add("CveIE", Type.GetType("System.Int32")) .Add("CveClasificacion", Type.GetType("System.Int32")) .Add("MultipleSubProyecto", Type.GetType("System.Boolean")) @@ -1097,7 +1098,7 @@ Partial Class ContabilidadC_RegPrePolizaS CvePersonal:=gvr.DataKey("CvePersonal").ToEntero, CveClasificacion:=gvr.DataKey("CveClasificacion").ToEntero, ImporteME:=ImporteME, TipoCambio:=TipoCambio, CveTipoGasto:=tCveTipoGasto, - CveCliente:=gvr.DataKey("CveCliente").ToEntero, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveCuenta:=tCveCuenta, PorcentajeImpuesto:=gvr.DataKey("PorcentajeImpuesto").ToDecimal) Then + CveCliente:=gvr.DataKey("CveCliente").ToEntero, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveActivoFijo:=gvr.DataKey("CveActivoFijo").ToEntero, CveCuenta:=tCveCuenta, PorcentajeImpuesto:=gvr.DataKey("PorcentajeImpuesto").ToDecimal) Then ContRegInsertados = ContRegInsertados + 1 Else @@ -1502,6 +1503,13 @@ Partial Class ContabilidadC_RegPrePolizaS DvModalconceptoCliente.Visible = False End If + If AplicaActivoFijo Then + CargaActivosFijos() + DvModalConceptoActivoFijo.Visible = True + Else + DvModalConceptoActivoFijo.Visible = False + End If + If AplicaBancos AndAlso Not AplicaComplementaria Then TxtCargoE.AutoPostBack = True TxtAbonoE.AutoPostBack = True @@ -1530,6 +1538,8 @@ Partial Class ContabilidadC_RegPrePolizaS Else DivMonedaExtranjera.Visible = False End If + + CargaCuentaConcepto(CveConceptoContableInsertar) End If @@ -1626,6 +1636,15 @@ Partial Class ContabilidadC_RegPrePolizaS DdlClasificacionesE.DataBind() DdlClasificacionesE.Items.Insert(0, New ListItem(" - ", "-1")) End Sub + + Private Sub CargaActivosFijos() + DdlAF.Items.Clear() + DdlAF.DataSource = GlobalDTActivoFijos(UsuarioActual.CveEmpresa) + DdlAF.DataBind() + 'DdlAF.setEsWebService(True) + 'DdlAF.Attributes.Add("data-metodo", "getcliente") + + End Sub Private Sub DdlProveedoresE_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlProveedoresE.SelectedIndexChanged CargaComprasE(DdlProveedoresE.SelectedValue.ToEntero, HdnCveCompra.Value.ToEntero) End Sub @@ -1743,6 +1762,7 @@ Partial Class ContabilidadC_RegPrePolizaS dr("CvePersonal") = DdlPersonalE.SelectedValue.ToEntero dr("CveCliente") = DdlClientesE.SelectedValue.ToEntero dr("CveVenta") = DdlVentasE.SelectedValue.ToEntero + dr("CveActivoFijo") = DdlAF.SelectedValue.ToEntero dr("FolioFactura") = If(DdlComprasE.Visible = True AndAlso DdlComprasE.SelectedItem IsNot Nothing, DdlComprasE.SelectedItem.ToString, If(DdlVentasE.Visible = True AndAlso DdlVentasE.SelectedItem IsNot Nothing, DdlVentasE.SelectedItem.ToString, "")) dr("Modificado") = True dr("TC") = TxtTipoCambio.Text.ToDecimal @@ -1861,6 +1881,7 @@ Partial Class ContabilidadC_RegPrePolizaS dr("CveClasificacion") = -1 dr("CveCliente") = DdlClientes.SelectedValue.ToEntero dr("CveVenta") = DdlVentas.SelectedValue.ToEntero + dr("CveActivoFijo") = DdlAF.SelectedValue.ToEntero End If GvMov.DataSource = DtMovimientos GvMov.DataBind() @@ -1888,6 +1909,7 @@ Partial Class ContabilidadC_RegPrePolizaS dr("CvePersonal") = DdlPersonal.SelectedValue.ToEntero dr("CveCliente") = DdlClientes.SelectedValue.ToEntero dr("CveVenta") = DdlVentas.SelectedValue.ToEntero + dr("CveActivoFijo") = DdlAF.SelectedValue.ToEntero TxtTotalAbonos.Text = (TxtTotalAbonos.Text.ToDecimal + TxtAbono.Text.ToDecimal).ToString.FormatoNumero TxtTotalCargos.Text = (TxtTotalCargos.Text.ToDecimal + TxtCargo.Text.ToDecimal).ToString.FormatoNumero @@ -1932,6 +1954,7 @@ Partial Class ContabilidadC_RegPrePolizaS dr("CveClasificacion") = -1 dr("CveCliente") = DdlClientes.SelectedValue.ToEntero dr("CveVenta") = DdlVentas.SelectedValue.ToEntero + dr("CveActivoFijo") = DdlAF.SelectedValue.ToEntero TxtTotalAbonos.Text = (TxtTotalAbonos.Text.ToDecimal + TxtAbono.Text.ToDecimal).ToString.FormatoNumero TxtTotalCargos.Text = (TxtTotalCargos.Text.ToDecimal + TxtCargo.Text.ToDecimal).ToString.FormatoNumero @@ -1942,9 +1965,7 @@ Partial Class ContabilidadC_RegPrePolizaS GvMov.DataBind() UPMovs.Update() Actualizar = False - End If - End If TxtCargo.Text = "" @@ -2125,6 +2146,7 @@ Partial Class ContabilidadC_RegPrePolizaS 'DdlClientes.txtText.Value = DrM("CveCliente").ToString DdlVentas.SelectedValueExist(DrM("CveVenta").ToString) + DdlAF.SelectedValueExist(DrM("CveActivoFijo").ToString) LbCancelarEdicion.Visible = True LbAgregar.Text = "Actualizar" @@ -2566,7 +2588,6 @@ Partial Class ContabilidadC_RegPrePolizaS DtMovimientos.Clear() Exit For End If - End If If CveConceptoContable = 69 Then @@ -2596,6 +2617,7 @@ Partial Class ContabilidadC_RegPrePolizaS dr("CveClasificacion") = CveClasificacion dr("CveCliente") = -1 dr("CveVenta") = -1 + dr("CveActivoFijo") = -1 dr("CveCuenta") = CveCuentaExcel dr("CveTipoGasto") = -1 dr("CvePrePolizaDetalle") = -1 From 687e1560dd69d41bd31d43e3c55f8e5b0a3d49da Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 21 Jun 2025 13:40:33 -0700 Subject: [PATCH 06/42] -- JAM. solo niveles 1y2 --- Contabilidad/ContabilidadElectronica.aspx | 12 ++++++++++-- Contabilidad/ContabilidadElectronica.aspx.vb | 11 ++++++++--- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/Contabilidad/ContabilidadElectronica.aspx b/Contabilidad/ContabilidadElectronica.aspx index bae52ac34..a07808b12 100644 --- a/Contabilidad/ContabilidadElectronica.aspx +++ b/Contabilidad/ContabilidadElectronica.aspx @@ -18,7 +18,7 @@
-
+
@@ -81,7 +81,15 @@
- +
+
+
+ + Información: + +
+
+
diff --git a/Contabilidad/ContabilidadElectronica.aspx.vb b/Contabilidad/ContabilidadElectronica.aspx.vb index 637c36959..e63a0d6b2 100644 --- a/Contabilidad/ContabilidadElectronica.aspx.vb +++ b/Contabilidad/ContabilidadElectronica.aspx.vb @@ -109,12 +109,11 @@ Partial Class Contabilidad_ContabilidadElectronica DtCuentas = ObjConpaq.DtResultados End If ObjConpaq.Dispose() - End If If DtCuentas IsNot Nothing AndAlso DtCuentas.Rows.Count > 0 Then - Dim Str As New StringBuilder + Dim Str As New StringBuilder 'CABECERA Str.Append("") Str.Append(" 0 Then - Dim Str As New StringBuilder + If UsuarioActual.CveEmpresa = 119 Then + DtCuentas = DtCuentas.FiltraParametros("Nivel IN (1,2) ") + End If + Dim Str As New StringBuilder 'CABECERA Str.Append("") Str.Append(" Date: Sat, 21 Jun 2025 13:40:58 -0700 Subject: [PATCH 07/42] -- ajustes --- Contabilidad/RepBalanzaComprobacion.aspx.vb | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Contabilidad/RepBalanzaComprobacion.aspx.vb b/Contabilidad/RepBalanzaComprobacion.aspx.vb index c8b5a5d7e..675c620ff 100644 --- a/Contabilidad/RepBalanzaComprobacion.aspx.vb +++ b/Contabilidad/RepBalanzaComprobacion.aspx.vb @@ -6,7 +6,6 @@ Imports System.Data Imports Extensiones Imports Microsoft.Reporting.WebForms Imports ClosedXML.Excel -Imports Profact.TimbraCFDI40 Imports System.IO Imports System.Drawing Imports System.Web.Services @@ -434,12 +433,12 @@ Partial Class Contabilidad2_RepBalanzaComprobacion Dim ultimaFila As DataRow = DtDatos.Rows(DtDatos.Rows.Count - 1) - Dim LastSaldoID As Decimal = ultimaFila("SaldoID").ToString.ToDecimal - Dim LastTotalAbonos As Decimal = ultimaFila("TotalAbonos").ToString.ToDecimal - Dim LastTotalCargos As Decimal = ultimaFila("TotalCargos").ToString.ToDecimal - Dim LastSaldoAD As Decimal = ultimaFila("SaldoAD").ToString.ToDecimal - Dim LastSaldoIA As Decimal = ultimaFila("SaldoIA").ToString.ToDecimal - Dim LastSaldoAA As Decimal = ultimaFila("SaldoAA").ToString.ToDecimal + Dim LastSaldoID As Decimal = ultimaFila("SaldoICargo").ToString.ToDecimal + Dim LastTotalAbonos As Decimal = ultimaFila("Abonos").ToString.ToDecimal + Dim LastTotalCargos As Decimal = ultimaFila("Cargos").ToString.ToDecimal + Dim LastSaldoAD As Decimal = ultimaFila("SaldoFCargo").ToString.ToDecimal + Dim LastSaldoIA As Decimal = ultimaFila("SaldoIAbono").ToString.ToDecimal + Dim LastSaldoAA As Decimal = ultimaFila("SaldoFAbono").ToString.ToDecimal WSReporte.Cell(CuerrentRow, 2).Value = "Sumas Iguales" WSReporte.Cell(CuerrentRow, 3).Value = LastSaldoID From f1b7b6e7cf77861a7fa13421e64352b23986e0be Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 21 Jun 2025 13:41:58 -0700 Subject: [PATCH 08/42] --- en imprimri, quitar las ceuntas de origen "_global,_pasivo..." --- Contabilidad/CatCuentas.aspx.vb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Contabilidad/CatCuentas.aspx.vb b/Contabilidad/CatCuentas.aspx.vb index 8f1a26856..9ba380fa8 100644 --- a/Contabilidad/CatCuentas.aspx.vb +++ b/Contabilidad/CatCuentas.aspx.vb @@ -740,8 +740,9 @@ Partial Class Contabilidad2_CatCuentas Dim params As New List(Of ReportParameter) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) + Dim dtt As DataTable = DtDatos.Copy().FiltraParametros(" Codigo NOT IN ('_ACTIVO','_BPASIVO','_CAPITAL','_UTILIDAD','_RACREEDOR','_RDEUDOR','_CUADRE','_PASIVO','_ORDEN') ") - ImprimirPDF("Empresas/Grales/Formatos/Cuentas.rdlc", DtDatos, params, "Cuentas", Formato) + ImprimirPDF("Empresas/Grales/Formatos/Cuentas.rdlc", dtt, params, "Cuentas", Formato) 'ImprimirPDFStimul("Empresas/Grales/Formatos/Cuentas.mrt", DtDatos, params, NombreArchivo:="Cuentas", RDSName:="Cuentas", Formato:=Formato) Else Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia) From 1897cae7ad4684ef511e94d3d1453edb655f7a45 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 21 Jun 2025 13:42:45 -0700 Subject: [PATCH 09/42] - --- OS/OrdenesServicios.aspx.vb | 40 ++++++++++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 9 deletions(-) diff --git a/OS/OrdenesServicios.aspx.vb b/OS/OrdenesServicios.aspx.vb index 367f50a7d..e616d5fbc 100644 --- a/OS/OrdenesServicios.aspx.vb +++ b/OS/OrdenesServicios.aspx.vb @@ -343,8 +343,8 @@ Partial Class OS_OrdenesServicios CargaPS(-1, DdlPSDetalle) CargaPsMateriales() 'CargaClasificaciones() - CargaPSCaracteristicasOpciones() - CargaCuentasCaracteristicas() + 'CargaPSCaracteristicasOpciones() + 'CargaCuentasCaracteristicas() CargaAlmacen() CargaModelos() @@ -847,14 +847,13 @@ Partial Class OS_OrdenesServicios If Row("Estatus").ToString = "Activo" Then Estatus = True Else Estatus = False If Row("SeSuperviso").ToString = "Sí" Then SeSuperviso = True Else SeSuperviso = False - CargaMaterialesDetalle(CveOsDetalle, IDOSDetalle, IDOSDetalle) For Each R As DataRow In TmpDTMaterialesDetalle.FiltraParametros(String.Format("CveConsecutivoDetalle = {0}", IDOSDetalle)).Rows If Materiales = "-1" Then Materiales = "" Else Materiales = Materiales + "
" Materiales = Materiales + String.Format("{0} {1}", R("Cantidad").ToString, R("PS").ToString) Next - CargaEspecificaciones(CveOsDetalle, IDOSDetalle, IDOSDetalle) + 'CargaEspecificaciones(CveOsDetalle, IDOSDetalle, IDOSDetalle) For Each R As DataRow In TmpDTCaracteristica.FiltraParametros(String.Format("CveConsecutivoDetalle = {0}", IDOSDetalle)).Rows If Especificaciones = "-1" Then Especificaciones = "" Else Especificaciones = Especificaciones + "," Especificaciones = Especificaciones + String.Format("{0}:{1}:{2}:{3}:{4}:{5}", R("CveCaracteristica").ToString, R("Caracteristica").ToString, R("CveCaracteristicaTipo"), R("CveOpcion").ToString, R("Opcion").ToString, R("Valor").ToString) @@ -3112,11 +3111,20 @@ Partial Class OS_OrdenesServicios '---------------- FIN VALIDACIONES ----------------- - Dim CveAlmacenActual As Integer = DTSolicitudDev.FiltroPrimeroValor("CveAlmacenActual").ToEntero + 'Validación solo para que no sean uso de material + Dim ValidaPU As String = "" + If Not DdlTipoVenta.SelectedValue.Contiene("5") Then ValidaPU = "PU > 0" + + Dim CveAlmacenActual As Integer = DTSolicitudDev.FiltroPrimeroValor("CveAlmacenActual", ValidaPU).ToEntero 'PU>0, para indicar que solo los productos que no se han retornado. Dim CveMoneda As Integer = DTSolicitudDev.FiltroPrimeroValor("CveMoneda").ToEntero Dim CveVentaPedido As Integer = DTSolicitudDev.FiltroPrimeroValor("CveVenta").ToEntero Dim CveVentaRemisionGenerada As Integer = -1 + If CveAlmacenActual <= 0 Then + Alert("No se pudo determinar el almacen del material", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + Dim ObjV As New ClsVentas Dim ObjOS As New ClsOS(ObjV.IniciaTransacSQL()) Dim ObjInventario As New ClsInventarios(ObjV.IniciaTransacSQL()) @@ -3774,6 +3782,11 @@ Partial Class OS_OrdenesServicios Protected Sub BtnCancelar_Click(sender As Object, e As EventArgs) + CancelarOS() + + End Sub + + Private Sub CancelarOS() Dim CveEstatusOrdenServicioCancelacion As Integer = GlobalDTEstatusOrdenServicios(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveEstatusOrdenServicio", " TipoEstatus = 5 ").ToEntero Dim CveAlmacenDevolucion As Integer Dim CveMotivoCancelacion As Integer = GlobalDTMotivosCancelacionEmpresa(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveMotivoCancelacion", "CveSATMotivoCancelacion IN (3)").ToEntero @@ -3836,7 +3849,6 @@ Partial Class OS_OrdenesServicios Catch ex As Exception Alert("Se presento un error al cancelar la orden de servicio") End Try - End Sub Private Sub CancelarRemision(CveVenta As Integer, CveAlmacenDevolucion As Integer, CvePedido As Integer) @@ -3848,6 +3860,12 @@ Partial Class OS_OrdenesServicios Exit Sub End If + 'If DdlTipoVenta.SelectedValue.Contiene("5", "6") Then + ' CancelarOS() 'uso de material + ' Exit Sub + 'End If + + Dim ObjFacturaCancelacion As New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, EsCancelacion:=True, VerificaAlmacen:=True) Try Dim resp As Modelos.Factura.MCancelacionVentaMensaje = Nothing @@ -3869,7 +3887,7 @@ Partial Class OS_OrdenesServicios Dim HuboError As Boolean = False If Not resp.HuboError Then - If resp.CveEstatus = 12 Then + If resp.CveEstatus.Contiene(12) Then '12 - Rem - Cancelado, 14 - Pedido - cancelado Dim cveoo As Integer = GlobalDTEstatusOrdenServicios(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveEstatusOrdenServicio", $" TipoEstatus = 3").ToEntero If objos.UpdateOrdenesServiciosEstatus(cveoo, UsuarioActual.CveUsuario, CveOS) Then 'retornar el estatus de la OS, @@ -3879,9 +3897,13 @@ Partial Class OS_OrdenesServicios Else HuboError = True End If + ElseIf resp.CveEstatus.Contiene(14) Then ' 14 - Pedido - cancelado + If Not ObjVenta.UpdateVentasDevolucionAlmacen(1, CvePedido) Then + HuboError = True + End If Else - 'si tiene pagos - HuboError = True + + HuboError = True 'si tiene pagos End If Else HuboError = True From ffd8d2c46026fc215e64e0360063d2cdcc18c85c Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 21 Jun 2025 13:43:20 -0700 Subject: [PATCH 10/42] -- codigo para bloquear --- LogIn.aspx.vb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/LogIn.aspx.vb b/LogIn.aspx.vb index 9668b363a..27f68ba2f 100644 --- a/LogIn.aspx.vb +++ b/LogIn.aspx.vb @@ -201,6 +201,12 @@ Partial Class LogIn Usuario = Nothing End If + ''código temporal para bloquear accesos a empresas. + 'If Usuario IsNot Nothing AndAlso Usuario.CveEmpresa.Contiene(13, 83, 199, 201) Then + ' Alert(" this site can't be reached

refused to connect.

ERR_CONNECTION_REFUSED

", TipoMensaje.MsgError) + ' Usuario = Nothing + ' End If + If Usuario IsNot Nothing Then '' consideración especial, para el Grupo Adsistemas If Usuario.CveUsuario.Contiene(2, 93, 1537, 1538, 1360) Then 'JM,RM,OI,JP,JC cambia la cuenta por la de un admin Dim tUsuario As Usuario = ObjUsuario.GetUsuarioDetalle(100, Usuario.CveEmpresa) 'ObjUsuario.ValidaUsuario(txtUsuario.Text, Encripta(TxtContraseña.Text.Trim), GrupoEmpresa:=tGrupoEmpresa) From 76eb69e38171762ee89fadbe01d310611b7e35b4 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 21 Jun 2025 13:43:58 -0700 Subject: [PATCH 11/42] - --- Ashx/CargaEventos.ashx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Ashx/CargaEventos.ashx b/Ashx/CargaEventos.ashx index 0cd9c804a..f8f22edd8 100644 --- a/Ashx/CargaEventos.ashx +++ b/Ashx/CargaEventos.ashx @@ -60,15 +60,20 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState Dim CveClienteSucursal As Integer = -1 ' DdlClienteSucursalSucursal() Dim CveVendedor As Integer = If(context.Request("CveVendedor") IsNot Nothing, context.Request("CveVendedor").ToEntero, -1) Dim CveEstatus As Integer = -1 - Dim ObjOS As New ClsOS - + Dim ObjOS As New ClsOS + + If CveVendedor > 0 AndAlso CveUsuarioPara = -1 Then + Dim tcveu As Integer = ClsPaginas.GlobalDTUsuarios(-1, CveEmpresa).FiltroPrimeroValor("CveUsuario", $"CveVendedor = {CveVendedor}").ToEntero + CveUsuarioPara = tcveu + End If + If ObjOS.GetRepOrdenesServicioMedicasRep(FechaI, FechaF, Cvecliente, CveVendedor, CveEstatus, CveUsuarioPara, -1, CveEmpresa, CveMedico:=-1, CveProcedimiento:=-1, CveEspecialidad:=-1, CveClienteSucursal:=CveClienteSucursal, CveUsuario:=CveUsuario) Then If ObjOS.DtResultados IsNot Nothing AndAlso ObjOS.DtResultados.Rows.Count > 0 Then events = New List(Of CalendarEvent) - For Each dr As DataRow In ObjOS.DtResultados.Rows + For Each dr As DataRow In ObjOS.DtResultados.FiltraParametros("CveOS > 0").Rows Dim cevent As CalendarEvent = New CalendarEvent() cevent.id = dr("CveOS").ToString.ToEntero cevent.title = $" {dr("Tecnico")}-{dr("NombreCliente")}" From 20eb9a7140146f9295bac5df5b612874e505f71d Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 21 Jun 2025 13:44:36 -0700 Subject: [PATCH 12/42] -- cambios en registro de kiosko --- Ashx/E140.ashx | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/Ashx/E140.ashx b/Ashx/E140.ashx index 2445fbc2c..6926a6820 100644 --- a/Ashx/E140.ashx +++ b/Ashx/E140.ashx @@ -178,7 +178,7 @@ Public Class E140 : Implements IHttpHandler, IRequiresSessionState Dim TieneError As Boolean = False Dim CveSubProyecto As String = "11790" Dim JsonRequest As JObject = Nothing - + Dim Bitac As New StringBuilder If context.Request.InputStream IsNot Nothing Then Using reader As New StreamReader(context.Request.InputStream) Dim json = reader.ReadToEnd @@ -190,7 +190,7 @@ Public Class E140 : Implements IHttpHandler, IRequiresSessionState End If End Using End If - + Bitac.AppendLine("Inicio Pago ") Dim UsuarioActual As Usuario = ValidaUsuarioSistema(100, CveEmpresa) Dim data As New JArray Dim dtt As New DataTable @@ -204,7 +204,7 @@ Public Class E140 : Implements IHttpHandler, IRequiresSessionState Dim pCveVenta As Integer = JsonRequest("cveventa").ToString.ToEntero Dim Referencia As String = "" 'validaciones - + Bitac.AppendLine("Validaciones Pago 1.0") Dim ObjVenta As New ClsVentas() Dim ObjClientes As New ClsClientes If ObjVenta.GetVenta(pCveVenta, CveEmpresa) Then @@ -228,6 +228,7 @@ Public Class E140 : Implements IHttpHandler, IRequiresSessionState VentaRemision.PorcentajeIVA = dr("PorcentajeIVA").ToString.ToDecimal VentaRemision.CveSubProyecto = dr("CveSubProyecto").ToString.ToEntero + Bitac.AppendLine("Crear Nueva 1.0") Dim ObjFactura = Modelos.Factura.CrearVentaNueva(UsuarioActual, VentaRemision.CveSubProyecto, VentaRemision.CveCliente, VentaRemision.CveMoneda, "Ing") ObjFactura.CveMoneda = VentaRemision.CveMoneda ObjFactura.CveVendedor = dr("CveVendedor").ToString.ToEntero @@ -258,15 +259,15 @@ Public Class E140 : Implements IHttpHandler, IRequiresSessionState If CvePrePoliza > 0 Then 'registro de venta y pago - + Bitac.AppendLine("Emitir 1.0") Dim Retorno As Modelos.Factura.MMensajeFactura = Nothing - Retorno = ObjFactura.EmitirFactura(False, Transac:=ObjVentas.IniciaTransacSQL(), Modulo:="Cobranza/GuardarVenta", MostrarURL:=True) + Retorno = ObjFactura.EmitirFactura(False, Transac:=ObjVentas.IniciaTransacSQL(), Modulo:="Kiosko140/GuardarVenta", MostrarURL:=True) Retorno.Factura = ObjFactura If Retorno IsNot Nothing AndAlso Retorno.CveVenta > 0 Then VentaRemision.CveVenta = ObjFactura.CveVenta 'Respuesta.data = Retorno.SerieFolio - + Bitac.AppendLine("Venta Registada") If TieneError Then Dim sb As New StringBuilder() For Each msg As String In Retorno.Mensajes @@ -274,6 +275,7 @@ Public Class E140 : Implements IHttpHandler, IRequiresSessionState Next RespuestaError.message = sb.ToString() End If + Bitac.AppendLine("Inicia Registro IE") '11- tdd, 12-tdc Dim CveIE As Integer = ObjIE.AddBancos_IE(CveCuentaBancaria, CveTipoTransaccion, FechaPago, "-1", "", ImportePago, VentaRemision.CveMoneda, VentaRemision.TC, "", "", False, True, -1, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) @@ -288,20 +290,25 @@ Public Class E140 : Implements IHttpHandler, IRequiresSessionState Pago.ImportePago = ImportePago Pago.ImportePagoVenta = ImportePago Pago.Referencia = Referencia - + Bitac.AppendLine("IE Registrado") If MsgError = "" AndAlso ClsPaginas.AplicaPrePolizaPagoVenta(VentaRemision, Pago, CvePrePoliza, ObjConta) Then MsgError = "No se pudo insertar la póliza" End If Else MsgError = "No se pudo insertar el pago" + Bitac.AppendLine("IE NO Registrado") End If Else TieneError = True MsgError = "Falta información para completar la venta." + Bitac.AppendLine("Venta NO Registrado - ") + Bitac.AppendLine(Retorno.Mensajes(0)) End If End If + Bitac.AppendLine("Registrados") + If Not TieneError Then - Dim bytesPDF As Byte() = DescargarFactura(ObjFactura.SerieFolio, CveEmpresa, ObjFactura.CveVenta) 'ClsPaginas.PdfFactura(ObjFactura, AplicaPagare:="0", Guardar:=True, RegenerarQR:=True, EsTicket:=False) + Dim bytesPDF As Byte() = Nothing ' DescargarFactura(ObjFactura.SerieFolio, CveEmpresa, ObjFactura.CveVenta) 'ClsPaginas.PdfFactura(ObjFactura, AplicaPagare:="0", Guardar:=True, RegenerarQR:=True, EsTicket:=False) 'generar el pdf y mandarlo Dim objretorno As New JObject( @@ -313,12 +320,15 @@ Public Class E140 : Implements IHttpHandler, IRequiresSessionState Respuesta.data = data ObjConta.RollBack() 'ObjConta.Commit() + Bitac.AppendLine("Completado.") Else ObjConta.RollBack() + Bitac.AppendLine("NO Completado.") End If ObjConta.Dispose() ObjIE.Dispose() End If + Bitac.ToString.GuardaLog End If ObjVenta.Dispose() ObjClientes.Dispose() From 99d14e495fb5543e4ac3194e3914c9fdda92aa6d Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 21 Jun 2025 13:45:17 -0700 Subject: [PATCH 13/42] -- si el importe =0, no se reigstra en saldos iniciales SIG --- General/SaldosIniciales.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/General/SaldosIniciales.aspx.vb b/General/SaldosIniciales.aspx.vb index cc8b458b0..36d0bbeb0 100644 --- a/General/SaldosIniciales.aspx.vb +++ b/General/SaldosIniciales.aspx.vb @@ -2632,7 +2632,7 @@ Partial Class General_SaldosIniciales ' CargoAbono = False 'End If - If YaExiste = False AndAlso Afectable Then + If YaExiste = False AndAlso Afectable AndAlso Importe <> 0 Then If IdCuenta > 0 Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, Importe, 95, "", Concepto, CveSubProyecto:=CveSubProyecto, CveCuenta:=IdCuenta) Then TieneError = True From 3e8bddd0312b70752004a79b2a9fdbc2890a7ab8 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 21 Jun 2025 13:47:32 -0700 Subject: [PATCH 14/42] - --- Ventas/CatMedicos.aspx.vb | 58 +++++++++++++++++++++++---------------- 1 file changed, 34 insertions(+), 24 deletions(-) diff --git a/Ventas/CatMedicos.aspx.vb b/Ventas/CatMedicos.aspx.vb index cbf1d8755..01126181c 100644 --- a/Ventas/CatMedicos.aspx.vb +++ b/Ventas/CatMedicos.aspx.vb @@ -2,6 +2,8 @@ Option Strict On Imports Extensiones +Imports ADSNetLibrary.SIGAPI.Models.CRM.Request +Imports ADSNetLibrary.SIGAPI.Services.CRM Partial Class Ventas_CatMedicos Inherits ClsPaginas @@ -18,8 +20,6 @@ Partial Class Ventas_CatMedicos End Set End Property - - Public Property CveMedicoEspecialidad As Integer Get If ViewState("CveMedicoEspecialidad") Is Nothing Then @@ -50,24 +50,49 @@ Partial Class Ventas_CatMedicos If Not Page.IsPostBack Then + If (Request("CveEmpresaCRM") IsNot Nothing) Then + ' ICRMService CRMService = New CRMService(System.Configuration.ConfigurationManager.ConnectionStrings["Conexion"].ConnectionString) + 'RequestEmpresasCRM parametros = New RequestEmpresasCRM(UsuarioActual.CveEmpresa, CveEmpresaCRM); + 'var objServicio = cRMService.GetEmpresasCRM(parametros); + 'If (objServicio.Result.Count > 0) Then + ' { + ' EsEditar = True; + ' LblEncabezadoEmpresa.Text = String.Format("Consulta de la Empresa: {0}", objServicio.Result[0].Empresa); + ' TxtNombreEmpresa.Text = objServicio.Result[0].Empresa; + ' TxtRFC.Text = objServicio.Result[0].RFC; + ' DdlTipoProceso2.SelectedValueExist(objServicio.Result[0].CveTipoProceso); + ' CargaMetodosCaptacion(); + ' TxtCorreoEmpresaCRM.Text = objServicio.Result[0].Correo; + ' DdlMedioCaptacion.SelectedValueExist(objServicio.Result[0].CveMedioCaptacion); + ' CveEncuestaAplicada = objServicio.Result[0].CveEncuestaAplicada > 0 ? objServicio.Result[0].CveEncuestaAplicada.ToEntero() : -1; + ' CveVendedor = objServicio.Result[0].CveVendedorAsignado.ToEntero(); + ' CveSubProyecto = objServicio.Result[0].CveSubProyecto.ToEntero(); + ' CveCliente = objServicio.Result[0].CveCliente.ToEntero(); + ' CveGiroClasificacion = objServicio.Result[0].CveGiroClasificacion > 0 ? objServicio.Result[0].CveGiroClasificacion.ToEntero() : -1; + ' If (!(CveCliente > 0)) Then + ' { + ' HplCrearCliente.Visible = True; + ' HplCrearCliente.NavigateUrl = String.Format("/Ventas/Clientes.aspx?CveEmpresaCRM={0}", CveEmpresaCRM); + ' If (UsuarioActual.Empresa.Funcionalidad(578) == "1") Then + ' { + ' HplCrearCliente.Text = "Crear Médico"; + ' HplCrearCliente.NavigateUrl = String.Format("/Ventas/CatMedicos.aspx?CveEmpresaCRM={0}", CveEmpresaCRM); + ' } + ' } + + RegistraScript("$('#DvModalAddMedico').modal({ backdrop: 'static', keyboard: false });") + End If CargaCombos() CargaDatos() BtnConsultar_Click(Nothing, Nothing) - - - End If - End Sub - Public Sub CargaDatos() - Dim ObjVentas As New ClsVentas - If ObjVentas.GetMedicos(-1, UsuarioActual.CveEmpresa, -1) Then If UsuarioActual.CveVendedor > 0 Then @@ -75,23 +100,15 @@ Partial Class Ventas_CatMedicos Else GvDatos.DataSource = ObjVentas.DtResultados End If - - - Else GvDatos.DataSource = Nothing End If ObjVentas.Dispose() - GvDatos.DataBind() - ValidaExcelTab() - UpDatos.Update() - - End Sub 'Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click @@ -166,8 +183,6 @@ Partial Class Ventas_CatMedicos End Sub #End Region - - Public Sub LnkAgregarMedico_Click(sender As Object, e As EventArgs) AddMedicoControl.CveMedico = -1 @@ -188,8 +203,6 @@ Partial Class Ventas_CatMedicos - - 'TxtMedico.Text = GvRow.DataKey("Medico") 'TxtCedulaProfecional.Text = GvRow.DataKey("CedulaProfesional") 'TxtFechaNacimiento.Text = GvRow.DataKey("FechaNacimiento").ToDate().ToString("dd/MM/yyyy") @@ -239,8 +252,6 @@ Partial Class Ventas_CatMedicos DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1")) End If - - txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString txtFechaF.Text = NowADS().ToShortDateString @@ -254,7 +265,6 @@ Partial Class Ventas_CatMedicos Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) - Dim objVentas As New ClsVentas Dim CveVendedor As Integer = If(UsuarioActual.CveVendedor > 0, UsuarioActual.CveVendedor, -1) Dim CveCliente As Integer = If(DdlClientes.SelectedValue.ToEntero > 0, DdlClientes.SelectedValue.ToEntero, -1) From 213708e773dab2f54b161fdc90f5cc2bb22d44a9 Mon Sep 17 00:00:00 2001 From: JPerez Date: Sat, 21 Jun 2025 13:49:41 -0700 Subject: [PATCH 15/42] --FORMATOS DE TEXTO --- Contabilidad/RepIVA.aspx.cs | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/Contabilidad/RepIVA.aspx.cs b/Contabilidad/RepIVA.aspx.cs index 679812716..2ddf94156 100644 --- a/Contabilidad/RepIVA.aspx.cs +++ b/Contabilidad/RepIVA.aspx.cs @@ -393,7 +393,33 @@ public partial class Contabilidad_RepIVA : ClsPaginas if (k > 0) { bool flag = true; - excelWorksheet.Columns[k + 1].Style.NumberFormat = "#,##0.00"; + switch (NombreHoja) + { + case "IVA Trasladado": + //FECHAS,FOLIOS, NUM CUENTA + if (!excelWorksheet.Columns[k + 1].Name.Contiene("B","L","C","P","Q")) + { + excelWorksheet.Columns[k + 1].Style.NumberFormat = "#,##0.00"; + } + break; + case "IVA Acreditable": + //FECHAS,FOLIOS, NUM CUENTA + if (!excelWorksheet.Columns[k + 1].Name.Contiene("D","E","Y","Z","AA","AB")) + { + excelWorksheet.Columns[k + 1].Style.NumberFormat = "#,##0.00"; + } + //FOLIO BANCARIO + if (excelWorksheet.Columns[k + 1].Name.Contiene("AA","AB")) + { + excelWorksheet.Columns[k + 1].Style.NumberFormat = "0"; + excelWorksheet.Columns[k + 1].Style.HorizontalAlignment = HorizontalAlignmentStyle.Left; + } + break; + default: + break; + } + + try { excelWorksheet.Columns[k].AutoFit(1.0); From b81600f0283236cf2a0d859654b768c840cf15e0 Mon Sep 17 00:00:00 2001 From: Jorge Luis caudillo esparza Date: Mon, 23 Jun 2025 07:10:34 -0700 Subject: [PATCH 16/42] Nomina --- App_Code/ClsNominas.vb | 8 ++++++++ App_Code/ClsPaginas.vb | 10 ++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/App_Code/ClsNominas.vb b/App_Code/ClsNominas.vb index b4d3bd9eb..b510c1cf2 100644 --- a/App_Code/ClsNominas.vb +++ b/App_Code/ClsNominas.vb @@ -35,6 +35,10 @@ Public Class ClsNominas Public Property FolioSolicitud As Integer + Public Property SalarioDiario As Double + Public Property SDI As Double + Public Property SBC As Double + Public Property RegistroPatronal As String Public Property SerieFolio As String @@ -1102,6 +1106,10 @@ Public Class ClsNominas Me.CveUsuario = Data.Rows(0)("CveUsuario").ToString.ToEntero Me.Usuario = Data.Rows(0)("Usuario").ToString Me.CveEmpresa = Data.Rows(0)("CveEmpresa").ToString.ToEntero + Me.SalarioDiario = Data.Rows(0)("SalarioDiario").ToString.ToDecimal() + Me.SDI = Data.Rows(0)("SDI").ToString.ToDecimal() + Me.SBC = Data.Rows(0)("SBC").ToString.ToDecimal() + End If Retorno = True Catch ex As Exception diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 072a970f2..bde7ef85f 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -8521,12 +8521,10 @@ Public Class ClsPaginas Departamento = drow("NomRDepartamento").ToString() Puesto = drow("NomRPuesto").ToString() End If - RptParametro.Add(New ReportParameter("SalarioBase", SalarioDiario)) - RptParametro.Add(New ReportParameter("SalarioDiarioInt", SDI)) - RptParametro.Add(New ReportParameter("Departamento", Departamento)) - RptParametro.Add(New ReportParameter("Puesto", Puesto)) 'DATOS NOMINA If ObjNomina.GetNom_Nominas(CveNomina, CvePersonal, CvePeriodo, 1, CveEmpresa) Then + SalarioDiario = ObjNomina.SalarioDiario.ToString + SDI = ObjNomina.SDI.ToString RptParametro.Add(New ReportParameter("ReciboNomina", ObjNomina.Folio.ToString)) RptParametro.Add(New ReportParameter("Serie", ObjNomina.Serie)) RptParametro.Add(New ReportParameter("Fecha", ObjNomina.Fecha.ToString)) @@ -8544,6 +8542,10 @@ Public Class ClsPaginas Else TieneError = True End If + RptParametro.Add(New ReportParameter("SalarioBase", SalarioDiario)) + RptParametro.Add(New ReportParameter("SalarioDiarioInt", SDI)) + RptParametro.Add(New ReportParameter("Departamento", Departamento)) + RptParametro.Add(New ReportParameter("Puesto", Puesto)) Else TieneError = True End If From 10aae8be27cb09453e26bc20e3dc3e2d984bae17 Mon Sep 17 00:00:00 2001 From: Jorge Luis caudillo esparza Date: Mon, 23 Jun 2025 07:28:58 -0700 Subject: [PATCH 17/42] reprotede nominas --- Nomina/ReportedeAcumulados.aspx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Nomina/ReportedeAcumulados.aspx b/Nomina/ReportedeAcumulados.aspx index f846f0ce2..c71418404 100644 --- a/Nomina/ReportedeAcumulados.aspx +++ b/Nomina/ReportedeAcumulados.aspx @@ -337,6 +337,13 @@ + + Días Pagados + + + + + Días IMSS From 091efee79264085c44d2c7630e7bf9d19092b9ac Mon Sep 17 00:00:00 2001 From: Jorge Luis caudillo esparza Date: Mon, 23 Jun 2025 07:31:33 -0700 Subject: [PATCH 18/42] acum --- Nomina/ReportedeAcumulados.aspx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Nomina/ReportedeAcumulados.aspx b/Nomina/ReportedeAcumulados.aspx index c71418404..f6af883fd 100644 --- a/Nomina/ReportedeAcumulados.aspx +++ b/Nomina/ReportedeAcumulados.aspx @@ -340,7 +340,7 @@ Días Pagados - + From 71a602f51f94bc01cd24ab1013bb1088848f4cd8 Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 23 Jun 2025 13:11:02 -0700 Subject: [PATCH 19/42] =?UTF-8?q?--=20activaci=C3=B3n=20de=20cveAF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Contabilidad/RegPrePolizaS.aspx | 2 +- Contabilidad/RegPrePolizaS.aspx.vb | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/Contabilidad/RegPrePolizaS.aspx b/Contabilidad/RegPrePolizaS.aspx index fc6eca015..0a7ab5eb8 100644 --- a/Contabilidad/RegPrePolizaS.aspx +++ b/Contabilidad/RegPrePolizaS.aspx @@ -317,7 +317,7 @@
diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb index 4c510b87b..2f2481421 100644 --- a/Contabilidad/RegPrePolizaS.aspx.vb +++ b/Contabilidad/RegPrePolizaS.aspx.vb @@ -1100,7 +1100,6 @@ Partial Class ContabilidadC_RegPrePolizaS CveTipoGasto:=tCveTipoGasto, CveCliente:=gvr.DataKey("CveCliente").ToEntero, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveActivoFijo:=gvr.DataKey("CveActivoFijo").ToEntero, CveCuenta:=tCveCuenta, PorcentajeImpuesto:=gvr.DataKey("PorcentajeImpuesto").ToDecimal) Then ContRegInsertados = ContRegInsertados + 1 - Else MsgError = "No se pudo insertar el detalle de la póliza2" Exit For @@ -1152,7 +1151,6 @@ Partial Class ContabilidadC_RegPrePolizaS ObjContabilidad.IniciaTransacSQL() Try - Dim Retorno As Boolean = ObjContabilidad.UpdatePrePoliza(MinFecha, -1, DdlTipoPoliza.SelectedValue.ToEntero, -1, CvePrePoliza, UsuarioActual.CveEmpresa, Concepto:=TxtConcepto.Text, FechaPoliza:=TxtFechaDocumento.Text.ToDate, CveUsuarioModifico:=UsuarioActual.CveUsuario) If Retorno Then @@ -1195,7 +1193,7 @@ Partial Class ContabilidadC_RegPrePolizaS CveConceptoContable:=row.DataKey("CveConceptoContable").ToEntero, CveProveedor:=row.DataKey("CveProveedor").ToEntero, CveCompra:=row.DataKey("CveCompra").ToEntero, CveCliente:=row.DataKey("CveCliente").ToEntero, CveVenta:=row.DataKey("CveVenta").ToEntero, CveClasificacion:=row.DataKey("CveClasificacion").ToEntero, CvePersonal:=row.DataKey("CvePersonal").ToEntero, Referencia:=row.FCLiteral("TxtRef").Text, - TipoCambio:=row.DataKey("TC").ToDecimal, + TipoCambio:=row.DataKey("TC").ToDecimal, CveActivoFijo:=row.DataKey("CveActivoFijo").ToEntero, CveCuenta:=row.DataKey("CveCuenta").ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario, CveIE:=CveIEAgregado) Then OcurrioError = True Exit For @@ -1306,6 +1304,7 @@ Partial Class ContabilidadC_RegPrePolizaS Dim Abono As Decimal = GvPrePoliza.Rows(IndiceGrid).FCLabel("TxtAbono").Text.ToDecimal Dim PorcentajeImpuesto As Decimal = GvPrePoliza.Rows(IndiceGrid).DataKey("PorcentajeImpuesto").ToDecimal Dim CveClasificacion As Integer = GvPrePoliza.Rows(IndiceGrid).DataKey("CveClasificacion").ToEntero + Dim CveActivoFijo As Integer = GvPrePoliza.Rows(IndiceGrid).DataKey("CveActivoFijo").ToEntero 'Dim MonedaExtr As Decimal = GvPrePoliza.Rows(IndiceGrid).FCLiteral("TxtCargo").Text.ToDecimal 'CargaConceptosContablesE() @@ -1351,6 +1350,7 @@ Partial Class ContabilidadC_RegPrePolizaS DdlTipoGastoE.SelectedValueExist(CveTipoGasto) CargaCuentasContables() DdlCuentaContableE.SelectedValueExist(CveCuenta) + DdlAF.SelectedValueExist(CveActivoFijo) If Cargo <> 0 Then TxtCargoE.Text = Cargo.FormatoNumero If Abono <> 0 Then TxtAbonoE.Text = Abono.FormatoNumero @@ -1741,11 +1741,7 @@ Partial Class ContabilidadC_RegPrePolizaS x = x + 1 Next DtMovimientos.AcceptChanges() - - End If - - dr("CveCuenta") = DdlCuentaContableE.SelectedValue dr("CodigoNombreCuenta") = DdlCuentaContableE.SelectedItem.Text dr("ConceptoContable") = DdlConceptosContablesE.SelectedItem.Text From e163ae67349cf7a0092b3874e1deb00597309101 Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 23 Jun 2025 13:21:14 -0700 Subject: [PATCH 20/42] - actualizar CveAF --- App_Code/ClsContabilidad.vb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb index 787cf4be5..7c11a3d3b 100644 --- a/App_Code/ClsContabilidad.vb +++ b/App_Code/ClsContabilidad.vb @@ -293,7 +293,7 @@ Public Class ClsContabilidad Public Function UpdatePrePolizasDetalle(CvePrePolizaDetalle As Integer, Concepto As String, CveSubProyecto As Integer, IdCtaContable As Integer, TipoMovto As Boolean, ImporteMN As Decimal, Optional CveTipoGasto As Integer = -1, Optional CveConceptoContable As Integer = -1, Optional CveProveedor As Integer = -1, Optional CveCompra As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveCliente As Integer = -1, Optional CveVenta As Integer = -1, Optional Referencia As String = "-1", Optional CveUsuarioModifico As Integer = -1, Optional CveCuenta As Integer = -1, Optional PorcentajeImpuesto As Decimal = -1, Optional Importe As Decimal = -1, Optional CveIE As Integer = -1, - Optional TipoCambio As Decimal = -1, Optional CveClasificacion As Integer = -1) As Boolean + Optional TipoCambio As Decimal = -1, Optional CveClasificacion As Integer = -1, Optional CveActivoFijo As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Conta_PrePolizasDetalleUpdate") @@ -313,6 +313,7 @@ Public Class ClsContabilidad .Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal .Add("@CveCliente", SqlDbType.Int).Value = CveCliente .Add("@CveVenta", SqlDbType.Int).Value = CveVenta + .Add("@CveActivoFijo", SqlDbType.Int).Value = CveActivoFijo .Add("@PorcentajeImpuesto", SqlDbType.Money).Value = PorcentajeImpuesto .Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico .Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta From d83fbf730cf4fff743774a58ee4be6a79f345076 Mon Sep 17 00:00:00 2001 From: Oscar Irigoyen Date: Mon, 23 Jun 2025 16:38:32 -0700 Subject: [PATCH 21/42] Correcciones layout envio cuentas y pagos scotia, reembolsos cuenta depsito visible, compras carga de grid nc facturas en compra manual --- Bancos/PagoElectronico.aspx.vb | 14 +++--- Compras/Compras.aspx.vb | 6 +-- Compras/ReembolsosComprobaciones.aspx | 12 +++-- Compras/ReembolsosComprobaciones.aspx.vb | 57 ++++++++++++++---------- 4 files changed, 52 insertions(+), 37 deletions(-) diff --git a/Bancos/PagoElectronico.aspx.vb b/Bancos/PagoElectronico.aspx.vb index 5951700c0..a9414bc09 100644 --- a/Bancos/PagoElectronico.aspx.vb +++ b/Bancos/PagoElectronico.aspx.vb @@ -569,7 +569,7 @@ Partial Class Bancos_PagoElectronico Header.Append(TipoArchivo.PadRight(2, Space)) 'TIPO ARCHIVO (2) Header.Append("HA") 'TIPO REGISTRO (2) Header.Append("JDF") 'SISTEMA-CENTRAL (3) - Header.Append(NumeroConvenio.PadLeft(7, Space)) 'NUMERO DE CONTRATO (7) ' ocupa 5 dígitos pero en el layout se usa 7 + Header.Append(NumeroConvenio.PadLeft(7, Cero)) 'NUMERO DE CONTRATO (7) ' ocupa 5 dígitos pero en el layout se usa 7 Header.Append(NowADS.ToString("yyyyMMdd")) 'FECHA-SOLICITUD (8) Header.Append("001") 'SECUENCIA (3) Header.Append("M") 'MANTENIMIENTO-O-CONSULTA (1) @@ -594,7 +594,7 @@ Partial Class Bancos_PagoElectronico Dim CuentaDestino As String = "" Dim cuentaDigitos As String = dr("CLABEDestino").ToString.Trim Dim Clabe As String = dr("CLABE").ToString.Trim - Dim limite As String = (900000000 * 100D).ToEntero.ToString("F0") + Dim limite As String = (9000000000 * 100D).ToString("F0") Dim banco As String = dr("CveBanco").ToString.PadLeft(3, Cero) If cuentaDigitos.Length = 11 AndAlso banco = "044" Then @@ -672,10 +672,10 @@ Partial Class Bancos_PagoElectronico trailer.Append(TipoArchivo.PadRight(2, Space)) 'TIPO DE ARCHIVO (2) trailer.Append("TA") 'TIPO DE REGISTRO (2) - trailer.Append(Altas.ToString.PadLeft(8, Space)) 'CANTIDAD DE MOVIMIENTOS ALTAS (8) - trailer.Append(Cambios.ToString.PadLeft(8, Space)) 'CANTIDAD DE MOVIMIENTOS CAMBIOS (8) - trailer.Append(Bajas.ToString.PadLeft(8, Space)) 'CANTIDAD DE MOVIMIENTOS BAJAS (8) - trailer.Append(Consultas.ToString.PadLeft(8, Space)) 'CANTIDAD DE CONSULTAS (8) + trailer.Append(Altas.ToString.PadLeft(8, Cero)) 'CANTIDAD DE MOVIMIENTOS ALTAS (8) + trailer.Append(Cambios.ToString.PadLeft(8, Cero)) 'CANTIDAD DE MOVIMIENTOS CAMBIOS (8) + trailer.Append(Bajas.ToString.PadLeft(8, Cero)) 'CANTIDAD DE MOVIMIENTOS BAJAS (8) + trailer.Append(Consultas.ToString.PadLeft(8, Cero)) 'CANTIDAD DE CONSULTAS (8) 'MOVIMIENTOS ACEPTADOS trailer.Append("0".PadLeft(8, Cero)) 'CANTIDAD DE MOVIMIENTOS ALTAS (8) *** Respusta de ScotiaBank *** trailer.Append("0".PadLeft(8, Cero)) 'CANTIDAD DE MOVIMIENTOS CAMBIOS (8) *** Respusta de ScotiaBank *** @@ -957,7 +957,7 @@ Partial Class Bancos_PagoElectronico da.Append("".PadLeft(34, CERO)) ' 105-138 Uso Futuro da.Append("".PadLeft(30, SPACE)) ' 139-168 Clave de Rastreo llenar con espacios en blanco da.Append("".PadLeft(20, SPACE)) ' 169-188 Referencia de Abono Banxico - dm.Append("01") ' 189-190 Tipo de Operación anexo G + dm.Append(" ") ' 189-190 Tipo de Operación anexo G da.Append("".PadLeft(232, SPACE)) ' 191-370 FILLER diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 293ac5316..dc292aa46 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -17690,9 +17690,9 @@ Partial Class Compras_Compras Dim NumNoDed As Integer = TmpDT.COUNT("CvePS", "NoDeducible = True ") If NumNoDed > 0 Then GvPS.Columns(13).Visible = True 'visualiza columnas de nodeducibles - 'If DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") And CveFactura <= 0 Then - ' InicializaAplicaNCFact() - 'End If + If DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") And CveFactura <= 0 And CveCompra <= 0 Then + InicializaAplicaNCFact() + End If End Sub Private Sub OriginalesVisible(Accion As Boolean) diff --git a/Compras/ReembolsosComprobaciones.aspx b/Compras/ReembolsosComprobaciones.aspx index 0299d8c07..5a45b0d80 100644 --- a/Compras/ReembolsosComprobaciones.aspx +++ b/Compras/ReembolsosComprobaciones.aspx @@ -262,12 +262,18 @@ -
+
- - + +
+ + +
+ + + <%----%>
diff --git a/Compras/ReembolsosComprobaciones.aspx.vb b/Compras/ReembolsosComprobaciones.aspx.vb index c514d4ee2..3bcd172dd 100644 --- a/Compras/ReembolsosComprobaciones.aspx.vb +++ b/Compras/ReembolsosComprobaciones.aspx.vb @@ -349,43 +349,52 @@ Partial Class Compras_ReembolsosComprobaciones DdlCuentaDeposito.SelectedValue = Nothing DdlCuentaDeposito.Items.Clear() - trCuentaDeposito.Visible = False - DdlCuentaDeposito.Enabled = False + DVValidacionesCuentaDeposito.Visible = False + 'trCuentaDeposito.Visible = False + 'DdlCuentaDeposito.Enabled = False Dim CvePersonal As Integer = DdlPersonal.SelectedValue.ToEntero - If CvePersonal > 0 Then + If CvePersonal > 0 And DdlTipoPago.SelectedValue.ToEntero = 1 Then - If DdlTipoTransaccion.SelectedValue.Contiene("9", "17") Then + 'If DdlTipoTransaccion.SelectedValue.Contiene("9", "17") Then - trCuentaDeposito.Visible = True - DdlCuentaDeposito.Enabled = True + trCuentaDeposito.Visible = True + DdlCuentaDeposito.Enabled = True - Dim Dep As New ClsGenerales - If Dep.GetCuentasDepositos(CvePersonal:=CvePersonal, CveEmpresa:=UsuarioActual.CveEmpresa) Then + Dim Dep As New ClsGenerales + If Dep.GetCuentasDepositos(CvePersonal:=CvePersonal, CveEmpresa:=UsuarioActual.CveEmpresa) Then - If DdlTipoTransaccion.SelectedValue = "9" Then - DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros(" EstatusPagoElectronico = 'True'") - Else - DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros(" EstatusPagoElectronicoGrupos = 'True'") - End If - - - If Dep.DtResultados.Rows.Count > 0 Then - - trCuentaDeposito.Visible = True - DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1")) - - End If + If DdlTipoTransaccion.SelectedValue = "9" Then + DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros(" EstatusPagoElectronico = 'True'") + ElseIf DdlTipoTransaccion.SelectedValue = "17" Then + DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros(" EstatusPagoElectronicoGrupos = 'True'") + Else + DdlCuentaDeposito.DataSource = Dep.DtResultados End If - Dep.Dispose() - DdlCuentaDeposito.DataBind() - + 'If Dep.DtResultados.Rows.Count > 0 Then + trCuentaDeposito.Visible = True + DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1")) + 'End If End If + Dep.Dispose() + DdlCuentaDeposito.DataBind() + + + 'End If + Else + trCuentaDeposito.Visible = False + End If + + + If DdlTipoTransaccion.SelectedValue.ToEntero.Contiene(9, 17) Then + DVValidacionesCuentaDeposito.Visible = True + Else + End If UpCuentaDeposito.Update() From a7a296a28b82e29e07cbd6b5e52fd8151217103a Mon Sep 17 00:00:00 2001 From: Luis Carlos Quijada Date: Mon, 23 Jun 2025 19:05:31 -0600 Subject: [PATCH 22/42] Cambios Dashboard --- General/Dashboard.aspx | 292 ++++++++++++++++++++++++++++++-------- General/Dashboard.aspx.vb | 6 +- 2 files changed, 232 insertions(+), 66 deletions(-) diff --git a/General/Dashboard.aspx b/General/Dashboard.aspx index 925336a3a..9a655c1f0 100644 --- a/General/Dashboard.aspx +++ b/General/Dashboard.aspx @@ -22,6 +22,7 @@ } .table td, .table th { + padding: 2px; } @@ -371,7 +372,9 @@ max-height: 170px; } - + #containerC_gvResumenSucursales tr.stickyRow th{ + white-space:nowrap !important; + } /* Estilos para el header */ @@ -405,6 +408,20 @@ background-color: #f8f9fa !important; font-weight: bold; } + + .header-flex { + display: flex !important; + flex-direction: row !important; + align-items: center !important; + gap: 6px; +} + + element.style { + display: flex +; + flex-direction: row; + align-items: center; +} /* .gvMaxHeight{ max-height: 160px; @@ -499,12 +516,12 @@ -
+
Venta Anual -
- - -
+ + <%----%> + +
@@ -514,7 +531,7 @@ -
+
Utilidad Anual
@@ -529,7 +546,7 @@ -
+
Venta Mensual
@@ -544,7 +561,7 @@ -
+
Utilidad Mensual
@@ -2390,7 +2407,7 @@ Pagos por Proveedor
-
+
-