<?=$this->headerSinistro($this->data['id_proposta'], $this->data['id_processo'])?>
<div id="tabs">
	<ul>
		<li><a href="#tabs-aba1">Aviso</a></li>
	</ul>

	<div class="geral">
		<div id="tabs-aba1">
			<?=$this->form->id;?>

			<?=$this->title('Dados do Aviso de Encerramento de Colheita');?>
			<div class="padding-10">
				<table cellpadding="10" cellspacing="5" border="0">
					<tr>
						<td valign="top"><b>Código</b><br /><?=str_pad($this->data['id'], 10, 0, STR_PAD_LEFT)?></td>
						<td valign="top"><b>Data Início</b><br /><?=$this->data['dt_encerramento_colheita']?></td>
						<td valign="top"><b>Data Envio</b><br /><?=$this->data['dt_envio']?></td>
					</tr>
				</table>
			</div>
			<? if ($this->informacoes_bancarias): ?>
				<?=$this->title('Informações Bancárias');?>
				<div class="padding-10">
					<table class="grid">
						<thead>
							<tr>
								<th>Proponente/Beneficiário</th>
								<th>CPF/CNPJ</th>
								<th>Forma de Pagamento</th>
								<th>Banco</th>
								<th>Agência</th>
								<th>Conta Corrente</th>
							</tr>
						</thead>
						<tbody align="center">
							<? foreach ($this->informacoes_bancarias as $info):?>
								<tr>
									<td align="left"><?=$info['ds_nome']?></td>
									<td align="right"><?=$info['cpf_cnpj']?></td>
									<td><?=$info['ds_forma_pagamento']?></td>
									<td align="left"><?=$info['ds_nome_banco']?></td>
									<td align="right"><?=$info['nu_agencia'].'-'.$info['nu_digito_agencia']?></td>
									<td align="right"><?=$info['nu_conta_corrente'].'-'.$info['nu_digito_conta_corrente']?></td>
								</tr>
							<? endforeach; ?>
						</tbody>
					</table>
				</div>
			<? endif; ?>
			<?=$this->title('Unidades Seguradas');?>
			<div class="padding-10">
				<table class="grid">
					<thead>
						<tr>
							<th>Item</th>
							<th>Quadra/Talhão</th>
							<th>Variedade</th>
							<th>Área</th>
							<?if (Agro_Util::checkPermission('sinistro:avisoencerramentocolheita:deleteitem')):?>
								<th align="center" width="1%" nowrap="nowrap">--</th>
							<?endif;?>
						</tr>
					</thead>
					<tbody align="center">
						<? foreach($this->data['arItensSegurados'] as $ItemSegurado):?>
							<tr>
								<td><?=$ItemSegurado['nr_item_segurado']?></td>
								<td><?=$ItemSegurado['ds_item_segurado']?></td>
								<td><?=$ItemSegurado['ds_nome_variedade']?></td>
								<td><?=$ItemSegurado['vl_area']?></td>
								<?if (Agro_Util::checkPermission('sinistro:avisoencerramentocolheita:deleteitem')):?>
									<td>
										<a href="/sinistro/avisoencerramentocolheita/view/id/<?=$this->id_aviso_encerramento?>/item/<?=$ItemSegurado["id"];?>/id_item_segurado/<?=$ItemSegurado["id_item_segurado"];?>" class="icon_excluir">
											<img class='delete_{$item['id']}' src='/resources/imagens/mini/delete.png' border='0' alt='delete.png' title='Exluir' />
										</a>
									</td>
								<?endif;?>
							</tr>
						<? endforeach; ?>
					</tbody>
				</table>
			</div>
		</div>
	</div>
</div>
