From a00115042962e0b38174e3223ce596d86c2eabe1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@users.sourceforge.net> Date: Tue, 3 May 2005 01:07:58 +0000 Subject: [PATCH] =?UTF-8?q?Quelques=20am=E9liorations=20et=20traduction=20?= =?UTF-8?q?sur=20les=20rapports=20bilans=20recette-d=E9penses=20et=20CA=20?= =?UTF-8?q?Ajout=20d'un=20cartouche=20commun=20Utilisation=20du=20style=20?= =?UTF-8?q?liste=5Ftotal=20pour=20les=20totaux.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/html.form.class.php | 63 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/htdocs/html.form.class.php b/htdocs/html.form.class.php index 32d62849e8a..940581acae9 100644 --- a/htdocs/html.form.class.php +++ b/htdocs/html.form.class.php @@ -935,6 +935,69 @@ class Form } } + + /** + * \brief Affiche la cartouche g�n�rique d'un rapport + * \param nom valeur pour nom du rapport + * \param variante lien optionnel du variante du rapport + * \param period periode du reporting + * \param description description + * \param builddate date g�n�ration + * \param exportlink lien pour export + */ + function report_header($nom,$variante='',$period,$periodlink,$description,$builddate,$exportlink) + { + global $langs; + + print "\n\n<!-- debut cartouche rapport -->\n"; + + $h=0; + $head[$h][0] = $_SERVER["PHP_SELF"]; + $head[$h][1] = $langs->trans("Report"); + dolibarr_fiche_head($head, $hselected, $societe->nom); + + print '<table width="100%" class="border">'; + + // Ligne de titre + print '<tr>'; + print '<td valign="top" width="110px">'.$langs->trans("ReportName").'</td>'; + if (! $variante) print '<td colspan="3">'; + else print '<td>'; + print $nom; + if ($variante) print '</td><td colspan="2">'.$variante; + print '</td>'; + print '</tr>'; + + // Ligne de la periode d'analyse du rapport + print '<tr>'; + print '<td>'.$langs->trans("ReportPeriod").'</td>'; + if (! $periodlink) print '<td colspan="3">'; + else print '<td>'; + print $period; + if ($periodlink) print '</td><td colspan="2">'.$periodlink; + print '</td>'; + print '</tr>'; + + // Ligne de description + print '<tr>'; + print '<td valign="top">'.$langs->trans("ReportDescription").'</td>'; + print '<td colspan="3">'.$description.'</td>'; + print '</tr>'; + + // Ligne d'export + print '<tr>'; + print '<td>'.$langs->trans("GeneratedOn").'</td>'; + if (! $exportlink) print '<td colspan="3">'; + else print '<td>'; + print dolibarr_print_date($builddate); + if ($exportlink) print '</td><td>'.$langs->trans("Export").'</td><td>'.$exportlink; + print '</td></tr>'; + + print '</table><br>'; + print '</div>'; + print "\n<!-- fin cartouche rapport -->\n\n"; + } + } ?> -- GitLab