← Índice de manuales
Manual funcional · Sistema Plenario v14

Reportes — Online, Formularios y Funciones

Catálogo de objetos de base de datos de Plenario v14 vinculados a reportes. Agrupa tres familias:

Módulo: ReportesVersión: 1.0Actualizado: 2026-06-23

Reportes — Online, Formularios y Funciones

Catálogo de objetos de base de datos de Plenario v14 vinculados a reportes. Agrupa tres familias:

  • Reporte Online (Reporte_Online_Log / Reporte_Online_Setup): registro de consultas online de cartera/beneficiarios y la configuración de credenciales del servicio. CRUD estándar (Add/Mod/Del/Search).
  • Formularios ↔ Reportes (Formularios_Reportes): mapeo entre un formulario de la aplicación y la ruta del reporte (Reporte_Path) que dispara. CRUD estándar.
  • Funciones / listados de cartera: ListadoCarteraAFecha (reporte de cartera de cheques a una fecha de corte) y las funciones de tabla fn_Listado*.

Nota sobre los fn_Listado*: en el proyecto SSDT (VPNET_Database\Functions\) los archivos fn_ListadoAcreditados, fn_ListadoCartera, fn_ListadoEntregados y fn_ListadoRechazos están presentes como referencias pero vacíos (sin cuerpo CREATE FUNCTION). Se documentan como stubs; el cuerpo real no está en la fuente y no se inventa.


Reporte Online — Log: Búsqueda

  • SP/archivo: ReporteOnline_Log_Search.proc.sql
  • Tipo: CRUD (Search)
  • Parámetros: @Id, @FechaDesde, @FechaHasta, @NroDocumento, @RazonSocial, @NroBeneficiario, @Ticket, @Resultado, @Id_Usuario_Add, @Fecha_Add
  • Relación con módulos: Reporte_Online_Log + Seguridad_Usuarios (resuelve el NombreUsuario del usuario que registró la consulta)

Búsqueda dinámica sobre el log de consultas online. Arma un WHERE por SQL dinámico según los filtros recibidos (rango de fecha de consulta, documento, razón social, beneficiario, ticket, usuario) y devuelve las filas con el UserName resuelto.

CREATE PROCEDURE [dbo].[ReporteOnline_Log_Search]
                                  @Id Int = 0,
                                  @FechaDesde Datetime = '01/01/1900',
                                  @FechaHasta Datetime = '01/01/1900',
                                  @NroDocumento Varchar(50) = '',
                                  @RazonSocial Varchar(100) = '',
                                  @NroBeneficiario Varchar(50) = '',
                                  @Ticket Varchar(200) = '',
                                  @Resultado Text = '',
                                  @Id_Usuario_Add Int = 0,
                                  @Fecha_Add Datetime = '01/01/1900'
AS
Declare @Where     VarChar(1000),
        @Columns   VarChar(1000),
        @SQLString VarChar(1000),
        @Inner     VarChar(1000)

Set @Where = ''
Set @Columns = 'Reporte_Online_Log.*, NombreUsuario = Seguridad_Usuarios.UserName'
Set @Inner = 'Inner Join Seguridad_Usuarios on Seguridad_Usuarios.Id = Reporte_Online_Log.Id_Usuario_Add'

If @Id <> 0
        If @Where <> ''
                Set @Where = @Where + ' And Reporte_Online_Log.Id = ' + RTrim(Convert(Char,@Id))
        Else
                Set @Where = @Where + ' Reporte_Online_Log.Id = ' + RTrim(Convert(Char,@Id))

If @FechaDesde <> '01/01/1900' And @FechaHasta <> '01/01/1900'
    If @Where <> ''
        Set @Where = @Where + ' And Fecha_Consulta Between ''' + RTrim(Convert(Char,@FechaDesde,103)) + ''' And ''' + RTrim(Convert(Char,@FechaHasta,103)) + ''''
    Else
        Set @Where = @Where + ' Fecha_Consulta Between ''' + RTrim(Convert(Char,@FechaDesde,103)) + ''' And ''' + RTrim(Convert(Char,@FechaHasta,103)) + ''''

If @NroDocumento <> ''
        If @Where <> ''
                Set @Where = @Where + ' And Reporte_Online_Log.NroDocumento Like ''%' + Replace(RTrim(@NroDocumento),' ', '%') + '%'''
        Else
                Set @Where = @Where + ' Reporte_Online_Log.NroDocumento Like ''%' + Replace(RTrim(@NroDocumento),' ', '%') + '%'''

