From 453570af6f3b1531f77456b05b3eb240e693f308 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 12 Mar 2025 19:22:18 -0700 Subject: [PATCH 01/11] =?UTF-8?q?--=20nuevo=20globalDT=20DIOT=20Tipo=20Ope?= =?UTF-8?q?raci=C3=B3n,,=20en=20base=20a=202025?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App_Code/ClsGenerales.vb | 14 ++++++++++++++ App_Code/ClsPaginas.vb | 16 ++++++++++++++++ Compras/Proveedores.aspx | 24 +++++++++++++++--------- Compras/Proveedores.aspx.vb | 22 ++++++++++++++++++++++ 4 files changed, 67 insertions(+), 9 deletions(-) diff --git a/App_Code/ClsGenerales.vb b/App_Code/ClsGenerales.vb index 3b125265b..4e0ef922e 100644 --- a/App_Code/ClsGenerales.vb +++ b/App_Code/ClsGenerales.vb @@ -2973,6 +2973,20 @@ Public Class ClsGenerales End Try Return Retorno End Function + + Public Function GetSATDIOTTipoOperacion() As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Gral_SAT_DIOT_TipoOperacionGet") + With SqlAdapter.SelectCommand.Parameters + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener los tipos de operacion del SAT-DIOT", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + Return Retorno + End Function Public Function GetSATUnidadesAduana() As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Gral_SAT_UnidadAduanaGet") diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index b9c0c104c..c884bbe5d 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -561,6 +561,22 @@ Public Class ClsPaginas HttpContext.Current.Application(AppNombre) = value End Set End Property + + Property GlobalDTDIOTTipoOperacion() As DataTable + Get + Dim AppNombre As String = "GlobalDTDIOTTipoOperacion" + If Application(AppNombre) Is Nothing Then + Dim ObjGrales As New ClsGenerales + If ObjGrales.GetSATDIOTTipoOperacion() Then Application(AppNombre) = ObjGrales.DtResultados + ObjGrales.Dispose() + End If + GlobalDTDIOTTipoOperacion = DirectCast(Application(AppNombre), DataTable) + End Get + Set(value As DataTable) + Dim AppNombre As String = "GlobalDTDIOTTipoOperacion" + Application(AppNombre) = value + End Set + End Property Property GlobalDTGralPaises() As DataTable Get Dim AppNombre As String = "GlobalDTGralPaises" diff --git a/Compras/Proveedores.aspx b/Compras/Proveedores.aspx index 1801c70c2..81079cc46 100644 --- a/Compras/Proveedores.aspx +++ b/Compras/Proveedores.aspx @@ -799,20 +799,19 @@
+ + +
Tipo Tercero:
- + - - - - - - + + @@ -833,11 +832,16 @@
Tipo Operación:
- + + + + + + @@ -864,7 +868,9 @@
-
+ + +
diff --git a/Compras/Proveedores.aspx.vb b/Compras/Proveedores.aspx.vb index e5548a436..51eeafbab 100644 --- a/Compras/Proveedores.aspx.vb +++ b/Compras/Proveedores.aspx.vb @@ -908,6 +908,7 @@ Partial Class Compras_Proveedores 'DIOT CargaDIOTPais() DDlDIOTTipoTercero.SelectedValueExist(ObjProveedor.DIOTCveTipoTercero) + CargaTipoTransaccion() DdlDIOTTipoOperacion.SelectedValueExist(ObjProveedor.DIOTCveTipoOperacion) TxtDIOTNumIDFiscal.Text = ObjProveedor.DIOTNumeroIDFiscal DdlDIOTPais.SelectedValueExist(ObjProveedor.DIOTCvePais) @@ -5876,6 +5877,27 @@ Partial Class Compras_Proveedores End If End Sub + + Protected Sub DDlDIOTTipoTercero_SelectedIndexChanged(sender As Object, e As EventArgs) + CargaTipoTransaccion() + End Sub + + + Private Sub CargaTipoTransaccion() + Dim Filtro As String = "" + Select Case DDlDIOTTipoTercero.SelectedValue + Case "1" + Filtro = "AplicaProvNacional = 1" + Case "2" + Filtro = "AplicaProvExtranjero = 1" + Case "5" + Filtro = "AplicaProvGlobal = 1" + End Select + + DdlDIOTTipoOperacion.DataSource = GlobalDTDIOTTipoOperacion.FiltraParametros(Filtro) + DdlDIOTTipoOperacion.DataBind() + End Sub + End Class From 133a4930c71b6599422a80f495ae6c14fb413481 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 12 Mar 2025 19:23:21 -0700 Subject: [PATCH 02/11] dfdff --- Contabilidad/RepIVA.aspx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Contabilidad/RepIVA.aspx b/Contabilidad/RepIVA.aspx index 9ba2ebace..3f452be28 100644 --- a/Contabilidad/RepIVA.aspx +++ b/Contabilidad/RepIVA.aspx @@ -241,7 +241,7 @@ <%-- --%> - SubTotal
0%
+ SubTotal
0%
From 24315b028be831d3ec1b4143a137c6bb1a2de01b Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 12 Mar 2025 19:26:54 -0700 Subject: [PATCH 03/11] -- mejoras DIOT 25 --- Contabilidad/RepIVA.aspx.cs | 29 ++++------------------------- 1 file changed, 4 insertions(+), 25 deletions(-) diff --git a/Contabilidad/RepIVA.aspx.cs b/Contabilidad/RepIVA.aspx.cs index 77b7be8ac..ac8f7ced2 100644 --- a/Contabilidad/RepIVA.aspx.cs +++ b/Contabilidad/RepIVA.aspx.cs @@ -343,7 +343,7 @@ public partial class Contabilidad_RepIVA : ClsPaginas if (Objconta.GetRepIVA(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), 2, UsuarioActual.CveUsuario, -1, Conciliado, UsuarioActual.CveEmpresa, TipoCambio, TCEspecifico)) { - if (txtFechaI.Text.ToDate() < "2025/01/31".ToDate()) // años anteriores al enero 2025 + if (txtFechaI.Text.ToDate() < "2024/12/31".ToDate()) // años anteriores al enero 2025 { foreach (DataRow Drow in Objconta.DtResultados.FiltraParametros("CveCompra is null and CveProveedor > 0 and SubTotal >= 1 ").Rows) // and(IVA > 1 OR IEPS > 0) { @@ -380,7 +380,7 @@ public partial class Contabilidad_RepIVA : ClsPaginas } else { - foreach (DataRow Drow in Objconta.DtResultados.FiltraParametros("CveCompra is null and CveProveedor > 0 and SubTotal >= 1 ").Rows) // and(IVA > 1 OR IEPS > 0) + foreach (DataRow Drow in Objconta.DtResultados.FiltraParametros("CveCompra is null and CveProveedor > 0 ").Rows) // and(IVA > 1 OR IEPS > 0) { SBDIOT.AppendLine( Drow["TipoTercero"].ToString() + "|" + @@ -388,7 +388,7 @@ public partial class Contabilidad_RepIVA : ClsPaginas Drow["RFC_DIOT"].ToString() + "|" + Drow["NumeroIDFiscal"].ToString() + "|" + Drow["NombreExtranjero"].ToString() + "|" + - Drow["PaisResidencia"].ToString() + "|" + + Drow["PaisResidenciaFiscal"].ToString() + "|" + Drow["Jurisdiccion"].ToString() + "|" + // 3.2 valor de los actos o actividades LV0(Drow["ActosFN"].ToString()) + "|" + // actos norte @@ -441,28 +441,7 @@ public partial class Contabilidad_RepIVA : ClsPaginas LV0(Drow["DANoObjetoTN"].ToString()) + "|" + // Actos o actividades no objeto del IVA realizados en LV0(Drow["DANoObjetoNoTN"].ToString()) + "|" + // Actos o actividades no objeto del IVA por no contar on establecimiento en territorio nacion (Drow["DAManifiesto"].ToString())); // Manifiesto que se dio efectos fiscales a los comprobantes que amparan las operaciones realizadas con el proveedor - - //LV(Drow["valorActos1516"].ToString()) + "|" + - //LV(Drow["valorActos15"].ToString()) + "|" + - //LV(Drow["ValorIvaNo1516"].ToString()) + "|" + - - //LV(Drow["valorActos1011"].ToString()) + "|" + - //LV(Drow["valorActos10"].ToString()) + "|" + - //LV(Drow["valorActosImp8"].ToString()) + "|" + - //LV(Drow["ValorIvaNo10"].ToString()) + "|" + - //LV(Drow["ValorIvaNo08"].ToString()) + "|" + - - //LV(Drow["valorActosImp1516"].ToString()) + "|" + - //LV(Drow["ValorIvaNoImp16"].ToString()) + "|" + - - //LV(Drow["valorActosImp10"].ToString()) + "|" + - //LV(Drow["ValorIvaNoImp10"].ToString()) + "|" + - - //LV(Drow["IvaExentoImpo"].ToString()) + "|" + - //LV(Drow["IVACero"].ToString()) + "|" + - //LV(Drow["IvaExento"].ToString()) + "|" + - //LV(Drow["IvaRetenido"].ToString()) + "|" + - //LV(Drow["IvaDevoluciones"].ToString()) + "|"); + } } From e205326268f34fbe99ab813c1a6306d248a12aa7 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Wed, 12 Mar 2025 19:55:31 -0700 Subject: [PATCH 04/11] Compras EMD ajuste retenciones validacion ret IVA para compras Rafael Martinez de con OCS 72882 y 72881 --- Compras/Compras.aspx.vb | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 1f3e35b51..241e90e0d 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -8488,7 +8488,7 @@ Partial Class Compras_Compras Dim DiferenciaRetISR As Decimal = TxtRetISR.Text.ToDecimal - RetISRDetalles If Math.Abs(DiferenciaRetISR) > 0 Then - If Math.Abs(DiferenciaRetISR) <= 0.05 Then + If Math.Abs(DiferenciaRetISR) <= 0.09 Then Dim DTConsulta As New DataTable DTConsulta = TmpDT.FiltraParametros(" RetISR > 0 ") @@ -8512,12 +8512,17 @@ Partial Class Compras_Compras If Math.Abs(DiferenciaRetISR) > 0.0D Then - If (TmpDT.Rows(IndiceUltimo)("RetISR").ToString.ToDecimal + DiferenciaRetISR) < 0 Then + If (TmpDT.Rows(IndiceUltimo)("RetISR").ToString.ToDecimal + DiferenciaRetISR) < 0 Or (Math.Abs(DiferenciaRetISR) >= 0.06) Then Dim AjusteteDividido As Decimal = Math.Abs(DiferenciaRetISR) / CantidadRegistroConRetISR For Each dRow As DataRow In TmpDT.Rows - dRow("RetISR") = dRow("RetISR").ToString.ToDecimal - AjusteteDividido + If DiferenciaRetISR > 0 Then + dRow("RetISR") = dRow("RetISR").ToString.ToDecimal + AjusteteDividido + Else + dRow("RetISR") = dRow("RetISR").ToString.ToDecimal - AjusteteDividido + End If + Next Else From 27aa307cf4283ced07a86d5a18b8a5d780144d3b Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Thu, 13 Mar 2025 00:30:43 -0700 Subject: [PATCH 05/11] --Filtros rep recuperacion --- App_Code/ClsMovimientos.vb | 257 ++++++++++------ Ventas/RepRecuperacion.aspx | 421 ++++++++++++++++++++++---- Ventas/RepRecuperacion.aspx.vb | 249 +++++++++++---- Ventas/RepRecuperacionDetalle.aspx | 389 +++++++++++++++++++++++- Ventas/RepRecuperacionDetalle.aspx.vb | 274 +++++++++++++---- 5 files changed, 1330 insertions(+), 260 deletions(-) diff --git a/App_Code/ClsMovimientos.vb b/App_Code/ClsMovimientos.vb index afc719fed..4cad5571a 100644 --- a/App_Code/ClsMovimientos.vb +++ b/App_Code/ClsMovimientos.vb @@ -5,8 +5,8 @@ Option Strict On Imports System Imports System.Data Imports System.Data.SqlClient -Imports Extensiones - +Imports Extensiones + Public Class ClsMovimientos Implements IDisposable @@ -1580,51 +1580,91 @@ Public Class ClsMovimientos #End Region #Region "REP RECUPERACION" - Public Function GetRepRecuperacion(FechaI As Date, FechaF As Date, CveCliente As Integer, CveSubProyecto As Integer, - CveVendedor As Integer, CveUsuario As Integer, CveEstatus As Integer, IVA As String, - CveEmpresa As Integer, Gpo As Integer, CveResponsable As Integer, - Optional TipoDocto As String = "-1", Optional CveProyecto As Integer = -1, - Optional EstatusCliente As Integer = -1, Optional CveUsuarioConsulta As Integer = -1, - Optional CveBanco As Integer = -1, Optional CveCuenta As Integer = -1, - Optional TipoCambio As Integer = -1, Optional TCEspecifico As Double = 0, Optional CveClienteClasificacion As Integer = -1, - Optional EsDistribuidor As Integer = -1, Optional FechaAplicadoI As Date = MinFecha, Optional FechaAplicadoF As Date = MaxFecha, - Optional FechaRegistroIEI As Date = MinFecha, Optional FechaRegistroIEF As Date = MaxFecha, - Optional CveCondicionesPago As Integer = -1, Optional CveTipoTransaccion As Integer = -1, Optional CveMoneda As Integer = -1, Optional CveSubProyectoCobranza As Integer = -1) As Boolean + Public Function GetRepRecuperacion(FechaI As Date, FechaF As Date, FechaIEjec As Date, FechaFEjec As Date, CveCliente As Integer, CveSubProyectoEjecucion As Integer, + CveVendedor As String, CveUsuario As Integer, CveEstatus As String, IVA As String, CveEmpresa As Integer, Gpo As Integer, Optional TipoDocto As String = "-1", + Optional CveProyecto As Integer = -1, Optional CveSubProyecto As String = "-1", Optional TipoCambio As Integer = 1, Optional TCEspecifico As Decimal = -1, Optional CveUsuarioConsulta As Integer = -1, + Optional CveClienteClasificacion As Integer = -1, Optional CveCondicionesPago As Integer = -1, Optional TipoCliente As Integer = -1, Optional ModalidadContable As Boolean = False, + Optional EsDistribuidor As Integer = -1, Optional CveTipoRelacion As Integer = -1, Optional ServicioDomicilio As Integer = -1, Optional EsFacturaGlobal As Integer = -1, Optional EsFilial As Integer = -1, + Optional CveResponsable As Integer = -1, Optional CveBanco As Integer = -1, Optional EstatusCliente As Integer = -1, + Optional CveCuenta As Integer = -1, Optional CveTipoTransaccion As Integer = -1, + Optional FechaAplicadoI As Date = MinFecha, Optional FechaAplicadoF As Date = MaxFecha, + Optional FechaRegistroIEI As Date = MinFecha, Optional FechaRegistroIEF As Date = MaxFecha, Optional CveMoneda As Integer = -1, Optional CveSubProyectoCobranza As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_RepRecuperacion") SqlAdapter.SelectCommand.CommandTimeout = 0 - With SqlAdapter.SelectCommand.Parameters - .Add("@CveResponsable", SqlDbType.Int).Value = CveResponsable - .Add("@FechaI", SqlDbType.Date).Value = FechaI - .Add("@FechaF", SqlDbType.Date).Value = FechaF - .Add("@CveCliente", SqlDbType.Int).Value = CveCliente - .Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto - .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto - .Add("@CveVendedor", SqlDbType.VarChar).Value = CveVendedor - .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario - .Add("@CveEstatus", SqlDbType.Int).Value = CveEstatus - .Add("@IVA", SqlDbType.VarChar).Value = IVA - .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa - .Add("@GPO", SqlDbType.Int).Value = Gpo - .Add("@TipoDocto", SqlDbType.VarChar).Value = TipoDocto - .Add("@CveEstatusCliente", SqlDbType.Int).Value = EstatusCliente - .Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta - .Add("@CveBanco", SqlDbType.Int).Value = CveBanco - .Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta - .Add("@TipoCambio", SqlDbType.Int).Value = TipoCambio - .Add("@TCEspecifico", SqlDbType.Float).Value = TCEspecifico - .Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion - .Add("@EsDistribuidor", SqlDbType.Int).Value = EsDistribuidor - .Add("@CveCondicionesPago", SqlDbType.Int).Value = CveCondicionesPago - .Add("@CveTipoTransaccion", SqlDbType.Int).Value = CveTipoTransaccion - - .Add("@FechaAplicadoI", SqlDbType.Date).Value = FechaAplicadoI.ToShortDateString - .Add("@FechaAplicadoF", SqlDbType.Date).Value = FechaAplicadoF.ToShortDateString - - .Add("@FechaRegistroIEI", SqlDbType.Date).Value = FechaRegistroIEI.ToShortDateString - .Add("@FechaRegistroIEF", SqlDbType.Date).Value = FechaRegistroIEF.ToShortDateString + With SqlAdapter.SelectCommand.Parameters + 'PARAMETROS BASE + .Add("@FechaI", SqlDbType.Date).Value = FechaI + .Add("@FechaF", SqlDbType.Date).Value = FechaF + .Add("@FechaIEjec", SqlDbType.Date).Value = FechaIEjec + .Add("@FechaFEjec", SqlDbType.Date).Value = FechaFEjec + .Add("@CveCliente", SqlDbType.Int).Value = CveCliente + .Add("@CveSubProyectoEjecucion", SqlDbType.Int).Value = CveSubProyectoEjecucion + .Add("@CveVendedor", SqlDbType.VarChar).Value = CveVendedor + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@CveEstatus", SqlDbType.VarChar).Value = CveEstatus + .Add("@IVA", SqlDbType.VarChar).Value = IVA + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@GPO", SqlDbType.Int).Value = Gpo + .Add("@TipoDocto", SqlDbType.VarChar).Value = TipoDocto + .Add("@CveSubProyecto", SqlDbType.VarChar).Value = CveSubProyecto + .Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto + .Add("@TipoCambio", SqlDbType.Int).Value = TipoCambio + .Add("@TCEspecifico", SqlDbType.Float).Value = TCEspecifico + .Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta + .Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion + .Add("@CveCondicionesPago", SqlDbType.Int).Value = CveCondicionesPago + .Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente + .Add("@EsDistribuidor", SqlDbType.Int).Value = EsDistribuidor + .Add("@ModalidadContable", SqlDbType.Bit).Value = ModalidadContable + .Add("@CveTipoRelacion", SqlDbType.Int).Value = CveTipoRelacion + .Add("@ServicioDomicilio", SqlDbType.Int).Value = ServicioDomicilio + .Add("@EsFacturaGlobal", SqlDbType.Int).Value = EsFacturaGlobal + .Add("@EsFilial", SqlDbType.Int).Value = EsFilial + 'PARAMETROS EXTRA + .Add("@CveResponsable", SqlDbType.Int).Value = CveResponsable + .Add("@CveBanco", SqlDbType.Int).Value = CveBanco + .Add("@CveEstatusCliente", SqlDbType.Int).Value = EstatusCliente + .Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta + .Add("@CveTipoTransaccion", SqlDbType.Int).Value = CveTipoTransaccion + .Add("@FechaAplicadoI", SqlDbType.Date).Value = FechaAplicadoI.ToShortDateString + .Add("@FechaAplicadoF", SqlDbType.Date).Value = FechaAplicadoF.ToShortDateString + + .Add("@FechaRegistroIEI", SqlDbType.Date).Value = FechaRegistroIEI.ToShortDateString + .Add("@FechaRegistroIEF", SqlDbType.Date).Value = FechaRegistroIEF.ToShortDateString .Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda - .Add("@CveSubProyectoCobranza", SqlDbType.Int).Value = CveSubProyectoCobranza + .Add("@CveSubProyectoCobranza", SqlDbType.Int).Value = CveSubProyectoCobranza + + '.Add("@FechaI", SqlDbType.Date).Value = FechaI + '.Add("@FechaF", SqlDbType.Date).Value = FechaF + '.Add("@CveCliente", SqlDbType.Int).Value = CveCliente + '.Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto + '.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto + '.Add("@CveVendedor", SqlDbType.VarChar).Value = CveVendedor + '.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + '.Add("@CveEstatus", SqlDbType.Int).Value = CveEstatus + '.Add("@IVA", SqlDbType.VarChar).Value = IVA + '.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + '.Add("@GPO", SqlDbType.Int).Value = Gpo + '.Add("@TipoDocto", SqlDbType.VarChar).Value = TipoDocto + '.Add("@CveEstatusCliente", SqlDbType.Int).Value = EstatusCliente + '.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta + + '.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta + '.Add("@TipoCambio", SqlDbType.Int).Value = TipoCambio + '.Add("@TCEspecifico", SqlDbType.Float).Value = TCEspecifico + '.Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion + '.Add("@EsDistribuidor", SqlDbType.Int).Value = EsDistribuidor + '.Add("@CveCondicionesPago", SqlDbType.Int).Value = CveCondicionesPago + '.Add("@CveTipoTransaccion", SqlDbType.Int).Value = CveTipoTransaccion + + '.Add("@FechaAplicadoI", SqlDbType.Date).Value = FechaAplicadoI.ToShortDateString + '.Add("@FechaAplicadoF", SqlDbType.Date).Value = FechaAplicadoF.ToShortDateString + + '.Add("@FechaRegistroIEI", SqlDbType.Date).Value = FechaRegistroIEI.ToShortDateString + '.Add("@FechaRegistroIEF", SqlDbType.Date).Value = FechaRegistroIEF.ToShortDateString + '.Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda + '.Add("@CveSubProyectoCobranza", SqlDbType.Int).Value = CveSubProyectoCobranza End With Try SqlAdapter.Fill(Data) @@ -1671,55 +1711,98 @@ Public Class ClsMovimientos End Try Return Retorno End Function - Public Function GetRepRecuperacionDetalle(FechaI As Date, FechaF As Date, CveCliente As Integer, CveSubProyecto As Integer, - CveVendedor As Integer, CveUsuario As Integer, CveClienteSucursal As Integer, - CveEstatus As Integer, IVA As String, Agrupador As Integer, CveEmpresa As Integer, - CveResponsable As Integer, Optional TipoDocto As String = "-1", Optional CveProyecto As Integer = -1, - Optional CveUsuarioConsulta As Integer = -1, Optional CveBanco As Integer = -1, - Optional CveCuenta As Integer = -1, Optional Grupo As String = "-1", - Optional TipoCambio As Integer = -1, Optional TCEspecifico As Double = 0, - Optional CveMoneda As Integer = -1, Optional CveClienteClasificacion As Integer = -1, Optional Tipo As Integer = -1, - Optional EsDistribuidor As Integer = -1, Optional FechaAplicadoI As Date = Nothing, Optional FechaAplicadoF As Date = Nothing, - Optional FechaRegistroIEI As Date = MinFecha, Optional FechaRegistroIEF As Date = MaxFecha, - Optional CveCondicionesPago As Integer = -1, Optional CveTipoTransaccion As Integer = -1, Optional CveSubProyectoCobranza As Integer = -1) As Boolean + Public Function GetRepRecuperacionDetalle(FechaI As Date, FechaF As Date, FechaIEjec As Date, FechaFEjec As Date, CveCliente As Integer, CveSubProyectoEjecucion As Integer, + CveVendedor As String, CveUsuario As Integer, CveEstatus As String, IVA As String, CveEmpresa As Integer, Gpo As Integer, Optional TipoDocto As String = "-1", + Optional CveProyecto As Integer = -1, Optional CveSubProyecto As String = "-1", Optional TipoCambio As Integer = 1, Optional TCEspecifico As Decimal = -1, Optional CveUsuarioConsulta As Integer = -1, + Optional CveClienteClasificacion As Integer = -1, Optional CveCondicionesPago As Integer = -1, Optional TipoCliente As Integer = -1, Optional ModalidadContable As Boolean = False, + Optional EsDistribuidor As Integer = -1, Optional CveTipoRelacion As Integer = -1, Optional ServicioDomicilio As Integer = -1, Optional EsFacturaGlobal As Integer = -1, Optional EsFilial As Integer = -1, + Optional CveResponsable As Integer = -1, Optional CveBanco As Integer = -1, Optional EstatusCliente As Integer = -1, + Optional CveCuenta As Integer = -1, Optional CveTipoTransaccion As Integer = -1, + Optional FechaAplicadoI As Date = MinFecha, Optional FechaAplicadoF As Date = MaxFecha, + Optional FechaRegistroIEI As Date = MinFecha, Optional FechaRegistroIEF As Date = MaxFecha, Optional CveMoneda As Integer = -1, Optional CveSubProyectoCobranza As Integer = -1, + Optional CveClienteSucursal As Integer = -1, Optional Tipo As Integer = -1, Optional Grupo As String = "") As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_RepRecuperacionDetalle") - With SqlAdapter.SelectCommand.Parameters - - .Add("@FechaI", SqlDbType.Date).Value = FechaI - .Add("@FechaF", SqlDbType.Date).Value = FechaF - .Add("@CveCliente", SqlDbType.Int).Value = CveCliente - .Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto - .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto - .Add("@CveVendedor", SqlDbType.VarChar).Value = CveVendedor - .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario - .Add("@CveEstatus", SqlDbType.Int).Value = CveEstatus - .Add("@IVA", SqlDbType.VarChar).Value = IVA - .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa - .Add("@GPO", SqlDbType.Int).Value = Agrupador - .Add("@CveResponsable", SqlDbType.Int).Value = CveResponsable - .Add("@TipoDocto", SqlDbType.VarChar).Value = TipoDocto - .Add("@CveClienteSucursal", SqlDbType.Int).Value = CveClienteSucursal - .Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta - .Add("@CveBanco", SqlDbType.Int).Value = CveBanco - .Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta - .Add("@Grupo", SqlDbType.VarChar).Value = Grupo - .Add("@TipoCambio", SqlDbType.Int).Value = TipoCambio - .Add("@TCEspecifico", SqlDbType.Float).Value = TCEspecifico - .Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda - .Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion - .Add("@Tipo", SqlDbType.Int).Value = Tipo - .Add("@EsDistribuidor", SqlDbType.Int).Value = EsDistribuidor - .Add("@CveCondicionesPago", SqlDbType.Int).Value = CveCondicionesPago - .Add("@CveTipoTransaccion", SqlDbType.Int).Value = CveTipoTransaccion - - .Add("@FechaAplicadoI", SqlDbType.Date).Value = FechaAplicadoI.ToShortDateString - .Add("@FechaAplicadoF", SqlDbType.Date).Value = FechaAplicadoF.ToShortDateString - .Add("@FechaRegistroIEI", SqlDbType.Date).Value = FechaRegistroIEI.ToShortDateString + With SqlAdapter.SelectCommand.Parameters + 'PARAMETROS BASE + .Add("@FechaI", SqlDbType.Date).Value = FechaI + .Add("@FechaF", SqlDbType.Date).Value = FechaF + .Add("@FechaIEjec", SqlDbType.Date).Value = FechaIEjec + .Add("@FechaFEjec", SqlDbType.Date).Value = FechaFEjec + .Add("@CveCliente", SqlDbType.Int).Value = CveCliente + .Add("@CveSubProyectoEjecucion", SqlDbType.Int).Value = CveSubProyectoEjecucion + .Add("@CveVendedor", SqlDbType.VarChar).Value = CveVendedor + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@CveEstatus", SqlDbType.VarChar).Value = CveEstatus + .Add("@IVA", SqlDbType.VarChar).Value = IVA + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@GPO", SqlDbType.Int).Value = Gpo + .Add("@TipoDocto", SqlDbType.VarChar).Value = TipoDocto + .Add("@CveSubProyecto", SqlDbType.VarChar).Value = CveSubProyecto + .Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto + .Add("@TipoCambio", SqlDbType.Int).Value = TipoCambio + .Add("@TCEspecifico", SqlDbType.Float).Value = TCEspecifico + .Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta + .Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion + .Add("@CveCondicionesPago", SqlDbType.Int).Value = CveCondicionesPago + .Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente + .Add("@EsDistribuidor", SqlDbType.Int).Value = EsDistribuidor + .Add("@ModalidadContable", SqlDbType.Bit).Value = ModalidadContable + .Add("@CveTipoRelacion", SqlDbType.Int).Value = CveTipoRelacion + .Add("@ServicioDomicilio", SqlDbType.Int).Value = ServicioDomicilio + .Add("@EsFacturaGlobal", SqlDbType.Int).Value = EsFacturaGlobal + .Add("@EsFilial", SqlDbType.Int).Value = EsFilial + 'PARAMETROS EXTRA + .Add("@CveResponsable", SqlDbType.Int).Value = CveResponsable + .Add("@CveBanco", SqlDbType.Int).Value = CveBanco + .Add("@CveEstatusCliente", SqlDbType.Int).Value = EstatusCliente + .Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta + .Add("@CveTipoTransaccion", SqlDbType.Int).Value = CveTipoTransaccion + .Add("@FechaAplicadoI", SqlDbType.Date).Value = FechaAplicadoI.ToShortDateString + .Add("@FechaAplicadoF", SqlDbType.Date).Value = FechaAplicadoF.ToShortDateString + + .Add("@FechaRegistroIEI", SqlDbType.Date).Value = FechaRegistroIEI.ToShortDateString .Add("@FechaRegistroIEF", SqlDbType.Date).Value = FechaRegistroIEF.ToShortDateString - .Add("@CveSubProyectoCobranza", SqlDbType.Int).Value = CveSubProyectoCobranza + .Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda + .Add("@CveSubProyectoCobranza", SqlDbType.Int).Value = CveSubProyectoCobranza + .Add("@CveClienteSucursal", SqlDbType.Int).Value = CveClienteSucursal + .Add("@Tipo", SqlDbType.Int).Value = Tipo + .Add("@Grupo", SqlDbType.VarChar).Value = Grupo + + '.Add("@FechaI", SqlDbType.Date).Value = FechaI + '.Add("@FechaF", SqlDbType.Date).Value = FechaF + '.Add("@CveCliente", SqlDbType.Int).Value = CveCliente + '.Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto + '.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto + '.Add("@CveVendedor", SqlDbType.VarChar).Value = CveVendedor + '.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + '.Add("@CveEstatus", SqlDbType.Int).Value = CveEstatus + '.Add("@IVA", SqlDbType.VarChar).Value = IVA + '.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + '.Add("@GPO", SqlDbType.Int).Value = Agrupador + '.Add("@CveResponsable", SqlDbType.Int).Value = CveResponsable + '.Add("@TipoDocto", SqlDbType.VarChar).Value = TipoDocto + '.Add("@CveClienteSucursal", SqlDbType.Int).Value = CveClienteSucursal + '.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta + '.Add("@CveBanco", SqlDbType.Int).Value = CveBanco + '.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta + '.Add("@Grupo", SqlDbType.VarChar).Value = Grupo + '.Add("@TipoCambio", SqlDbType.Int).Value = TipoCambio + '.Add("@TCEspecifico", SqlDbType.Float).Value = TCEspecifico + '.Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda + '.Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion + '.Add("@Tipo", SqlDbType.Int).Value = Tipo + '.Add("@EsDistribuidor", SqlDbType.Int).Value = EsDistribuidor + '.Add("@CveCondicionesPago", SqlDbType.Int).Value = CveCondicionesPago + '.Add("@CveTipoTransaccion", SqlDbType.Int).Value = CveTipoTransaccion + + '.Add("@FechaAplicadoI", SqlDbType.Date).Value = FechaAplicadoI.ToShortDateString + '.Add("@FechaAplicadoF", SqlDbType.Date).Value = FechaAplicadoF.ToShortDateString + '.Add("@FechaRegistroIEI", SqlDbType.Date).Value = FechaRegistroIEI.ToShortDateString + '.Add("@FechaRegistroIEF", SqlDbType.Date).Value = FechaRegistroIEF.ToShortDateString + '.Add("@CveSubProyectoCobranza", SqlDbType.Int).Value = CveSubProyectoCobranza End With Try diff --git a/Ventas/RepRecuperacion.aspx b/Ventas/RepRecuperacion.aspx index ea900ab31..6b5e73c87 100644 --- a/Ventas/RepRecuperacion.aspx +++ b/Ventas/RepRecuperacion.aspx @@ -4,6 +4,50 @@