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"));
35 $action =
GETPOST(
'action',
'aZ09');
39 'INTRACOMMREPORT_NUM_AGREMENT',
43 'INTRACOMMREPORT_NUM_DECLARATION',
46 if ($action ==
'update') {
51 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)
62 $constvalue =
GETPOST($constname,
'alpha');
64 if (!
dolibarr_set_const($db, $constname, $constvalue,
'chaine', 0,
'', $conf->entity)) {
69 dolibarr_set_const($db,
"INTRACOMMREPORT_TYPE_ACTEUR",
GETPOST(
"INTRACOMMREPORT_TYPE_ACTEUR",
'alpha'),
'chaine', 0,
'', $conf->entity);
70 dolibarr_set_const($db,
"INTRACOMMREPORT_ROLE_ACTEUR",
GETPOST(
"INTRACOMMREPORT_ROLE_ACTEUR",
'alpha'),
'chaine', 0,
'', $conf->entity);
71 dolibarr_set_const($db,
"INTRACOMMREPORT_NIV_OBLIGATION_INTRODUCTION",
GETPOST(
"INTRACOMMREPORT_NIV_OBLIGATION_INTRODUCTION",
'alpha'),
'chaine', 0,
'', $conf->entity);
72 dolibarr_set_const($db,
"INTRACOMMREPORT_NIV_OBLIGATION_EXPEDITION",
GETPOST(
"INTRACOMMREPORT_NIV_OBLIGATION_EXPEDITION",
'alpha'),
'chaine', 0,
'', $conf->entity);
73 dolibarr_set_const($db,
"INTRACOMMREPORT_CATEG_FRAISDEPORT",
GETPOST(
"INTRACOMMREPORT_CATEG_FRAISDEPORT",
'alpha'),
'chaine', 0,
'', $conf->entity);
89 $form =
new Form($db);
92 llxHeader(
'', $langs->trans(
"IntracommReportSetup"));
94 $linkback =
'<a href="'.DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToModuleList").
'</a>';
101 print '<form action="'.$_SERVER[
"PHP_SELF"].
'" method="post">';
102 print '<input type="hidden" name="token" value="'.newToken().
'">';
103 print '<input type="hidden" name="action" value="update">';
107 print '<table class="noborder" width="100%">';
108 print '<tr class="liste_titre">';
109 print '<td>'.$langs->trans(
"Description").
'</td>';
110 print '<td>'.$langs->trans(
"Value").
'</td>';
113 foreach ($list_DEB as $key)
115 print '<tr class="oddeven value">';
118 $label = $langs->trans($key);
119 print '<td>'.$label.
'</td>';
121 print '<td class="left">';
122 print '<input type="text" class="maxwidth100" id="'.$key.
'" name="'.$key.
'" value="'.$conf->global->$key.
'">';
128 print '<tr class="oddeven">';
129 print '<td>'.$langs->trans(
"INTRACOMMREPORT_TYPE_ACTEUR").
'</td>';
130 $arraychoices = array(
''=>$langs->trans(
"None"),
'PSI'=>
'Déclarant pour son compte',
'TDP'=>
'Tiers déclarant');
132 print $form->selectarray(
'INTRACOMMREPORT_TYPE_ACTEUR', $arraychoices, $conf->global->INTRACOMMREPORT_TYPE_ACTEUR, 0);
136 print
'<tr class="oddeven">';
137 print
'<td>'.$langs->trans(
"INTRACOMMREPORT_ROLE_ACTEUR").
'</td>';
138 $arraychoices = array(
''=>$langs->trans(
"None"),
'sender'=>
'Emetteur',
'PSI'=>
'Déclarant');
140 print $form->selectarray(
'INTRACOMMREPORT_ROLE_ACTEUR', $arraychoices, $conf->global->INTRACOMMREPORT_ROLE_ACTEUR, 0);
144 print
'<tr class="oddeven">';
145 print
'<td>'.$langs->trans(
"INTRACOMMREPORT_NIV_OBLIGATION_INTRODUCTION").
'</td>';
146 $arraychoices = array(1=>
'Seuil de 460 000 €', 2=>
'En dessous de 460 000 €');
148 print $form->selectarray(
'INTRACOMMREPORT_NIV_OBLIGATION_INTRODUCTION', $arraychoices, $conf->global->INTRACOMMREPORT_NIV_OBLIGATION_INTRODUCTION, 0);
152 print
'<tr class="oddeven">';
153 print
'<td>'.$langs->trans(
"INTRACOMMREPORT_NIV_OBLIGATION_EXPEDITION").
'</td>';
154 $arraychoices = array(3=>
'Seuil de 460 000 €', 4=>
'En dessous de 460 000 €');
156 print $form->selectarray(
'INTRACOMMREPORT_NIV_OBLIGATION_EXPEDITION', $arraychoices, $conf->global->INTRACOMMREPORT_NIV_OBLIGATION_EXPEDITION, 0);
160 print
'<tr class="oddeven">';
161 print
'<td>'.$langs->trans(
"INTRACOMMREPORT_CATEG_FRAISDEPORT").
'</td>';
163 print $formother->select_categories(
'product', $conf->global->INTRACOMMREPORT_CATEG_FRAISDEPORT,
'INTRACOMMREPORT_CATEG_FRAISDEPORT');
172 print
'<table class="noborder" width="100%">';
173 print
'<tr class="liste_titre">';
174 print
'<td>'.$langs->trans(
"Description").
'</td>';
175 print
'<td>'.$langs->trans(
"Value").
'</td>';
178 foreach ($list_DES as $key)
180 print
'<tr class="oddeven value">';
183 $label = $langs->trans($key);
184 print
'<td>'.$label.
'</td>';
186 print
'<td class="left">';
187 print
'<input type="text" class="maxwidth100" id="'.$key.
'" name="'.$key.
'" value="'.$conf->global->$key.
'">';
195 print
'<div class="center">';
196 print
'<input type="submit" name="bt_save" class="butAction button-save" value="'.$langs->trans(
"Update").
'" />';
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
intracommReportAdminPrepareHead()
Prepare array with list of admin tabs.
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).
setEventMessages($mesg, $mesgs, $style= 'mesgs', $messagekey= '')
Set event messages in dol_events session object.
load_fiche_titre($titre, $morehtmlright= '', $picto= 'generic', $pictoisfullpath=0, $id= '', $morecssontable= '', $morehtmlcenter= '')
Load a title with picto.
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 ...
dol_get_fiche_head($links=array(), $active= '', $title= '', $notab=0, $picto= '', $pictoisfullpath=0, $morehtmlright= '', $morecss= '', $limittoshow=0, $moretabssuffix= '')
Show tabs of a record.
print
Draft customers invoices.
dol_get_fiche_end($notab=0)
Return tab footer of a card.