DROP PROCEDURE OP_ListarVales_Proc
GO 
CREATE PROCEDURE OP_ListarVales_Proc 
(@SITEID	UD_IDSITE,
 @NBRDOCUMENT  UD_CORRELATIVOS
) 
as
BEGIN
	DECLARE @DOCTYPEIDTICKET UD_DOCTYPEID
	SET @DOCTYPEIDTICKET =(SELECT DOCTYPEIDTICKET FROM OP_SETUP)

	SELECT NBRBONUS AS Número_de_Vale
	FROM OP_BONUS 
	WHERE DOCTYPEID=@DOCTYPEIDTICKET AND NBRDOCUMENT=@NBRDOCUMENT AND SITEID=@SITEID

END

