Go to the documentation of this file.
25 require
'../../main.inc.php';
26 require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
27 require_once DOL_DOCUMENT_ROOT.
'/core/lib/intracommreport.lib.php';
28 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
31 $langs->loadLangs(array(
"admin",
"intracommreport"));
37 $action =
GETPOST(
'action',
'aZ09');
41 'INTRACOMMREPORT_NUM_AGREMENT',
45 'INTRACOMMREPORT_NUM_DECLARATION',
48 if ($action ==
'update') {
52 foreach ($list_DEB as $constname) {
53 $constvalue =
GETPOST($constname,
'alpha');
55 if (!
dolibarr_set_const($db, $constname, $constvalue,
'chaine', 0,
'', $conf->entity)) {
60 foreach ($list_DES as $constname) {
61 $constvalue =
GETPOST($constname,
'alpha');
63 if (!
dolibarr_set_const($db, $constname, $constvalue,
'chaine', 0,
'', $conf->entity)) {
68 dolibarr_set_const($db,
"INTRACOMMREPORT_TYPE_ACTEUR",
GETPOST(
"INTRACOMMREPORT_TYPE_ACTEUR",
'alpha'),
'chaine', 0,
'', $conf->entity);
69 dolibarr_set_const($db,
"INTRACOMMREPORT_ROLE_ACTEUR",
GETPOST(
"INTRACOMMREPORT_ROLE_ACTEUR",
'alpha'),
'chaine', 0,
'', $conf->entity);
70 dolibarr_set_const($db,
"INTRACOMMREPORT_NIV_OBLIGATION_INTRODUCTION",
GETPOST(
"INTRACOMMREPORT_NIV_OBLIGATION_INTRODUCTION",
'alpha'),
'chaine', 0,
'', $conf->entity);
71 dolibarr_set_const($db,
"INTRACOMMREPORT_NIV_OBLIGATION_EXPEDITION",
GETPOST(
"INTRACOMMREPORT_NIV_OBLIGATION_EXPEDITION",
'alpha'),
'chaine', 0,
'', $conf->entity);
72 dolibarr_set_const($db,
"INTRACOMMREPORT_CATEG_FRAISDEPORT",
GETPOST(
"INTRACOMMREPORT_CATEG_FRAISDEPORT",
'alpha'),
'chaine', 0,
'', $conf->entity);
91 llxHeader(
'', $langs->trans(
"IntracommReportSetup"));
93 $linkback =
'<a href="'.DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToModuleList").
'</a>';
94 print
load_fiche_titre($langs->trans(
"IntracommReportSetup"), $linkback,
'title_setup');
98 print
dol_get_fiche_head($head,
'general', $langs->trans(
"IntracommReport"), -1,
"intracommreport");
100 print
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="post">';
101 print
'<input type="hidden" name="token" value="'.newToken().
'">';
102 print
'<input type="hidden" name="action" value="update">';
106 print
'<table class="noborder" width="100%">';
107 print
'<tr class="liste_titre">';
108 print
'<td>'.$langs->trans(
"Description").
'</td>';
109 print
'<td>'.$langs->trans(
"Value").
'</td>';
112 foreach ($list_DEB as $key) {
113 print
'<tr class="oddeven value">';
116 $label = $langs->trans($key);
117 print
'<td>'.$label.
'</td>';
119 print
'<td class="left">';
120 print
'<input type="text" class="maxwidth100" id="'.$key.
'" name="'.$key.
'" value="'.
getDolGlobalString($key).
'">';
126 print
'<tr class="oddeven">';
127 print
'<td>'.$langs->trans(
"INTRACOMMREPORT_TYPE_ACTEUR").
'</td>';
128 $arraychoices = array(
''=>$langs->trans(
"None"),
'PSI'=>
'Déclarant pour son compte',
'TDP'=>
'Tiers déclarant');
130 print
$form->selectarray(
'INTRACOMMREPORT_TYPE_ACTEUR', $arraychoices, $conf->global->INTRACOMMREPORT_TYPE_ACTEUR, 0);
134 print
'<tr class="oddeven">';
135 print
'<td>'.$langs->trans(
"INTRACOMMREPORT_ROLE_ACTEUR").
'</td>';
136 $arraychoices = array(
''=>$langs->trans(
"None"),
'sender'=>
'Emetteur',
'PSI'=>
'Déclarant');
138 print
$form->selectarray(
'INTRACOMMREPORT_ROLE_ACTEUR', $arraychoices, $conf->global->INTRACOMMREPORT_ROLE_ACTEUR, 0);
142 print
'<tr class="oddeven">';
143 print
'<td>'.$langs->trans(
"INTRACOMMREPORT_NIV_OBLIGATION_INTRODUCTION").
'</td>';
144 $arraychoices = array(1=>
'Seuil de 460 000 €', 2=>
'En dessous de 460 000 €');
146 print
$form->selectarray(
'INTRACOMMREPORT_NIV_OBLIGATION_INTRODUCTION', $arraychoices, $conf->global->INTRACOMMREPORT_NIV_OBLIGATION_INTRODUCTION, 0);
150 print
'<tr class="oddeven">';
151 print
'<td>'.$langs->trans(
"INTRACOMMREPORT_NIV_OBLIGATION_EXPEDITION").
'</td>';
152 $arraychoices = array(3=>
'Seuil de 460 000 €', 4=>
'En dessous de 460 000 €');
154 print
$form->selectarray(
'INTRACOMMREPORT_NIV_OBLIGATION_EXPEDITION', $arraychoices, $conf->global->INTRACOMMREPORT_NIV_OBLIGATION_EXPEDITION, 0);
158 print
'<tr class="oddeven">';
159 print
'<td>'.$langs->trans(
"INTRACOMMREPORT_CATEG_FRAISDEPORT").
'</td>';
161 print $formother->select_categories(
'product', $conf->global->INTRACOMMREPORT_CATEG_FRAISDEPORT,
'INTRACOMMREPORT_CATEG_FRAISDEPORT');
170 print
'<table class="noborder" width="100%">';
171 print
'<tr class="liste_titre">';
172 print
'<td>'.$langs->trans(
"Description").
'</td>';
173 print
'<td>'.$langs->trans(
"Value").
'</td>';
176 foreach ($list_DES as $key) {
177 print
'<tr class="oddeven value">';
180 $label = $langs->trans($key);
181 print
'<td>'.$label.
'</td>';
183 print
'<td class="left">';
184 print
'<input type="text" class="maxwidth100" id="'.$key.
'" name="'.$key.
'" value="'.
getDolGlobalString($key).
'">';
192 print
'<div class="center">';
193 print
'<input type="submit" name="bt_save" class="butAction button-save" value="'.$langs->trans(
"Update").
'" />';
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='')
Show tabs of a record.
if(!function_exists('utf8_encode')) if(!function_exists('utf8_decode')) getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
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).
intracommReportAdminPrepareHead()
Prepare array with list of admin tabs.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='')
Set event messages in dol_events session object.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOCSRFCHECK')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.