public function API_ElementCommande_Modifier_quantite_reel($QtteReel,$id_commande,$id_produit) { if(!$this->estAdmin()) { throw new ErrorException("Vous devez être admin pour accéder à cette fonctionalitée."); } return $this->bdd->ElementCommande_Modifier_quantite_reel($QtteReel,$id_commande,$id_produit); }
</script> </head> <body> <?php if($valider_commande==='facturation') { $id_facture = $bdd->Facture_Ajouter($id_commande,$detail->id_compte); $id_facture = $bdd->Facture_Recupere($id_commande)->id_facture; $bdd->ElementCommande_Modifier_id_facture($id_facture, $id_commande); echo 'Facture n° '.$id_facture. 'creé'; foreach($elements as $element) { $inp='reel_'.$element->id_produit; $QtteReel=(float)$_REQUEST[$inp]; $bdd->ElementCommande_Modifier_quantite_reel($QtteReel,$id_commande,$element->id_produit); } $bdd->Commande_Modifier_Etat($id_commande,'Livraison'); } else{ ?> <form action=""> <select id="id_commande" name="id_commande" data-autosubmit ><?php foreach ($commandes as $commande) { ?><option <?php if($id_commande===$commande->id_commande) echo 'selected="selected"'; ?> value= "<?php echo $commande->id_commande;?>"><?php