CREATE OR REPLACE VIEW USU_VTITULOS AS
SELECT E301TCR.NUMTIT TITULO,
       0 SITUACAO,
       E301TCR.CODTPT TIPOTITULO,
       E085CLI.CODCLI IDPESSOAFJ,
       E301TCR.CODEMP CDEMPRESA,
	   E301TCR.CODFIL CDFILIAL,
       0 EMISSAO,
       TO_CHAR(E301TCR.VCTPRO, 'YYYYMMDD') VENCIMENTO,
       0 ULTIMOVENCIMENTO,
       0 PROXIMOCONTATO,
       E301TCR.NUMNFV NOTAFISCAL,
       0 BORDERO,
       0 PROTESTADOEM,
       0 LIQUIDADOEM,
       E301TCR.VLRORI VALOR,
       0 REPRESENTANTE,
       0 COMISSAO,
       0 COMISSADEVIDA,
       0 COMISSAOORDENADA,
       0 QTDEMRECEBIMENTOS,
       E301TCR.VLRORI - E301TCR.VLRABE TOTALEMRECEBIMENTO,
       0 QTDRECEBIDO,
       0 TOTALRECEBIDO,
       0 QTDEXTRA,
       0 TOTALEXTRA,
       E301TCR.OBSTCR OBS,
       '0' EMITIDOPOR,
       TO_CHAR(E301TCR.DATEMI, 'YYYYMMDD') EMITIDOEM,
       DECODE(E085CLI.CGCCPF, 0, '1                   ', '0                   ') ALTERADOPOR,
       0 ALTERADOEM,
       0 COMISSAODEVIDA
FROM   E301TCR, E085CLI, E002TPT
WHERE  E301TCR.CODCLI =  E085CLI.CODCLI     
AND    E301TCR.CODTPT =  E002TPT.CODTPT
