From d81a1afc71b763414beaa8619c14783a2bdea9c3 Mon Sep 17 00:00:00 2001 From: Oscar Irigoyen Date: Thu, 12 Jun 2025 16:26:01 -0700 Subject: [PATCH 01/32] Correciones Grupos --- Bancos/PagoElectronicoGrupos.aspx.vb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Bancos/PagoElectronicoGrupos.aspx.vb b/Bancos/PagoElectronicoGrupos.aspx.vb index d6981455e..06fabcddc 100644 --- a/Bancos/PagoElectronicoGrupos.aspx.vb +++ b/Bancos/PagoElectronicoGrupos.aspx.vb @@ -379,12 +379,8 @@ Partial Class Bancos_PagoElectronicoGrupos DTPendientes = Nothing End If - - ObjBancos.Dispose() - - If DTPendientes IsNot Nothing AndAlso DTPendientes.Rows.Count > 0 Then CargaDatosInformativos() Else @@ -436,18 +432,20 @@ Partial Class Bancos_PagoElectronicoGrupos '–– Determina si la cuenta ya está **habilitada** para el banco elegido en la pantalla ––' Dim habilitada As Boolean Select Case True - Case DdlCuenta.SelectedItem.Text.ToUpper.Contains("BANCOMER") _ - OrElse DdlCuenta.SelectedItem.Text.ToUpper.Contains("BBVA") + Case DdlCuenta.SelectedItem.Text.ToUpper.Contains("BANCOMER") OrElse DdlCuenta.SelectedItem.Text.ToUpper.Contains("BBVA") + habilitada = (dr("EstatusPagoElectronicoGrupos").ToString = "True") Case DdlCuenta.SelectedItem.Text.ToUpper.Contains("BAJIO") + habilitada = (dr("EstatusPagoElectronicoGruposBajio").ToString = "True") Case DdlCuenta.SelectedItem.Text.ToUpper.Contains("SCOTIA") + habilitada = (dr("EstatusPagoElectronicoGruposScotia").ToString = "True") Case Else - habilitada = False 'Otros bancos → sin bandera propia + habilitada = False 'Otros bancos sin bandera propia End Select If Not habilitada Then @@ -468,6 +466,8 @@ Partial Class Bancos_PagoElectronicoGrupos Case Else Interbancarias += 1 End Select + Else + Movimientos += 1 End If ' 3. MOVIMIENTOS de cuentas ya existentes From abc2901e8a3bc84b5aff6e3432b3f2ea475b2a63 Mon Sep 17 00:00:00 2001 From: JPerez Date: Thu, 12 Jun 2025 18:50:47 -0700 Subject: [PATCH 02/32] --FIX nombre promocion --- Ventas/Ventas.aspx.vb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 04f2469e1..28b262930 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -2868,6 +2868,7 @@ Partial Class Ventas TmpDT.Columns("Costo").DefaultValue = 0D TmpDT.Columns.Add("UltimoCosto", GetType(Decimal)) TmpDT.Columns("UltimoCosto").DefaultValue = 0D + If Not TmpDT.Columns.Contains("NumeroParte") Then TmpDT.Columns.Add("NumeroParte", GetType(String)) GvPS.DataSource = ObjVentas.DtResultados GvPS.DataBind() @@ -9172,7 +9173,7 @@ Partial Class Ventas If e.Row.DBCampo("CvePromocionDetalle").ToEntero() > 0 Then If CveVenta > 0 Then - Dim NombrePromo As String = e.Row.DBCampo("Promocion") ' DtPromociones.FiltroPrimeroValor("NombrePromocion", $"CvePromocionDetalle={e.Row.DBCampo("CvePromocionDetalle")}") + Dim NombrePromo As String = If(TmpDT.Columns.Contains("Promocion"), e.Row.DBCampo("Promocion"), "") e.Row.FCHtmlGenericControl("TagPromocion").Attributes.Add("title", NombrePromo) Else If DtPromociones IsNot Nothing Then From a46659fc657479237bda16903ad39c92846c21c0 Mon Sep 17 00:00:00 2001 From: Oscar Irigoyen Date: Fri, 13 Jun 2025 16:08:22 -0700 Subject: [PATCH 03/32] =?UTF-8?q?Pago=20Electronico=20Grupos=20correci?= =?UTF-8?q?=C3=B3n=20=20etiqueta=20de=20importe,=20Compras=20editar=20no?= =?UTF-8?q?=20acreditable=20en=20compra=20son=20xml=20con=20pago?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bancos/PagoElectronicoGrupos.aspx.vb | 7 +++++++ Compras/Compras.aspx.vb | 21 +++++++++++++++------ 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/Bancos/PagoElectronicoGrupos.aspx.vb b/Bancos/PagoElectronicoGrupos.aspx.vb index 06fabcddc..7e8382112 100644 --- a/Bancos/PagoElectronicoGrupos.aspx.vb +++ b/Bancos/PagoElectronicoGrupos.aspx.vb @@ -468,6 +468,7 @@ Partial Class Bancos_PagoElectronicoGrupos End Select Else Movimientos += 1 + Importe += dr("Abonado").ToString.ToDecimal End If ' 3. MOVIMIENTOS de cuentas ya existentes @@ -3404,6 +3405,12 @@ Partial Class Bancos_PagoElectronicoGrupos Dim FileName As String = NombreArchivo Dim FilePath As String = $"{UsuarioActual.Empresa.Ruta}Layout\{NombreArchivo}" + + If NombreArchivo.Length = 0 Then + FileName = LnkDescarga.Text + FilePath = $"{UsuarioActual.Empresa.Ruta}Layout\{ LnkDescarga.Text}" + End If + Response.Clear() Response.ContentType = "application/octet-stream" Response.AddHeader("Content-Disposition", "attachment; filename=" & FileName) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 8b1947ecb..293ac5316 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -9164,9 +9164,12 @@ Partial Class Compras_Compras Next 'If UsuarioActual.Empresa.Funcionalidad(207) = "1" Then - If Not ActualizarPrePoliza(ObjContabilidad, ObjCompra) Then - Retorno = False + If Not ComparaDatatables(False) Then + If Not ActualizarPrePoliza(ObjContabilidad, ObjCompra) Then + Retorno = False + End If End If + 'End If @@ -9972,26 +9975,32 @@ Partial Class Compras_Compras End Sub - Private Function ComparaDatatables() As Boolean + Private Function ComparaDatatables(Optional ValidaNoDeducible As Boolean = True) As Boolean Dim NumRow As Integer = 0 For Each row1 As DataRow In TmpDT.Rows Dim NumRow2 As Integer = 0 For Each row2 As DataRow In TmpDTOriginal.Rows + + 'Dim test As Boolean = (row1("NoDeducible").ToString <> row2("NoDeducible").ToString And ValidaNoDeducible) + 'Dim test2 As Boolean = (row1("IVAPorcentaje").ToString.ToDecimal <> row2("IVAPorcentaje").ToString.ToDecimal AndAlso CveCompra > 0 AndAlso CveCompraFactura = 0) + + Dim TipoCompra As Integer = If(DdlTipoCompra.SelectedValue.ToEntero > 0, DdlTipoCompra.SelectedValue.ToEntero, 0) + If NumRow2 = NumRow Then If (row1("CveSubProyecto").ToString.ToEntero <> row2("CveSubProyecto").ToString.ToEntero) Or (row1("CveClasificacion").ToString.ToEntero <> row2("CveClasificacion").ToString.ToEntero) Or (row1("CveTipoGasto").ToString.ToEntero <> row2("CveTipoGasto").ToString.ToEntero) Or (row1("Total").ToString.ToDouble <> row2("Total").ToString.ToDouble) Or - (row1("NoDeducible").ToString <> row2("NoDeducible").ToString) Or + (row1("NoDeducible").ToString <> row2("NoDeducible").ToString And ValidaNoDeducible) Or (row1("CveActivoFijo").ToString.ToEntero <> row2("CveActivoFijo").ToString.ToEntero) Or (row1("AFMedida").ToString.ToEntero <> row2("AFMedida").ToString.ToEntero) Or (row1("TipoAF").ToString.ToEntero <> row2("TipoAF").ToString.ToEntero) Or (row1("CvePS").ToString.ToEntero <> row2("CvePS").ToString.ToEntero) Or (row1("Obs").ToString <> row2("Obs").ToString) Or - (row1("IVAPorcentaje").ToString <> row2("IVAPorcentaje").ToString AndAlso CveCompra > 0 AndAlso CveCompraFactura = 0) Or - (DdlTipoCompra.SelectedValue.ToEntero <> TipoCompraOriginal) Then + (row1("IVAPorcentaje").ToString.ToDecimal <> row2("IVAPorcentaje").ToString.ToDecimal AndAlso CveCompra > 0 AndAlso CveCompraFactura = 0) Or + (TipoCompra <> TipoCompraOriginal) Then Return False End If End If From 4f99d54c9c45b91b1020bc9305f58714660522d7 Mon Sep 17 00:00:00 2001 From: JPerez Date: Tue, 17 Jun 2025 12:01:01 -0700 Subject: [PATCH 04/32] =?UTF-8?q?--Cambios=20informaci=C3=B3n=20completa?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ventas/Clientes.aspx | 2 +- Ventas/Clientes.aspx.vb | 18 +++++++++++++----- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/Ventas/Clientes.aspx b/Ventas/Clientes.aspx index 97a0b5725..e3f74c920 100644 --- a/Ventas/Clientes.aspx +++ b/Ventas/Clientes.aspx @@ -2569,7 +2569,7 @@
- + diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index 52440f082..3b4e5846f 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -2592,6 +2592,7 @@ Partial Class Clientes If TxtLimiteCredito.Text.ToDecimal = 0 OrElse TxtCobranzaContacto.Text.Trim = "" OrElse TxtCobranzaTelefono.Text.Trim = "" OrElse TxtDiasEspecifico.Text.Trim = "" OrElse TxtCobranzaCorreo.Text.Trim = "" Then InformacionCompleta = False End If + If DdlTipoPago.SelectedValue.ToEntero <= 0 Then InformacionCompleta = False 'si es el concepto de pagaré tPagare = 0 For Each dRow As GridViewRow In GvDocumentosCliente.Rows @@ -2601,18 +2602,25 @@ Partial Class Clientes End If Next If tPagare = 0 Then InformacionCompleta = False - If GvClentesPersonalEntrega.Rows.Count = 0 Then InformacionCompleta = False - End If - If TxtTelefono.Text.Trim() = "" Then InformacionCompleta = False - If TxtEmail.Text.Trim() = "" Then InformacionCompleta = False 'SOLO VALIDA EN CLIENTES FRECUENTE If DdlTipoCliente.SelectedValue = "1" Then + If GvClentesPersonalEntrega.Rows.Count = 0 Then InformacionCompleta = False + 'VALIDACIONES DE BANCOS + If Not GvBancosCuentas.Rows.Cast(Of GridViewRow).Any(Function(c) c.DataKey("EstatusTexto") = "Activo") Then InformacionCompleta = False + If Not GvBancosCuentas.Rows.Cast(Of GridViewRow).Any(Function(c) c.DataKey("CLABE") <> "") Then InformacionCompleta = False + If Not GvBancosCuentas.Rows.Cast(Of GridViewRow).Any(Function(c) c.DataKey("BancoNombre") <> "") Then InformacionCompleta = False + If Not GvBancosCuentas.Rows.Cast(Of GridViewRow).Any(Function(c) c.DataKey("Sucursal") <> "") Then InformacionCompleta = False + If Not GvBancosCuentas.Rows.Cast(Of GridViewRow).Any(Function(c) c.DataKey("Cuenta") <> "") Then InformacionCompleta = False + If TxtContacto.Text.Trim() = "" Then InformacionCompleta = False If TxtRepresentanteLegal.Text.Trim() = "" Then InformacionCompleta = False - End If + + If TxtTelefono.Text.Trim() = "" Then InformacionCompleta = False + If TxtEmail.Text.Trim() = "" Then InformacionCompleta = False + End If 'CargaSucursal() From 51d2175d808fa3743380b96112f0396ba519fd95 Mon Sep 17 00:00:00 2001 From: JPerez Date: Tue, 17 Jun 2025 12:01:27 -0700 Subject: [PATCH 05/32] =?UTF-8?q?--Validaci=C3=B3n=20de=20timbrado?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ventas/Ventas.aspx.vb | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 28b262930..5e0531f71 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -18477,6 +18477,17 @@ Partial Class Ventas If UsuarioActual.Empresa.TipoFacturacion = "CFDi" Then If UsuarioActual.Empresa.FacturaProduccion Then + Using ObjVta As New ClsVentas + If ObjVta.GetVenta(Me.CveVenta, UsuarioActual.CveEmpresa) Then + Dim RowVenta As DataRow = ObjVta.DtResultados.FiltroPrimero("") + If RowVenta IsNot Nothing AndAlso RowVenta("SeTimbro").ToString() = "Si" Then + Dim Liga = $"document.location.href=""/Ventas/Ventas.aspx?CveVenta={Me.CveVenta}"";" + Alert("La factura ya ha sido timbrada previamente", TipoMensaje.MsgAdvertencia, JSBtnAceptar:=Liga, ShowCloseButton:=False) + Exit Sub + End If + End If + End Using + CreaObjetosVenta() 'PARA CUANDO YA ESTA GUARDADA LA VENTA From 9e01f6f848591d87dddcb326e2ddbf31ef3e54f2 Mon Sep 17 00:00:00 2001 From: JPerez Date: Wed, 18 Jun 2025 18:34:23 -0700 Subject: [PATCH 06/32] --FIX informacion completa --- Ventas/Clientes.aspx.vb | 5 +++-- Ventas/Ventas.aspx.vb | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index 3b4e5846f..cd97aafbd 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -2592,7 +2592,7 @@ Partial Class Clientes If TxtLimiteCredito.Text.ToDecimal = 0 OrElse TxtCobranzaContacto.Text.Trim = "" OrElse TxtCobranzaTelefono.Text.Trim = "" OrElse TxtDiasEspecifico.Text.Trim = "" OrElse TxtCobranzaCorreo.Text.Trim = "" Then InformacionCompleta = False End If - If DdlTipoPago.SelectedValue.ToEntero <= 0 Then InformacionCompleta = False + If DdlTipoPago.SelectedValue = "-1" Then InformacionCompleta = False 'si es el concepto de pagaré tPagare = 0 For Each dRow As GridViewRow In GvDocumentosCliente.Rows @@ -2611,11 +2611,12 @@ Partial Class Clientes If Not GvBancosCuentas.Rows.Cast(Of GridViewRow).Any(Function(c) c.DataKey("EstatusTexto") = "Activo") Then InformacionCompleta = False If Not GvBancosCuentas.Rows.Cast(Of GridViewRow).Any(Function(c) c.DataKey("CLABE") <> "") Then InformacionCompleta = False If Not GvBancosCuentas.Rows.Cast(Of GridViewRow).Any(Function(c) c.DataKey("BancoNombre") <> "") Then InformacionCompleta = False - If Not GvBancosCuentas.Rows.Cast(Of GridViewRow).Any(Function(c) c.DataKey("Sucursal") <> "") Then InformacionCompleta = False + 'If Not GvBancosCuentas.Rows.Cast(Of GridViewRow).Any(Function(c) c.DataKey("Sucursal") <> "") Then InformacionCompleta = False If Not GvBancosCuentas.Rows.Cast(Of GridViewRow).Any(Function(c) c.DataKey("Cuenta") <> "") Then InformacionCompleta = False If TxtContacto.Text.Trim() = "" Then InformacionCompleta = False If TxtRepresentanteLegal.Text.Trim() = "" Then InformacionCompleta = False + If DdlClasificacion.SelectedValue.ToEntero() <= 0 Then InformacionCompleta = False End If If TxtTelefono.Text.Trim() = "" Then InformacionCompleta = False diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 5e0531f71..7a182e510 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -8423,7 +8423,8 @@ Partial Class Ventas Dim ObjClie As New ClsClientes If ObjClie.GetClienteInformacionCompleta(CveCliente, UsuarioActual.CveEmpresa) Then If Not CBool(ObjClie.DtResultados.FiltroPrimeroValor("InformacionCompleta")) Then - Dim OpcionMsg As String = String.Format("El Cliente se encuentra bloqueado por la siguiente razón:

