<?php 
error_reporting(0);
ini_set(“display_errors”, 0 );
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<META http-equiv="X-UA-Compatible" content="IE=8">
<TITLE>Immobile Business</TITLE>
<!-- #include virtual="/convert-pdf-to-html/includes/pdf-to-word-head-tag.htm" -->
<META name="generator" content="BCL easyConverter SDK 5.0.08">
<STYLE type="text/css">

body {margin-top: 0px;margin-left: 0px;}

#page_1 {position:relative; overflow: hidden;margin: 0px 0px 48px 85px;padding: 0px;border: none;width: 709px;}

#page_1 #p1dimg1 {position:absolute;top:0px;left:7px;z-index:-1;width:542px;height:408px;}
#page_1 #p1dimg1 #p1img1 {width:542px;height:408px;}




#page_2 {position:relative; overflow: hidden;margin: 0px 0px 48px 85px;padding: 0px;border: none;width: 709px;}

#page_2 #p2dimg1 {position:absolute;top:100px;left:268px;z-index:-1;width:98px;height:98px;}
#page_2 #p2dimg1 #p2img1 {width:98px;height:98px;}




.dclr {clear:both;float:none;height:1px;margin:0px;padding:0px;overflow:hidden;}

.ft0{font: bold 21px 'Calibri';text-decoration: underline;line-height: 26px;}
.ft1{font: bold 16px 'Calibri';line-height: 19px;}
.ft2{font: 1px 'Calibri';line-height: 1px;}
.ft3{font: 1px 'Calibri';line-height: 11px;}
.ft4{font: bold 16px 'Calibri';text-decoration: underline;line-height: 18px;}
.ft5{font: 1px 'Calibri';line-height: 18px;}
.ft6{font: 1px 'Calibri';line-height: 10px;}
.ft7{font: bold 16px 'Calibri';text-decoration: underline;line-height: 19px;}
.ft8{font: 16px 'Calibri';line-height: 19px;}
.ft9{font: 1px 'Calibri';line-height: 3px;}
.ft10{font: 1px 'Calibri';line-height: 5px;}
.ft11{font: 1px 'Calibri';line-height: 8px;}
.ft12{font: 15px 'Calibri';line-height: 15px;}
.ft13{font: 12px 'Arial Narrow';line-height: 16px;}
.ft14{font: 15px 'Calibri';line-height: 18px;}

.p0{text-align: left;padding-left: 149px;margin-top:50px;margin-bottom: 0px;}
.p1{text-align: left;padding-left: 232px;margin-top: 0px;margin-bottom: 0px;}
.p2{text-align: left;padding-left: 19px;margin-top: 0px;margin-bottom: 0px;white-space: nowrap;}
.p3{text-align: left;margin-top: 0px;margin-bottom: 0px;white-space: nowrap;}
.p4{text-align: left;padding-left: 3px;margin-top: 0px;margin-bottom: 0px;white-space: nowrap;}
.p5{text-align: left;padding-left: 30px;margin-top: 0px;margin-bottom: 0px;white-space: nowrap;}
.p6{text-align: left;padding-left: 7px;margin-top: 0px;margin-bottom: 0px;white-space: nowrap;}
.p7{text-align: left;padding-left: 0px;margin-top: 0px;margin-bottom: 0px;white-space: nowrap;}
.p8{text-align: left;padding-left: 24px;margin-top: 0px;margin-bottom: 0px;white-space: nowrap;}
.p9{text-align: left;padding-left: 18px;margin-top: 0px;margin-bottom: 0px;white-space: nowrap;}
.p10{text-align: left;padding-left: 0px;margin-top: 0px;margin-bottom: 0px;white-space: nowrap;}
.p11{text-align: left;padding-left: 9px;margin-top: 0px;margin-bottom: 0px;white-space: nowrap;}
.p12{text-align: left;padding-left: 10px;margin-top: 0px;margin-bottom: 0px;white-space: nowrap;}
.p13{text-align: left;padding-left: 10px;margin-top: 0px;margin-bottom: 0px;white-space: nowrap;}
.p14{text-align: left;padding-left: 0px;margin-top: 0px;margin-bottom: 0px;white-space: nowrap;}
.p15{text-align: left;padding-left: 13px;margin-top: 0px;margin-bottom: 0px;white-space: nowrap;}
.p16{text-align: left;padding-left: 35px;margin-top: 0px;margin-bottom: 0px;white-space: nowrap;}
.p17{text-align: left;padding-left: 45px;margin-top: 0px;margin-bottom: 0px;white-space: nowrap;}
.p18{text-align: left;padding-left: 48px;margin-top: 0px;margin-bottom: 0px;white-space: nowrap;}
.p19{text-align: left;padding-left: 5px;margin-top: 0px;margin-bottom: 0px;white-space: nowrap;}
.p20{text-align: left;padding-left: 332px;margin-top: 7px;margin-bottom: 0px;}
.p21{text-align: left;padding-left: 47px;margin-top: 3px;margin-bottom: 0px;}
.p22{text-align: right;margin-top: 0px;margin-bottom: 0px;white-space: nowrap;}
.p23{text-align: right;padding-right: 199px;margin-top: 0px;margin-bottom: 0px;white-space: nowrap;}
.p24{text-align: right;padding-right: 271px;margin-top: 0px;margin-bottom: 0px;white-space: nowrap;}
.p25{text-align: right;padding-right: 275px;margin-top: 0px;margin-bottom: 0px;white-space: nowrap;}
.p26{text-align: left;padding-left: 332px;margin-top: 637px;margin-bottom: 0px;}

