1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
| <form name="commande" method="POST" action="index.php?action=accepter_commande">
<table>
<tr>
<th>Code</th> <!-- Création de la colonne "Code" -->
<th>Marque</th> <!-- Création de la colonne "Marque" -->
<th>Modele</th> <!-- Création de la colonne "Modele" -->
<th>Cylindre</th> <!-- Création de la colonne "Cylindre" -->
<th>Designation</th> <!-- Création de la colonne "Designation" -->
<th>Prix</th> <!-- Création de la colonne "Prix" -->
<th>Quantité</th> <!-- Création de la colonne "Quantité" -->
<th>Montant</th> <!-- Création de la colonne "Montant" -->
</tr>
<?php
$i=0;
$LesLignesCdes=$Cde->get_LesLignesCommandes()->getAll(); //renvoie les lignes de commande de la variable 'maCde'
// Pour chaque lignes de commandes correspondants à la variable "article" on insére les données des articles choissit
foreach ($LesLignesCdes as $article)
{
$i=$i+1;?>
<tr>
<td><?php echo $article->get_article()->get_key(); ?></td>
<td><?php echo $article->get_article()->get_marque(); ?></td>
<td><?php echo $article->get_article()->get_modele(); ?></td>
<td><?php echo $article->get_article()->get_cylindre(); ?></td>
<td><?php echo $article->get_article()->get_designation(); ?></td>
<td><?php echo number_format($article->get_article()->get_prixHT(),2,"."," ");?></td>
<td>
<!-- 'type="text"' Permet d'afficher la quantité d'article commandé par article -->
<input type="text" readonly="true" name="quantite<?php echo $i; ?>" value="<?php echo $article->get_Qte(); ?>" class="quantite"<?php echo $article->get_Qte(); ?>"/>
</td>
<td>
<!-- number_format permet de formater un nombre pour l'affichage -->
<?php echo number_format(($article->get_article()->get_prixHT()*$article->get_Qte()), 2,"."," "); ?>
</td>
<td>
<input type="hidden" name="cumul" value="<?php echo $i; ?>"/>
</td>
</tr>
<?php
}
?>
<tr>
<!-- 6 colonnes vides -->
<td/><td/><td/><td/><td/><td/>
<th>Montant TTC</th>
<td><?php echo number_format($MaCde->retournePrixTotalTTC(),2,"."," "); ?></td>
</tr>
<tr>
<!-- 6 colonnes vides -->
<td/><td/><td/><td/><td/><td/>
<th>Dont T.V.A.</th>
<td><?php echo number_format($MaCde->retourneTVA(),2,"."," "); ?></td>
</tr>
<tr>
<!-- 6 colonnes vides -->
<td/><td/><td/><td/><td/><td/>
<th>Frais de port</th>
<td><?php echo number_format($MaCde->retourneFraisPort(),2,"."," "); ?></td>
</tr>
<tr>
<!-- 6 colonnes vides -->
<td/><td/><td/><td/><td/><td/>
<th>Montant a payer</th>
<td><?php echo number_format($MaCde->retournePrixTotalAPayer(),2,"."," "); ?></td>
</tr>
<tr>
<!-- 4 colonnes vides -->
<td/><td/><td/><td/>
<!-- 'type="image"' permet d'afficher le bouton "commander" -->
<td><input type="image" src="images_gabarit/commander1.jpg"/></td>
<td/><td/>
</tr>
</table>
</form> |
Partager