32require
'../main.inc.php';
33require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
44$langs->loadLangs(array(
'admin',
'compta',
'accountancy'));
50$action =
GETPOST(
'action',
'aZ09');
54 'ACCOUNTING_PRODUCT_BUY_ACCOUNT',
55 'ACCOUNTING_PRODUCT_SOLD_ACCOUNT',
56 'ACCOUNTING_SERVICE_BUY_ACCOUNT',
57 'ACCOUNTING_SERVICE_SOLD_ACCOUNT',
58 'ACCOUNTING_VAT_SOLD_ACCOUNT',
59 'ACCOUNTING_VAT_BUY_ACCOUNT',
60 'ACCOUNTING_ACCOUNT_CUSTOMER',
61 'ACCOUNTING_ACCOUNT_SUPPLIER'
70if ($action ==
'update') {
73 $accounting_modes = array(
78 $accounting_mode =
GETPOST(
'accounting_mode',
'alpha');
81 if (in_array($accounting_mode, $accounting_modes)) {
89 foreach ($list as $constname) {
90 $constvalue =
GETPOST($constname,
'alpha');
97 $report_include_varpay =
GETPOST(
'ACCOUNTING_REPORTS_INCLUDE_VARPAY',
'alpha');
98 if (!empty($report_include_varpay)) {
99 if ($report_include_varpay ==
'yes') {
105 if ($report_include_varpay ==
'no') {
111 $report_include_loan =
GETPOST(
'ACCOUNTING_REPORTS_INCLUDE_LOAN',
'alpha');
112 if (!empty($report_include_loan)) {
113 if ($report_include_loan ==
'yes') {
119 if ($report_include_loan ==
'no') {
136llxHeader(
'',
'',
'',
'', 0, 0,
'',
'',
'',
'mod-admin page-compta');
138$form =
new Form($db);
140$linkback =
'<a href="'.DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToModuleList").
'</a>';
141print
load_fiche_titre($langs->trans(
'ComptaSetup'), $linkback,
'title_setup');
145print
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="post">';
146print
'<input type="hidden" name="token" value="'.newToken().
'">';
147print
'<input type="hidden" name="action" value="update">';
149print
'<table class="noborder centpercent">';
153print
'<tr class="liste_titre">';
154print
'<td>'.$langs->trans(
'OptionMode').
'</td><td>'.$langs->trans(
'Description').
'</td>';
156print
'<tr class="oddeven"><td width="200"><input type="radio" name="accounting_mode" value="RECETTES-DEPENSES"'.($accounting_mode !=
'CREANCES-DETTES' ?
' checked' :
'').
'> '.$langs->trans(
'OptionModeTrue').
'</td>';
157print
'<td colspan="2">'.nl2br($langs->trans(
'OptionModeTrueDesc'));
159print
'<tr class="oddeven"><td width="200"><input type="radio" name="accounting_mode" value="CREANCES-DETTES"'.($accounting_mode ==
'CREANCES-DETTES' ?
' checked' :
'').
'> '.$langs->trans(
'OptionModeVirtual').
'</td>';
160print
'<td colspan="2">'.nl2br($langs->trans(
'OptionModeVirtualDesc')).
"</td></tr>\n";
166print
'<table class="noborder centpercent">';
167print
'<tr class="liste_titre">';
168print
'<td colspan="3">'.$langs->trans(
'OtherOptions').
'</td>';
172foreach ($list as $key) {
173 print
'<tr class="oddeven value">';
176 $libelle = $langs->trans($key);
177 print
'<td><label for="'.$key.
'">'.$libelle.
'</label></td>';
181 print
'<input type="text" size="20" id="'.$key.
'" name="'.$key.
'" value="'.
getDolGlobalString($key).
'">';
186print
'<tr class="oddeven value">'.
"\n";
187print
'<td><label for="ACCOUNTING_REPORTS_INCLUDE_VARPAY">'.$langs->trans(
'IncludeVarpaysInResults').
'</label></td>'.
"\n";
188print
'<td class="center">'.
"\n";
189print $form->selectyesno(
'ACCOUNTING_REPORTS_INCLUDE_VARPAY', (
getDolGlobalString(
'ACCOUNTING_REPORTS_INCLUDE_VARPAY')));
193print
'<tr class="oddeven value">'.
"\n";
194print
'<td><label for="ACCOUNTING_REPORTS_INCLUDE_LOAN">'.$langs->trans(
'IncludeLoansInResults').
'</label></td>'.
"\n";
195print
'<td class="center">'.
"\n";
196print $form->selectyesno(
'ACCOUNTING_REPORTS_INCLUDE_LOAN', (
getDolGlobalString(
'ACCOUNTING_REPORTS_INCLUDE_LOAN')));
201print
'<br><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).
dolibarr_del_const($db, $name, $entity=1)
Delete a constant.
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.
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.