If @RazonSocial <> ''
        If @Where <> ''
                Set @Where = @Where + ' And Reporte_Online_Log.RazonSocial Like ''%' + Replace(RTrim(@RazonSocial),' ', '%') + '%'''
        Else
                Set @Where = @Where + ' Reporte_Online_Log.RazonSocial Like ''%' + Replace(RTrim(@RazonSocial),' ', '%') + '%'''

If @NroBeneficiario <> ''
        If @Where <> ''
                Set @Where = @Where + ' And Reporte_Online_Log.NroBeneficiario Like ''%' + Replace(RTrim(@NroBeneficiario),' ', '%') + '%'''
        Else
                Set @Where = @Where + ' Reporte_Online_Log.NroBeneficiario Like ''%' + Replace(RTrim(@NroBeneficiario),' ', '%') + '%'''

If @Ticket <> ''
        If @Where <> ''
                Set @Where = @Where + ' And Reporte_Online_Log.Ticket Like ''%' + Replace(RTrim(@Ticket),' ', '%') + '%'''
        Else
                Set @Where = @Where + ' Reporte_Online_Log.Ticket Like ''%' + Replace(RTrim(@Ticket),' ', '%') + '%'''

If @Id_Usuario_Add <> 0
        If @Where <> ''
                Set @Where = @Where + ' And Reporte_Online_Log.Id_Usuario_Add = ' + RTrim(Convert(Char,@Id_Usuario_Add))
        Else
                Set @Where = @Where + ' Reporte_Online_Log.Id_Usuario_Add = ' + RTrim(Convert(Char,@Id_Usuario_Add))

