From c33d04534b5c7e2e20b3d9e1e1872561c7361407 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Thu, 19 Jun 2003 13:12:27 +0000 Subject: [PATCH] =?UTF-8?q?Nouvelle=20gestion=20de=20la=20g=E9n=E9ration?= =?UTF-8?q?=20des=20propales?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/comm/propal.php3 | 52 +++++++++++++++-------------------------- 1 file changed, 19 insertions(+), 33 deletions(-) diff --git a/htdocs/comm/propal.php3 b/htdocs/comm/propal.php3 index da80f3ce346..c8984c59b8c 100644 --- a/htdocs/comm/propal.php3 +++ b/htdocs/comm/propal.php3 @@ -79,21 +79,8 @@ if ($action == 'add') */ if ($id) { + propale_pdf_create($db, $id); - //$gljroot = "/home/www/dolibarr/dolibarr/htdocs"; - - $command = "export DBI_DSN=\"dbi:mysql:dbname=".$conf->db->name.":host=localhost\" "; - $command .= " ; ./propal-tex.pl --propal=".$id ." --pdf --ps --output=".$conf->propal->outputdir; - $command .= " --templates=".$conf->propal->templatesdir; - - $output = system($command); - //print "

command : $command
"; - //print $output; - - /* - * Renvoie directement sur la fiche - */ - //Header("Location: propal.php3?propalid=$id"); $propalid = $id; } else @@ -102,6 +89,10 @@ if ($action == 'add') } } +if ($action == 'pdf') +{ + propale_pdf_create($db, $propalid); +} if ($action == 'setstatut') { @@ -306,9 +297,14 @@ if ($propalid) { print "-"; } } - - print "-"; - + /* + * + */ + print '[Générer]"; + + /* + * + */ if ($obj->statut == 1) { $file = $conf->propal->outputdir. "/$obj->ref/$obj->ref.pdf"; if (file_exists($file)) { @@ -381,23 +377,13 @@ if ($propalid) { print "Documents générés
"; print ""; - $file = $conf->propal->outputdir. "/$obj->ref/$obj->ref.pdf"; - if (file_exists($file)) { - print ""; - print ''; - } - $file = $conf->propal->outputdir . "/$obj->ref/$obj->ref.ps"; - if (file_exists($file)) { - print ""; - print ''; - print ""; - } - print ''; + $file = PROPALE_OUTPUTDIR . "/$obj->ref/$obj->ref.pdf"; + if (file_exists($file)) + { + print ""; + print ''; + } - $file = $GLOBALS["GLJ_ROOT"] . "/www-sys/doc/propale/$obj->ref/FAX-$obj->ref.ps"; - if (file_exists($file)) { - print ""; - } print "
Propale PDF'.$obj->ref.'.pdf
Propale Postscript'.$obj->ref.'.s
(liste...)
Propale PDF'.$obj->ref.'.pdf
FAX d'entete
\n"; /* *