
<form enctype="multipart/form-data" method="post" id="form-laudo" class="formDefault">
	<?=$this->headerSinistro($this->form->getValue('id_proposta'), $this->form->getValue('id_processo'))?>
	<div id="tabs">
        
	<?=$this->LaudoFinalFormItemSegurado($this->form, true, false, false, false, true, true, true)?>

		<fieldset>
            <table width="100%" class="grid">
            	<thead>
            		<tr>
            			<th colspan="5" align="center">PERDAS POR REDUÇÃO DE POPULAÇÃO</th>
            			<td width="5px"></td>
            			<th colspan="2" align="center">DANOS ÀS ESPIGAS</th>
						<td width="5px"></td>
            			<th colspan="3" align="center">PERDAS POR DESFOLHAMENTO</th>
            		</tr>

            	</thead>
            	<tbody>
					<tr class="fontSmall">
						<th>
							A<br>M<br>O<br>S<br>T<br>R<br>A
						</th>
						<th>STAND<br>INICIAL</th>
						<th>PLANTAS<br>DESTRUÍDAS</th>
						<th>% Médio de <br>Plantas <br>Destruídas</th>
						<th>% DANO</th>
						<th></th>
						<th>% DANOS ESPIGAS</th>
						<th>% DANO</th>
						<th></th>
						<th>% DESFOLHAMENTO</th>
						<th>% Desfolhamento Médio</th>
						<th>% DANO</th>					
					</tr>

        			<?for($i = 1; $i<= 10; $i++){?>
						<tr>
							<th>
								<?=$i;?>
							</th>
							<td>
								<input type="hidden" name="amostra_<?=$i?>" id="amostras" value="<?=$i?>"/>
								<input type="text" class="integer" size="4" name="populacao_stand_inicial-<?echo $i?>" id="populacao_stand_inicial-<?echo $i?>" value="<?echo $this->dados["amostras"][$i]["populacao_stand_inicial"]?>"/>
							</td>
							<td><input type="text" class="integer" size="4" name="populacao_plantas_destruidas-<?echo $i?>" id="populacao_plantas_destruidas-<?echo $i?>" value="<?echo $this->dados["amostras"][$i]["populacao_plantas_destruidas"]?>"/></td>
							<td><label id="populacao_media_plantas_destruidas"><?echo $this->dados["amostras"][$i]["populacao_media_plantas_destruidas"]?></label></td>
							<td><label id="populacao_perda"><?echo $this->dados["amostras"][$i]["populacao_perda"]?></label></td>
							<th></th>
							<td>
								<table width="100%">
									<?
										$num = 0;
        								for($linha = 1; $linha <= 2; $linha++){
											echo "<tr>";
											for($coluna = 1; $coluna <= 5; $coluna++){
												$num = ($linha == 2) ? ($coluna + 5) : $coluna; 
												?>
												<td>
													<input type="text" class="decimal" size="4" name="espiga_dano_<?echo $i?>-<?echo $num?>" id="espiga_dano_<?echo $i?>-<?echo $num?>" value="<?echo $this->dados["amostras"][$i]["espiga_dano_".$num]?>"/>
												</td>
											<?}
											echo "</tr>";
										}
									?>																			
								</table>
							</td>
							<td><label id="espiga_perda"><?echo $this->dados["amostras"][$i]["espiga_perda"]?></label></td>
							<th></th>
							<td>
								<table width="100%">
									<?
										$num = 0;
        								for($linha = 1; $linha <= 2; $linha++){
											echo "<tr>";
											for($coluna = 1; $coluna <= 5; $coluna++){
												$num = ($linha == 2) ? ($coluna + 5) : $coluna; 
												?>
												<td>
													<input type="text" class="decimal" size="4" name="desfolhamento_percent_<?echo $i?>-<?echo $num?>" id="desfolhamento_percent_<?echo $i?>-<?echo $num?>" value="<?echo $this->dados["amostras"][$i]["desfolhamento_percent_".$num]?>"/>
												</td>
											<?}
											echo "</tr>";
										}
									?>																			
								</table>								
							</td>
							<td><label id="desfolhamento_dano_medio"><?echo $this->dados["amostras"][$i]["desfolhamento_dano_medio"]?></label></td>	
							<td><label id="desfolhamento_perda"><?echo $this->dados["amostras"][$i]["desfolhamento_perda"]?></label></td>																												
						</tr>
					<?}?>
            	</tbody>
				<tfoot>
					<tr>
						<th class="white"></th>
						<th class="white" colspan="2">Média</th>
						<th class="white" colspan="2"><label id="vl_percent_media_perda_stand"><?echo $this->dados["vl_percent_media_perda_stand"]?> %</label></th>
						<th class="white"></th>
						<th class="white" colspan="">Média</th>
						<th class="white" colspan=""><label id="vl_percent_media_perda_espiga"><?echo $this->dados["vl_percent_media_perda_espiga"]?> %</label></th>
						<th class="white"></th>
						<th class="white" colspan="">Média</th>
						<th class="white" colspan="2"><label id="vl_percent_media_perda_desfolhamento"><?echo $this->dados["vl_percent_media_perda_desfolhamento"]?> %</label></th>						
					</tr>
					<tr>
						<td class="white">&nbsp;</td>
						<td class="footer" colspan="4">100 PLANTAS/AMOSTRA</td>
						<td class="white">&nbsp;</td>
						<td class="footer" colspan="2">10 ESPIGAS/AMOSTRA</td>
						<td class="white">&nbsp;</td>
						<td class="footer" colspan="3">10 PLANTAS/AMOSTRA</td>
					</tr>
				</tfoot>            	
            </table>
            
            <div class="clear"></div>
            
            <div style="width: 400px; float: right;" >
            	<table class="grid">
	            	<tbody>		            		            	
		            	<tr>
		            		<th align="right" style="padding-right: 10px;" width="45%">% PERDA FINAL</th>
		            		<td align="center">
		            			<label id="vl_percent_total_perda_final"><?echo $this->dados["vl_percent_total_perda_final"]?> %</label>
		            		</td>
		            	</tr>
		            </tbody>
	            </table>
            </div>
		</fieldset>
		<div class="clear"></div>
		
		<?=$this->LaudoFinalFormInformacoesAdicionais($this->form)?>
		<?=$this->form->buttons?>
	</div>
</form>