If @Fecha_Add <> '01/01/1900'
        If @Where <> ''
                Set @Where = @Where + ' And Reporte_Online_Log.Fecha_Add = ''' + RTrim(Convert(Char,@Fecha_Add,103)) + ''''
        Else
                Set @Where = @Where + ' Reporte_Online_Log.Fecha_Add = ''' + RTrim(Convert(Char,@Fecha_Add,103)) + ''''

If @Where <> ''
        Set @SQLString = 'Select ' + @Columns + ' From Reporte_Online_Log ' + @Inner + ' Where ' + @Where
Else
        Set @SQLString = 'Select ' + @Columns + ' From Reporte_Online_Log ' + @Inner
Exec(@SQLString)
Print @SQLString

Reporte Online — Log: Alta

  • SP/archivo: ReporteOnline_Log_Add.sql
  • Tipo: CRUD (Add)
  • Parámetros: @Fecha_Consulta, @NroDocumento, @RazonSocial, @NroBeneficiario, @Ticket, @Resultado, @Id_Usuario_Add, @Fecha_Add
  • Relación con módulos: Reporte_Online_Log

Inserta un registro en el log de consultas online (documento/razón social/beneficiario consultados, ticket, resultado y usuario que la ejecutó).

create PROCEDURE [dbo].[ReporteOnline_Log_Add]
                               @Fecha_Consulta Datetime = '01/01/1900',
                               @NroDocumento Varchar(50) = '',
                               @RazonSocial Varchar(100) = '',
                               @NroBeneficiario Varchar(50) = '',
                               @Ticket Varchar(200) = '',
                               @Resultado Text = '',
                               @Id_Usuario_Add Int = 0,
                               @Fecha_Add Datetime = '01/01/1900'
AS
Insert Into Reporte_Online_Log (Fecha_Consulta, NroDocumento, RazonSocial, NroBeneficiario, Ticket, Resultado, Id_Usuario_Add, Fecha_Add)
     Values (@Fecha_Consulta, @NroDocumento, @RazonSocial, @NroBeneficiario, @Ticket, @Resultado, @Id_Usuario_Add, @Fecha_Add)

Reporte Online — Log: Modificación

  • SP/archivo: ReporteOnline_Log_Mod.sql
  • Tipo: CRUD (Mod)
  • Parámetros: @Id, @Fecha_Consulta, @NroDocumento, @RazonSocial, @NroBeneficiario, @Ticket, @Resultado, @Id_Usuario_Add, @Fecha_Add
  • Relación con módulos: Reporte_Online_Log

Actualiza por @Id todos los campos de un registro del log de consultas online.

create PROCEDURE [dbo].[ReporteOnline_Log_Mod]
                               @Id Int = 0,
                               @Fecha_Consulta Datetime = '01/01/1900',
                               @NroDocumento Varchar(50) = '',
                               @RazonSocial Varchar(100) = '',
                               @NroBeneficiario Varchar(50) = '',
                               @Ticket Varchar(200) = '',
                               @Resultado Text = '',
                               @Id_Usuario_Add Int = 0,
                               @Fecha_Add Datetime = '01/01/1900'
AS
Update Reporte_Online_Log
Set Fecha_Consulta = @Fecha_Consulta, NroDocumento = @NroDocumento, RazonSocial = @RazonSocial, NroBeneficiario = @NroBeneficiario, Ticket = @Ticket, Resultado = @Resultado, Id_Usuario_Add = @Id_Usuario_Add, Fecha_Add = @Fecha_Add
Where Id = @Id

Reporte Online — Log: Baja

  • SP/archivo: ReporteOnline_Log_Del.sql
  • Tipo: CRUD (Del)
  • Parámetros: @Id
  • Relación con módulos: Reporte_Online_Log

Elimina un registro del log de consultas online por @Id.

create PROCEDURE [dbo].[ReporteOnline_Log_Del] @Id Int
AS

Delete From Reporte_Online_Log Where Id = @Id

Reporte Online — Setup: Búsqueda

  • SP/archivo: ReporteOnline_Setup_Search.proc.sql
  • Tipo: CRUD (Search)
  • Parámetros: @Id, @UserName, @Password, @TTL, @UserNameWeb, @PasswordWeb, @HostWeb
  • Relación con módulos: Reporte_Online_Setup

Búsqueda dinámica sobre la configuración del servicio de Reporte Online (credenciales locales, TTL, y credenciales/host del servicio web). Arma el WHERE por SQL dinámico según los filtros.

CREATE PROCEDURE [dbo].[ReporteOnline_Setup_Search]
                                    @Id Int = 0,
                                    @UserName Varchar(50) = '',
                                    @Password Varchar(50) = '',
                                    @TTL Int = 0,
                                    @UserNameWeb Varchar(50) = '',
                                    @PasswordWeb Varchar(50) = '',
                                    @HostWeb Varchar(200) = ''
AS

Declare @Where     VarChar(1000),
        @Columns   VarChar(1000),
        @SQLString VarChar(1000),
        @Inner     VarChar(1000)

Set @Where = ''
Set @Columns = '*'
Set @Inner = ''

If @Id <> 0
        If @Where <> ''
                Set @Where = @Where + ' And Reporte_Online_Setup.Id = ' + RTrim(Convert(Char,@Id))
        Else
                Set @Where = @Where + ' Reporte_Online_Setup.Id = ' + RTrim(Convert(Char,@Id))

If @UserName <> ''
        If @Where <> ''
                Set @Where = @Where + ' And Reporte_Online_Setup.UserName Like ''%' + Replace(RTrim(@UserName),' ', '%') + '%'''
        Else
                Set @Where = @Where + ' Reporte_Online_Setup.UserName Like ''%' + Replace(RTrim(@UserName),' ', '%') + '%'''

If @Password <> ''
        If @Where <> ''
                Set @Where = @Where + ' And Reporte_Online_Setup.Password Like ''%' + Replace(RTrim(@Password),' ', '%') + '%'''
        Else
                Set @Where = @Where + ' Reporte_Online_Setup.Password Like ''%' + Replace(RTrim(@Password),' ', '%') + '%'''

If @TTL <> 0
        If @Where <> ''
                Set @Where = @Where + ' And Reporte_Online_Setup.TTL = ' + RTrim(Convert(Char,@TTL))
        Else
                Set @Where = @Where + ' Reporte_Online_Setup.TTL = ' + RTrim(Convert(Char,@TTL))

If @UserNameWeb  <> 0
        If @Where <> ''
                Set @Where = @Where + ' And Reporte_Online_Setup.UserNameWeb = ' + RTrim(Convert(Char,@UserNameWeb))
        Else
                Set @Where = @Where + ' Reporte_Online_Setup.UserNameWeb = ' + RTrim(Convert(Char,@UserNameWeb))

