<?php
error_reporting(0);
ini_set("display_errors", 0 );
//header('Content-Type: text/html; charset=utf-8');
include("../configuracao.php");//confirma no banco de dados
include("../inclusos/funcoes.php");
include("../seguranca.php"); // Inclui o arquivo com o sistema de seguran?a
protegePagina(); // Protege a página

//echo GerarCamposPost("contratos", "linha_contratos");

$idcompra_gerada = $_GET['idcompra_gerada'];

//DADOS ORÇAMENTO

$selecionar_orcamentos = Seleciona("compras_geradas", "WHERE idcompra_gerada='".$idcompra_gerada."'", "") or die(mysql_error());
while($linha_orcamentos=mysql_fetch_array($selecionar_orcamentos)){
		
	$idobra = $linha_orcamentos['idobra'];
	$status = $linha_orcamentos['status']; 
	$dataorcamento = $linha_orcamentos['datacompra']; 
	$idusuario = $linha_orcamentos['aprovado_por']; 
	$idfornecedor = $linha_orcamentos['idfornecedor']; 
	$nf = $linha_orcamentos['nf']; 
	$dataentrega = $linha_orcamentos['dataentrega']; 		
	$idconta = $linha_orcamentos['idconta'];

	$conclusao_parecer = $linha_orcamentos['conclusao_parecer'];
	$responsavel_contratante = $linha_orcamentos['responsavel_contratante'];
	$responsavel_contratado = $linha_orcamentos['responsavel_contratado'];
	$data_finalizacao = $linha_orcamentos['data_finalizacao'];				
	
}

$SelecionaObra = Seleciona("obras", "WHERE idobra='$idobra'", "LIMIT 0,1");
while($Obra = mysql_fetch_array($SelecionaObra)){
  $idvenda = $Obra['idvenda'];
  $idcliente = $Obra['idcliente'];
  $codmax = $Obra['codmax'];	  
  $titulo = $Obra['titulo'];	    
  $CodObra = $Obra['codmax'] . "-" . substr($Obra['datacadastro'], 0, 4) . " - " . $titulo;  
}

$seleciona_fornecedores = Seleciona("fornecedores", "WHERE idfornecedor='".$idfornecedor."'", "ORDER BY nome ASC LIMIT 0,1");
while($linha_fornecedores=mysql_fetch_array($seleciona_fornecedores)){
	$NomeFornecedor = $linha_fornecedores['nome'];
	$CnpjFornecedor = $linha_fornecedores['cnpj'];
	$CpfFornecedor = $linha_fornecedores['cpf'];		
}

?>
<html>
<head>

<meta charset="utf-8">
<style>
<!--
 /* Font Definitions */
 @font-face
	{font-family:"Tms Rmn";
	panose-1:2 2 6 3 4 5 5 2 3 4;
	mso-font-charset:0;
	mso-generic-font-family:roman;
	mso-font-format:other;
	mso-font-pitch:variable;
	mso-font-signature:3 0 0 0 1 0;}
@font-face
	{font-family:Wingdings;
	panose-1:5 0 0 0 0 0 0 0 0 0;
	mso-font-charset:2;
	mso-generic-font-family:auto;
	mso-font-pitch:variable;
	mso-font-signature:0 268435456 0 0 -2147483648 0;}
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;
	mso-font-charset:0;
	mso-generic-font-family:roman;
	mso-font-pitch:variable;
	mso-font-signature:-536870145 1107305727 0 0 415 0;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;
	mso-font-charset:0;
	mso-generic-font-family:swiss;
	mso-font-pitch:variable;
	mso-font-signature:-536870145 1073786111 1 0 415 0;}
