<%session.LCID=1046%>
<!--#include file="funcoes.asp"-->


<%
Sub WBarCode( Valor )
'**************************

Dim f, f1, f2, i
Dim texto
Const fino = 1
Const largo = 3
Const altura = 50
Dim BarCodes(99)

if isempty(BarCodes(0)) then
  BarCodes(0) = "00110"
  BarCodes(1) = "10001"
  BarCodes(2) = "01001"
  BarCodes(3) = "11000"
  BarCodes(4) = "00101"
  BarCodes(5) = "10100"
  BarCodes(6) = "01100"
  BarCodes(7) = "00011"
  BarCodes(8) = "10010"
  BarCodes(9) = "01010"
  for f1 = 9 to 0 step -1
    for f2 = 9 to 0 Step -1
      f = f1 * 10 + f2
      texto = ""
      for i = 1 To 5
        texto = texto & mid(BarCodes(f1), i, 1) + mid(BarCodes(f2), i, 1)
      next
      BarCodes(f) = texto
    next
  next
end if

'Desenho da barra


' Guarda inicial
%>

<head>

<STYLE type=text/css>
.ti { FONT: 9px Arial, Helvetica, sans-serif }
.ct { FONT: 9px Arial Narrow; COLOR: navy }
.cn { FONT: 9px Arial; COLOR: black }
.cp { FONT: bold 11px Arial; COLOR: black }
.ld { FONT: bold 15px Arial; COLOR: #000000 }
.bc { FONT: bold 18px Arial; COLOR: #000000 }
</STYLE>

</head>


<img src=2.gif width=<%=fino%> height=<%=altura%> border=0><img 
src=1.gif width=<%=fino%> height=<%=altura%> border=0><img 
src=2.gif width=<%=fino%> height=<%=altura%> border=0><img 
src=1.gif width=<%=fino%> height=<%=altura%> border=0><img 

<%
texto = valor
if len( texto ) mod 2 <> 0 then
  texto = "0" & texto
end if


' Draw dos dados
do while len(texto) > 0
  i = cint( left( texto, 2) )
  texto = right( texto, len( texto ) - 2)
  f = BarCodes(i)
  for i = 1 to 10 step 2
    if mid(f, i, 1) = "0" then
      f1 = fino
    else
      f1 = largo
    end if
    %>
    src=2.gif width=<%=f1%> height=<%=altura%> border=0><img 
    <%
    if mid(f, i + 1, 1) = "0" Then
      f2 = fino
    else
      f2 = largo
    end if
    %>
    src=1.gif width=<%=f2%> height=<%=altura%> border=0><img 
    <%
  next
loop

' Draw guarda final
%>
src=2.gif width=<%=largo%> height=<%=altura%> border=0><img 
src=1.gif width=<%=fino%> height=<%=altura%> border=0><img 
src=2.gif width=<%=1%> height=<%=altura%> border=0>

<%
'**************************
end sub
'**************************
%>


<SCRIPT language=JavaScript>
var da = (document.all) ? 1 : 0;
var pr = (window.print) ? 1 : 0;
var mac = (navigator.userAgent.indexOf("Mac") != -1); 

function x86(){
if (pr) // NS4, IE5
window.print()
else if (da && !mac) // IE4 (Windows)
vbx86()
else // outros browsers
alert("Desculpe seu browser não suporta esta função. Por favor utilize a barra de trabalho para imprimir a página.");
return false;}
if (da && !pr && !mac) with (document) {
writeln('<OBJECT ID="WB" WIDTH="0" HEIGHT="0" CLASSID="clsid:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>');
writeln('<' + 'SCRIPT LANGUAGE="VBScript">');
writeln('Sub window_onunload');
writeln('  On Error Resume Next');
writeln('  Set WB = nothing');
writeln('End Sub');
writeln('Sub vbx86');
writeln('  OLECMDID_PRINT = 6');
writeln('  OLECMDEXECOPT_DONTPROMPTUSER = 2');
writeln('  OLECMDEXECOPT_PROMPTUSER = 1');
writeln('  On Error Resume Next');
writeln('  WB.ExecWB OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER');
writeln('End Sub');
writeln('<' + '/SCRIPT>');}
</SCRIPT>

<% 

Set Database = Server.CreateObject("ADODB.Connection")
Database.Open StringConexao

wFatura=request.item("Fatura")
wID_Empresa=request.item("ID_Empresa")

SQL=" SELECT * FROM BOLETOS_BANCARIOS BB "
SQL=SQL & " WHERE BB.DOCUMENTO = 'FAT'||" & wFatura
Set TabBoleto = DataBase.Execute(SQL)

SQL="SELECT ID, CNPJ FROM EMPRESAS WHERE ID=" & wID_Empresa
Set TabEmpresa = DataBase.Execute(SQL)

%>
 
<p>&nbsp;</p>
<table border="0" cellpadding="0" cellspacing="0" width="654" style="position: absolute; left: 6; top: 0">
  <tr>
    <td>
      <p align="center" style="text-indent: 0; line-height: 100%; margin: 0">&nbsp;
      <p align="center" style="text-indent: 0; line-height: 100%; margin: 0"><b>
		<font face="Arial" size="5">Boleto Tickets</font></b>
      <hr color="#FF9900">
    </td>
  </tr>
  <tr>
    <td>
<p align="left" style="text-indent: 0; line-height: 100%; margin: 0"><b><font face="Arial" size="2">Imprima
o boleto abaixo e pague preferencialmente nas casas lotéricas, podendo ser pago
ainda na rede bancaria.</font></b></p>
<p align="left" style="text-indent: 0; line-height: 100%; margin: 0">&nbsp;</p>
<p align="left" style="text-indent: 0; line-height: 100%; margin: 0"><b>
<font face="Arial" size="2">Após a confirmação de recebimento do boleto, seus 
tickets serão enviados no e-mail cadastrado, caso tenha alguma dúvida, entre em 
contato pelo telefone no menu FALE CONOSCO.</font></b></p>
<p align="left" style="text-indent: 0; line-height: 100%; margin: 0">&nbsp;</p>
<p align="center" style="text-indent: 0; line-height: 100%; margin: 0">&nbsp;</p>
<table WIDTH="644" CELLSPACING="0" CELLPADDING="0" BORDER="0">
  <tr>
    <td class="cp" VALIGN="BOTTOM" WIDTH="226">
      <p style="text-indent: 0; line-height: 100%; margin: 0"><img border="0" src="images/Logo_Caixa.jpg"></p>
    </td>
    <td ALIGN="RIGHT" VALIGN="BOTTOM" width="414">
      <p style="text-indent: 0; line-height: 100%; margin: 0"><font class="ld" size="2" face="Arial"><b>RECIBO
      DO SACADO</b></font></p>
    </td>
  </tr>
</table>
<table WIDTH="646" BORDER="1" CELLSPACING="0" CELLPADDING="1">
  <tr>
    <td COLSPAN="2" width="212">
      <p style="text-indent: 0; line-height: 100%; margin: 0"><b><font size="1" face="Arial">Cedente</font></b></p>
      <p style="text-indent: 0; line-height: 100%; margin: 0"><font face="Arial" size="1">Clube
      dos Amigos Vida Simples</font></p>
    </td>
    <td width="114">
      <p style="text-indent: 0; line-height: 100%; margin: 0"><b><font size="1" face="Arial">Ag./Cod.Cedente</font></b></p>
      <p style="text-indent: 0; line-height: 100%; margin: 0"><font size="1" face="Arial">1284.870.00000274-7</font></p>
    </td>
    <td width="143">
      <p style="text-indent: 0; line-height: 100%; margin: 0"><b><font  size="1" face="Arial">Nosso Número</font></b></p>
      <p style="text-indent: 0; line-height: 100%; margin: 0"><font  size="1" face="Arial"><%=TabBoleto("NOSSO_NUMERO")%></font></p>
    </td>
    <td width="159" bgcolor="#CCCCCC">
      <table WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
        <tr>
          <td align="left">
            <p style="text-indent: 0; line-height: 100%; margin: 0"><b><font  size="1" face="Arial">Vencimento</font></b></p>
          </td>
        </tr>
        <tr>
          <td align="center"><font size="1" face="Arial"><%=DataBr(TabBoleto("DT_VENC"))%></font></td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <td COLSPAN="2" width="212">
      <p style="text-indent: 0; line-height: 100%; margin: 0"><b><font  size="1" face="Arial">Sacado</font></b></p>
      <p style="text-indent: 0; line-height: 100%; margin: 0"><font  size="1" face="Arial"><%=TabBoleto("Nome")%></font></p>
    </td>
    <td width="114">
      <p style="text-indent: 0; line-height: 100%; margin: 0"><b><font  size="1" face="Arial">Dt.
      Processamento</font></b></p>
      <p style="text-indent: 0; line-height: 100%; margin: 0"><font  size="1" face="Arial"><%=TabBoleto("DT_PROCESSAMENTO")%></font></p>
    </td>
    <td width="143">
      <p style="text-indent: 0; line-height: 100%; margin: 0"><b><font  size="1" face="Arial">Nº
      Documento</font></b></p>
      <p style="text-indent: 0; line-height: 100%; margin: 0"><font  size="1" face="Arial"><%=TabBoleto("Documento")%></font></p>
    </td>
    <td width="159" bgcolor="#CCCCCC">
      <table WIDTH="159" BORDER="0" CELLSPACING="0" CELLPADDING="0">
        <tr>
          <td align="left" width="157">
            <p style="text-indent: 0; line-height: 100%; margin: 0"><b><font  size="1" face="Arial">(=) Valor
            do Documento</font></b></p>
          </td>
        </tr>
        <tr>
          <td align="center" width="157"><font size="1" face="Arial"><%=FormatNumber(TabBoleto("VL_DOCUMENTO"), 2)%></font></td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <td width="93">
      <p style="text-indent: 0; line-height: 100%; margin: 0"><b><font  size="1" face="Arial">CPF
      / CNPJ</font></b></p>
      <p style="text-indent: 0; line-height: 100%; margin: 0"><font size="1" face="Arial"><%=TabEmpresa("CNPJ")%></font></p>
    </td>
    <td width="115">
      <p style="text-indent: 0; line-height: 100%; margin: 0"><b><font size="1" face="Arial">(-)
      Desc./Abatimento</font></b></p>
      <p style="text-indent: 0; line-height: 100%; margin: 0">&nbsp;</p>
    </td>
    <td width="114">
      <p style="text-indent: 0; line-height: 100%; margin: 0"><b><font  size="1" face="Arial">(-) Outras
      Deduções</font></b></p>
      <p style="text-indent: 0; line-height: 100%; margin: 0">&nbsp;</p>
    </td>
    <td width="143">
      <p style="text-indent: 0; line-height: 100%; margin: 0"><b><font  size="1" face="Arial">(+) Mora /
      Multa</font></b></p>
      <p style="text-indent: 0; line-height: 100%; margin: 0">&nbsp;</p>
    </td>
    <td width="159" bgcolor="#CCCCCC">
      <p style="text-indent: 0; line-height: 100%; margin: 0"><b><font  size="1" face="Arial">(=)
      Valor Cobrado</font></b></p>
      <p style="text-indent: 0; line-height: 100%; margin: 0">&nbsp;</p>
    </td>
  </tr>
</table>
<table WIDTH="645" CELLSPACING="0" CELLPADDING="0" BORDER="0">
  <tr>
    <td align="right" width="643">
      <p style="text-indent: 0; line-height: 100%; margin: 0"><font size="2" face="Arial"><font >Autenticação
      Mecânica</font><br>
      </font>
      </p>
    </td>
  </tr>
</table>
<p align="center" style="text-indent: 0; line-height: 100%; margin: 0">&nbsp;</p>
<p align="center" style="text-indent: 0; line-height: 100%; margin: 0"><img border="0" src="images/corte.gif"></p>
<p align="center" style="text-indent: 0; line-height: 100%; margin: 0">&nbsp;</p>
<table WIDTH="645" BORDER="0" CELLSPACING="0" CELLPADDING="0" height="46">
  <tr>
    <td class="cp" width="150" height="46">
      <div align="left">
        <p style="text-indent: 0; line-height: 100%; margin: 0">
        <img border="0" src="images/Logo_Caixa.jpg">
      </div>
    </td>
    <td width="3" valign="bottom" background="images/barra.gif" height="46">
      <p style="text-indent: 0; line-height: 100%; margin: 0">&nbsp;</p>
    </td>
    <td class="cpt" width="89" valign="middle" height="46">
      <p align="center" style="text-indent: 0; line-height: 100%; margin-left: 0; margin-right: 0; margin-top: 2; margin-bottom: 2"><b><font face="Times New Roman" size="6">104-0</font></b></td>
    <td width="3" valign="bottom" background="images/barra.gif" height="46">
      <p style="text-indent: 0; line-height: 100%; margin: 0">&nbsp;</p>
    </td>
    <td class="ld" align="right" width="407" valign="bottom" height="46"><span class="ld">
      <p align="right" style="text-indent: 0; line-height: 100%; margin: 0"><font size="2" face="Arial"><%=TabBoleto("CD_BARRA_DIG")%>
      </font></span></td>
  </tr>
</table>
<table WIDTH="634" BORDER="1" CELLSPACING="0" CELLPADDING="1">
  <tr>
    <td COLSPAN="5" WIDTH="477">
      <p style="text-indent: 0; line-height: 100%; margin: 0"><font face="Arial" size="1"><b>Local
      de Pagamento</b><br>
      PAGÁVEL PREFERENC. NAS CASAS LOTÉRICAS AGÊNCIAS DA CAIXA E TODA
            REDE BANCÁRIA</font></p>
    </td>
    <td width="159" bgcolor="#CCCCCC">
      <table WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
        <tr>
          <td align="left">
            <p style="text-indent: 0; line-height: 100%; margin: 0"><b><font face="Arial" size="1">Vencimento</font></b></p>
          </td>
        </tr>
        <tr>
          <td align="center">
            <p style="text-indent: 0; line-height: 100%; margin: 0"><font face="Arial" size="1"><%=DataBr(TabBoleto("DT_VENC"))%></font></td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <td COLSPAN="5" WIDTH="477">
      <p style="text-indent: 0; line-height: 100%; margin: 0"><font face="Arial" size="1"><b>Cedente</b><br>
      <font class="cn">&nbsp;</font>Clube
            dos Amigos Vida Simples</font></p>
    </td>
    <td width="159">
      <table WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
        <tr>
          <td align="left">
            <p style="text-indent: 0; line-height: 100%; margin: 0"><b><font face="Arial" size="1">Ag./Cod.Cedente</font></b></p>
          </td>
        </tr>
        <tr>
          <td align="center">
            <font face="Arial" size="1"><%=TabBoleto("AG_COD_CEDENTE")%></font></td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
          <td width="111" valign="top">
            <p style="text-indent: 0; line-height: 100%; margin: 0"><b><font face="Arial" size="1">Dt.
            Emissão</font></b></p>
            <p style="text-indent: 0; line-height: 100%; margin: 0"><font face="Arial" size="1"><%=TabBoleto("DT_EMISSAO")%></font></p>
    </td>
          <td width="111" valign="top">
            <p style="text-indent: 0; line-height: 100%; margin: 0"><b><font face="Arial" size="1">Nº
            Documento</font></b>
            <p style="text-indent: 0; line-height: 100%; margin: 0"><font face="Arial" size="1"><%=TabBoleto("Documento")%></font></td>
          <td width="110" valign="top">
            <p style="text-indent: 0; line-height: 100%; margin: 0"><b><font face="Arial" size="1">Esp.
            Doc.</font></b>
            <p style="text-indent: 0; line-height: 100%; margin: 0"><font face="Arial" size="1">DS</font></td>
          <td width="68" valign="top">
            <p style="text-indent: 0; line-height: 100%; margin: 0"><b><font face="Arial" size="1">Aceite</font></b>
            <p style="text-indent: 0; line-height: 100%; margin: 0"><font face="Arial" size="1">N</font></td>
    <td valign="top" width="61">
      <p style="text-indent: 0; line-height: 100%; margin: 0"><b><font face="Arial" size="1">Dt. Proc.</font></b></p>
      <p style="text-indent: 0; line-height: 100%; margin: 0"><font face="Arial" size="1"><%=TabBoleto("DT_PROCESSAMENTO")%></font></p>
          </td>
    <td width="159">
      <table WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
        <tr>
          <td align="left">
            <p style="text-indent: 0; line-height: 100%; margin: 0"><b><font face="Arial" size="1">Nosso Número</font></b></p>
          </td>
        </tr>
        <tr>
          <td align="center">
            <font face="Arial" size="1"><%=TabBoleto("NOSSO_NUMERO")%></font></td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
          <td width="111" valign="top">
            <p style="text-indent: 0; line-height: 100%; margin: 0"><b><font face="Arial" size="1">Uso
            do Banco</font></b></td>
          <td width="111" valign="top">
            <p style="text-indent: 0; line-height: 100%; margin: 0"><b><font face="Arial" size="1">Carteira</font></b></p>
            <p style="text-indent: 0; line-height: 100%; margin: 0"><font face="Arial" size="1">SR</font></p>
          </td>
          <td width="110" valign="top">
            <p style="text-indent: 0; line-height: 100%; margin: 0"><b><font face="Arial" size="1">Esp.
            Moeda</font></b></p>
            <p style="text-indent: 0; line-height: 100%; margin: 0"><font face="Arial" size="1">R$</font></td>
          <td width="68" valign="top">
            <p style="text-indent: 0; line-height: 100%; margin: 0"><b><font face="Arial" size="1">Qtde
            Moeda</font></b></td>
    <td valign="top" width="61">
      <p style="text-indent: 0; line-height: 100%; margin: 0"><b><font face="Arial" size="1">Vl.
      Moeda</font></b></p>
          </td>
    <td width="159" bgcolor="#CCCCCC">
      <table WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
        <tr>
          <td align="left">
            <p style="text-indent: 0; line-height: 100%; margin: 0"><b><font face="Arial" size="1">(=) Vl.
            Documento</font></b></p>
          </td>
        </tr>
        <tr>
          <td align="center">
            <font face="Arial" size="1"><%=FormatNumber(TabBoleto("VL_DOCUMENTO"))%></font></td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <th COLSPAN="5" ROWSPAN="4" valign="top" align="LEFT" width="477">
      <p style="text-indent: 0; line-height: 100%; margin: 0"><font face="Arial" size="1"><b>Texto
      de Responsabilidade do cedente</b><br>
      </font>
      <table WIDTH="475" ALIGN="RIGHT" CELLSPACING="0" CELLPADDING="0" BORDER="0">
        <tr>
          <td valign="top" align="left"><font class="cn">
      <p style="text-indent: 0; line-height: 100%; margin: 0">&nbsp;</p>
      <p style="text-indent: 0; line-height: 100%; margin: 0"><b><font face="Arial" size="3">BEM
      VINDO AO CLUBE DOS AMIGOS VIDA SIMPLES</font></b></p>
      <p style="text-indent: 0; line-height: 100%; margin: 0">&nbsp;</p>
      <p style="text-indent: 0; line-height: 100%; margin: 0">
      <p style="text-indent: 0; line-height: 100%; margin: 0"><font face="Arial" size="2"><b>Boleto referente a parcela <%=wParcela%> , vencida em <%=wRef_Venc%>, da proposta <%=wProposta%>.</b></font>
      <p style="text-indent: 0; line-height: 100%; margin: 0">&nbsp;
      <p style="text-indent: 0; line-height: 100%; margin: 0">&nbsp;
            </font></td>
        </tr>
      </table>
    </th>
    <td WIDTH="159">
      <p style="text-indent: 0; line-height: 100%; margin: 0"><b><font face="Arial" size="1">(-)
            Desconto/Abatimento</font></b></p>
      <p style="text-indent: 0; line-height: 100%; margin: 0">&nbsp;</p>
    </td>
  </tr>
  <tr>
    <td WIDTH="159">
      <p style="text-indent: 0; line-height: 100%; margin: 0"><b><font face="Arial" size="1">(-)
            Outras Deduc/Abat.</font></b></p>
      <p style="text-indent: 0; line-height: 100%; margin: 0"><font class="cn" size="1" face="Arial">&nbsp;</font></p>
    </td>
  </tr>
  <tr>
    <td WIDTH="159">
      <p style="text-indent: 0; line-height: 100%; margin: 0"><b><font face="Arial" size="1">(+)
            Mora/Multa</font></b></p>
      <p style="text-indent: 0; line-height: 100%; margin: 0"><font class="cn" size="1" face="Arial">&nbsp;</font></p>
    </td>
  </tr>
  <tr>
    <td WIDTH="159" bgcolor="#CCCCCC">
      <p style="text-indent: 0; line-height: 100%; margin: 0"><b><font face="Arial" size="1">(=)
            Valor Cobrado</font></b></p>
      <p style="text-indent: 0; line-height: 100%; margin: 0"><font class="cn" size="1" face="Arial">&nbsp;</font></p>
    </td>
  </tr>
  <tr>
    <td COLSPAN="6" valign="top" width="640">
      <p style="text-indent: 0; line-height: 100%; margin: 0"><font face="Arial" size="1"><b>Sacado</b><br>
      </font>
      <table WIDTH="640" ALIGN="RIGHT" CELLSPACING="0" CELLPADDING="0" BORDER="0">
        <tr>
          <td valign="top" align="left">
            <p style="text-indent: 0; line-height: 100%; margin: 0"><font class="cn" face="Arial" size="1"><%=TabBoleto("Nome")%></font></p>
            <p style="text-indent: 0; line-height: 100%; margin: 0"><font class="cn" face="Arial" size="1"><%=TabBoleto("Endereco")%></font></p>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table WIDTH="646" CELLSPACING="0" CELLPADDING="0" BORDER="0">
  <tr>
    <td  align="right" width="644">
      <div align="right">
        <p style="text-indent: 0; line-height: 100%; margin: 0">
        <font face="Arial" size="1">Autenticação Mecânica - <b class="cp">Ficha
        de Compensação</b></font>
      </div>
    </td>
  </tr>
  <tr>
    <td align="left" width="644">
      <p style="text-indent: 0; line-height: 100%; margin: 0">
    <font size="2" face="Arial">
                 <%
						call wbarcode(TabBoleto("CD_Barra"))
					%>
      </font>
    </td>
  </tr>
</table>
<p align="center" style="text-indent: 0; line-height: 100%; margin: 0">&nbsp;</p>
<p align="center" style="text-indent: 0; line-height: 100%; margin: 0"><img border="0" src="images/corte.gif"></p>
<p align="left" style="text-indent: 0; line-height: 100%; margin: 0">&nbsp;</p>
    </td>
  </tr>
</table>

<p style="text-indent: 0; line-height: 100%; margin: 0">&nbsp;</p>
<p style="text-indent: 0; line-height: 100%; margin: 0">&nbsp;</p>
<p style="text-indent: 0; line-height: 100%; margin: 0">&nbsp;</p>
<p style="text-indent: 0; line-height: 100%; margin: 0">&nbsp;</p>
<p style="text-indent: 0; line-height: 100%; margin: 0">&nbsp;</p>