If @PasswordWeb  <> 0
        If @Where <> ''
                Set @Where = @Where + ' And Reporte_Online_Setup.PasswordWeb = ' + RTrim(Convert(Char,@PasswordWeb))
        Else
                Set @Where = @Where + ' Reporte_Online_Setup.PasswordWeb = ' + RTrim(Convert(Char,@PasswordWeb))

If @HostWeb  <> 0
        If @Where <> ''
                Set @Where = @Where + ' And Reporte_Online_Setup.HostWeb = ' + RTrim(Convert(Char,@HostWeb))
        Else
                Set @Where = @Where + ' Reporte_Online_Setup.HostWeb = ' + RTrim(Convert(Char,@HostWeb))

If @Where <> ''
        Set @SQLString = 'Select ' + @Columns + ' From Reporte_Online_Setup ' + @Inner + ' Where ' + @Where
Else
        Set @SQLString = 'Select ' + @Columns + ' From Reporte_Online_Setup ' + @Inner
Exec ( @SQLString )
Print @SQLString

Reporte Online — Setup: Alta

  • SP/archivo: ReporteOnline_Setup_Add.proc.sql
  • Tipo: CRUD (Add)
  • Parámetros: @Id, @UserName, @PassWord, @TTL, @Activo, @UserNameWeb, @PasswordWeb, @HostWeb
  • Relación con módulos: Reporte_Online_Setup

Inserta la configuración del servicio de Reporte Online (incluye credenciales locales, TTL, flag Activo y credenciales/host del servicio web).

CREATE PROCEDURE [dbo].[ReporteOnline_Setup_Add]
                                 @Id Int = 0,
                                 @UserName Varchar(50) = '',
                                 @PassWord Varchar(50) = '',
                                 @TTL Int = 0,
                                 @Activo Bit = 0,
                                 @UserNameWeb Varchar(50) = '',
                                 @PasswordWeb Varchar(50) = '',
                                 @HostWeb Varchar(200) = ''
AS
Insert Into Reporte_Online_Setup (Id, UserName, [PassWord], TTL, Activo,UserNameWeb,PasswordWeb, HostWeb)
     Values (@Id, @UserName, @PassWord, @TTL, @Activo, @UserNameWeb , @PasswordWeb , @HostWeb)

Reporte Online — Setup: Modificación

  • SP/archivo: ReporteOnline_Setup_Mod.sql
  • Tipo: CRUD (Mod)
  • Parámetros: @Id, @UserName, @PassWord, @TTL, @Activo
  • Relación con módulos: Reporte_Online_Setup

Actualiza la configuración por @Id. Nota: a diferencia del Add, este Mod no actualiza los campos UserNameWeb, PasswordWeb ni HostWeb.

create PROCEDURE [dbo].[ReporteOnline_Setup_Mod]
                                 @Id Int = 0,
                                 @UserName Varchar(50) = '',
                                 @PassWord Varchar(50) = '',
                                 @TTL Int = 0,
                                 @Activo Bit = 0
AS
Update Reporte_Online_Setup
Set Id = @Id, UserName = @UserName, PassWord = @PassWord, TTL = @TTL, Activo = @Activo
Where Id = @Id

Reporte Online — Setup: Baja

  • SP/archivo: ReporteOnline_Setup_Del.sql
  • Tipo: CRUD (Del)
  • Parámetros: @Id
  • Relación con módulos: Reporte_Online_Setup

Elimina la configuración del servicio de Reporte Online por @Id.

create PROCEDURE [dbo].[ReporteOnline_Setup_Del] @Id Int
AS

Delete From Reporte_Online_Setup Where Id = @Id

Formularios ↔ Reportes: Búsqueda

  • SP/archivo: Formularios_Reportes_Search.proc.sql
  • Tipo: CRUD (Search)
  • Parámetros: @Id, @Nombre_A_Mostrar, @Reporte_Path, @Formulario
  • Relación con módulos: Formularios_Reportes

Búsqueda dinámica sobre el mapeo formulario→reporte. Filtra por id, nombre a mostrar, ruta del reporte o nombre del formulario (todos LIKE).

