28require
'../../main.inc.php';
31require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
32require_once DOL_DOCUMENT_ROOT.
'/core/lib/salaries.lib.php';
33if (isModEnabled(
'accounting')) {
34 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formaccounting.class.php';
46$langs->loadLangs(array(
'admin',
'salaries'));
53$action =
GETPOST(
'action',
'aZ09');
57 'SALARIES_ACCOUNTING_ACCOUNT_PAYMENT',
64if ($action ==
'update') {
67 foreach ($list as $constname) {
68 $constvalue =
GETPOST($constname,
'alpha');
83if (preg_match(
'/^(set|del)_?([A-Z_]+)$/', $action, $reg)) {
94llxHeader(
'', $langs->trans(
'SalariesSetup'));
97if (isModEnabled(
'accounting')) {
101$linkback =
'<a href="'.DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToModuleList").
'</a>';
102print
load_fiche_titre($langs->trans(
'SalariesSetup'), $linkback,
'title_setup');
104$head = salaries_admin_prepare_head();
111print
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="post">';
112print
'<input type="hidden" name="token" value="'.newToken().
'">';
113print
'<input type="hidden" name="action" value="update">';
118print
'<table class="noborder centpercent">';
119print
'<tr class="liste_titre">';
120print
'<td>'.$langs->trans(
"Parameters").
'</td>';
121print
'<td width="60">'.$langs->trans(
"Value").
"</td>\n";
124foreach ($list as $key) {
125 print
'<tr class="oddeven value">';
128 $label = $langs->trans($key);
129 print
'<td class="fieldrequired" width="50%"><label for="'.$key.
'">'.$label.
'</label></td>';
133 if (isModEnabled(
'accounting')) {
134 print $formaccounting->select_account(
getDolGlobalString($key), $key, 1, array(), 1, 1);
136 print
'<input type="text" size="20" id="'.$key.
'" name="'.$key.
'" value="'.
getDolGlobalString($key).
'">';
147print
'<div class="center"><input type="submit" class="button button-edit" name="button" value="'.$langs->trans(
'Modify').
'"></div>';
152echo
'<table class="noborder centpercent">';
154echo
'<tr class="liste_titre"><th>' . $langs->trans(
'Parameter') .
'</th><th>' . $langs->trans(
'Value') .
'</th></tr>';
158$key =
'CREATE_NEW_SALARY_WITHOUT_AUTO_PAYMENT';
159echo
'<tr><td>', $langs->trans($key),
'</td><td>', ajax_constantonoff($key),
'</td></tr>';
dolibarr_set_const($db, $name, $value, $type='chaine', $visible=0, $note='', $entity=1)
Insert a parameter (key,value) into database (delete old key then insert it again).
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0, $morecssdiv='')
Show tabs of a record.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.