*
* 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* 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$
* $Source$
*/
/**
\file htdocs/admin/limits.php
\brief Page de configuration des limites
\version $Revision$
*/
require("./pre.inc.php");
$langs->load("companies");
$langs->load("products");
$langs->load("admin");
if (!$user->admin)
accessforbidden();
if (isset($_POST["action"]) && $_POST["action"] == 'update')
{
dolibarr_set_const($db, "MAIN_MAX_DECIMALS_UNIT", $_POST["MAIN_MAX_DECIMALS_UNIT"]);
dolibarr_set_const($db, "MAIN_MAX_DECIMALS_TTC", $_POST["MAIN_MAX_DECIMALS_TTC"]);
dolibarr_set_const($db, "MAIN_MAX_DECIMALS_SHOWN", $_POST["MAIN_MAX_DECIMALS_SHOWN"]);
Header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup");
exit;
}
llxHeader();
print_fiche_titre($langs->trans("LimitsSetup"),'','setup');
print $langs->trans("LimitsDesc")."
\n";
print "
\n";
if (isset($_GET["action"]) && $_GET["action"] == 'edit')
{
$html=new Form($db);
print '
| '.$langs->trans("Parameter").' | '.$langs->trans("Value").' |
| '.$langs->trans("MAIN_MAX_DECIMALS_UNIT").' | '.$conf->global->MAIN_MAX_DECIMALS_UNIT.' |
| '.$langs->trans("MAIN_MAX_DECIMALS_TTC").' | '.$conf->global->MAIN_MAX_DECIMALS_TTC.' |
| '.$langs->trans("MAIN_MAX_DECIMALS_SHOWN").' | '.$conf->global->MAIN_MAX_DECIMALS_SHOWN.' |