CREATE PROCEDURE [dbo].[Formularios_Reportes_Search]
                                             @Id Int = 0,
                                             @Nombre_A_Mostrar Varchar(50) = '',
                                             @Reporte_Path Varchar(200) = '',
                                             @Formulario Varchar(50) = ''
AS
Declare @Where     VarChar(1000),
        @Columns   VarChar(1000),
        @SQLString VarChar(1000),
        @Inner     VarChar(1000)
Set @Where = ''
Set @Columns = '*'
Set @Inner = ''
If @Id <> 0
        If @Where <> ''
                Set @Where = @Where + ' And Formularios_Reportes.Id = ' + RTrim(Convert(Char,@Id))
        Else
                Set @Where = @Where + ' Formularios_Reportes.Id = ' + RTrim(Convert(Char,@Id))
If @Nombre_A_Mostrar <> ''
        If @Where <> ''
                Set @Where = @Where + ' And Formularios_Reportes.Nombre_A_Mostrar Like ''%' + Replace(RTrim(@Nombre_A_Mostrar),' ', '%') + '%'''
        Else
                Set @Where = @Where + ' Formularios_Reportes.Nombre_A_Mostrar Like ''%' + Replace(RTrim(@Nombre_A_Mostrar),' ', '%') + '%'''
If @Reporte_Path <> ''
        If @Where <> ''
                Set @Where = @Where + ' And Formularios_Reportes.Reporte_Path Like ''%' + Replace(RTrim(@Reporte_Path),' ', '%') + '%'''
        Else
                Set @Where = @Where + ' Formularios_Reportes.Reporte_Path Like ''%' + Replace(RTrim(@Reporte_Path),' ', '%') + '%'''
If @Formulario <> ''
        If @Where <> ''
                Set @Where = @Where + ' And Formularios_Reportes.Formulario Like ''%' + Replace(RTrim(@Formulario),' ', '%') + '%'''
        Else
                Set @Where = @Where + ' Formularios_Reportes.Formulario Like ''%' + Replace(RTrim(@Formulario),' ', '%') + '%'''
If @Where <> ''
        Set @SQLString = 'Select ' + @Columns + ' From Formularios_Reportes ' + @Inner + ' Where ' + @Where
Else
        Set @SQLString = 'Select ' + @Columns + ' From Formularios_Reportes ' + @Inner
Exec(@SQLString)
Print @SQLString

Formularios ↔ Reportes: Alta

  • SP/archivo: Formularios_Reportes_Add.proc.sql
  • Tipo: CRUD (Add)
  • Parámetros: @Id, @Nombre_A_Mostrar, @Reporte_Path, @Formulario
  • Relación con módulos: Formularios_Reportes

Inserta un mapeo entre un formulario de la aplicación y la ruta de reporte (Reporte_Path) que dispara, con su nombre a mostrar.

CREATE PROCEDURE [dbo].[Formularios_Reportes_Add]
                                          @Id Int = 0,
                                          @Nombre_A_Mostrar Varchar(50) = '',
                                          @Reporte_Path Varchar(200) = '',
                                          @Formulario Varchar(50) = ''
AS
Insert Into Formularios_Reportes (Id, Nombre_A_Mostrar, Reporte_Path, Formulario)
     Values (@Id, @Nombre_A_Mostrar, @Reporte_Path, @Formulario)

Formularios ↔ Reportes: Modificación

  • SP/archivo: Formularios_Reportes_Mod.proc.sql
  • Tipo: CRUD (Mod)
  • Parámetros: @Id, @Nombre_A_Mostrar, @Reporte_Path, @Formulario
  • Relación con módulos: Formularios_Reportes

Actualiza por @Id el mapeo formulario→reporte (nombre a mostrar, ruta del reporte y formulario).

CREATE PROCEDURE [dbo].[Formularios_Reportes_Mod]
                                          @Id Int = 0,
                                          @Nombre_A_Mostrar Varchar(50) = '',
                                          @Reporte_Path Varchar(200) = '',
                                          @Formulario Varchar(50) = ''
AS
Update Formularios_Reportes
Set Id = @Id, Nombre_A_Mostrar = @Nombre_A_Mostrar, Reporte_Path = @Reporte_Path, Formulario = @Formulario
Where Id = @Id

Formularios ↔ Reportes: Baja

  • SP/archivo: Formularios_Reportes_Del.proc.sql
  • Tipo: CRUD (Del)
  • Parámetros: @Id
  • Relación con módulos: Formularios_Reportes

