diff --git a/controller/fact.php b/controller/fact.php index 38a3ea838d4713972827de67f7e483f7800a0cf1..71eb6c3edf76bdcb656d0fd4d84ad8cc6564d00b 100644 --- a/controller/fact.php +++ b/controller/fact.php @@ -4,7 +4,7 @@ */ // Implemented actions -$actions = array("listeFacture", "addFacture", "detailFacture"); +$actions = array("listeFacture", "addFacture", "detailFacture", "addPresta", "addProduit", "addOrd"); // Check action is correct if(!in_array($action, $actions)) { @@ -21,6 +21,24 @@ switch($action) { $formConf = $facture->getForm(); include 'view/form.php'; break; + case "addPresta": + $ligne = new LigneFacturePrestation(); + $ligne->setFacture($_GET['factId']); + $formConf = $facture->getForm(); + include 'view/form.php'; + break; + case "addProduit": + $ligne = new LigneFactureProduit(); + $ligne->setFacture($_GET['factId']); + $formConf = $facture->getForm(); + include 'view/form.php'; + break; + case "addOrd": + $ligne = new LigneFactureOrdonnance(); + $ligne->setFacture($_GET['factId']); + $formConf = $facture->getForm(); + include 'view/form.php'; + break; case "detailFacture": // TODO: Ajouter bouton payer // TODO: Ajouter résumé de la facture (client, prix etc... )