CREATE OR REPLACE VIEW V_IMPOSTO_NOTAF
AS 
SELECT IT.CDFILIAL, IT.NRLANCTONF, IT.NRSEQITPROD, IT.NRITPROIMPOS, IT.VRALIQITEM, IT.CDIMPOSTO, IT.VRCONTITIMP, IT.VRPERREDBCIT,
          IT.VRBASECALCIT, IT.VRALIQITEM AS VRALIQIT, IT.VRPARDEDIT, IT.VRIMPOSTOIT, IT.CDFISCALIT, IT.CDSITUTRIBIT,
          IT.CDFISCOPERIT, IT.CDSUFXCFOPIT
     FROM ITEMPROIMPOS IT, NOTAFISCAL N
    WHERE N.CDFILIAL  = IT.CDFILIAL
      AND N.NRLANCTONF = IT.NRLANCTONF
      AND ((N.IDSTATUS = 'E') OR (N.IDSTATUS = 'A'))
/