@font-face
	{font-family:Tahoma;
	panose-1:2 11 6 4 3 5 4 4 2 4;
	mso-font-charset:0;
	mso-generic-font-family:swiss;
	mso-font-pitch:variable;
	mso-font-signature:-520081665 -1073717157 41 0 66047 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{mso-style-unhide:no;
	mso-style-qformat:yes;
	mso-style-parent:"";
	margin:0cm;
	margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	font-family:"Times New Roman","serif";
	mso-fareast-font-family:"Times New Roman";}
h1
	{mso-style-unhide:no;
	mso-style-qformat:yes;
	mso-style-link:"Título 1 Char";
	mso-style-next:Normal;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	mso-pagination:widow-orphan;
	page-break-after:avoid;
	mso-outline-level:1;
	font-size:12.0pt;
	font-family:"Times New Roman","serif";
	mso-font-kerning:0pt;
	mso-ansi-language:X-NONE;
	mso-fareast-language:X-NONE;}
p.MsoHeader, li.MsoHeader, div.MsoHeader
	{mso-style-priority:99;
	mso-style-unhide:no;
	mso-style-link:"Cabeçalho Char";
	margin:0cm;
	margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	tab-stops:center 220.95pt right 441.9pt;
	font-size:12.0pt;
	font-family:"Times New Roman","serif";
	mso-fareast-font-family:"Times New Roman";
	mso-ansi-language:X-NONE;
	mso-fareast-language:X-NONE;}
p.MsoFooter, li.MsoFooter, div.MsoFooter
	{mso-style-priority:99;
	mso-style-unhide:no;
	mso-style-link:"Rodapé Char";
	margin:0cm;
	margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	tab-stops:center 220.95pt right 441.9pt;
	font-size:12.0pt;
	font-family:"Times New Roman","serif";
	mso-fareast-font-family:"Times New Roman";
	mso-ansi-language:X-NONE;
	mso-fareast-language:X-NONE;}
p.MsoTitle, li.MsoTitle, div.MsoTitle
	{mso-style-unhide:no;
	mso-style-qformat:yes;
	mso-style-link:"Título Char";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	mso-pagination:widow-orphan;
	font-size:14.0pt;
	mso-bidi-font-size:12.0pt;
	font-family:"Times New Roman","serif";
	mso-fareast-font-family:"Times New Roman";
	mso-ansi-language:X-NONE;
	mso-fareast-language:X-NONE;}
p.MsoBodyText, li.MsoBodyText, div.MsoBodyText
	{mso-style-unhide:no;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	font-family:"Times New Roman","serif";
	mso-fareast-font-family:"Times New Roman";
	font-weight:bold;}
p.MsoBodyTextIndent, li.MsoBodyTextIndent, div.MsoBodyTextIndent
	{mso-style-unhide:no;
	mso-style-link:"Recuo de corpo de texto Char";
	margin-top:0cm;
	margin-right:0cm;
	margin-bottom:6.0pt;
	margin-left:14.15pt;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	font-family:"Times New Roman","serif";
	mso-fareast-font-family:"Times New Roman";
	mso-ansi-language:X-NONE;
	mso-fareast-language:X-NONE;}
p.MsoBodyTextIndent3, li.MsoBodyTextIndent3, div.MsoBodyTextIndent3
	{mso-style-noshow:yes;
	mso-style-priority:99;
	mso-style-link:"Recuo de corpo de texto 3 Char";
	margin-top:0cm;
	margin-right:0cm;
	margin-bottom:6.0pt;
	margin-left:14.15pt;
	mso-pagination:widow-orphan;
	font-size:8.0pt;
	font-family:"Times New Roman","serif";
	mso-fareast-font-family:"Times New Roman";}
a:link, span.MsoHyperlink
	{mso-style-unhide:no;
	mso-style-parent:"";
	color:blue;
	text-decoration:underline;
	text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-noshow:yes;
	mso-style-priority:99;
	color:purple;
	mso-themecolor:followedhyperlink;
	text-decoration:underline;
	text-underline:single;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
	{mso-style-noshow:yes;
	mso-style-unhide:no;
	margin:0cm;
	margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:8.0pt;
	font-family:"Tahoma","sans-serif";
	mso-fareast-font-family:"Times New Roman";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
	{mso-style-priority:34;
	mso-style-unhide:no;
	mso-style-qformat:yes;
	margin-top:0cm;
	margin-right:0cm;
	margin-bottom:8.0pt;
	margin-left:35.4pt;
	line-height:107%;
	mso-pagination:widow-orphan;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";
	mso-fareast-font-family:"Times New Roman";
	mso-bidi-font-family:"Times New Roman";}
span.RecuodecorpodetextoChar
	{mso-style-name:"Recuo de corpo de texto Char";
	mso-style-unhide:no;
	mso-style-locked:yes;
	mso-style-parent:"";
	mso-style-link:"Recuo de corpo de texto";
	mso-ansi-font-size:12.0pt;
	mso-bidi-font-size:12.0pt;}
span.TtuloChar
	{mso-style-name:"Título Char";
	mso-style-unhide:no;
	mso-style-locked:yes;
	mso-style-parent:"";
	mso-style-link:Título;
	mso-ansi-font-size:14.0pt;
	mso-bidi-font-size:12.0pt;}
span.Ttulo1Char
	{mso-style-name:"Título 1 Char";
	mso-style-unhide:no;
	mso-style-locked:yes;
	mso-style-parent:"";
	mso-style-link:"Título 1";
	mso-ansi-font-size:12.0pt;
	mso-bidi-font-size:12.0pt;
	font-weight:bold;}
p.BodyText1, li.BodyText1, div.BodyText1
	{mso-style-name:"Body Text1";
	mso-style-unhide:no;
	mso-style-parent:"";
	margin:0cm;
	margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	mso-bidi-font-size:10.0pt;
	font-family:"Tms Rmn","serif";
	mso-fareast-font-family:"Times New Roman";
	mso-bidi-font-family:"Times New Roman";
	color:black;
	mso-ansi-language:EN-US;}
p.Default, li.Default, div.Default
	{mso-style-name:Default;
	mso-style-unhide:no;
	mso-style-parent:"";
	margin:0cm;
	margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	mso-layout-grid-align:none;
	text-autospace:none;
	font-size:12.0pt;
	font-family:"Arial","sans-serif";
	mso-fareast-font-family:"Times New Roman";
	color:black;}
p.GradeMdia21, li.GradeMdia21, div.GradeMdia21
	{mso-style-name:"Grade Média 21";
	mso-style-priority:1;
	mso-style-unhide:no;
	mso-style-qformat:yes;
	mso-style-parent:"";
	mso-style-link:"Grade Média 2 Char";
	margin:0cm;
	margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";
	mso-fareast-font-family:"Times New Roman";
	mso-bidi-font-family:"Times New Roman";}
span.GradeMdia2Char
	{mso-style-name:"Grade Média 2 Char";
	mso-style-priority:1;
	mso-style-unhide:no;
	mso-style-locked:yes;
	mso-style-parent:"";
	mso-style-link:"Grade Média 21";
	mso-ansi-font-size:11.0pt;
	mso-bidi-font-size:11.0pt;
	font-family:"Calibri","sans-serif";
	mso-ascii-font-family:Calibri;
	mso-hansi-font-family:Calibri;
	mso-bidi-language:AR-SA;}
span.RodapChar
	{mso-style-name:"Rodapé Char";
	mso-style-priority:99;
	mso-style-unhide:no;
	mso-style-locked:yes;
	mso-style-parent:"";
	mso-style-link:Rodapé;
	mso-ansi-font-size:12.0pt;
	mso-bidi-font-size:12.0pt;}
span.CabealhoChar
	{mso-style-name:"Cabeçalho Char";
	mso-style-priority:99;
	mso-style-unhide:no;
	mso-style-locked:yes;
	mso-style-parent:"";
	mso-style-link:Cabeçalho;
	mso-ansi-font-size:12.0pt;
	mso-bidi-font-size:12.0pt;}
span.Recuodecorpodetexto3Char
	{mso-style-name:"Recuo de corpo de texto 3 Char";
	mso-style-noshow:yes;
	mso-style-priority:99;
	mso-style-unhide:no;
	mso-style-locked:yes;
	mso-style-parent:"";
	mso-style-link:"Recuo de corpo de texto 3";
	mso-ansi-font-size:8.0pt;
	mso-bidi-font-size:8.0pt;}
 /* Page Definitions */

div.Section1
	{page:Section1;}
 /* List Definitions */
 @list l0
	{mso-list-id:-227;
	mso-list-template-ids:-1477049504;}
@list l0:level1
	{mso-level-number-format:bullet;
	mso-level-text:"";
	mso-level-tab-stop:0cm;
	mso-level-number-position:left;
	margin-left:0cm;
	text-indent:0cm;
	font-family:Symbol;}
@list l0:level2
	{mso-level-number-format:bullet;
	mso-level-text:\F0B7;
	mso-level-tab-stop:36.0pt;
	mso-level-number-position:left;
	margin-left:54.0pt;
	text-indent:-18.0pt;
	font-family:Symbol;}
@list l0:level3
	{mso-level-number-format:bullet;
	mso-level-text:o;
	mso-level-tab-stop:72.0pt;
	mso-level-number-position:left;
	margin-left:90.0pt;
	text-indent:-18.0pt;
	font-family:"Courier New";
	mso-bidi-font-family:"Times New Roman";}
@list l0:level4
	{mso-level-number-format:bullet;
	mso-level-text:\F0A7;
	mso-level-tab-stop:108.0pt;
	mso-level-number-position:left;
	margin-left:126.0pt;
	text-indent:-18.0pt;
	font-family:Wingdings;}
@list l0:level5
	{mso-level-number-format:bullet;
	mso-level-text:\F0FA;
	mso-level-tab-stop:144.0pt;
	mso-level-number-position:left;
	margin-left:162.0pt;
	text-indent:-18.0pt;
	font-family:Wingdings;}
@list l0:level6
	{mso-level-number-format:bullet;
	mso-level-text:\F0B7;
	mso-level-tab-stop:180.0pt;
	mso-level-number-position:left;
	margin-left:198.0pt;
	text-indent:-18.0pt;
	font-family:Symbol;}
@list l0:level7
	{mso-level-number-format:bullet;
	mso-level-text:o;
	mso-level-tab-stop:216.0pt;
	mso-level-number-position:left;
	margin-left:234.0pt;
	text-indent:-18.0pt;
	font-family:"Courier New";
	mso-bidi-font-family:"Times New Roman";}
@list l0:level8
	{mso-level-number-format:bullet;
	mso-level-text:\F0A7;
	mso-level-tab-stop:252.0pt;
	mso-level-number-position:left;
	margin-left:270.0pt;
	text-indent:-18.0pt;
	font-family:Wingdings;}
@list l0:level9
	{mso-level-number-format:bullet;
	mso-level-text:\F0FA;
	mso-level-tab-stop:288.0pt;
	mso-level-number-position:left;
	margin-left:306.0pt;
	text-indent:-18.0pt;
	font-family:Wingdings;}
@list l1
	{mso-list-id:6106474;
	mso-list-type:simple;
	mso-list-template-ids:-1120993410;}
@list l1:level1
	{mso-level-tab-stop:18.0pt;
	mso-level-number-position:left;
	margin-left:18.0pt;
	text-indent:-18.0pt;}
@list l2
	{mso-list-id:44988672;
	mso-list-type:hybrid;
	mso-list-template-ids:-1308225940 517210932 68550659 68550661 68550657 68550659 68550661 68550657 68550659 68550661;}
@list l2:level1
	{mso-level-start-at:0;
	mso-level-number-format:bullet;
	mso-level-text:-;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:"Times New Roman","serif";
	mso-fareast-font-family:"Times New Roman";}
@list l3
	{mso-list-id:102767365;
	mso-list-type:hybrid;
	mso-list-template-ids:2098990574 517210932 68550659 68550661 68550657 68550659 68550661 68550657 68550659 68550661;}
@list l3:level1
	{mso-level-start-at:0;
	mso-level-number-format:bullet;
	mso-level-text:-;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:"Times New Roman","serif";
	mso-fareast-font-family:"Times New Roman";}
@list l4
	{mso-list-id:137840246;
	mso-list-type:hybrid;
	mso-list-template-ids:-1127603444 517210932 68550659 68550661 68550657 68550659 68550661 68550657 68550659 68550661;}
@list l4:level1
	{mso-level-start-at:0;
	mso-level-number-format:bullet;
	mso-level-text:-;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:"Times New Roman","serif";
	mso-fareast-font-family:"Times New Roman";}
@list l5
	{mso-list-id:142739502;
	mso-list-type:hybrid;
	mso-list-template-ids:-611127672 68550669 68550659 68550661 68550657 68550659 68550661 68550657 68550659 68550661;}
@list l5:level1
	{mso-level-number-format:bullet;
	mso-level-text:\F0FC;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:Wingdings;}
@list l6
	{mso-list-id:145053271;
	mso-list-template-ids:-918620316;}
@list l6:level1
	{mso-level-start-at:2;
	mso-level-text:%1;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:18.0pt;
	text-indent:-18.0pt;
	mso-bidi-font-family:"Times New Roman";}
@list l6:level2
	{mso-level-text:"%1\.%2";
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:18.0pt;
	text-indent:-18.0pt;
	mso-bidi-font-family:"Times New Roman";
	mso-ansi-font-weight:bold;}
@list l6:level3
	{mso-level-text:"%1\.%2\.%3";
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:64.4pt;
	text-indent:-36.0pt;
	mso-bidi-font-family:"Times New Roman";}
@list l6:level4
	{mso-level-text:"%1\.%2\.%3\.%4";
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:78.6pt;
	text-indent:-36.0pt;
	mso-bidi-font-family:"Times New Roman";}
@list l6:level5
	{mso-level-text:"%1\.%2\.%3\.%4\.%5";
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:110.8pt;
	text-indent:-54.0pt;
	mso-bidi-font-family:"Times New Roman";}
@list l6:level6
	{mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6";
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:125.0pt;
	text-indent:-54.0pt;
	mso-bidi-font-family:"Times New Roman";}
@list l6:level7
	{mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6\.%7";
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:157.2pt;
	text-indent:-72.0pt;
	mso-bidi-font-family:"Times New Roman";}
@list l6:level8
	{mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6\.%7\.%8";
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:171.4pt;
	text-indent:-72.0pt;
	mso-bidi-font-family:"Times New Roman";}
@list l6:level9
	{mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6\.%7\.%8\.%9";
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:203.6pt;
	text-indent:-90.0pt;
	mso-bidi-font-family:"Times New Roman";}
@list l7
	{mso-list-id:155993795;
	mso-list-type:hybrid;
	mso-list-template-ids:-464874452 68550657 68550659 68550661 68550657 68550659 68550661 68550657 68550659 68550661;}
@list l7:level1
	{mso-level-number-format:bullet;
	mso-level-text:\F0B7;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:57.25pt;
	text-indent:-18.0pt;
	font-family:Symbol;}
@list l8
	{mso-list-id:237910259;
	mso-list-type:hybrid;
	mso-list-template-ids:32256894 68550657 68550659 68550661 68550657 68550659 68550661 68550657 68550659 68550661;}
@list l8:level1
	{mso-level-number-format:bullet;
	mso-level-text:\F0B7;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:Symbol;}
@list l9
	{mso-list-id:273758123;
	mso-list-type:hybrid;
	mso-list-template-ids:-719037230 68550657 68550659 68550661 68550657 68550659 68550661 68550657 68550659 68550661;}
@list l9:level1
	{mso-level-number-format:bullet;
	mso-level-text:\F0B7;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:Symbol;}
@list l10
	{mso-list-id:275601469;
	mso-list-type:hybrid;
	mso-list-template-ids:367957554 68550657 68550659 68550661 68550657 68550659 68550661 68550657 68550659 68550661;}
@list l10:level1
	{mso-level-number-format:bullet;
	mso-level-text:\F0B7;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:Symbol;}
@list l11
	{mso-list-id:303972388;
	mso-list-type:hybrid;
	mso-list-template-ids:-1344218702 68550667 68550659 68550661 68550657 68550659 68550661 68550657 68550659 68550661;}
@list l11:level1
	{mso-level-number-format:bullet;
	mso-level-text:\F0D8;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:Wingdings;}
@list l12
	{mso-list-id:308949709;
	mso-list-type:hybrid;
	mso-list-template-ids:1157367880 517210932 68550659 68550661 68550657 68550659 68550661 68550657 68550659 68550661;}
@list l12:level1
	{mso-level-start-at:0;
	mso-level-number-format:bullet;
	mso-level-text:-;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:"Times New Roman","serif";
	mso-fareast-font-family:"Times New Roman";}
@list l13
	{mso-list-id:338503147;
	mso-list-type:hybrid;
	mso-list-template-ids:-559925880 68550657 68550659 68550661 68550657 68550659 68550661 68550657 68550659 68550661;}
@list l13:level1
	{mso-level-number-format:bullet;
	mso-level-text:\F0B7;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:Symbol;}
@list l14
	{mso-list-id:378746894;
	mso-list-type:hybrid;
	mso-list-template-ids:2119719508 68550669 68550659 68550661 68550657 68550659 68550661 68550657 68550659 68550661;}
@list l14:level1
	{mso-level-number-format:bullet;
	mso-level-text:\F0FC;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:Wingdings;}
@list l15
	{mso-list-id:379597237;
	mso-list-type:hybrid;
	mso-list-template-ids:994321056 68550657 68550659 68550661 68550657 68550659 68550661 68550657 68550659 68550661;}
@list l15:level1
	{mso-level-number-format:bullet;
	mso-level-text:\F0B7;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:39.4pt;
	text-indent:-18.0pt;
	font-family:Symbol;}
@list l16
	{mso-list-id:483550500;
	mso-list-type:hybrid;
	mso-list-template-ids:-548749150 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l16:level1
	{mso-level-number-format:bullet;
	mso-level-text:\F0B7;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:Symbol;}
@list l17
	{mso-list-id:488864566;
	mso-list-type:hybrid;
	mso-list-template-ids:706534378 68550669 -711953842 68550661 68550657 68550659 68550661 68550657 68550659 68550661;}
@list l17:level1
	{mso-level-number-format:bullet;
	mso-level-text:\F0FC;
	mso-level-tab-stop:64.35pt;
	mso-level-number-position:left;
	margin-left:64.35pt;
	text-indent:-18.0pt;
	font-family:Wingdings;
	color:teal;
	mso-ansi-font-weight:normal;
	mso-ansi-font-style:italic;}
@list l17:level2
	{mso-level-text:%2-;
	mso-level-tab-stop:103.1pt;
	mso-level-number-position:left;
	margin-left:103.1pt;
	text-indent:-18.0pt;
	color:windowtext;
	mso-ansi-font-weight:normal;
	mso-ansi-font-style:normal;}
@list l18
	{mso-list-id:525410361;
	mso-list-type:hybrid;
	mso-list-template-ids:-1233462106 68550657 68550659 68550661 68550657 68550659 68550661 68550657 68550659 68550661;}
@list l18:level1
	{mso-level-number-format:bullet;
	mso-level-text:\F0B7;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:Symbol;}
@list l19
	{mso-list-id:616252236;
	mso-list-type:hybrid;
	mso-list-template-ids:-224211584 68550667 68550659 68550661 68550657 68550659 68550661 68550657 68550659 68550661;}
@list l19:level1
	{mso-level-number-format:bullet;
	mso-level-text:\F0D8;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:Wingdings;}
@list l20
	{mso-list-id:628247603;
	mso-list-type:hybrid;
	mso-list-template-ids:614113816 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l20:level1
	{mso-level-number-format:bullet;
	mso-level-text:\F0B7;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:Symbol;}
@list l21
	{mso-list-id:711272739;
	mso-list-template-ids:-1121680824;}
@list l21:level1
	{mso-level-start-at:2;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:27.0pt;
	text-indent:-27.0pt;}
@list l21:level2
	{mso-level-start-at:3;
	mso-level-text:"%1\.%2\.";
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:45.0pt;
	text-indent:-36.0pt;}
@list l21:level3
	{mso-level-text:"%1\.%2\.%3\.";
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:54.0pt;
	text-indent:-36.0pt;}
@list l21:level4
	{mso-level-text:"%1\.%2\.%3\.%4\.";
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:81.0pt;
	text-indent:-54.0pt;}
@list l21:level5
	{mso-level-text:"%1\.%2\.%3\.%4\.%5\.";
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:90.0pt;
	text-indent:-54.0pt;}
@list l21:level6
	{mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6\.";
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:117.0pt;
	text-indent:-72.0pt;}
@list l21:level7
	{mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6\.%7\.";
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:126.0pt;
	text-indent:-72.0pt;}
@list l21:level8
	{mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6\.%7\.%8\.";
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:153.0pt;
	text-indent:-90.0pt;}
@list l21:level9
	{mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6\.%7\.%8\.%9\.";
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:162.0pt;
	text-indent:-90.0pt;}
@list l22
	{mso-list-id:806363856;
	mso-list-type:hybrid;
	mso-list-template-ids:-1829724502 517210932 68550659 68550661 68550657 68550659 68550661 68550657 68550659 68550661;}
@list l22:level1
	{mso-level-start-at:0;
	mso-level-number-format:bullet;
	mso-level-text:-;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:"Times New Roman","serif";
	mso-fareast-font-family:"Times New Roman";}
@list l23
	{mso-list-id:892737716;
	mso-list-type:hybrid;
	mso-list-template-ids:-1056538598 517210932 68550659 68550661 68550657 68550659 68550661 68550657 68550659 68550661;}
@list l23:level1
	{mso-level-start-at:0;
	mso-level-number-format:bullet;
	mso-level-text:-;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:"Times New Roman","serif";
	mso-fareast-font-family:"Times New Roman";}
@list l24
	{mso-list-id:1083406958;
	mso-list-type:hybrid;
	mso-list-template-ids:1503398586 68550657 68550659 68550661 68550657 68550659 68550661 68550657 68550659 68550661;}
@list l24:level1
	{mso-level-number-format:bullet;
	mso-level-text:\F0B7;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:Symbol;}
@list l25
	{mso-list-id:1151944620;
	mso-list-type:hybrid;
	mso-list-template-ids:-1106325410 68550669 68550659 68550661 68550657 68550659 68550661 68550657 68550659 68550661;}
@list l25:level1
	{mso-level-number-format:bullet;
	mso-level-text:\F0FC;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:40.5pt;
	text-indent:-18.0pt;
	font-family:Wingdings;}
@list l26
	{mso-list-id:1286232064;
	mso-list-type:hybrid;
	mso-list-template-ids:469111992 1168147268 68550681 68550683 68550671 68550681 68550683 68550671 68550681 68550683;}
@list l26:level1
	{mso-level-number-format:alpha-lower;
	mso-level-text:"%1\)";
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	mso-bidi-font-family:"Times New Roman";
	mso-ansi-font-weight:bold;}
@list l27
	{mso-list-id:1349217322;
	mso-list-type:hybrid;
	mso-list-template-ids:-1276999412 1086599954 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l27:level1
	{mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:39.3pt;
	text-indent:-18.0pt;}
@list l28
	{mso-list-id:1395810996;
	mso-list-type:hybrid;
	mso-list-template-ids:-1179878542 517210932 68550659 68550661 68550657 68550659 68550661 68550657 68550659 68550661;}
@list l28:level1
	{mso-level-start-at:0;
	mso-level-number-format:bullet;
	mso-level-text:-;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:"Times New Roman","serif";
	mso-fareast-font-family:"Times New Roman";}
@list l29
	{mso-list-id:1417508232;
	mso-list-type:hybrid;
	mso-list-template-ids:-1874666708 68550657 68550659 68550661 68550657 68550659 68550661 68550657 68550659 68550661;}
@list l29:level1
	{mso-level-number-format:bullet;
	mso-level-text:\F0B7;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:Symbol;}
@list l30
	{mso-list-id:1460487347;
	mso-list-type:hybrid;
	mso-list-template-ids:-1461166364 517210932 68550659 68550661 68550657 68550659 68550661 68550657 68550659 68550661;}
@list l30:level1
	{mso-level-start-at:0;
	mso-level-number-format:bullet;
	mso-level-text:-;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:"Times New Roman","serif";
	mso-fareast-font-family:"Times New Roman";}
@list l31
	{mso-list-id:1466241439;
	mso-list-type:hybrid;
	mso-list-template-ids:2024538732 517210932 68550659 68550661 68550657 68550659 68550661 68550657 68550659 68550661;}
@list l31:level1
	{mso-level-start-at:0;
	mso-level-number-format:bullet;
	mso-level-text:-;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:"Times New Roman","serif";
	mso-fareast-font-family:"Times New Roman";}
@list l31:level2
	{mso-level-number-format:bullet;
	mso-level-text:o;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:"Courier New";}
@list l31:level4
	{mso-level-number-format:bullet;
	mso-level-text:\F0B7;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:Symbol;}
@list l32
	{mso-list-id:1467578390;
	mso-list-template-ids:-734905408;}
@list l32:level1
	{mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
@list l32:level2
	{mso-level-start-at:2;
	mso-level-legal-format:yes;
	mso-level-text:"%1\.%2\.";
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:54.0pt;
	text-indent:-36.0pt;}
@list l32:level3
	{mso-level-legal-format:yes;
	mso-level-text:"%1\.%2\.%3\.";
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:54.0pt;
	text-indent:-36.0pt;}
@list l32:level4
	{mso-level-legal-format:yes;
	mso-level-text:"%1\.%2\.%3\.%4\.";
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:72.0pt;
	text-indent:-54.0pt;}
@list l32:level5
	{mso-level-legal-format:yes;
	mso-level-text:"%1\.%2\.%3\.%4\.%5\.";
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:72.0pt;
	text-indent:-54.0pt;}
@list l32:level6
	{mso-level-legal-format:yes;
	mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6\.";
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:90.0pt;
	text-indent:-72.0pt;}
@list l32:level7
	{mso-level-legal-format:yes;
	mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6\.%7\.";
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:90.0pt;
	text-indent:-72.0pt;}
@list l32:level8
	{mso-level-legal-format:yes;
	mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6\.%7\.%8\.";
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:108.0pt;
	text-indent:-90.0pt;}
@list l32:level9
	{mso-level-legal-format:yes;
	mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6\.%7\.%8\.%9\.";
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:108.0pt;
	text-indent:-90.0pt;}
@list l33
	{mso-list-id:1496874069;
	mso-list-type:hybrid;
	mso-list-template-ids:321701316 517210932 68550659 68550661 68550657 68550659 68550661 68550657 68550659 68550661;}
@list l33:level1
	{mso-level-start-at:0;
	mso-level-number-format:bullet;
	mso-level-text:-;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:"Times New Roman","serif";
	mso-fareast-font-family:"Times New Roman";}
@list l34
	{mso-list-id:1508135334;
	mso-list-type:hybrid;
	mso-list-template-ids:111328202 68550669 68550659 68550661 68550657 68550659 68550661 68550657 68550659 68550661;}
@list l34:level1
	{mso-level-number-format:bullet;
	mso-level-text:\F0FC;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:Wingdings;}
@list l35
	{mso-list-id:1563100070;
	mso-list-template-ids:960780796;}
@list l35:level1
	{mso-level-text:%1;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:18.0pt;
	text-indent:-18.0pt;}
@list l35:level2
	{mso-level-text:"%1\.%2";
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:36.0pt;
	text-indent:-18.0pt;}
@list l35:level3
	{mso-level-text:"%1\.%2\.%3";
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:72.0pt;
	text-indent:-36.0pt;}
@list l35:level4
	{mso-level-text:"%1\.%2\.%3\.%4";
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:90.0pt;
	text-indent:-36.0pt;}
@list l35:level5
	{mso-level-text:"%1\.%2\.%3\.%4\.%5";
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:126.0pt;
	text-indent:-54.0pt;}
@list l35:level6
	{mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6";
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:144.0pt;
	text-indent:-54.0pt;}
@list l35:level7
	{mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6\.%7";
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:180.0pt;
	text-indent:-72.0pt;}
@list l35:level8
	{mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6\.%7\.%8";
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:198.0pt;
	text-indent:-72.0pt;}
@list l35:level9
	{mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6\.%7\.%8\.%9";
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:234.0pt;
	text-indent:-90.0pt;}
@list l36
	{mso-list-id:1762097074;
	mso-list-type:hybrid;
	mso-list-template-ids:-1173699044 -1963701210 -711953842 68550661 68550657 68550659 68550661 68550657 68550659 68550661;}
@list l36:level1
	{mso-level-number-format:bullet;
	mso-level-text:\F076;
	mso-level-tab-stop:64.35pt;
	mso-level-number-position:left;
	margin-left:64.35pt;
	text-indent:-18.0pt;
	font-family:Wingdings;
	color:teal;
	mso-ansi-font-weight:normal;
	mso-ansi-font-style:italic;}
@list l36:level2
	{mso-level-text:%2-;
	mso-level-tab-stop:103.1pt;
	mso-level-number-position:left;
	margin-left:103.1pt;
	text-indent:-18.0pt;
	color:windowtext;
	mso-ansi-font-weight:normal;
	mso-ansi-font-style:normal;}
@list l37
	{mso-list-id:1795518968;
	mso-list-type:hybrid;
	mso-list-template-ids:795405658 68550667 68550659 68550661 68550657 68550659 68550661 68550657 68550659 68550661;}
@list l37:level1
	{mso-level-number-format:bullet;
	mso-level-text:\F0D8;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:Wingdings;}
@list l38
	{mso-list-id:1853258718;
	mso-list-type:hybrid;
	mso-list-template-ids:1841212974 68550661 68550659 68550661 68550657 68550659 68550661 68550657 68550659 68550661;}
@list l38:level1
	{mso-level-number-format:bullet;
	mso-level-text:\F0A7;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:Wingdings;}
@list l39
	{mso-list-id:1900940075;
	mso-list-type:hybrid;
	mso-list-template-ids:1033693946 68550661 68550659 68550661 68550657 68550659 68550661 68550657 68550659 68550661;}
@list l39:level1
	{mso-level-number-format:bullet;
	mso-level-text:\F0A7;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:Wingdings;}
@list l40
	{mso-list-id:1942178471;
	mso-list-type:hybrid;
	mso-list-template-ids:2046328516 68550657 68550659 68550661 68550657 68550659 68550661 68550657 68550659 68550661;}
@list l40:level1
	{mso-level-number-format:bullet;
	mso-level-text:\F0B7;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	margin-left:72.0pt;
	text-indent:-18.0pt;
	font-family:Symbol;}
@list l41
	{mso-list-id:2108233088;
	mso-list-type:hybrid;
	mso-list-template-ids:270985142 517210932 68550659 68550661 68550657 68550659 68550661 68550657 68550659 68550661;}
@list l41:level1
	{mso-level-start-at:0;
	mso-level-number-format:bullet;
	mso-level-text:-;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:"Times New Roman","serif";
	mso-fareast-font-family:"Times New Roman";}
ol
	{margin-bottom:0cm;}
ul
	{margin-bottom:0cm;}
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
body,td,th {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 10pt;
}
-->
</style>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>TERMO DE ENTREGA DE OBRA</title>
</head>

<body lang=PT-BR link=blue vlink=purple style='tab-interval:35.4pt'>

<div class=Section1 style="background-image:url(background_topo.jpg); background-repeat:no-repeat; background-position:top;>

<p class=MsoNormal align=center style='text-align:center;mso-pagination:none;
mso-layout-grid-align:none;text-autospace:none'>&nbsp;</p>
<p class=MsoNormal align=center style='text-align:center;mso-pagination:none;
mso-layout-grid-align:none;text-autospace:none'>&nbsp;</p>
<p class=MsoNormal align=center style='text-align:center;mso-pagination:none;
mso-layout-grid-align:none;text-autospace:none'>&nbsp;</p>
<p class=MsoNormal align=center style='text-align:center;mso-pagination:none;
mso-layout-grid-align:none;text-autospace:none'>&nbsp;</p>
<p class=MsoNormal align=center style='text-align:center;mso-pagination:none;
mso-layout-grid-align:none;text-autospace:none'><b><span lang=pt
style='font-size:10.0pt;font-family:"Arial","sans-serif";mso-ansi-language:
#0016'></span></b></p>
<p class=MsoNormal align=center style='text-align:center;mso-pagination:none;
mso-layout-grid-align:none;text-autospace:none'>&nbsp;</p>
<p class=MsoNormal align=center style='text-align:center;mso-pagination:none;
mso-layout-grid-align:none;text-autospace:none'>&nbsp;</p>
<p class=MsoNormal align=center style='text-align:center;mso-pagination:none;
mso-layout-grid-align:none;text-autospace:none'>&nbsp;</p>
<p class=MsoNormal align=center style='text-align:center;mso-pagination:none;
mso-layout-grid-align:none;text-autospace:none'><span class="Section1" style="background-image:url(background_topo.jpg); background-repeat:no-repeat; background-position:top;&gt;

&lt;p class=MsoNormal align=center style='text-align:center;mso-pagination:none;
mso-layout-grid-align:none;text-autospace:none'&gt;&nbsp;&lt;/p&gt;
&lt;p class=MsoNormal align=center style='text-align:center;mso-pagination:none;
mso-layout-grid-align:none;text-autospace:none'&gt;&nbsp;&lt;/p&gt;
&lt;p class=MsoNormal align=center style='text-align:center;mso-pagination:none;
mso-layout-grid-align:none;text-autospace:none'&gt;&nbsp;&lt;/p&gt;
&lt;p class=MsoNormal align=center style='text-align:center;mso-pagination:none;
mso-layout-grid-align:none;text-autospace:none'&gt;&nbsp;&lt;/p&gt;
&lt;p class=MsoNormal align=center style='text-align:center;mso-pagination:none;
mso-layout-grid-align:none;text-autospace:none'&gt;&lt;b&gt;&lt;span lang=pt
style='font-size:10.0pt;font-family:"><img src="logomaxarkhe.jpg" width="269" height="52"></span></p>
<p class=MsoNormal align=center style='text-align:center;mso-pagination:none;
mso-layout-grid-align:none;text-autospace:none'>&nbsp;</p>
<p class=MsoNormal align=center style='text-align:center;mso-pagination:none;
mso-layout-grid-align:none;text-autospace:none'>&nbsp;</p>
<table width="100%" border="1" align="center" cellpadding="4" cellspacing="4">
  <tr>
    <td bgcolor="#CCCCCC"><p align="center"><strong><em>&nbsp;</em></strong><strong><em>TERMO DE ENTREGA DE    OBRA</em></strong><strong></strong></p>
      <p align="center"><strong><?php echo $CodObra;?></strong><strong> </strong></p></td>
  </tr>
</table>
<p>&nbsp;</p>
<p>Prezados  Senhores,</p>
<p>Apresentamos para an&aacute;lise e aprecia&ccedil;&atilde;o, o  termo de entrega <strong><?php echo $CodObra;?></strong><strong> da empresa prestadora  de servi&ccedil;o </strong><strong> <?php echo $NomeFornecedor;?> </strong><strong>– </strong>no CNPJ. <?php echo $CnpjFornecedor;?> o n&ordm; CPF  <?php echo $CpfFornecedor;?> </p>
<p>As  premissas e descri&ccedil;&otilde;es ser&atilde;o apresentadas a seguir</p>
<p>&nbsp;</p>
<table border="1" cellspacing="4" cellpadding="4" width="100%">
  <tr>
    <td bgcolor="#CCCCCC"><p><strong>1.&nbsp; ESCOPO DOS SERVI&Ccedil;OS REALIZADOS:</strong><strong> </strong></p></td>
  </tr>
</table>
<p><strong>O escopo abaixo descreve todos os itens  que foram realizados:</strong></p>
<p>&nbsp;</p>
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="0" style="border:1px solid #333;">
  <tr>
    <td style="background-color:#CCC;"><strong>DISCRIMINA&Ccedil;&Atilde;O</strong></td>
    <td width="60" style="background-color:#CCC;"><strong>UN.</strong></td>
    <td width="100" align="center" style="background-color:#CCC;"><strong>QUANT</strong></td>
    <td width="100" align="center" style="background-color:#CCC;"><strong>STATUS</strong></td>
    <?php
		$seleciona_fornecedores_compras = Seleciona("compras_orcamentos_fornecedores", "WHERE idfornecedor='$idfornecedor'", "LIMIT 0,1");
		while($linha_fornecedores=mysql_fetch_array($seleciona_fornecedores_compras)){		  
	  
	  $seleciona = Seleciona("fornecedores", "WHERE idfornecedor='".$linha_fornecedores['idfornecedor']."'", "ORDER BY nome ASC LIMIT 0,1");
		while($linha=mysql_fetch_array($seleciona)){		
		
		?>
    <?php } }?>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td align="center">&nbsp;</td>
    <td align="center">&nbsp;</td>
    <?php
		$seleciona_fornecedores_compras = Seleciona("compras_orcamentos_fornecedores", "WHERE idfornecedor='$idfornecedor'", "LIMIT 0,1");
		while($linha_fornecedores=mysql_fetch_array($seleciona_fornecedores_compras)){	
		?>
    <?php }?>
  </tr>
  <?php
	  $SelecionaComprasServico = Seleciona("compras_orcamentos_servicos", "WHERE idobra='$idobra' AND idcompra_gerada='$idcompra_gerada'", "");
	  $contproduto = 1;
	  while($CompraServico = mysql_fetch_array($SelecionaComprasServico)){
	
		$IdServico_Atual = $CompraServico['idservico'];  
	 	$Quantidade = $CompraServico['quantidade']; 		

	//NOME SERVIÇO	  
	  $SelecionaTituloServico = Seleciona("servicos", "WHERE idservico='$IdServico_Atual'", "LIMIT 0,1");
	  while($ServicoNome = mysql_fetch_array($SelecionaTituloServico)){
		 $TituloServico = $ServicoNome['titulo']; 
		 $UnidadeServico = $ServicoNome['unidade']; 
	  }	  
	  ?>
  <tr bgcolor="#FFFFE6">
    <td style="border:1px solid #333; font-weight:bold;"><?php echo $TituloServico;?></td>
    <td style="border:1px solid #333;"><?php echo $UnidadeServico;?></td>
    <td align="center" style="border:1px solid #333;"><?php echo $CompraServico['quantidade'];?></td>
    <td align="center" style="border:1px solid #333;"><?php echo $Status;?></td>
    <?php
		$seleciona_fornecedores_compras = Seleciona("compras_orcamentos_fornecedores", "WHERE idfornecedor='$idfornecedor'", "LIMIT 0,1");		
		while($linha_fornecedores=mysql_fetch_array($seleciona_fornecedores_compras)){	
		?>
    <?php
		$SelecionaServicosDetalhe = Seleciona("compras_orcamentos_fornecedores_valores", "WHERE idcompra_gerada='$idcompra_gerada' AND idfornecedor='".$linha_fornecedores['idfornecedor']."' AND idobra='$idobra' AND idservicoobra='".$CompraServico['idservicoobra']."'", "ORDER BY valor_total ASC LIMIT 0,1");
		while($linha_valor=mysql_fetch_array($SelecionaServicosDetalhe)){	
			$valor_total_input = $linha_valor['valor_total'];
			$idorcamento_compras_fornecedores_valor = $linha_valor['idorcamento_compras_fornecedores_valor'];
					
		if($linha_valor['selecionado'] == "sim"){
			$cor_celula = "yellow";
			$checkado = "checked";
			$opcao = "nao";
		}else{
			$opcao = "sim";
		}
		}		
		?>
    <?php 
		$valor_total_input = "";
		$idorcamento_compras_fornecedores_valor = "";	
		$opcao = "";			
		$cor_celula = "";
		$checkado = "";		 		
		}?>
  </tr>
  <?php
	  }
	  
		$SelecionaComprasProdutos = Seleciona("compras_orcamentos_produtos", "WHERE idobra='$idobra' AND idcompra_gerada='$idcompra_gerada'", "");
		while($CompraProduto = mysql_fetch_array($SelecionaComprasProdutos)){	  	  
		
		$idorcamento_compras_produtos = $CompraProduto['idorcamento_compras_produtos'];  
	  
		$SelecionaProdutosDetalhe = Seleciona("planilhadecompras", "WHERE idplanilha_compras='".$CompraProduto['idplanilha_compras']."'", "ORDER BY titulo ASC");
		while($ProdutoDetalhe = mysql_fetch_array($SelecionaProdutosDetalhe)){	
		$TipoProduto = $ProdutoDetalhe['tipo'];
		$Fornecedor1 = $ProdutoDetalhe['fornecedor1'];
		$Fornecedor2 = $ProdutoDetalhe['fornecedor2'];				
		$TituloProduto = $ProdutoDetalhe['titulo'];
		$Unidade = $ProdutoDetalhe['unidade'];		
		$QuantidadeProduto = $ProdutoDetalhe['quantidade'];	
		$Id_ServicoObra = $ProdutoDetalhe['idservicoobra'];				
		}
		

	//NOME SERVIÇO	  
	  $SelecionaTituloServico = Seleciona("obras_servicos", "WHERE idservicoobra='$Id_ServicoObra'", "LIMIT 0,1");
	  while($ServicoNome = mysql_fetch_array($SelecionaTituloServico)){
		 $IdServicoAtual = $ServicoNome['idservico'];
		 $TituloServico = $ServicoNome['titulo'];
		 $CodItem = $ServicoNome['coditem'];
		 $Unidade = $ServicoNome['unidade'];
		 $Status = $ServicoNome['status'];		 		 		  
	  }			
		

		
		?>
  <tr bgcolor="#E1FFFF">
    <td style="border:1px solid #333;"><?php 
        echo $TituloProduto;
        if($TipoProduto == "Produto"){		
        echo "<br><b style='font-size: 14px; color: red;'>".$CodItem." " . $TituloServico . "</b></span>";			
        }
        
        if($TituloProduto == "Mão de Obra + Produto"){
            echo "<br><b style='font-size: 14px; color: red;'>".$CodItem." ".$TituloServico . "</b><br>";
        }else{
        
        if($TipoProduto == "MaoDeObra"){
            echo "<br><b style='font-size: 14px; color: red;'>".$CodItem." " . $TituloServico . "</b><br>";	
        }
        }						
        ?></td>
    <td style="border:1px solid #333;"><?php echo $Unidade;?></td>
    <td align="center" style="border:1px solid #333;"><?php echo $QuantidadeProduto;?></td>
    <td align="center" style="border:1px solid #333;"><?php echo $Status;?></td>
    <?php
		$seleciona_fornecedores_compras = Seleciona("compras_orcamentos_fornecedores", "WHERE idfornecedor='$idfornecedor'", "LIMIT 0,1");		
		while($linha_fornecedores=mysql_fetch_array($seleciona_fornecedores_compras)){	
		?>
    <?php
		$SelecionaServicosDetalhe = Seleciona("compras_orcamentos_fornecedores_valores", "WHERE idcompra_gerada='$idcompra_gerada' AND idfornecedor='".$linha_fornecedores['idfornecedor']."' AND idobra='$idobra' AND idplanilha_compras='".$CompraProduto['idplanilha_compras']."'", "ORDER BY valor_total ASC LIMIT 0,1");
		while($linha_valor=mysql_fetch_array($SelecionaServicosDetalhe)){					
			$valor_total_input = $linha_valor['valor_total'];
			$idorcamento_compras_fornecedores_valor = $linha_valor['idorcamento_compras_fornecedores_valor'];
					
		if($linha_valor['selecionado'] == "sim"){
			$cor_celula = "yellow";
			$checkado = "checked";
			$opcao = "nao";
		}else{
			$opcao = "sim";
		}
		}		
		?>
    <?php 
		$valor_total_input = "";
		$idorcamento_compras_fornecedores_valor = "";	
		$opcao = "";			
		$cor_celula = "";
		$checkado = "";			
		}?>
  </tr>
  <?php 
		}
	  ?>
  </table>
<p>&nbsp;</p>
<p><strong>&nbsp;</strong></p>
<table border="1" cellspacing="4" cellpadding="4" width="100%">
  <tr>
    <td bgcolor="#CCCCCC"><p><strong>2.    CONCLUS&Atilde;O E PARECER</strong><strong> </strong></p></td>
  </tr>
</table>
<p>&nbsp;</p>
<p><?php echo $conclusao_parecer;?></p>
<p>&nbsp;</p>
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="288" valign="top"><p>_________________________________<br>
      <?php echo $responsavel_contratante;?><br>
    </p></td>
    <td width="288" valign="top"><p>_________________________________<br>
      <?php echo $responsavel_contratado;?></p></td>
  </tr>
</table>
<p>&nbsp;</p>
<p>                  Data: <?php echo InverteDataNovoSeparador($data_finalizacao, "-", "/");?></p>
<p class=MsoNormal align=center style='text-align:center;mso-pagination:none;
mso-layout-grid-align:none;text-autospace:none'>&nbsp;</p>

<p class=MsoNormal align=center style='text-align:center;mso-pagination:none;
mso-layout-grid-align:none;text-autospace:none'><b><span lang=pt
style='font-size:10.0pt;font-family:"Arial","sans-serif";mso-ansi-language:
#0016'><o:p>&nbsp;</o:p></span></b></p>

<p class=MsoNormal style='text-align:justify;mso-pagination:none;mso-layout-grid-align:
none;text-autospace:none'><span lang=pt style='font-size:10.0pt;font-family:
"Arial","sans-serif";mso-ansi-language:#0016'><br></span></p>

<p class=MsoNormal style='text-align:justify;line-height:150%'><span
style='font-family:"Arial","sans-serif";mso-bidi-font-family:"Times New Roman"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-align:justify;line-height:150%'><span
style='font-family:"Arial","sans-serif";mso-bidi-font-family:"Times New Roman"'><o:p>&nbsp;</o:p></span></p>
<p align="right"><strong><em>&nbsp;&nbsp;&nbsp; S&Atilde;O PAULO</em></strong> &ndash; <em>Avenida  Paulista, 1499, CJ.1604</em><br>
  <em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  Bela Vista &ndash; S&atilde;o Paulo / SP &ndash; Tel.: (11) 3052-0842</em> <br><br>
  <strong><em>RIO  DE JANEIRO</em></strong> - <em>Av. Jo&atilde;o Cabral de Mello Neto, 850, BL. West - sala 406</em><br>
  <em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Edif&iacute;cio  CEO - Barra da Tijuca &ndash; Rio de Janeiro &ndash; RJ&ndash; Tel.: (21)3549-1204</em><br>
&nbsp;<em><strong>http://</strong></em><strong><em>www.maxlayouts.com.br</em></strong>
<br>
</div>
<SCRIPT LANGUAGE="JavaScript">
window.print();
</SCRIPT>
</body>

</html>
