12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <div class="content-add01">
- <div class="heading01"><h1>Livraison de la facture "<?php echo $katao_invoice->getNumber() ?>" de l'adhérent "<?php echo $katao_invoice->getMemberName() ?>" pour la période "<?php echo $katao_invoice->getKataoPeriod()->getName() ?>"</h1></div>
- </div>
- <?php echo form_tag('@katao_invoice_deliver?id=' . $katao_invoice->getId()) ?>
- <table class="admin-sub-list">
- <tr>
- <td style="border:none!important"> </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">Délivrée</th>
- <th nowrap="nowrap" width="1%" style="text-align:center!important">EN COURS / TOTAL</th>
- </tr>
- <?php $criteria = new Criteria();
- $criteria->addAscendingOrderByColumn(KataoInvoiceProductPeer::PRODUCT_NAME); ?>
- <?php foreach ($katao_invoice->getKataoInvoiceProductsJoinKataoProduct($criteria) as/*(KataoInvoiceProduct)*/ $katao_invoice_product): ?>
- <?php $katao_product = $katao_invoice_product->getKataoProduct() ?>
- <?php $quantity = $katao_invoice_product->getQuantityDelivered() ?>
- <?php $total_delivered_quantity = $katao_product->getTotalDeliveredQuantity($katao_invoice->getId(), $katao_invoice->getKataoPeriodId(), $katao_invoice->getKataoNodeId()) ?>
- <tr>
- <td><?php echo $katao_invoice_product->getProductName() ?></td>
- <td style="text-align:center!important"><?php echo $katao_invoice_product->getQuantity() ?></td>
- <td nowrap="nowrap" style="text-align:center!important">
- <?php echo input_number_tag('quantity[' . $katao_invoice_product->getId() . ']', $quantity, array('style' => 'width: 60px; height: 20px; text-align: center;', 'class' => 'quantity-delivered', 'onchange' => 'updateCurrentDelivered(' . $katao_invoice_product->getId() . ', ' . $total_delivered_quantity . ');')) ?>
- </td>
- <td style="text-align:center!important"><span id="current-quantity-<?php echo $katao_invoice_product->getId() ?>"><?php echo $total_delivered_quantity + $quantity ?></span> / <?php echo $katao_product->getTotalReceivedQuantity($katao_invoice->getKataoPeriodId(), $katao_invoice->getKataoNodeId()) ?></td>
- </tr>
- <?php endforeach ?>
- <tr>
- <td colspan="4"><?php echo select_tag('new_product', options_for_select($katao_invoice->getOtherProducts(), false, array('include_custom' => '— Autre produit —'))) ?> <?php echo submit_tag('Ajouter') ?></td>
- </tr>
- </table>
- <br /><?php echo submit_tag('Délivrer') ?> ou <a href="<?php echo url_for('kataoInvoice/index') ?>">annuler</a>
- </form>
- <script type="text/javascript" language="JavaScript">
- /* <![CDATA[ */
- function updateCurrentDelivered(id, total_delivered_quantity){
- $('current-quantity-' + id).innerHTML = total_delivered_quantity + parseFloat($F('quantity_' + id));
- }
- /* ]]> */
- </script>
|