New: Ajout pages configuration prcisions Dolibarr
This commit is contained in:
parent
34833bb342
commit
5771bdefca
117
htdocs/admin/limits.php
Normal file
117
htdocs/admin/limits.php
Normal file
@ -0,0 +1,117 @@
|
||||
<?php
|
||||
/* Copyright (C) 2007 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* 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")."<br>\n";
|
||||
print "<br>\n";
|
||||
|
||||
|
||||
if (isset($_GET["action"]) && $_GET["action"] == 'edit')
|
||||
{
|
||||
$html=new Form($db);
|
||||
|
||||
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
|
||||
clearstatcache();
|
||||
$var=true;
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
||||
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("MAIN_MAX_DECIMALS_UNIT").'</td><td><input class="flat" name="MAIN_MAX_DECIMALS_UNIT" size="3" value="' . $conf->global->MAIN_MAX_DECIMALS_UNIT . '"></td></tr>';
|
||||
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("MAIN_MAX_DECIMALS_TTC").'</td><td><input class="flat" name="MAIN_MAX_DECIMALS_TTC" size="3" value="' . $conf->global->MAIN_MAX_DECIMALS_TTC . '"></td></tr>';
|
||||
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("MAIN_MAX_DECIMALS_SHOWN").'</td><td><input class="flat" name="MAIN_MAX_DECIMALS_SHOWN" size="3" value="' . $conf->global->MAIN_MAX_DECIMALS_SHOWN . '"></td></tr>';
|
||||
|
||||
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<br><center>';
|
||||
print '<input class="button" type="submit" value="'.$langs->trans("Save").'">';
|
||||
print '</center>';
|
||||
|
||||
print '</form>';
|
||||
print '<br>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$var=true;
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
||||
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("MAIN_MAX_DECIMALS_UNIT").'</td><td align="right">'.$conf->global->MAIN_MAX_DECIMALS_UNIT.'</td></tr>';
|
||||
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("MAIN_MAX_DECIMALS_TTC").'</td><td align="right">'.$conf->global->MAIN_MAX_DECIMALS_TTC.'</td></tr>';
|
||||
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("MAIN_MAX_DECIMALS_SHOWN").'</td><td align="right">'.$conf->global->MAIN_MAX_DECIMALS_SHOWN.'</td></tr>';
|
||||
|
||||
print '</table><br>';
|
||||
|
||||
print '<div class="tabsAction">';
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit">'.$langs->trans("Edit").'</a>';
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date$ - $Revision$');
|
||||
?>
|
||||
@ -450,6 +450,11 @@ DictionnaryDesc=Define here all reference datas. You can complete predefined val
|
||||
ConstDesc=All other parameters not available in previous pages
|
||||
OnceSetupFinishedCreateUsers=Warning, you are a Dolibarr administrator user. Administrator users are used to setup Dolibarr. For a usual usage of Dolibarr, it is recommended to use a non administrator user created from Users & Groups menu.
|
||||
MiscellanousDesc=Define here all other parameters related to security.
|
||||
LimitsSetup=Limits/Precision setup
|
||||
LimitsDesc=You can define here limits and precision used by Dolibarr
|
||||
MAIN_MAX_DECIMALS_UNIT=Max decimals for unit prices
|
||||
MAIN_MAX_DECIMALS_TTC=Max decimals for prices with taxes
|
||||
MAIN_MAX_DECIMALS_SHOWN=Max decimals for prices shown on screen (Excedented decimals will be replaced by three dots <b>...</b>)
|
||||
##### Users setup #####
|
||||
UserGroupSetup=Users and groups module setup
|
||||
GeneratePassword=Suggest a generated password
|
||||
|
||||
@ -129,6 +129,8 @@ About=About
|
||||
WelcomeString=<font class="body">We are </font>%s<font class="body">, and you are connected as user</font> %s
|
||||
Number=Number
|
||||
Numero=Numero
|
||||
Limit=Limit
|
||||
Limits=Limits
|
||||
DevelopmentTeam=Development Team
|
||||
Logout=Logout
|
||||
Connection=Connection
|
||||
|
||||
@ -457,6 +457,11 @@ DictionnaryDesc=Definissez ici les donn
|
||||
ConstDesc=Tout autre parametre non editable dans les pages précédentes
|
||||
OnceSetupFinishedCreateUsers=Attention, vous êtes sous un compte administrateur de Dolibarr. Les administrateurs sont utilisés pour configurer Dolibarr. Pour une utilisation courante de Dolibarr, il est recommandé d'utiliser un compte non administrateur créé depuis le menu "Utilisateurs & Groupes".
|
||||
MiscellanousDesc=Définissez ici les autres paramètres en rapport avec la sécurité.
|
||||
LimitsSetup=Configuration des limites et precisions
|
||||
LimitsDesc=Vous pouvez définir ici les limites et précisions utilisées par Dolibarr
|
||||
MAIN_MAX_DECIMALS_UNIT=Nombre de décimals maximum pour les prix unitaires
|
||||
MAIN_MAX_DECIMALS_TTC=Nombre de décimals maximum pour les prix totaux toute taxe comprise
|
||||
MAIN_MAX_DECIMALS_SHOWN=Nombre de décimals maximum pour les montant affichés à l'écran (Les décimals en trop sont remplacés par trois petits points: <b>...</b>)
|
||||
##### Users setup #####
|
||||
UserGroupSetup=Configuration module utilisateurs et groupes
|
||||
GeneratePassword=Proposer un mot de passe généré
|
||||
|
||||
@ -52,7 +52,6 @@ InformationToHelpDiagnose=Voici les informations qui pourront aider au diagnosti
|
||||
MoreInformation=Plus d'information
|
||||
NotePublic=Note (publique)
|
||||
NotePrivate=Note (privée)
|
||||
|
||||
yes=oui
|
||||
Yes=Oui
|
||||
no=non
|
||||
@ -131,6 +130,8 @@ About=
|
||||
WelcomeString=<font class="body">Nous sommes le</font> %s<font class="body">, et vous êtes connecté(e) en tant que </font> %s
|
||||
Number=Nombre
|
||||
Numero=Numéro
|
||||
Limit=Limite
|
||||
Limits=Limites
|
||||
DevelopmentTeam=Équipe de développement
|
||||
Logout=Déconnexion
|
||||
Connection=Connexion
|
||||
|
||||
Loading…
Reference in New Issue
Block a user