<?xml version='1.0' encoding='ISO8859-1'?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output encoding="ISO8859-1" indent="yes" method="html" version="1.0"/>
<xsl:template match="/">
<html xmlns="http://www.w3.org/1999/xhtml" lang="pt-br">
<head>
<title>Impressão do pedido</title>
  <style type="text/css">
	table {
		font-family: Verdana;
		font-size: 10px;
    width: 734px;
		border: 1px solid #000000;
		border-collapse:collapse;
		border-spacing: 0px;
		margin-left: 0px;
		margin-top: 10px;
		empty-cells:show;
		padding: 0px;
	}
  .coluna2 {
    width: 100px;
    border-width: 1px;
    border-style: solid;
    border-bottom: none;
    border-right: none;
    border-top: none;
  }
  #tableAssinatura td {border: none;}
  </style>
</head>
<body>
<center>
<table style="border-width: 1px; height: 100px;" border="0">
    <tr>
      <td style="width: 180px;"><img style="width: 179px; height: 98px;" alt="Logo" src="file:///i:\9999\logotipos\cantustange_logo_imgbaixa.jpg" /></td>
      <td style="width: 404px; font-weight: bold; font-size: 18px; text-align: center;"><xsl:value-of select="documento/tipo"/></td>
      <td style="width: 150px; text-align: center; font-weight: bold; font-size: 14pt;">Nº
        <span style="font-weight: bold; font-size: 14pt;"><xsl:value-of select="documento/numero"/></span>
          <br></br>
        <span style="font-weight: bold; font-size: 9pt;"><xsl:value-of select="documento/dados_princ/datapedido"/></span>
      </td>
    </tr>
</table>
<table style="height: 68px;" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td style="text-align: right; width: 132px;">Razão social:</td>
    <td colspan="5" style="padding-left: 2px; width: 700px;" align="left"><xsl:value-of select="documento/estabelecimento/razsoc"/></td>
  </tr>
  <tr>
    <td style="text-align: right;">Endereço:</td>
    <td colspan="5" style="padding-left: 2px; text-align: left;" align="left">
        <xsl:value-of select="documento/estabelecimento/ender"/>
        <span style="padding-left: 2px;"><xsl:value-of select="documento/estabelecimento/bairro"/></span>
        <span style="padding-left: 2px;"><xsl:value-of select="documento/estabelecimento/munic"/></span>
        <span style="padding-left: 2px;"><xsl:value-of select="documento/cliestabelecimentoente/uf"/></span>
    </td>
  </tr>
  <tr>
    <td style="text-align: right;">CNPJ:</td>
    <td style="padding-left: 2px; text-align: left; width: 340px;" align="left"><xsl:value-of select="documento/estabelecimento/cgc"/></td>
    <td style="text-align: right;">IE:</td>
    <td colspan="3" style="padding-left: 2px; width: 250px;" align="left"><xsl:value-of select="documento/estabelecimento/ie"/></td>
  </tr>
  <tr>
    <td style="2px; text-align: right;">Fone:</td>
    <td style="padding-left: 2px; width: 100px;" align="left"><xsl:value-of select="documento/estabelecimento/fone"/></td>
    <td style="text-align: right; width: 50px;">Fax:</td>
    <td style="padding-left: 2px; width: 200px;" align="left"><xsl:value-of select="documento/estabelecimento/fax"/></td>
    <td style="2px; text-align: right; width: 60px;">E-mail:</td>
    <td style="padding-left: 2px; width: 300px;" align="left"><xsl:value-of select="documento/estabelecimento/email"/></td>
  </tr>
