34require
'../../main.inc.php';
35require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
36require_once DOL_DOCUMENT_ROOT.
'/core/lib/accounting.lib.php';
37require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
38require_once DOL_DOCUMENT_ROOT.
'/accountancy/class/accountancyexport.class.php';
41$langs->loadLangs(array(
"compta",
"bills",
"admin",
"accountancy",
"other"));
44if (!$user->hasRight(
'accounting',
'chartofaccount')) {
48$action =
GETPOST(
'action',
'aZ09');
50$nbletter =
GETPOSTINT(
'ACCOUNTING_LETTERING_NBLETTERS');
54 'ACCOUNTING_LENGTH_GACCOUNT',
55 'ACCOUNTING_LENGTH_AACCOUNT',
59 'ACCOUNTING_DEFAULT_PERIOD_ON_TRANSFER',
60 'ACCOUNTING_DATE_START_BINDING',
61 'ACCOUNTING_LABEL_OPERATION_ON_TRANSFER'
66 'ACCOUNTING_EXPORT_PREFIX_SPEC',
70$configuration = $accountancyexport->getTypeConfig();
72$listparam = $configuration[
'param'];
73$listformat = $configuration[
'format'];
74$listcr = $configuration[
'cr'];
78 'label' =>
'ACCOUNTING_EXPORT_FORMAT',
79 'param' => $listformat,
82 'label' =>
'ACCOUNTING_EXPORT_SEPARATORCSV',
86 'label' =>
'ACCOUNTING_EXPORT_ENDLINE',
90 'label' =>
'ACCOUNTING_EXPORT_DATE',
102if (in_array($action, array(
'setBANK_DISABLE_DIRECT_INPUT',
'setACCOUNTANCY_ER_DATE_RECORD',
'setACCOUNTANCY_COMBO_FOR_AUX',
'setACCOUNTING_MANAGE_ZERO',
'setACCOUNTING_BANK_CONCILIATED'))) {
103 $constname = preg_replace(
'/^set/',
'', $action);
105 $res =
dolibarr_set_const($db, $constname, $constvalue,
'yesno', 0,
'', $conf->entity);
117if ($action ==
'update') {
121 foreach ($list as $constname) {
122 $constvalue =
GETPOST($constname,
'alpha');
123 if (!
dolibarr_set_const($db, $constname, $constvalue,
'chaine', 0,
'', $conf->entity)) {
132 foreach ($list_binding as $constname) {
133 $constvalue =
GETPOST($constname,
'alpha');
135 if ($constname ==
'ACCOUNTING_DATE_START_BINDING') {
139 if (!
dolibarr_set_const($db, $constname, $constvalue,
'chaine', 0,
'', $conf->entity)) {
145 if (GETPOSTISSET(
'ACCOUNTING_LETTERING_NBLETTERS')) {
146 if (!
dolibarr_set_const($db,
'ACCOUNTING_LETTERING_NBLETTERS',
GETPOST(
'ACCOUNTING_LETTERING_NBLETTERS'),
'chaine', 0,
'', $conf->entity)) {
152 $modelcsv =
GETPOSTINT(
'ACCOUNTING_EXPORT_MODELCSV');
154 if (!empty($modelcsv)) {
155 if (!
dolibarr_set_const($db,
'ACCOUNTING_EXPORT_MODELCSV', $modelcsv,
'chaine', 0,
'', $conf->entity)) {
165 foreach ($main_option as $constname) {
166 $constvalue =
GETPOST($constname,
'alpha');
168 if (!
dolibarr_set_const($db, $constname, $constvalue,
'chaine', 0,
'', $conf->entity)) {
173 foreach ($listparam[$modelcsv] as $key => $value) {
176 if (strpos($constante,
'ACCOUNTING') !==
false) {
177 $constvalue =
GETPOST($key,
'alpha');
178 if (!
dolibarr_set_const($db, $constante, $constvalue,
'chaine', 0,
'', $conf->entity)) {
186 $configuration = $accountancyexport->getTypeConfig();
187 $listparam = $configuration[
'param'];
198if ($action ==
'setmanagezero') {
200 $res =
dolibarr_set_const($db,
"ACCOUNTING_MANAGE_ZERO", $setmanagezero,
'yesno', 0,
'', $conf->entity);
212if ($action ==
'setenabledraftexport') {
214 $res =
dolibarr_set_const($db,
"ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL", $setenabledraftexport,
'yesno', 0,
'', $conf->entity);
226if ($action ==
'setenablesubsidiarylist') {
227 $setenablesubsidiarylist =
GETPOSTINT(
'value');
228 $res =
dolibarr_set_const($db,
"ACCOUNTANCY_COMBO_FOR_AUX", $setenablesubsidiarylist,
'yesno', 0,
'', $conf->entity);
240if ($action ==
'setdisablebindingonsales') {
241 $setdisablebindingonsales =
GETPOSTINT(
'value');
242 $res =
dolibarr_set_const($db,
"ACCOUNTING_DISABLE_BINDING_ON_SALES", $setdisablebindingonsales,
'yesno', 0,
'', $conf->entity);
254if ($action ==
'setdisablebindingonpurchases') {
255 $setdisablebindingonpurchases =
GETPOSTINT(
'value');
256 $res =
dolibarr_set_const($db,
"ACCOUNTING_DISABLE_BINDING_ON_PURCHASES", $setdisablebindingonpurchases,
'yesno', 0,
'', $conf->entity);
268if ($action ==
'setdisablebindingonexpensereports') {
269 $setdisablebindingonexpensereports =
GETPOSTINT(
'value');
270 $res =
dolibarr_set_const($db,
"ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS", $setdisablebindingonexpensereports,
'yesno', 0,
'', $conf->entity);
282if ($action ==
'setenablelettering') {
284 $res =
dolibarr_set_const($db,
"ACCOUNTING_ENABLE_LETTERING", $setenablelettering,
'yesno', 0,
'', $conf->entity);
296if ($action ==
'setenableautolettering') {
297 $setenableautolettering =
GETPOSTINT(
'value');
298 $res =
dolibarr_set_const($db,
"ACCOUNTING_ENABLE_AUTOLETTERING", $setenableautolettering,
'yesno', 0,
'', $conf->entity);
310if ($action ==
'setenablevatreversecharge') {
311 $setenablevatreversecharge =
GETPOSTINT(
'value');
312 $res =
dolibarr_set_const($db,
"ACCOUNTING_FORCE_ENABLE_VAT_REVERSE_CHARGE", $setenablevatreversecharge,
'yesno', 0,
'', $conf->entity);
329$form =
new Form($db);
331$title = $langs->trans(
'ConfigAccountingExpert');
332$help_url =
'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilité_en_Partie_Double#Configuration';
333llxHeader(
'', $title, $help_url,
'', 0, 0,
'',
'',
'',
'mod-accountancy page-admin_index');
344 print
'<div class="info">' . $langs->trans(
"ConstantIsOn",
"FACTURE_DEPOSITS_ARE_JUST_PAYMENTS") .
'</div>';
347 print
'<div class="info">' . $langs->trans(
"ConstantIsOn",
"FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS") .
'</div>';
350 print
'<div class="info">' . $langs->trans(
"ConstantIsOn",
"ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY") .
'</div>';
353 print
'<div class="info">' . $langs->trans(
"ConstantIsOn",
"MAIN_COMPANY_PERENTITY_SHARED") .
'</div>';
356 print
'<div class="info">' . $langs->trans(
"ConstantIsOn",
"MAIN_PRODUCT_PERENTITY_SHARED") .
'</div>';
360print
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="post">';
361print
'<input type="hidden" name="token" value="'.newToken().
'">';
362print
'<input type="hidden" name="action" value="update">';
363print
'<input type="hidden" name="page_y" value="">';
366print
'<div class="div-table-responsive-no-min">';
367print
'<table class="noborder centpercent">';
368print
'<tr class="liste_titre">';
369print
'<td colspan="2">'.$langs->trans(
'Options').
'</td>';
389print
'<tr class="oddeven">';
390print
'<td>'.$langs->trans(
"BANK_DISABLE_DIRECT_INPUT").
'</td>';
392 print
'<td class="right"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?token='.
newToken().
'&action=setBANK_DISABLE_DIRECT_INPUT&value=0">';
393 print
img_picto($langs->trans(
"Activated"),
'switch_on');
396 print
'<td class="right"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?token='.
newToken().
'&action=setBANK_DISABLE_DIRECT_INPUT&value=1">';
397 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
402print
'<tr class="oddeven">';
403print
'<td>'.$langs->trans(
"ACCOUNTANCY_COMBO_FOR_AUX");
404print
' - <span class="opacitymedium">'.$langs->trans(
"NotRecommended").
'</span>';
408 print
'<td class="right"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?token='.
newToken().
'&action=setACCOUNTANCY_COMBO_FOR_AUX&value=0">';
409 print
img_picto($langs->trans(
"Activated").
' - '.$langs->trans(
"NotRecommended"),
'switch_on',
'class="warning"');
412 print
'<td class="right"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?token='.
newToken().
'&action=setACCOUNTANCY_COMBO_FOR_AUX&value=1">';
413 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
418print
'<tr class="oddeven">';
419print
'<td>'.$langs->trans(
"ACCOUNTING_MANAGE_ZERO").
'</td>';
421 print
'<td class="right"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?token='.
newToken().
'&action=setACCOUNTING_MANAGE_ZERO&value=0">';
422 print
img_picto($langs->trans(
"Activated"),
'switch_on');
425 print
'<td class="right"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?token='.
newToken().
'&action=setACCOUNTING_MANAGE_ZERO&value=1">';
426 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
432foreach ($list as $key) {
433 print
'<tr class="oddeven value">';
435 if (
getDolGlobalInt(
'ACCOUNTING_MANAGE_ZERO') && ($key ==
'ACCOUNTING_LENGTH_GACCOUNT' || $key ==
'ACCOUNTING_LENGTH_AACCOUNT')) {
440 $label = $langs->trans($key);
441 print
'<td>'.$label.
'</td>';
443 print
'<td class="right">';
444 print
'<input type="number" class="maxwidth50 right" id="'.$key.
'" name="'.$key.
'" value="'.
getDolGlobalString($key).
'">';
452print
'<div class="center"><input type="submit" class="button reposition" value="'.dol_escape_htmltag($langs->trans(
'Save')).
'" name="button"></div>';
459print
'<div class="div-table-responsive-no-min">';
460print
'<table class="noborder centpercent">';
461print
'<tr class="liste_titre">';
462print
'<td colspan="2">'.$langs->trans(
'BindingOptions').
'</td>';
466foreach ($list_binding as $key) {
467 print
'<tr class="oddeven value">';
470 $label = $langs->trans($key);
471 print
'<td>'.$label.
'</td>';
473 print
'<td class="right minwidth75imp parentonrightofpage">';
474 if ($key ==
'ACCOUNTING_DATE_START_BINDING') {
476 } elseif ($key ==
'ACCOUNTING_DEFAULT_PERIOD_ON_TRANSFER') {
477 $array = array(0=>$langs->trans(
"PreviousMonth"), 1=>$langs->trans(
"CurrentMonth"), 2=>$langs->trans(
"Fiscalyear"));
478 print $form->selectarray($key, $array,
getDolGlobalInt(
'ACCOUNTING_DEFAULT_PERIOD_ON_TRANSFER', 0), 0, 0, 0,
'', 0, 0, 0,
'',
'onrightofpage width200');
479 } elseif ($key ==
'ACCOUNTING_LABEL_OPERATION_ON_TRANSFER') {
481 0=>$langs->trans(
"ThirdPartyName") .
' - ' . $langs->trans(
"NumPiece") .
' - ' . $langs->trans(
"LabelAccount"),
482 1=>$langs->trans(
"ThirdPartyName") .
' - ' . $langs->trans(
"NumPiece"),
483 2=>$langs->trans(
"ThirdPartyName")
485 print $form->selectarray($key, $array,
getDolGlobalInt(
'ACCOUNTING_LABEL_OPERATION_ON_TRANSFER', 0), 0, 0, 0,
'', 0, 0, 0,
'',
'onrightofpage width200');
487 print
'<input type="text" class="maxwidth100" id="'.$key.
'" name="'.$key.
'" value="'.
getDolGlobalString($key).
'">';
494print
'<tr class="oddeven">';
495print
'<td>'.$langs->trans(
"ACCOUNTING_DISABLE_BINDING_ON_SALES").
'</td>';
497 print
'<td class="right"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?token='.
newToken().
'&action=setdisablebindingonsales&value=0">';
498 print
img_picto($langs->trans(
"Activated"),
'switch_on',
'', 0, 0, 0,
'',
'warning');
501 print
'<td class="right"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?token='.
newToken().
'&action=setdisablebindingonsales&value=1">';
502 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
507print
'<tr class="oddeven">';
508print
'<td>'.$langs->trans(
"ACCOUNTING_DISABLE_BINDING_ON_PURCHASES").
'</td>';
510 print
'<td class="right"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?token='.
newToken().
'&action=setdisablebindingonpurchases&value=0">';
511 print
img_picto($langs->trans(
"Activated"),
'switch_on',
'', 0, 0, 0,
'',
'warning');
514 print
'<td class="right"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?token='.
newToken().
'&action=setdisablebindingonpurchases&value=1">';
515 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
520print
'<tr class="oddeven">';
521print
'<td>'.$langs->trans(
"ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS").
'</td>';
523 print
'<td class="right"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?token='.
newToken().
'&action=setdisablebindingonexpensereports&value=0">';
524 print
img_picto($langs->trans(
"Activated"),
'switch_on',
'', 0, 0, 0,
'',
'warning');
527 print
'<td class="right"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?token='.
newToken().
'&action=setdisablebindingonexpensereports&value=1">';
528 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
534 print
'<tr class="oddeven">';
535 print
'<td>'.$langs->trans(
"ACCOUNTANCY_ER_DATE_RECORD").
'</td>';
537 print
'<td class="right"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?token='.
newToken().
'&action=setACCOUNTANCY_ER_DATE_RECORD&value=0">';
538 print
img_picto($langs->trans(
"Activated"),
'switch_on');
541 print
'<td class="right"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?token='.
newToken().
'&action=setACCOUNTANCY_ER_DATE_RECORD&value=1">';
542 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
548print
'<tr class="oddeven">';
549print
'<td>'.$langs->trans(
"ACCOUNTING_BANK_CONCILIATED").
'</td>';
551 print
'<td class="right"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?token='.
newToken().
'&action=setACCOUNTING_BANK_CONCILIATED&value=1">';
552 print
img_picto($langs->trans(
"Activated"),
'switch_on');
555 print
'<td class="right"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?token='.
newToken().
'&action=setACCOUNTING_BANK_CONCILIATED&value=2">';
556 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
564print
'<div class="center"><input type="submit" class="button reposition" value="'.dol_escape_htmltag($langs->trans(
'Save')).
'" name="button"></div>';
573print
'<div class="div-table-responsive-no-min">';
574print
'<table class="noborder centpercent">';
575print
'<tr class="liste_titre">';
576print
'<td colspan="2">' . $langs->trans(
'OptionsAdvanced') .
'</td>';
579print
'<tr class="oddeven">';
581print $form->textwithpicto($langs->trans(
"ACCOUNTING_ENABLE_LETTERING"), $langs->trans(
"ACCOUNTING_ENABLE_LETTERING_DESC", $langs->transnoentitiesnoconv(
"NumMvts")).
'<br>'.$langs->trans(
"EnablingThisFeatureIsNotNecessary")).
'</td>';
583 print
'<td class="right"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?token='.
newToken().
'&action=setenablelettering&value=0">';
584 print
img_picto($langs->trans(
"Activated"),
'switch_on');
587 print
'<td class="right"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?token='.
newToken().
'&action=setenablelettering&value=1">';
588 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
595 print
'<tr class="oddeven">';
597 print $form->textwithpicto($langs->trans(
"ACCOUNTING_LETTERING_NBLETTERS"), $langs->trans(
"ACCOUNTING_LETTERING_NBLETTERS_DESC")) .
'</td>';
598 print
'<td class="right">';
600 if (empty($letter)) {
608 print
'<input class="flat right" name="ACCOUNTING_LETTERING_NBLETTERS" id="ACCOUNTING_LETTERING_NBLETTERS" value="' . $nbletter .
'" type="number" step="1" min="2" max="3" >' .
"\n";
612 print
'<tr class="oddeven">';
614 print $form->textwithpicto($langs->trans(
"ACCOUNTING_ENABLE_AUTOLETTERING"), $langs->trans(
"ACCOUNTING_ENABLE_AUTOLETTERING_DESC")) .
'</td>';
616 print
'<td class="right"><a class="reposition" href="' . $_SERVER[
'PHP_SELF'] .
'?token=' .
newToken() .
'&action=setenableautolettering&value=0">';
617 print
img_picto($langs->trans(
"Activated"),
'switch_on');
620 print
'<td class="right"><a class="reposition" href="' . $_SERVER[
'PHP_SELF'] .
'?token=' .
newToken() .
'&action=setenableautolettering&value=1">';
621 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
627print
'<tr class="oddeven">';
629print $form->textwithpicto($langs->trans(
"ACCOUNTING_FORCE_ENABLE_VAT_REVERSE_CHARGE"), $langs->trans(
"ACCOUNTING_FORCE_ENABLE_VAT_REVERSE_CHARGE_DESC", $langs->transnoentities(
"MenuDefaultAccounts"))).
'</td>';
631 print
'<td class="right"><a class="reposition" href="' . $_SERVER[
'PHP_SELF'] .
'?token=' .
newToken() .
'&action=setenablevatreversecharge&value=0">';
632 print
img_picto($langs->trans(
"Activated"),
'switch_on');
635 print
'<td class="right"><a class="reposition" href="' . $_SERVER[
'PHP_SELF'] .
'?token=' .
newToken() .
'&action=setenablevatreversecharge&value=1">';
636 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
645print
'<div class="center"><input type="submit" class="button button-edit reposition" name="button" value="'.$langs->trans(
'Save').
'"></div>';
652print
"\n".
'<script type="text/javascript">'.
"\n";
653print
'jQuery(document).ready(function () {'.
"\n";
654print
' function initfields()'.
"\n";
656foreach ($listparam as $key => $param) {
657 print
' if (jQuery("#ACCOUNTING_EXPORT_MODELCSV").val()=="'.$key.
'")'.
"\n";
659 print
' //console.log("'.$param[
'label'].
'");'.
"\n";
660 if (empty($param[
'ACCOUNTING_EXPORT_FORMAT'])) {
661 print
' jQuery("#ACCOUNTING_EXPORT_FORMAT").val("'.getDolGlobalString(
'ACCOUNTING_EXPORT_FORMAT').
'");'.
"\n";
662 print
' jQuery("#ACCOUNTING_EXPORT_FORMAT").prop("disabled", true);'.
"\n";
664 print
' jQuery("#ACCOUNTING_EXPORT_FORMAT").val("'.$param[
'ACCOUNTING_EXPORT_FORMAT'].
'");'.
"\n";
665 print
' jQuery("#ACCOUNTING_EXPORT_FORMAT").removeAttr("disabled");'.
"\n";
667 if (empty($param[
'ACCOUNTING_EXPORT_SEPARATORCSV'])) {
668 print
' jQuery("#ACCOUNTING_EXPORT_SEPARATORCSV").val("");'.
"\n";
669 print
' jQuery("#ACCOUNTING_EXPORT_SEPARATORCSV").prop("disabled", true);'.
"\n";
671 print
' jQuery("#ACCOUNTING_EXPORT_SEPARATORCSV").val("'.getDolGlobalString(
'ACCOUNTING_EXPORT_SEPARATORCSV').
'");'.
"\n";
672 print
' jQuery("#ACCOUNTING_EXPORT_SEPARATORCSV").removeAttr("disabled");'.
"\n";
674 if (empty($param[
'ACCOUNTING_EXPORT_ENDLINE'])) {
675 print
' jQuery("#ACCOUNTING_EXPORT_ENDLINE").prop("disabled", true);'.
"\n";
677 print
' jQuery("#ACCOUNTING_EXPORT_ENDLINE").removeAttr("disabled");'.
"\n";
679 if (empty($param[
'ACCOUNTING_EXPORT_DATE'])) {
680 print
' jQuery("#ACCOUNTING_EXPORT_DATE").val("");'.
"\n";
681 print
' jQuery("#ACCOUNTING_EXPORT_DATE").prop("disabled", true);'.
"\n";
683 print
' jQuery("#ACCOUNTING_EXPORT_DATE").val("'.getDolGlobalString(
'ACCOUNTING_EXPORT_DATE').
'");'.
"\n";
684 print
' jQuery("#ACCOUNTING_EXPORT_DATE").removeAttr("disabled");'.
"\n";
689print
' initfields();'.
"\n";
690print
' jQuery("#ACCOUNTING_EXPORT_MODELCSV").change(function() {'.
"\n";
691print
' initfields();'.
"\n";
694print
'</script>'.
"\n";
698print
'<table class="noborder centpercent">';
699print
'<tr class="liste_titre">';
700print
'<td colspan="2">'.$langs->trans(
'ExportOptions').
'</td>';
703$num = count($main_option);
705 foreach ($main_option as $key) {
706 print
'<tr class="oddeven value">';
709 $label = $langs->trans($key);
710 print
'<td>'.dol_escape_htmltag($label).
'</td>';
714 print
'<input type="text" size="20" id="'.$key.
'" name="'.$key.
'" value="'.
getDolGlobalString($key).
'">';
719print
'<tr class="oddeven">';
720print
'<td>'.$langs->trans(
"Selectmodelcsv").
'</td>';
721if (!$conf->use_javascript_ajax) {
722 print
'<td class="nowrap">';
723 print $langs->trans(
"NotAvailableWhenAjaxDisabled");
727 $listofexporttemplates = $accountancyexport->getType(1);
728 print $form->selectarray(
"ACCOUNTING_EXPORT_MODELCSV", $listofexporttemplates,
getDolGlobalString(
'ACCOUNTING_EXPORT_MODELCSV'), 0, 0, 0,
'', 0, 0, 0,
'',
'', 1);
734$num2 = count($model_option);
736 foreach ($model_option as $key) {
737 print
'<tr class="oddeven value">';
740 $label = $key[
'label'];
741 print
'<td>'.$langs->trans($label).
'</td>';
745 if (is_array($key[
'param'])) {
748 print
'<input type="text" size="20" id="'.$label.
'" name="'.$key[
'label'].
'" value="'.
getDolGlobalString($label).
'">';
757print
'<div class="center"><input type="submit" class="button reposition" value="'.dol_escape_htmltag($langs->trans(
'Save')).
'" name="button"></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.
Manage the different format accountancy export.
dol_mktime($hour, $minute, $second, $month, $day, $year, $gm='auto', $check=1)
Return a timestamp date built from detailed information (by default a local PHP server timestamp) Rep...
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.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
newToken()
Return the value of token currently saved into session with name 'newtoken'.
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.