From 17fd81a733fa5830b0fc5c1e9350a3b683f11d43 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Sat, 6 Sep 2003 15:13:29 +0000 Subject: [PATCH] =?UTF-8?q?Ajout=20possibilit=E9=20de=20changer=20le=20mod?= =?UTF-8?q?=E9le=20d'une=20proposition=20commerciale?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/comm/propal.php3 | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/propal.php3 b/htdocs/comm/propal.php3 index 346b9d8a448..371a274d395 100644 --- a/htdocs/comm/propal.php3 +++ b/htdocs/comm/propal.php3 @@ -31,13 +31,14 @@ $user->getrights('propale'); if (!$user->rights->propale->lire) accessforbidden(); -require("../lib/CMailFile.class.php3"); /* * Modules optionnels */ require("../project.class.php3"); +require("./propal_model_pdf.class.php3"); require("../propal.class.php3"); require("../actioncomm.class.php3"); +require("../lib/CMailFile.class.php3"); /* * @@ -160,10 +161,15 @@ if ($HTTP_POST_VARS["action"] == 'setremise' && $user->rights->propale->creer) { $propal = new Propal($db); $propal->id = $propalid; - $propal->set_remise($user, $HTTP_POST_VARS["remise"]); } +if ($HTTP_POST_VARS["action"] == 'setpdfmodel' && $user->rights->propale->creer) +{ + $propal = new Propal($db, 0, $propalid); + $propal->set_pdf_model($user, $HTTP_POST_VARS["modelpdf"]); +} + if ($action == 'del_ligne' && $user->rights->propale->creer) { @@ -623,6 +629,20 @@ if ($propalid) print ''.strftime("%d %b %Y %H:%M:%S",filemtime($file)).''; } + if ($propal->brouillon == 1) + { + print '
'; + print ''; + print 'Modèle'; + + $html = new Form($db); + $modelpdf = new Propal_Model_pdf($db); + $html->select_array("modelpdf",$modelpdf->liste_array(),$propal->modelpdf); + + print ''; + print '
'; + } + print "\n"; /* *