From a2390f0ebf372eb5b53429123132bb8f05acb683 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 16 Mar 2008 14:52:31 +0000 Subject: [PATCH] Add help on adding a new social contribution --- htdocs/admin/company.php | 22 +++++------ htdocs/compta/sociales/charges.php | 22 ++--------- htdocs/compta/tva/clients.php | 2 +- htdocs/html.form.class.php | 61 +++++++++++++++++++++++------- htdocs/lib/tax.lib.php | 2 + htdocs/translate.class.php | 21 +++++++--- 6 files changed, 81 insertions(+), 49 deletions(-) diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index 34af7e07bb7..9067c1883d7 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -209,53 +209,53 @@ if ((isset($_GET["action"]) && $_GET["action"] == 'edit') $var=true; print ''; - print ''; + print ''."\n"; $var=!$var; print ''; + print ''."\n"; $var=!$var; print ''; + print ''."\n"; $var=!$var; print ''; + print ''."\n"; $var=!$var; print ''; + print ''."\n"; $var=!$var; print ''; + print ''."\n"; $var=!$var; print ''; + print ''."\n"; $var=!$var; print ''; - print ''; + print ''."\n"; $var=!$var; print ''; - print ''; + print ''."\n"; $var=!$var; print ''; - print ''; + print ''."\n"; $var=!$var; print ''; - print ''; + print ''."\n"; $var=!$var; print ''; print ''; print ''; diff --git a/htdocs/compta/tva/clients.php b/htdocs/compta/tva/clients.php index 065a2e47e11..9960b0f220b 100644 --- a/htdocs/compta/tva/clients.php +++ b/htdocs/compta/tva/clients.php @@ -77,7 +77,7 @@ $fsearch.=' trans("SeeVATReportInInputOutputMode",'','').')'; diff --git a/htdocs/html.form.class.php b/htdocs/html.form.class.php index 8392cf22ac9..17f95ee856e 100644 --- a/htdocs/html.form.class.php +++ b/htdocs/html.form.class.php @@ -574,7 +574,35 @@ class Form } - /** + /** + * \brief Retourne la liste des types de comptes financiers + * \param selected Type pré-sélectionné + * \param htmlname Nom champ formulaire + */ + function select_type_socialcontrib($selected='',$htmlname='actioncode') + { + global $db,$langs,$user; + + $sql = "SELECT c.id, c.libelle as type FROM ".MAIN_DB_PREFIX."c_chargesociales as c"; + $sql .= " ORDER BY lower(c.libelle) ASC"; + $resql=$db->query($sql); + if ($resql) + { + $num = $db->num_rows($resql); + $i = 0; + + while ($i < $num) + { + $obj = $db->fetch_object($resql); + print '
'.$langs->trans("CompanyInfo").''.$langs->trans("Value").'
'.$langs->trans("CompanyInfo").''.$langs->trans("Value").'
'.$langs->trans("CompanyName").''; - print '
'.$langs->trans("CompanyAddress").''; - print '
'.$langs->trans("CompanyZip").''; - print '
'.$langs->trans("CompanyTown").''; - print '
'.$langs->trans("Country").''; $form->select_pays($conf->global->MAIN_INFO_SOCIETE_PAYS,'pays_id',($conf->use_javascript_ajax?' onChange="company_save_refresh()"':'')); - print '
'.$langs->trans("CompanyCurrency").''; $form->select_currency($conf->global->MAIN_MONNAIE,"currency"); - print '
'.$langs->trans("Tel").''; print '
'.$langs->trans("Fax").''; print '
'.$langs->trans("Mail").''; print '
'.$langs->trans("Web").''; print '
'.$langs->trans("Gencod").''; diff --git a/htdocs/compta/sociales/charges.php b/htdocs/compta/sociales/charges.php index 2c0d2d58d9b..551c538617a 100644 --- a/htdocs/compta/sociales/charges.php +++ b/htdocs/compta/sociales/charges.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2004-2008 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -14,15 +14,13 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * $Id$ */ /** \file htdocs/compta/sociales/charges.php \ingroup tax \brief Fiche d'une charge sociale - \version $Revision$ + \version $Id$ */ require("./pre.inc.php"); @@ -214,21 +212,7 @@ if ($_GET["action"] == 'create') print '
YYYYMMDD
'; + $html->select_type_socialcontrib(); print '