Elimina un mapeo formulario→reporte por @Id.

CREATE PROCEDURE [dbo].[Formularios_Reportes_Del] @Id Int
AS

Delete From Formularios_Reportes Where Id = @Id

Listado de Cartera a Fecha

  • SP/archivo: ListadoCarteraAFecha.sql
  • Tipo: Reporte
  • Parámetros: @Fecha (fecha de corte; default '26/11/2014')
  • Relación con módulos: Cruza Tesorería/Cheques (Documentos, Documentos_Marcas), Bancos, Clientes, Firmantes, Sucursales, Liquidaciones (Liquidaciones / Liquidaciones_Detalle), Recibos de Cobranza (Recibos / Recibos_Detalle), Órdenes de Pago (OrdenesDePago / OrdenesDePago_Detalle), Entregas (Entregas / Entregas_Detalle), Ventas (Ventas / Ventas_Detalle) e Inversores.

Reconstruye la cartera de cheques (Id_DocumentoTipo = 1) vigente a una fecha de corte @Fecha: por cada cheque que ya había ingresado y todavía no había salido a esa fecha, devuelve datos del cheque, su operación de origen (Liquidación / Recibo / Cheque extraordinario) y su operación/entidad de destino (Entrega, Venta, OP, depósito o "Cartera"). Es la base de los reportes de stock de cartera a fecha histórica.

CREATE PROCEDURE [dbo].[ListadoCarteraAFecha]
       @Fecha DATETIME = '26/11/2014'
AS


SELECT
    ---- Datos del cheque
    Id_Documento = D.Id,
    Nro_Cheque = D.Nro_Comprobante,
    Id_Banco = D.Id_Banco,
    Banco_Nombre = B.nombre,
    Sucursal_Banco = D.Sucursal,
    Cuenta_Banco = D.Nro_Cta,
    Id_Firmante = D.Id_Firmante,
    Firmante_CUIT = F.cuit,
    Firmante_Nombre = F.Nombre,
    Importe = D.Bruto,
    Fecha_Emision = D.Fecha_Emision,
    Fecha_Deposito = D.Fecha_Deposito,
    Clearing = D.Clearing,
    Fecha_Acreditacion = D.Fecha_Acreditacion,
    ALaOrden = d.Alaorden,
    Fecha_Anulado = Case When D.Fecha_Anulacion > @Fecha Then null Else D.Fecha_Anulacion End,
    MarcaIndividual = DM.Nombre,

    ---- Datos de origen
    Fecha_Ingreso = ISNULL(L.Fecha_Confirmacion,ISNULL(R.Fecha_Liquidacion,D.Fecha_Add)),
    Operacion_Origen = ISNULL('Liq. Nº ' + convert(varchar(10),L.NroComprobante),
                        ISNULL('RC Nº ' + convert(varchar(10),R.Id),
                        'Ch. Extraordinario')),
    Id_Cliente = D.Id_Cliente,
    Cliente_Nombre = C.nombre,
    Id_Sucursal = D.Id_Sucursal,
    Sucursal_Nombre = S.Descripcion,

    ---- Datos destino
    Operacion_Destino = ISNULL('Entrega Nº ' + convert(varchar(10),E.Id),
                        Isnull('Venta Nº ' + convert(varchar(10),V.Id),
                        IsNull('OP Nº ' + convert(varchar(10),O.Id),
                        case when fecha_depositado is not null then 'Dep. ' + convert(varchar(10),D.Fecha_Depositado,103) else
                        'Cartera' end))),
    Entidad_Destino = ISNULL('PF Nº ' + CONVERT(varchar(10),E.Id_Inversor) + ' - ' + I.Nombre,
                      ISNULL('PF Nº ' + CONVERT(varchar(10),V.Id_Inversor) + ' - ' + I.Nombre,
                    'Otro')),
    Fecha_Salida = Convert(Datetime,Isnull(O.Fecha_Liquidacion,IsNull(V.Fecha_Confirmacion,IsNull(E.Fecha_Confirmacion,D.Fecha_Depositado))))