.td0{padding: 0px;margin: 0px;width: 107px;vertical-align: bottom;}
.td1{padding: 0px;margin: 0px;width: 39px;vertical-align: bottom;}
.td2{padding: 0px;margin: 0px;width: 53px;vertical-align: bottom;}
.td3{padding: 0px;margin: 0px;width: 25px;vertical-align: bottom;}
.td4{padding: 0px;margin: 0px;width: 192px;vertical-align: bottom;}
.td5{padding: 0px;margin: 0px;width: 67px;vertical-align: bottom;}
.td6{padding: 0px;margin: 0px;width: 141px;vertical-align: bottom;}
.td7{padding: 0px;margin: 0px;width: 28px;vertical-align: bottom;}
.td8{padding: 0px;margin: 0px;width: 11px;vertical-align: bottom;}
.td9{padding: 0px;margin: 0px;width: 6px;vertical-align: bottom;}
.td10{border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 146px;vertical-align: bottom;}
.td11{border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 53px;vertical-align: bottom;}
.td12{border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 25px;vertical-align: bottom;}
.td13{border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 85px;vertical-align: bottom;}
.td14{border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 107px;vertical-align: bottom;}
.td15{border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 67px;vertical-align: bottom;}
.td16{border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 141px;vertical-align: bottom;}
.td17{border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 28px;vertical-align: bottom;}
.td18{border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 11px;vertical-align: bottom;}
.td19{border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 6px;vertical-align: bottom;}
.td20{border-left: #000000 1px solid;padding: 0px;margin: 0px;width: 198px;vertical-align: bottom;}
.td21{padding: 0px;margin: 0px;width: 85px;vertical-align: bottom;}
.td22{border-right: #000000 1px solid;padding: 0px;margin: 0px;width: 5px;vertical-align: bottom;}
.td23{padding: 0px;margin: 0px;width: 315px;vertical-align: bottom;}
.td24{padding: 0px;margin: 0px;width: 208px;vertical-align: bottom;}
.td25{border-right: #000000 1px solid;padding: 0px;margin: 0px;width: 44px;vertical-align: bottom;}
.td26{border-left: #000000 1px solid;padding: 0px;margin: 0px;width: 662px;vertical-align: bottom;}
.td27{padding: 0px;margin: 0px;width: 217px;vertical-align: bottom;}
.td28{border-right: #000000 1px solid;padding: 0px;margin: 0px;width: 252px;vertical-align: bottom;}
.td29{border-left: #000000 1px solid;padding: 0px;margin: 0px;width: 90px;vertical-align: bottom;}
.td30{border-right: #000000 1px solid;padding: 0px;margin: 0px;width: 561px;vertical-align: bottom;}
.td31{border-left: #000000 1px solid;padding: 0px;margin: 0px;width: 623px;vertical-align: bottom;}
.td32{border-left: #000000 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 145px;vertical-align: bottom;}
.td33{border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 163px;vertical-align: bottom;}
.td34{border-right: #000000 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 5px;vertical-align: bottom;}
.td35{border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 416px;vertical-align: bottom;}
.td36{border-left: #000000 1px solid;padding: 0px;margin: 0px;width: 415px;vertical-align: bottom;}
.td37{border-right: #000000 1px solid;padding: 0px;margin: 0px;width: 10px;vertical-align: bottom;}
.td38{border-left: #696969 1px solid;border-top: #696969 1px solid;border-bottom: #e3e3e3 1px solid;padding: 0px;margin: 0px;width: 140px;vertical-align: bottom;}
.td39{border-right: #e3e3e3 1px solid;border-top: #696969 1px solid;border-bottom: #e3e3e3 1px solid;padding: 0px;margin: 0px;width: 27px;vertical-align: bottom;}
.td40{border-left: #000000 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 198px;vertical-align: bottom;}
.td41{border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 192px;vertical-align: bottom;}
.td42{border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 208px;vertical-align: bottom;}
.td43{border-right: #000000 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 10px;vertical-align: bottom;}
.td44{border-bottom: #696969 1px solid;padding: 0px;margin: 0px;width: 53px;vertical-align: bottom;}
.td45{border-bottom: #696969 1px solid;padding: 0px;margin: 0px;width: 25px;vertical-align: bottom;}
.td46{border-bottom: #696969 1px solid;padding: 0px;margin: 0px;width: 85px;vertical-align: bottom;}
.td47{border-left: #696969 1px solid;border-bottom: #e3e3e3 1px solid;padding: 0px;margin: 0px;width: 52px;vertical-align: bottom;}
.td48{border-bottom: #e3e3e3 1px solid;padding: 0px;margin: 0px;width: 25px;vertical-align: bottom;}
.td49{border-right: #e3e3e3 1px solid;border-bottom: #e3e3e3 1px solid;padding: 0px;margin: 0px;width: 84px;vertical-align: bottom;}
.td50{padding: 0px;margin: 0px;width: 319px;vertical-align: bottom;}
.td51{padding: 0px;margin: 0px;width: 328px;vertical-align: bottom;}

.tr0{height: 20px;}
.tr1{height: 11px;}
.tr2{height: 18px;}
.tr3{height: 77px;}
.tr4{height: 33px;}
.tr5{height: 63px;}
.tr6{height: 19px;}
.tr7{height: 34px;}
.tr8{height: 43px;}
.tr9{height: 29px;}
.tr10{height: 10px;}
.tr11{height: 35px;}
.tr12{height: 32px;}
.tr13{height: 3px;}
.tr14{height: 27px;}
.tr15{height: 25px;}
.tr16{height: 5px;}
.tr17{height: 36px;}
.tr18{height: 37px;}
.tr19{height: 82px;}
.tr20{height: 49px;}
.tr21{height: 50px;}
.tr22{height: 23px;}
.tr23{height: 24px;}
.tr24{height: 8px;}
.tr25{height: 64px;}
.tr26{height: 58px;}
.tr27{height: 39px;}
.tr28{height: 38px;}

.t0{width: 669px;margin-top: 18px;font: 16px 'Calibri';}
.t1{width: 647px;margin-top: 149px;font: 16px 'Calibri';}

</STYLE>
</HEAD>

<BODY>
<script type="text/javascript">
    window.print();

</script>
<?php
function extenso($valor=0, $maiusculas=false) {
        // verifica se tem virgula decimal
        if (strpos($valor, ",") > 0) {
                // retira o ponto de milhar, se tiver
                $valor = str_replace(".", "", $valor);

                // troca a virgula decimal por ponto decimal
                $valor = str_replace(",", ".", $valor);
        }
        $singular = array("centavo", "real", "mil", "milhão", "bilhão", "trilhão", "quatrilhão");
        $plural = array("centavos", "reais", "mil", "milhões", "bilhões", "trilhões",
                "quatrilhões");

        $c = array("", "cem", "duzentos", "trezentos", "quatrocentos",
                "quinhentos", "seiscentos", "setecentos", "oitocentos", "novecentos");
        $d = array("", "dez", "vinte", "trinta", "quarenta", "cinquenta",
                "sessenta", "setenta", "oitenta", "noventa");
        $d10 = array("dez", "onze", "doze", "treze", "quatorze", "quinze",
                "dezesseis", "dezesete", "dezoito", "dezenove");
        $u = array("", "um", "dois", "três", "quatro", "cinco", "seis",
                "sete", "oito", "nove");

        $z = 0;

        $valor = number_format($valor, 2, ".", ".");
        $inteiro = explode(".", $valor);
        $cont = count($inteiro);
        for ($i = 0; $i < $cont; $i++)
                for ($ii = strlen($inteiro[$i]); $ii < 3; $ii++)
                $inteiro[$i] = "0" . $inteiro[$i];

        $fim = $cont - ($inteiro[$cont - 1] > 0 ? 1 : 2);
        $rt = '';
        for ($i = 0; $i < $cont; $i++) {
                $valor = $inteiro[$i];
                $rc = (($valor > 100) && ($valor < 200)) ? "cento" : $c[$valor[0]];
                $rd = ($valor[1] < 2) ? "" : $d[$valor[1]];
                $ru = ($valor > 0) ? (($valor[1] == 1) ? $d10[$valor[2]] : $u[$valor[2]]) : "";

                $r = $rc . (($rc && ($rd || $ru)) ? " e " : "") . $rd . (($rd &&
                        $ru) ? " e " : "") . $ru;
                $t = $cont - 1 - $i;
                $r .= $r ? " " . ($valor > 1 ? $plural[$t] : $singular[$t]) : "";
                if ($valor == "000"

                )$z++; elseif ($z > 0)
                $z--;
                if (($t == 1) && ($z > 0) && ($inteiro[0] > 0))
                $r .= ( ($z > 1) ? " de " : "") . $plural[$t];
                if ($r)
                $rt = $rt . ((($i > 0) && ($i <= $fim) &&
                        ($inteiro[0] > 0) && ($z < 1)) ? ( ($i < $fim) ? ", " : " e ") : " ") . $r;
        }

        if (!$maiusculas) {
                return($rt ? $rt : "zero");
        } elseif ($maiusculas == "2") {
                return (strtoupper($rt) ? strtoupper($rt) : "Zero");
        } else {
                return (ucwords($rt) ? ucwords($rt) : "Zero");
        }
        }
?>
<!-- #include virtual="/convert-pdf-to-html/includes/pdf-to-word-body-tag-02242014.htm" -->
<DIV id="page_1">

<?php
 $idvenda = $_GET["idvenda"];
                      include_once "conexao.php";
                $query_amigo = "SELECT * FROM venda 
                INNER JOIN cliente ON cliente.idcliente = venda.cliente_idcliente
                INNER JOIN lote ON lote.idlote = venda.lote_idlote
                INNER JOIN produto ON  lote.produto_idproduto = produto.idproduto
                where venda.idvenda = $idvenda";

                $executa_query = mysql_query ($query_amigo) or die ("Erro ao listar cliente");
                
                
            while ($buscar_amigo = mysql_fetch_assoc($executa_query)) {//--verifica se são amigos
           
            


$nome_cli			= $buscar_amigo["nome_cli"];
$cpf_cli			= $buscar_amigo["cpf_cli"];
$rg_cli				= $buscar_amigo["rg_cli"];
$estadocivil_cli	= $buscar_amigo["estadocivil_cli"];
$nacionalidade_cli	= $buscar_amigo["nacionalidade_cli"];
$profissao_cli		= $buscar_amigo["profissao_cli"];
$nascimento_cli		= $buscar_amigo["nascimento_cli"];
$email_cli			= $buscar_amigo["email_cli"];
$cidade_cli			= $buscar_amigo["cidade_cli"];
$logradouro_cli		= $buscar_amigo["logradouro_cli"];
$endereco_cli		= $buscar_amigo["endereco_cli"];
$numero_cli			= $buscar_amigo["numero_cli"];
$complemento_cli	= $buscar_amigo["complemento_cli"];
$bairro_cli			= $buscar_amigo["bairro_cli"];
$complemento_cli 	= $buscar_amigo["complemento_cli"];
$telefone1_cli		= $buscar_amigo["telefone1_cli"];
$telefone2_cli		= $buscar_amigo["telefone2_cli"];

$nome_con			= $buscar_amigo["nome_con"];
$cpf_con			= $buscar_amigo["cpf_con"];
$rg_con				= $buscar_amigo["rg_con"];
$profissao_con		= $buscar_amigo["profissao_con"];
$nascionalidade_con	= $buscar_amigo["nascionalidade_con"];
$nascimento_con		= $buscar_amigo["nascimento_con"];

$cep_cli		= $buscar_amigo["cep_cli"];
$nascimento_con		= $buscar_amigo["nascimento_con"];
$estado_cli		= $buscar_amigo["estado_cli"];


$lote		= $buscar_amigo["lote"];
$m2			= $buscar_amigo["m2"];
$frente		= $buscar_amigo["frente"];
$fundo		= $buscar_amigo["fundo"];
$esquerda	= $buscar_amigo["esquerda"];
$direita 	= $buscar_amigo["direita"];

$quadra 	= $buscar_amigo["quadra"];

$valor 	= $buscar_amigo["valor"];
        
$valor_total_entrada 	= $buscar_amigo["valor_entrada"];    
$plano_pagamento 	= $buscar_amigo["plano_pagamento"];
            }
             ?>


<P class="p0 ft0">PROPOSTA DE COMPRA E VENDA DE LOTE</P>
<P class="p1 ft0">BAIRRO JARDIM NATAL</P>
<TABLE cellpadding=0 cellspacing=0 class="t0">
<TR>
	<TD class="tr0 td0"><P class="p2 ft1">QUADRA: <?php echo "  $quadra"; ?></P></TD>
	<TD class="tr0 td1"><P class="p3 ft2">&nbsp;</P></TD>
	<TD class="tr0 td2"><P class="p4 ft1">LOTE: <?php echo "  $lote"; ?></P></TD>
	<TD class="tr0 td3"><P class="p3 ft2">&nbsp;</P></TD>
	<TD colspan=2 class="tr0 td4"><P class="p5 ft1"><?php echo " $m2 "; ?>M²</P></TD>
	<TD class="tr0 td5"><P class="p3 ft2">&nbsp;</P></TD>
	<TD class="tr0 td6"><P class="p3 ft2">&nbsp;</P></TD>
	<TD class="tr0 td7"><P class="p3 ft2">&nbsp;</P></TD>
	<TD class="tr0 td8"><P class="p3 ft2">&nbsp;</P></TD>
	<TD class="tr0 td9"><P class="p3 ft2">&nbsp;</P></TD>
</TR>
<TR>
	<TD colspan=2 class="tr1 td10"><P class="p3 ft3">&nbsp;</P></TD>
	<TD class="tr1 td11"><P class="p3 ft3">&nbsp;</P></TD>
	<TD class="tr1 td12"><P class="p3 ft3">&nbsp;</P></TD>
	<TD class="tr1 td13"><P class="p3 ft3">&nbsp;</P></TD>
	<TD class="tr1 td14"><P class="p3 ft3">&nbsp;</P></TD>
	<TD class="tr1 td15"><P class="p3 ft3">&nbsp;</P></TD>
	<TD class="tr1 td16"><P class="p3 ft3">&nbsp;</P></TD>
	<TD class="tr1 td17"><P class="p3 ft3">&nbsp;</P></TD>
	<TD class="tr1 td18"><P class="p3 ft3">&nbsp;</P></TD>
	<TD class="tr1 td19"><P class="p3 ft3">&nbsp;</P></TD>
</TR>
<?php

                      include_once "conexao.php";
                $query_amigo = "SELECT * FROM parcelas 
               
                where venda_idvenda = $idvenda AND descricao = 'Parcelamento Entrada'";

                $executa_query = mysql_query ($query_amigo) or die ("Erro ao listar cliente");
                
                
            while ($buscar_amigo = mysql_fetch_assoc($executa_query)) {//--verifica se são amigos
           
            


$valor_parcelas			= $buscar_amigo["valor_parcelas"];
$data_vencimento_parcela			= $buscar_amigo["data_vencimento_parcela"];
}

?>
<TR>
	<TD colspan=3 class="tr2 td20"><P class="p6 ft4">FORMA DE PAGAMENTO:</P></TD>
	<TD class=""></TD>
	<TD class=""></TD>
	<TD class=""></TD>
	<TD class=""></TD>
<TD class=""></TD>	<TD class=""></TD>
	<TD class=""></TD>
	<TD class=""></TD>
</TR>
<TR>
	<TD colspan=3 class="tr3 td20"><P class="p6 ft1">SENDO: ENTRADA: <?php echo 'R$' . number_format($valor_total_entrada, 2, ',', '.');  ?></P></TD>
	
	<TD colspan=3 class=""><P class="p7 ft1">

<?php

                      include_once "conexao.php";
                $query_amigo = "SELECT data_vencimento_parcela, valor_parcelas, count(idparcelas) as total_parcelas FROM parcelas 
               
                where venda_idvenda = $idvenda AND descricao = 'Parcelamento Entrada'";

                $executa_query = mysql_query ($query_amigo) or die ("Erro ao listar cliente");
                
                
            while ($buscar_amigo = mysql_fetch_assoc($executa_query)) {//--verifica se são amigos
           
            


$total_parcelas			= $buscar_amigo["total_parcelas"];
$valor_parcelas			= $buscar_amigo["valor_parcelas"];
$data_vencimento_parcela			= $buscar_amigo["data_vencimento_parcela"];
}
$texto_valor = extenso($valor_parcelas);


$dia_vencimento =  substr("$data_vencimento_parcela", 0, 2);

?>
Quantidade de parcelas da entrada: <?php echo " $total_parcelas"; ?></P></TD>
	<TD class="tr3 td7"><P class="p3 ft2">&nbsp;</P></TD>
	<TD class="tr3 td8"><P class="p3 ft2">&nbsp;</P></TD>
	<TD class="tr3 td22"><P class="p3 ft2">&nbsp;</P></TD>
</TR>
<TR>
	<TD colspan=3 class="tr4 td20"><P class="p6 ft1">1ª) Parcela da entrada:  <?php echo 'R$' . number_format($valor_parcelas, 2, ',', '.');  ?> </P></TD>
	
	
	
	<TD colspan=2 class="tr4 td24"><P class="p3 ft1">Data de Vencimento:<?php echo " $data_vencimento_parcela"; ?></P></TD>
	
</TR>
<TR>
	<TD colspan=3 class="tr5 td20"><P class="p8 ft1">Transferência</P></TD>
	<TD class="tr5 td3"><P class="p9 ft1">Depósito,</P></TD>
	

	
</TR>
<TR>
	<TD colspan=10 class="tr6 td26"><P class="p6 ft1">............................................................................................................................................</P></TD>
	<TD class="tr6 td22"><P class="p3 ft2">&nbsp;</P></TD>
</TR>
<TR>


<?php

                      include_once "conexao.php";
                $query_amigo = "SELECT data_vencimento_parcela, valor_parcelas, count(idparcelas) as total_parcelas FROM parcelas 
               
                where venda_idvenda = $idvenda AND descricao = 'Financiamento'";

                $executa_query = mysql_query ($query_amigo) or die ("Erro ao listar cliente");
                
                
            while ($buscar_amigo = mysql_fetch_assoc($executa_query)) {//--verifica se são amigos
           
            


$total_parcelas2			= $buscar_amigo["total_parcelas"];
$valor_parcelas2			= $buscar_amigo["valor_parcelas"];
$data_vencimento_parcela2			= $buscar_amigo["data_vencimento_parcela"];
}
?>


	<TD colspan=3 class="tr7 td20"><P class="p6 ft1">Saldo restante em: <?php echo "   $plano_pagamento "; ?>prestações de <?php echo 'R$' . number_format($valor_parcelas2, 2, ',', '.');  ?></P></TD>
	
	
</TR>
<TR>
	<TD colspan=3 class="tr7 td20"><P class="p6 ft1">
		vencendo a primeira em: <?php echo "  $data_vencimento_parcela2"; ?>
	</P></TD>
	
</TR>
<TR>
	
	<TD colspan=10 class="tr8 td30"><P class="p3 ft1">&nbsp;&nbsp;&nbsp;e as seguintes em igual dia dos meses subsequentes. As prestações sofrerão</P></TD>
</TR>
<TR>
	<TD colspan=8 class="tr9 td31"><P class="p6 ft1">reajuste anual, de acordo com a variação percentual acumulada do <NOBR>IGP-M.</NOBR></P></TD>
	
</TR>
<TR>
	<TD colspan=2 class="tr10 td32"><P class="p3 ft6">&nbsp;</P></TD>
	<TD colspan=3 class="tr10 td33"><P class="p3 ft6">&nbsp;</P></TD>
	<TD class="tr10 td14"><P class="p3 ft6">&nbsp;</P></TD>
	<TD class="tr10 td15"><P class="p3 ft6">&nbsp;</P></TD>
	<TD class="tr10 td16"><P class="p3 ft6">&nbsp;</P></TD>
	<TD class="tr10 td17"><P class="p3 ft6">&nbsp;</P></TD>
	<TD class="tr10 td18"><P class="p3 ft6">&nbsp;</P></TD>
	<TD class="tr10 td34"><P class="p3 ft6">&nbsp;</P></TD>
</TR>
<TR>
	<TD colspan=6 class="tr10 td35"><P class="p3 ft6">&nbsp;</P></TD>
	<TD class="tr10 td15"><P class="p3 ft6">&nbsp;</P></TD>
	<TD class="tr10 td16"><P class="p3 ft6">&nbsp;</P></TD>
	<TD class="tr10 td17"><P class="p3 ft6">&nbsp;</P></TD>
	<TD class="tr10 td18"><P class="p3 ft6">&nbsp;</P></TD>
	<TD class="tr1 td9"><P class="p3 ft3">&nbsp;</P></TD>
</TR>
<TR>
	<TD colspan=6 class="tr6 td36"><P class="p6 ft7">QUALIFICAÇÃO DO PROPONENTE:</P></TD>
	<TD class="tr6 td5"><P class="p3 ft2">&nbsp;</P></TD>
	<TD class="tr6 td6"><P class="p3 ft2">&nbsp;</P></TD>
	<TD class="tr6 td7"><P class="p3 ft2">&nbsp;</P></TD>
	<TD class="tr6 td37"><P class="p3 ft2">&nbsp;</P></TD>
	<TD class="tr6 td9"><P class="p3 ft2">&nbsp;</P></TD>
</TR>
<TR>
	<TD class="tr7 td29"><P class="p6 ft8">NOME: <?php echo " $nome_cli"; ?></P></TD>
	
	
	
</TR>
<TR>
	<TD class="tr4 td29"><P class="p6 ft8">RG: <?php echo " $rg_cli"; ?></P></TD>
	<TD class="tr4 td1"><P class="p3 ft2">&nbsp;</P></TD>
	<TD class="tr4 td2"><P class="p3 ft2">&nbsp;</P></TD>
	
	<TD colspan=2 class="tr4 td4"><P class="p3 ft8">CPF / CNPJ: <?php echo " $cpf_cli"; ?></P></TD>
	
</TR>
<TR>
	<TD class="tr4 td29"><P class="p6 ft8">Nacionalidade: Brasileira</P></TD>
	<TD class="tr4 td1"><P class="p3 ft2">&nbsp;</P></TD>
	<TD class="tr4 td2"><P class="p3 ft2">&nbsp;</P></TD>
	
	<TD colspan=2 class="tr4 td4"><P class="p14 ft8">Profissão: <?php echo " $profissao_cli"; ?></P></TD>
	
	
</TR>
<TR>
	<TD class="tr11 td29"><P class="p6 ft8">Nascimento: <?php echo " $nascimento_cli"; ?></P></TD>
	<TD class="tr11 td1"><P class="p3 ft2">&nbsp;</P></TD>
	<TD class="tr11 td2"><P class="p3 ft2">&nbsp;</P></TD>
	<TD colspan=3 class="tr11 td27"><P class="p10 ft8">Estado Civil: <?php echo " $estadocivil_cli"; ?></P></TD>
	
	
</TR>
<TR>
	<TD class="tr11 td29"><P class="p6 ft8">CÔNJUGE: <?php echo " $nome_con"; ?></P></TD>
	
</TR>
<TR>
	<TD class="tr4 td29"><P class="p6 ft8">RG: <?php echo " $rg_con"; ?></P></TD>
	<TD class="tr4 td1"><P class="p3 ft2">&nbsp;</P></TD>
	<TD class="tr4 td2"><P class="p3 ft2">&nbsp;</P></TD>
	
	<TD colspan=2 class="tr4 td4"><P class="p3 ft8">CPF: <?php echo " $cpf_con"; ?></P></TD>
	
</TR>
<TR>
	<TD class="tr7 td29"><P class="p6 ft8">Nacionalidade: Brasileira</P></TD>
	<TD class="tr7 td1"><P class="p3 ft2">&nbsp;</P></TD>
	<TD class="tr7 td2"><P class="p3 ft2">&nbsp;</P></TD>
	
	<TD colspan=2 class="tr7 td4"><P class="p14 ft8">Profissão:  <?php echo " $profissao_con"; ?></P></TD>
	
	
</TR>
<TR>
	<TD class="tr12 td29"><P class="p6 ft8">Nascimento:  <?php echo " $nascimento_con"; ?></P></TD>
	<TD class="tr12 td1"><P class="p3 ft2">&nbsp;</P></TD>
	<TD class="tr12 td2"><P class="p3 ft2">&nbsp;</P></TD>
	<TD colspan=3 class="tr12 td27"><P class="p10 ft8"><NOBR>E-mail:</NOBR></P></TD>
	
</TR>
<TR>
	<TD class="tr4 td29"><P class="p6 ft8">Endereço:  <?php echo " $endereco_cli"; ?></P></TD>
	
</TR>
<TR>
	<TD class="tr13 td29"><P class="p3 ft9">&nbsp;</P></TD>
	<TD class="tr13 td1"><P class="p3 ft9">&nbsp;</P></TD>
	<TD class="tr13 td2"><P class="p3 ft9">&nbsp;</P></TD>
	<TD class="tr13 td3"><P class="p3 ft9">&nbsp;</P></TD>
	<TD colspan=2 class="tr13 td4"><P class="p3 ft9">&nbsp;</P></TD>
	<TD class="tr13 td5"><P class="p3 ft9">&nbsp;</P></TD>
	<TD class="tr13 td6"><P class="p3 ft9">&nbsp;</P></TD>
	<TD class="tr13 td7"><P class="p3 ft9">&nbsp;</P></TD>
	<TD class="tr13 td37"><P class="p3 ft9">&nbsp;</P></TD>
	<TD class="tr13 td9"><P class="p3 ft9">&nbsp;</P></TD>
</TR>
<TR>
	<TD rowspan=2 class="tr12 td29"><P class="p6 ft8">Bairro:  <?php echo " $bairro_cli"; ?></P></TD>
	<TD class="tr14 td1"><P class="p3 ft2">&nbsp;</P></TD>
	
	<TD colspan=2 rowspan=2 class="tr12 td4"><P class="p15 ft8"> <?php echo " $cidade_cli"; ?> –  <?php echo " $estado_cli"; ?>:</P></TD>
	<TD rowspan=2 class="tr12 td5"><P class="p16 ft8">CEP:  <?php echo " $cep_cli"; ?></P></TD>
	
</TR>
<TR>
	<TD class="tr16 td1"><P class="p3 ft10">&nbsp;</P></TD>
	<TD class="tr16 td2"><P class="p3 ft10">&nbsp;</P></TD>
	<TD class="tr16 td3"><P class="p3 ft10">&nbsp;</P></TD>
	<TD class="tr16 td6"><P class="p3 ft10">&nbsp;</P></TD>
	<TD class="tr16 td7"><P class="p3 ft10">&nbsp;</P></TD>
	<TD class="tr16 td37"><P class="p3 ft10">&nbsp;</P></TD>
	<TD class="tr16 td9"><P class="p3 ft10">&nbsp;</P></TD>
</TR>
<TR>
	<TD colspan=3 class="tr17 td40"><P class="p6 ft8">Fones:  <?php echo " $telefone1_cli"; ?>/      Residencial:  <?php echo " $telefone2_cli"; ?></P></TD>
	
</TR>
<TR>
	<TD rowspan=3 class="tr19 td0"><P class="p3 ft8"></P></TD>
	<TD rowspan=3 class="tr19 td1"><P class="p2 ft8"></P></TD>
	<TD class="tr20 "><P class="p3 ft2">&nbsp;</P></TD>
	<TD class="tr20 "><P class="p3 ft2">&nbsp;</P></TD>
	<TD class="tr20 "><P class="p3 ft2">&nbsp;</P></TD>
	<TD rowspan=3 class="tr19 td0"><P class="p19 ft8"></P></TD>
	<TD class="tr21 td5"><P class="p3 ft2">&nbsp;</P></TD>
	<TD class="tr21 td6"><P class="p3 ft2">&nbsp;</P></TD>
	<TD class="tr21 td7"><P class="p3 ft2">&nbsp;</P></TD>
	<TD class="tr21 td8"><P class="p3 ft2">&nbsp;</P></TD>
	<TD class="tr21 td9"><P class="p3 ft2">&nbsp;</P></TD>
</TR>
<TR>
	<TD rowspan=3 class="tr19 td0"><P class="p3 ft8"></P></TD>
	<TD rowspan=3 class="tr19 td1"><P class="p2 ft8"></P></TD>
	<TD class="tr20 "><P class="p3 ft2">&nbsp;</P></TD>
	<TD class="tr20 "><P class="p3 ft2">&nbsp;</P></TD>
	<TD class="tr20 "><P class="p3 ft2">&nbsp;</P></TD>
	<TD rowspan=3 class="tr19 td0"><P class="p19 ft8"></P></TD>
	<TD class="tr21 td5"><P class="p3 ft2">&nbsp;</P></TD>
	<TD class="tr21 td6"><P class="p3 ft2">&nbsp;</P></TD>
	<TD class="tr21 td7"><P class="p3 ft2">&nbsp;</P></TD>
	<TD class="tr21 td8"><P class="p3 ft2">&nbsp;</P></TD>
	<TD class="tr21 td9"><P class="p3 ft2">&nbsp;</P></TD>
</TR>

<TR>
	<TD rowspan=3 class="tr19 td0"><P class="p3 ft8"></P></TD>
	<TD rowspan=3 class="tr19 td1"><P class="p2 ft8"></P></TD>
	<TD class="tr20 "><P class="p3 ft2">&nbsp;</P></TD>
	<TD class="tr20 "><P class="p3 ft2">&nbsp;</P></TD>
	<TD class="tr20 "><P class="p3 ft2">&nbsp;</P></TD>
	<TD rowspan=3 class="tr19 td0"><P class="p19 ft8"></P></TD>
	<TD class="tr21 td5"><P class="p3 ft2">&nbsp;</P></TD>
	<TD class="tr21 td6"><P class="p3 ft2">&nbsp;</P></TD>
	<TD class="tr21 td7"><P class="p3 ft2">&nbsp;</P></TD>
	<TD class="tr21 td8"><P class="p3 ft2">&nbsp;</P></TD>
	<TD class="tr21 td9"><P class="p3 ft2">&nbsp;</P></TD>
</TR>
<TR>
	<TD rowspan=3 class="tr19 td0"><P class="p3 ft8"></P></TD>
	<TD rowspan=3 class="tr19 td1"><P class="p2 ft8"></P></TD>
	<TD class="tr20 "><P class="p3 ft2">&nbsp;</P></TD>
	<TD class="tr20 "><P class="p3 ft2">&nbsp;</P></TD>
	<TD class="tr20 "><P class="p3 ft2">&nbsp;</P></TD>
	<TD rowspan=3 class="tr19 td0"><P class="p19 ft8"></P></TD>
	<TD class="tr21 td5"><P class="p3 ft2">&nbsp;</P></TD>
	<TD class="tr21 td6"><P class="p3 ft2">&nbsp;</P></TD>
	<TD class="tr21 td7"><P class="p3 ft2">&nbsp;</P></TD>
	<TD class="tr21 td8"><P class="p3 ft2">&nbsp;</P></TD>
	<TD class="tr21 td9"><P class="p3 ft2">&nbsp;</P></TD>
</TR>
<TR>
	<TD rowspan=3 class="tr19 td0"><P class="p3 ft8"></P></TD>
	<TD rowspan=3 class="tr19 td1"><P class="p2 ft8"></P></TD>
	<TD class="tr20 "><P class="p3 ft2">&nbsp;</P></TD>
	<TD class="tr20 "><P class="p3 ft2">&nbsp;</P></TD>
	<TD class="tr20 "><P class="p3 ft2">&nbsp;</P></TD>
	<TD rowspan=3 class="tr19 td0"><P class="p19 ft8"></P></TD>
	<TD class="tr21 td5"><P class="p3 ft2">&nbsp;</P></TD>
	<TD class="tr21 td6"><P class="p3 ft2">&nbsp;</P></TD>
	<TD class="tr21 td7"><P class="p3 ft2">&nbsp;</P></TD>
	<TD class="tr21 td8"><P class="p3 ft2">&nbsp;</P></TD>
	<TD class="tr21 td9"><P class="p3 ft2">&nbsp;</P></TD>
</TR>
<TR>
	<TD rowspan=3 class="tr19 td0"><P class="p3 ft8"></P></TD>
	<TD rowspan=3 class="tr19 td1"><P class="p2 ft8"></P></TD>
	<TD class="tr20 "><P class="p3 ft2">&nbsp;</P></TD>
	<TD class="tr20 "><P class="p3 ft2">&nbsp;</P></TD>
	<TD class="tr20 "><P class="p3 ft2">&nbsp;</P></TD>
	<TD rowspan=3 class="tr19 td0"><P class="p19 ft8"></P></TD>
	<TD class="tr21 td5"><P class="p3 ft2">&nbsp;</P></TD>
	<TD class="tr21 td6"><P class="p3 ft2">&nbsp;</P></TD>
	<TD class="tr21 td7"><P class="p3 ft2">&nbsp;</P></TD>
	<TD class="tr21 td8"><P class="p3 ft2">&nbsp;</P></TD>
	<TD class="tr21 td9"><P class="p3 ft2">&nbsp;</P></TD>
</TR>
<TR>
<?php 
$dia_hoje = date('d');
$ano_hoje = date('Y');
 
 $hoje = getdate();

$meses = array (1 => "Janeiro", 2 => "Fevereiro", 3 => "Março", 4 => "Abril", 5 => "Maio", 6 => "Junho", 7 => "Julho", 8 => "Agosto", 9 => "Setembro", 10 => "Outubro", 11 => "Novembro", 12 => "Dezembro");

 $mes = $hoje["mon"];

 $nome_mes = $meses[$mes];

?>
	<TD rowspan=3 class="tr19 td0"><P class="p3 ft8">Franca, <?php echo " $dia_hoje"; ?> de <?php echo " $nome_mes"; ?> de <?php echo " $ano_hoje"; ?></P></TD>
	
	
</TR>


</TABLE>


</DIV>

<!-- #include virtual="/convert-pdf-to-html/includes/pdf-to-word-body-tag-between-content.htm" --><DIV id="page_2">



<DIV class="dclr"></DIV>
<TABLE cellpadding=0 cellspacing=0 class="t1">
<TR>
	<TD class="tr0 td50"><P class="p3 ft14">________________________________________</P></TD>
	<TD class="tr0 td51"><P class="p22 ft8">_______________________________________</P></TD>
</TR>
<TR>
	<TD class="tr25 td50"><P class="p3 ft8">Proponente:</P></TD>
	<TD class="tr25 td51"><P class="p23 ft8">Corretor / CRECI</P></TD>
</TR>
<TR>
	<TD class="tr26 td50"><P class="p3 ft8">Testemunhas:</P></TD>
	<TD class="tr26 td51"><P class="p3 ft2">&nbsp;</P></TD>
</TR>
<TR>
	<TD class="tr27 td50"><P class="p3 ft14">________________________________________</P></TD>
	<TD class="tr27 td51"><P class="p22 ft8">_______________________________________</P></TD>
</TR>
<TR>
	<TD class="tr17 td50"><P class="p3 ft8">Nome:</P></TD>
	<TD class="tr17 td51"><P class="p24 ft8">Nome:</P></TD>
</TR>
<TR>
	<TD class="tr28 td50"><P class="p2 ft8">RG:</P></TD>
	<TD class="tr28 td51"><P class="p25 ft8">RG:</P></TD>
</TR>
</TABLE>
<P class="p26 ft12">2</P>
<P class="p21 ft13">Rua �?gua Santa, 393, Vila Nova, CEP: <NOBR>14.405-357,</NOBR> Franca/SP, Fone (16) <NOBR>3721-8132,</NOBR> CNPJ <NOBR>47.998.745/0001-55,</NOBR> CRECI – 165.698</P>
</DIV>
<DIV style="padding: 50px 0px 15px 20px; font-family: Arial, Helvetica, sans-serif; font-size: 8px;">
	
</DIV>
</BODY>
</HTML>
