public function API_Facture_Ajouter($id_commande,$id_compte) { if(!$this->estAdmin()) throw new ErrorException('vous n\'avez pas l\'autorisation'); return $this->bdd->Facture_Ajouter($id_commande,$id_compte); }
else{ otherinput.prop('disabled',true); otherinput.val(''); } }); }) }); </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{ ?>