dbo.ln_doc_id

Description

Properties

Name Value
ANSI Nulls ON

True

Quoted Identifier ON

True

Encrypted

False

Execute As
Assembly

Parameters

3
Name Data Type Length Description
@contraparte int 4
@gestion int 4
@tipo_doc int 4

SQL Script

Copy
SET QUOTED_IDENTIFIER, ANSI_NULLS ON
GO
/*
exec ln_doc_id 166590,163811,1211
*/

CREATE OR ALTER PROCEDURE dbo.ln_doc_id 
  @contraparte int, 
  @gestion     int,
  @tipo_doc    int

AS
BEGIN
 SET NOCOUNT ON;
  select top 1 nombre_tipo_doc, doc_id 
  from ln_docs 
  inner join LN_tipos_doc on ln_tipos_doc.tipo_doc = ln_docs.tipo_doc
  where ln_docs.tipo_doc = @tipo_doc
      and contraparte =  @contraparte and gestion = @gestion
      and estado_doc = 'V' order by doc_id desc
END 
GO

Used By

No items found