</table>
<table style="height: 150px;" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td style="text-align: right; width: 90px;">Cliente</td>
    <td style="width: 4px;" nowrap="nowrap" valign="middle">:</td>
    <td style="padding-left: 2px; width: 360px; font-weight: bold;" align="left"><xsl:value-of select="documento/cliente/cliente_nome"/></td>
    <td class="coluna2" style="text-align: right;"></td>
    <td style="width: 2px;" nowrap="nowrap" valign="middle"></td>
    <td style="padding-left: 2px; width: 178px;" align="left"></td>
  </tr>
  <tr>
    <td style="text-align: right;">Endereço</td>
    <td style="width: 4px;" nowrap="nowrap" valign="middle">:</td>
    <td style="padding-left: 2px; text-align: left; width: 360px;" align="left"><xsl:value-of select="documento/cliente/cliente_endereco"/></td>
    <td class="coluna2" style="text-align: right;"></td>
    <td style="width: 2px;" nowrap="nowrap" valign="middle"></td>
    <td style="padding-left: 2px; width: 178px;" align="left"></td>
  </tr>
  <tr>
    <td style="text-align: right;">Bairro</td>
    <td style="width: 2px;" nowrap="nowrap" valign="middle">:</td>
    <td style="padding-left: 2px; width: 360px;" align="left"><xsl:value-of select="documento/cliente/cliente_bairro"/></td>
    <td class="coluna2" style="text-align: right;"></td>
    <td style="width: 4px;" nowrap="nowrap" valign="middle"></td>
    <td style="padding-left: 2px; text-align: left; width: 178px;" align="left"></td>
  </tr>
  <tr>
    <td style="text-align: right;">Município</td>
    <td style="width: 4px;" nowrap="nowrap" valign="middle">:</td>
    <td style="padding-left: 2px; text-align: left; width: 360px;" align="left"><xsl:value-of select="documento/cliente/cliente_municipio"/>/<xsl:value-of select="documento/cliente/cliente_uf"/></td>
    <td class="coluna2" style="text-align: right;">Data do pedido</td>
    <td style="width: 2px;" nowrap="nowrap" valign="middle">:</td>
    <td style="padding-left: 2px; width: 178px;" align="left"><xsl:value-of select="documento/dados_princ/datapedido"/></td>
  </tr>
  <tr>
    <td style="2px; text-align: right;">IE/RG</td>
    <td style="width: 4px;" nowrap="nowrap" valign="middle">:</td>
    <td style="padding-left: 2px; width: 360px;" align="left"><xsl:value-of select="documento/cliente/cliente_ie"/>
      <span style="margin-left: 20px;">CNPJ/CPF: <xsl:value-of select="documento/cliente/cliente_cgc"/></span>
    </td>
    <td class="coluna2" style="text-align: right;">Data prev. fat.</td>
    <td style="width: 2px;" nowrap="nowrap" valign="middle">:</td>
    <td style="padding-left: 2px; width: 178px;" align="left"><xsl:value-of select="documento/dados_princ/dataprevfat"/></td>
  </tr>
  <tr>
    <td style="2px; text-align: right;">E-mail</td>
    <td style="width: 4px;" nowrap="nowrap" valign="middle">:</td>
    <td style="padding-left: 2px; width: 360px;" align="left"><xsl:value-of select="documento/cliente/cliente_email"/></td>
    <td class="coluna2" style="text-align: right;">Frete por conta</td>
    <td style="width: 2px;" nowrap="nowrap" valign="middle">:</td>
    <td style="padding-left: 2px; width: 178px;" align="left"><xsl:value-of select="documento/encerramento/tipofrete"/></td>
  </tr>
  <tr>
    <td style="2px; text-align: right;">Fone</td>
    <td style="width: 4px;" nowrap="nowrap" valign="middle">:</td>
    <td style="padding-left: 2px; width: 360px;" align="left"><xsl:value-of select="documento/cliente/cliente_fone"/></td>
    <td class="coluna2" style="text-align: right;"></td>
    <td style="width: 2px;" nowrap="nowrap" valign="middle"></td>
    <td style="padding-left: 2px; width: 178px;" align="left"></td>
  </tr>
  <tr>
    <td style="2px; text-align: right;">Transportador</td>
    <td style="width: 4px;" nowrap="nowrap" valign="middle">:</td>
    <td style="padding-left: 2px; width: 360px;" align="left"><xsl:value-of select="documento/encerramento/codtransp"/><span style="padding-left: 2px;"><xsl:value-of select="documento/encerramento/transpnome"/></span></td>
    <td class="coluna2" style="text-align: right;"></td>
    <td style="width: 2px;" nowrap="nowrap" valign="middle"></td>
    <td style="padding-left: 2px; width: 178px;" align="left"></td>
  </tr>
  <tr>
    <td style="2px; text-align: right;">Redespacho</td>
    <td style="width: 4px;" nowrap="nowrap" valign="middle">:</td>
    <td style="padding-left: 2px; width: 360px;" align="left"><xsl:value-of select="documento/encerramento/codredesp"/><span style="padding-left: 2px;"><xsl:value-of select="documento/encerramento/redespnome"/></span></td>
    <td class="coluna2" style="text-align: right;"></td>
    <td style="width: 2px;" nowrap="nowrap" valign="middle"></td>
    <td style="padding-left: 2px; width: 178px;" align="left"></td>
  </tr>
</table>
<table style="border-width: 1px; text-align: left; width: 734px; height: 40px;" border="1" cellpadding="0" cellspacing="0">
  <tr>
    <td style="text-align: right;  border-top-width: 0pt; height: 17px; width: 70px;  background-color: rgb(204, 204, 204);"><span style="font-weight: bold;">Código</span></td>
    <td style="text-align: left;   border-top-width: 0pt; height: 17px; width: auto; background-color: rgb(204, 204, 204);"><span style="font-weight: bold; padding-left: 2px;">Descrição</span></td>
    <td style="text-align: right;  border-top-width: 0pt; height: 17px; width: 54px;  background-color: rgb(204, 204, 204);"><span style="font-weight: bold;">Qtde</span></td>
    <td style="text-align: center; border-top-width: 0pt; height: 17px; width: 30px;  background-color: rgb(204, 204, 204);"><span style="font-weight: bold;">Und</span></td>
  </tr>
  <xsl:for-each select="documento/item/itens">
  <tr>
    <td style="text-align: right;  height: 17px; width: 70px;"><xsl:value-of select="item_coditem"/></td>
    <td style="text-align: left;   height: 17px; width: auto; padding-left: 2px;"><xsl:value-of select="item_desccompleta"/>&#32;<xsl:value-of select="item_especificação"/> <br/> <xsl:value-of select="item_obsitem"/></td>
    <td style="text-align: right;  height: 17px; width: 54px;"><xsl:value-of select="item_qtd"/></td>
    <td style="text-align: center; height: 17px; width: 30px;"><xsl:value-of select="item_unidade"/></td>
  </tr>
  </xsl:for-each>
</table>
<table style="height: 75px;" id="tableAssinatura">
  <tr>
    <td style="height: 45px;"></td>
    <td style="height: 45px;"></td>
  </tr>
  <tr>
    <td style="text-align: center; height: 5px;">_________________________________</td>
    <td style="text-align: center; height: 5px;">_________________________________</td>
  </tr>
  <tr>
    <td style="text-align: center; height: 25px;">RESPONSÁVEL</td>
    <td style="text-align: center; height: 25px;">ESCRITÓRIO</td>
  </tr> 
  <tr>
    <td style="text-align: center; height: 25px;">_____/_____/__________</td>
    <td style="text-align: center; height: 25px;">_____/_____/__________</td>
  </tr>  
</table>
</center>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