{0}", "Información incompleta") + Dim Faltante As String = ObjClie.DtResultados.FiltroPrimeroValor("Faltante") + Dim OpcionMsg As String = String.Format("El Cliente se encuentra bloqueado por la siguiente razón:

{0}

Falta la siguiente información:
{1}", "Información incompleta", Faltante) Alert(OpcionMsg, TipoMensaje.MsgAdvertencia) TieneBloqueoPorCreditoVencimiento = 1 End If From 285f9d8b557bfb65815d955fc6a6912000f8bf5f Mon Sep 17 00:00:00 2001 From: JPerez Date: Thu, 19 Jun 2025 11:11:02 -0700 Subject: [PATCH 07/32] --FIX metodo de pago al facturar remision --- Ventas/PVCobranza.aspx | 8 ++++---- Ventas/PVCobranza.aspx.vb | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Ventas/PVCobranza.aspx b/Ventas/PVCobranza.aspx index 441d2086c..2b9ec1698 100644 --- a/Ventas/PVCobranza.aspx +++ b/Ventas/PVCobranza.aspx @@ -491,7 +491,7 @@   - +   @@ -1476,9 +1476,9 @@ let totalAnt = 0; //si es con.nc,es.el.total - let Total = ToDouble($get("C_LtlSaldo").value.replace(",", "")); + let Total = ToDouble($get("C_LtlSaldo").innerText.replace(",", "")); - let SaldoCompra = parseFloat(parseFloat($get("C_LtlSaldo").value.replace(",", "")).toFixed(2)); + let SaldoCompra = parseFloat(parseFloat($get("C_LtlSaldo").innerText.replace(",", "")).toFixed(2)); if (t.checked) { @@ -1517,7 +1517,7 @@ function FnCambiaAnt(chk, txt, saldo) { - let Total = ToDouble($get("C_LtlSaldo").value.replace(",", ""));// ToDouble($get('TxtSubTotal').value); + let Total = ToDouble($get("C_LtlSaldo").innerText.replace(",", ""));// ToDouble($get('TxtSubTotal').value); let importeTxt = parseFloat(txt.value.replace(/,/g, '')); diff --git a/Ventas/PVCobranza.aspx.vb b/Ventas/PVCobranza.aspx.vb index 167f6a4db..5d6a9c720 100644 --- a/Ventas/PVCobranza.aspx.vb +++ b/Ventas/PVCobranza.aspx.vb @@ -1402,6 +1402,8 @@ Partial Class Ventas_PVCobranza Dim Importe = GvRow.FCTextBox(String.Format("TxtAnticipo{0}", GvRow.RowIndex)).Text.ToDecimal() DtPagos.Rows.Add({CveFormaPagoAnt, Importe}) + + PagadoSinEfectivo += Importe End If Next End If From 8d3478729775cd183a5263582aee7552c5cd0619 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 20 Jun 2025 09:31:07 -0700 Subject: [PATCH 08/32] =?UTF-8?q?--=20correcci=C2=B4n=20filtrador?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ventas/RepComisionesSMS.aspx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Ventas/RepComisionesSMS.aspx b/Ventas/RepComisionesSMS.aspx index 9ba4d2fa2..5e1f9a04f 100644 --- a/Ventas/RepComisionesSMS.aspx +++ b/Ventas/RepComisionesSMS.aspx @@ -206,8 +206,8 @@
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 16/32] - --- 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 bb41ab62519d11367db64adeb7137c5f241ebe9d Mon Sep 17 00:00:00 2001 From: JPerez Date: Fri, 20 Jun 2025 20:01:19 -0700 Subject: [PATCH 17/32] --Obs al saldar IxC --- Bancos/RepIngresosPorComprobar.aspx | 18 +++++++++++++----- Bancos/RepIngresosPorComprobar.aspx.vb | 15 ++++++++++----- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/Bancos/RepIngresosPorComprobar.aspx b/Bancos/RepIngresosPorComprobar.aspx index f0c84a439..928e41330 100644 --- a/Bancos/RepIngresosPorComprobar.aspx +++ b/Bancos/RepIngresosPorComprobar.aspx @@ -282,7 +282,7 @@
Fecha:
-
+
@@ -294,11 +294,19 @@
-
-
SubProyecto:
+
+
+
SubProyecto:
- - + + +
+
+
+
+
Observaciones:
+
+
diff --git a/Bancos/RepIngresosPorComprobar.aspx.vb b/Bancos/RepIngresosPorComprobar.aspx.vb index 32e006658..12998e47f 100644 --- a/Bancos/RepIngresosPorComprobar.aspx.vb +++ b/Bancos/RepIngresosPorComprobar.aspx.vb @@ -267,6 +267,7 @@ Partial Class Bancos_RepIngresosPorComprobar End Sub Protected Sub LnkSaldar_Click(sender As Object, e As EventArgs) + TxtObservaciones.Text = "" RegistraScript("$('#DivModalSaldar').modal();") End Sub @@ -277,16 +278,20 @@ Partial Class Bancos_RepIngresosPorComprobar ObjConta.IniciaTransacSQL() Dim CvePrePoliza As Integer = 0 Dim MsgError As String = "" - CvePrePoliza = ObjConta.AddPrePolizas("Bancos/RepIngresosPorComprobar", 6, 0, 0, 1, TxtFecha.Text.ToDate, "Saldo de IxC", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + + Dim Obs As String = TxtObservaciones.Text.Trim() + + CvePrePoliza = ObjConta.AddPrePolizas("Bancos/RepIngresosPorComprobar", 6, 0, 0, 1, TxtFecha.Text.ToDate, Obs, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + + Dim FolioPoliza As Integer = ObjConta.FolioPoliza For Each gr As GridViewRow In GvIPC.Rows If gr.FCCheckBox("Chk").Checked Then - - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, gr.DataKey("Saldo").ToDecimal, gr.DataKey("Saldo").ToDecimal, 92, "", "Saldo de IxC", CveIE:=gr.DataKey("CveIE").ToEntero, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveSubProyecto:=DdlSubProyectoSaldar.SelectedValue.ToEntero) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, gr.DataKey("Saldo").ToDecimal, gr.DataKey("Saldo").ToDecimal, 92, "Saldo de IxC", Obs, CveIE:=gr.DataKey("CveIE").ToEntero, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveSubProyecto:=DdlSubProyectoSaldar.SelectedValue.ToEntero) Then MsgError = "Ocurrio un error al saldar el movimiento" End If - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, gr.DataKey("Saldo").ToDecimal, gr.DataKey("Saldo").ToDecimal, 78, "", "Saldo de IxC", CveIE:=gr.DataKey("CveIE").ToEntero, CveSubProyecto:=DdlSubProyectoSaldar.SelectedValue.ToEntero) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, gr.DataKey("Saldo").ToDecimal, gr.DataKey("Saldo").ToDecimal, 78, "Saldo de IxC", Obs, CveIE:=gr.DataKey("CveIE").ToEntero, CveSubProyecto:=DdlSubProyectoSaldar.SelectedValue.ToEntero) Then MsgError = "Ocurrio un error al saldar el movimiento" End If End If @@ -296,7 +301,7 @@ Partial Class Bancos_RepIngresosPorComprobar ObjConta.Commit() CargaDatos() - Alert(String.Format("Los movimientos se saldaron correctamente.

Póliza: {1}
", CvePrePoliza, ObjConta.ContaFolio)) + Alert(String.Format("Los movimientos se saldaron correctamente.

Póliza: {1}
", CvePrePoliza, FolioPoliza)) Else ObjConta.RollBack() Alert(MsgError, TipoMensaje.MsgError) From 16c960d83f4f5d7146dd560a67ed92296d94136f Mon Sep 17 00:00:00 2001 From: JPerez Date: Sat, 21 Jun 2025 11:37:03 -0700 Subject: [PATCH 18/32] --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 0e6fa86ee544fd7e842f10b9413a1102822431a1 Mon Sep 17 00:00:00 2001 From: Oscar Irigoyen Date: Sat, 21 Jun 2025 12:31:33 -0700 Subject: [PATCH 19/32] Layout ScotiaBankl --- App_Code/ClsBancos.vb | 7 +- Bancos/PagoElectronico.aspx | 75 +- Bancos/PagoElectronico.aspx.vb | 5606 ++++++++++++------- Bancos/PagoElectronicoGrupos.aspx.vb | 174 +- Contabilidad/ContabilizacionCompras.aspx | 2 +- Contabilidad/ContabilizacionCompras.aspx.cs | 9 + 6 files changed, 3752 insertions(+), 2121 deletions(-) diff --git a/App_Code/ClsBancos.vb b/App_Code/ClsBancos.vb index 0be6651c1..8e7c0f8a7 100644 --- a/App_Code/ClsBancos.vb +++ b/App_Code/ClsBancos.vb @@ -3267,13 +3267,18 @@ Public Class ClsBancos ' Return Retorno 'End Function - Public Function UpdateCuentaDepositoPagoElectronico(CveCuentaDeposito As Integer) As Boolean + Public Function UpdateCuentaDepositoPagoElectronico(CveCuentaDeposito As Integer, Optional Opcion As Integer = 1, Optional FechaEliminacion As Date = MinFecha) As Boolean + + 'Opcion 1: Bancomer, Opcion 2: Bajio, Opcion 3: Scotia + Dim Retorno As Boolean = False DataAdapter("PA_Banc_LayoutCuentaDepositoUpdate") With SqlAdapter.SelectCommand.Parameters .Add("@CveCuentaDeposito", SqlDbType.Int).Value = CveCuentaDeposito + .Add("@Opcion", SqlDbType.Int).Value = Opcion + .Add("@FechaEliminacion", SqlDbType.Date).Value = FechaEliminacion End With Try diff --git a/Bancos/PagoElectronico.aspx b/Bancos/PagoElectronico.aspx index 85d24ba79..453f22d68 100644 --- a/Bancos/PagoElectronico.aspx +++ b/Bancos/PagoElectronico.aspx @@ -105,11 +105,17 @@ - + Bancomer: + + + Scotia Bank: + + + @@ -157,7 +163,7 @@
- + @@ -619,6 +625,71 @@ + + +