<div class="content-add01">
	<div class="heading01"><h1>Réception de la commande "<?php echo $katao_order->getNumber() ?>" du fournisseur "<?php echo $katao_order->getSupplierName() ?>" pour la période "<?php echo $katao_order->getKataoPeriod()->getName() ?>"</h1></div>
</div>

<?php echo form_tag('@katao_order_receive?id=' . $katao_order->getId()) ?>

<table class="admin-sub-list">
<tr>
	<td style="border:none!important">&nbsp;</td>
	<th colspan="3" style="text-align:center!important">Quantités</th>
</tr>
<tr>
	<th>Produit</th>
	<th nowrap="nowrap" width="1%" style="text-align:center!important">Commandée</th>
	<th nowrap="nowrap" width="1%" style="text-align:center!important">Réceptionnée</th>
</tr>
<?php foreach ($katao_order->getKataoOrderProducts() as/*(KataoOrderProduct)*/ $katao_order_product): ?>
<tr>
 	<td><?php echo $katao_order_product->getProductName() ?></td>
 	<td style="text-align:center!important"><?php echo $katao_order_product->getQuantity() ?></td>
 	<td nowrap="nowrap" style="text-align:center!important">
 		<a href="javascript://" onclick="document.getElementById('quantity_<?php echo $katao_order_product->getId() ?>').value = Math.max(0, parseInt(document.getElementById('quantity_<?php echo $katao_order_product->getId() ?>').value) - 1)" title="Diminuer la quantité"><?php echo image_tag('minus.png', array('alt' => 'Diminuer la quantité', 'align' => 'top')) ?></a>
		<?php echo input_tag('quantity[' . $katao_order_product->getId() . ']', $katao_order_product->getHasBeenReceived()?$katao_order_product->getQuantityReceived():$katao_order_product->getQuantity(), array('style' => 'width: 20px; text-align: center;')) ?>
		<a href="javascript://" onclick="document.getElementById('quantity_<?php echo $katao_order_product->getId() ?>').value = parseInt(document.getElementById('quantity_<?php echo $katao_order_product->getId() ?>').value) + 1" title="Augmenter la quantité"><?php echo image_tag('plus.png', array('alt' => 'Augmenter la quantité', 'align' => 'top')) ?></a>
	</td>
</tr>
<?php endforeach ?>
</table>

<br /><?php echo submit_tag('Réceptionner') ?> ou <a href="<?php echo url_for('kataoOrder/index') ?>">annuler</a>

</form>