From ab2c9ec999f55de0b1fdffd85d57ab70d6e5348e Mon Sep 17 00:00:00 2001
From: Matthieu Guffroy <mattgu74@gmail.com>
Date: Thu, 19 Jun 2014 02:14:38 +0200
Subject: [PATCH] add options sur factures

---
 controller/fact.php | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/controller/fact.php b/controller/fact.php
index 38a3ea8..71eb6c3 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... )
-- 
GitLab