FROM Documentos D
Inner Join Bancos B on B.id = D.Id_Banco
Inner Join Clientes C on C.Id = D.Id_Cliente
Inner Join Firmantes F on F.Id = D.Id_Firmante
Inner Join Sucursales S on S.Id = D.Id_Sucursal
Left Join Liquidaciones_Detalle LD on LD.Id_Documento = D.Id
Left Join Liquidaciones L on L.Id = LD.Id_Liquidacion
Left Join Recibos_Detalle RD on RD.Id_Documento = D.Id
Left Join Recibos R on R.Id = RD.Id_Recibo and R.Fecha_Liquidacion is not null and R.Fecha_Anulacion is null
Left Join OrdenesDePago_Detalle OD on OD.Id_Documento = D.Id
Left Join OrdenesDePago O on O.Id = OD.Id_OrdenDePago
Left Join Entregas_Detalle ED on ED.Id_Documento = D.Id
Left Join Entregas E on E.Id = ED.Id_Entrega
Left Join Ventas_Detalle VD on VD.Id_Documento = D.Id
Left Join Ventas V on V.Id = VD.Id_Venta
Left Join Inversores I on I.Id = ISNULL(E.Id_Inversor,V.Id_Inversor)
LEFT JOIN Documentos_Marcas DM ON DM.Id = D.IdDocumentoMarca

WHERE D.Id_DocumentoTipo = 1
    And (D.Fecha_Anulacion is null or D.Fecha_Anulacion > @Fecha)
    And ((L.Id is not null and L.Fecha_Confirmacion is not null)
        Or (R.Id is not null and R.Fecha_Liquidacion is not null)
        or (L.Id is null and R.Id is null))
    And CONVERT(datetime,ISNULL(L.Fecha_Confirmacion,ISNULL(R.Fecha_Liquidacion,D.Fecha_Add))) <= @Fecha
    And Convert(Datetime,Isnull(O.Fecha_Liquidacion,IsNull(V.Fecha_Confirmacion,IsNull(E.Fecha_Confirmacion,IsNull(D.Fecha_Depositado,dateadd(dd,1,@Fecha)))))) > @Fecha
    And ((V.Fecha_confirmacion is not null and V.Fecha_Anulacion is null)OR V.Id Is NULL)
    AND ((E.Fecha_Confirmacion is not null and E.Fecha_Anulacion is null)OR E.Id Is NULL)
    AND ((O.Fecha_Liquidacion is not null and O.Fecha_Anulacion is null)OR O.ID Is NULL)
    AND (L.Fecha_Confirmacion is not null and L.Fecha_Anulacion is null OR L.Id Is null)

Función fn_ListadoAcreditados

  • SP/archivo: fn_ListadoAcreditados.function.sql
  • Tipo: Función (de tabla)
  • Parámetros: desconocidos
  • Relación con módulos: (no determinable)

El archivo de esta función existe en VPNET_Database\Functions\ pero está vacío (sin cuerpo CREATE FUNCTION). No hay SQL real que documentar; se registra como stub. (No se incluye SQL para no inventar contenido.)


Función fn_ListadoCartera

  • SP/archivo: fn_ListadoCartera.function.sql
  • Tipo: Función (de tabla)
  • Parámetros: desconocidos
  • Relación con módulos: (no determinable)

El archivo de esta función existe en VPNET_Database\Functions\ pero está vacío (sin cuerpo CREATE FUNCTION). No hay SQL real que documentar; se registra como stub. (No se incluye SQL para no inventar contenido.)


Función fn_ListadoEntregados

  • SP/archivo: fn_ListadoEntregados.function.sql
  • Tipo: Función (de tabla)
  • Parámetros: desconocidos
  • Relación con módulos: (no determinable)

El archivo de esta función existe en VPNET_Database\Functions\ pero está vacío (sin cuerpo CREATE FUNCTION). No hay SQL real que documentar; se registra como stub. (No se incluye SQL para no inventar contenido.)


Función fn_ListadoRechazos

  • SP/archivo: fn_ListadoRechazos.function.sql
  • Tipo: Función (de tabla)
  • Parámetros: desconocidos
  • Relación con módulos: (no determinable)

El archivo de esta función existe en VPNET_Database\Functions\ pero está vacío (sin cuerpo CREATE FUNCTION). No hay SQL real que documentar; se registra como stub. (No se incluye SQL para no inventar contenido.)

¿Te resultó útil este manual?