From 02adcefad9eafeb1252afdd68b9f466afe37b55c Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Fri, 13 Jul 2007 16:32:34 +0000 Subject: [PATCH] Add: icone pdf dans la liste des commandes --- htdocs/compta/index.php | 23 ++++++++++++++++++++--- htdocs/html.form.class.php | 2 +- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index 6d013b89395..be3a0c552cf 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -92,6 +92,8 @@ if (isset($_GET["action"]) && $_GET["action"] == 'del_bookmark') $facturestatic=new Facture($db); $facturesupplierstatic=new FactureFournisseur($db); +$html = new Form($db); + llxHeader("",$langs->trans("AccountancyTreasuryArea")); print_fiche_titre($langs->trans("AccountancyTreasuryArea")); @@ -546,8 +548,24 @@ if ($conf->facture->enabled && $conf->commande->enabled && $user->rights->comman { $obj = $db->fetch_object($resql); print ""; - print "rowid\">".img_object($langs->trans("ShowOrder"),"order").' '; - print "rowid\">".$obj->ref.''; + print ''; + + $commandestatic->id=$obj->rowid; + $commandestatic->ref=$obj->ref; + + print ''; + print ''; + + print '
'; + print $commandestatic->getNomUrl(1); + print ''; + $filename=sanitize_string($obj->ref); + $filedir=$conf->commande->dir_output . '/' . sanitize_string($obj->ref); + $urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid; + $html->show_documents('commande',$filename,$filedir,$urlsource,'','','','','',1); + print '
'; + + print ''; print ''.img_object($langs->trans("ShowCompany"),"company").' '; print ''.dolibarr_trunc($obj->nom,44).''; @@ -617,7 +635,6 @@ if ($conf->facture->enabled && $user->rights->facture->lire) print ''; if ($num) { - $html = new Form($db); $total_ttc = $totalam = $total = 0; while ($i < $num && $i < $conf->liste_limit) { diff --git a/htdocs/html.form.class.php b/htdocs/html.form.class.php index 74fc145bf67..f9620fca06d 100644 --- a/htdocs/html.form.class.php +++ b/htdocs/html.form.class.php @@ -3079,7 +3079,7 @@ class Form print ''; if (!$iconPDF) { - $file["name"]; + print $file["name"]; } else {