27require
'../main.inc.php';
30require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
31if (isModEnabled(
'accounting')) {
32 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formaccounting.class.php';
36$langs->loadLangs(array(
'admin',
'loan'));
43$action =
GETPOST(
'action',
'aZ09');
47 'LOAN_ACCOUNTING_ACCOUNT_CAPITAL',
48 'LOAN_ACCOUNTING_ACCOUNT_INTEREST',
49 'LOAN_ACCOUNTING_ACCOUNT_INSURANCE'
56if ($action ==
'update') {
59 foreach ($list as $constname) {
60 $constvalue =
GETPOST($constname,
'alpha');
62 if (!
dolibarr_set_const($db, $constname, $constvalue,
'chaine', 0,
'', $conf->entity)) {
78llxHeader(
'',
'',
'',
'', 0, 0,
'',
'',
'',
'mod-admin page-loan');
81if (isModEnabled(
'accounting')) {
84 $formaccounting =
null;
87$linkback =
'<a href="'.DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToModuleList").
'</a>';
88print
load_fiche_titre($langs->trans(
'ConfigLoan'), $linkback,
'title_setup');
90print
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="post">';
91print
'<input type="hidden" name="token" value="'.newToken().
'">';
92print
'<input type="hidden" name="action" value="update">';
97print
'<table class="noborder centpercent">';
98print
'<tr class="liste_titre">';
99print
'<td colspan="3">'.$langs->trans(
'Options').
'</td>';
102foreach ($list as $key) {
103 print
'<tr class="oddeven value">';
106 $label = $langs->trans($key);
107 print
'<td><label for="' . $key .
'">' . $label .
'</label></td>';
112 print $formaccounting->select_account(
getDolGlobalString($key), $key, 1, array(), 1, 1);
114 print
'<input type="text" size="20" id="' . $key .
'" name="' . $key .
'" value="' .
getDolGlobalString($key) .
'">';
124print
'<br><div style="text-align:center"><input type="submit" class="button button-edit" name="button" value="'.$langs->trans(
'Modify').
'"></div>';
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).
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.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.