IF OBJECT_ID('SP_CUPOMNAOFISCAL_PESQUISAR') IS NOT NULL 
	DROP PROCEDURE SP_CUPOMNAOFISCAL_PESQUISAR 
GO 

CREATE PROCEDURE SP_CUPOMNAOFISCAL_PESQUISAR(@CD_EMP INT,@CD_FILIAL INT,@DT_CUPOM DATETIME)
AS
BEGIN
	SELECT * FROM V_CUPOMNAOFISCAL WHERE CD_EMP = @CD_EMP AND CD_FILIAL = @CD_FILIAL AND DT_CUPOM = @DT_CUPOM
	SELECT * FROM V_CUPOMNAOFISCAL_TEF WHERE CD_EMP = @CD_EMP AND CD_FILIAL = @CD_FILIAL AND DT_CUPOM = @DT_CUPOM
	SELECT * FROM V_CUPOMNAOFISCAL_CHEQUE WHERE CD_EMP = @CD_EMP AND CD_FILIAL = @CD_FILIAL AND DT_CUPOM = @DT_CUPOM
END