DROP PROCEDURE IN_INTRAHEADSelProc
GO
CREATE PROCEDURE IN_INTRAHEADSelProc
(
    @SITEID            UD_IDSITE,
    @BATNBR            char(10),
    @TYPEDOCID         UD_TYPEMOVEID)
AS
BEGIN
    SELECT SITEID,
           BATNBR,
           TYPEDOCID,
           VENDIDSS,
           DOCTYPEID,
           DOCSTATUSID,
           REFNBR,
           CURYRATE,
           TOCURYID,
           FROMCURYID,
           SITEPROCES,
           NBRORDER,
           DATENBRORDER,
           USERIDORDER,
           INTRDATE,
           INTRDATEPROCE,
           SITEDEST,
           INTRTOTPEN,
           INTRTAXPEN,
           INTRTOTUSD,
           INTRTAXUSD,
           PERPOST,
           RLSED,
           USER1,
           USER2,
           USER3,
           USER4,
           USER5,
           USER6,
           USER7,
           USER8,
           USER9,
           TSTAMP
      FROM IN_INTRAHEAD
     WHERE SITEID    = @SITEID
       AND BATNBR    = @BATNBR
       AND TYPEDOCID = @TYPEDOCID

    RETURN(0)
END