26require
'../../main.inc.php';
27require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
28require_once DOL_DOCUMENT_ROOT.
'/core/lib/intracommreport.lib.php';
29require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
32$langs->loadLangs(array(
"admin",
"intracommreport"));
40$action =
GETPOST(
'action',
'aZ09');
44 'INTRACOMMREPORT_NUM_AGREMENT',
48 'INTRACOMMREPORT_NUM_DECLARATION',
51if ($action ==
'update') {
55 foreach ($list_DEB as $constname) {
56 $constvalue =
GETPOST($constname,
'alpha');
58 if (!
dolibarr_set_const($db, $constname, $constvalue,
'chaine', 0,
'', $conf->entity)) {
63 foreach ($list_DES as $constname) {
64 $constvalue =
GETPOST($constname,
'alpha');
66 if (!
dolibarr_set_const($db, $constname, $constvalue,
'chaine', 0,
'', $conf->entity)) {
71 dolibarr_set_const($db,
"INTRACOMMREPORT_TYPE_ACTEUR",
GETPOST(
"INTRACOMMREPORT_TYPE_ACTEUR",
'alpha'),
'chaine', 0,
'', $conf->entity);
72 dolibarr_set_const($db,
"INTRACOMMREPORT_ROLE_ACTEUR",
GETPOST(
"INTRACOMMREPORT_ROLE_ACTEUR",
'alpha'),
'chaine', 0,
'', $conf->entity);
73 dolibarr_set_const($db,
"INTRACOMMREPORT_NIV_OBLIGATION_INTRODUCTION",
GETPOST(
"INTRACOMMREPORT_NIV_OBLIGATION_INTRODUCTION",
'alpha'),
'chaine', 0,
'', $conf->entity);
74 dolibarr_set_const($db,
"INTRACOMMREPORT_NIV_OBLIGATION_EXPEDITION",
GETPOST(
"INTRACOMMREPORT_NIV_OBLIGATION_EXPEDITION",
'alpha'),
'chaine', 0,
'', $conf->entity);
75 dolibarr_set_const($db,
"INTRACOMMREPORT_CATEG_FRAISDEPORT",
GETPOST(
"INTRACOMMREPORT_CATEG_FRAISDEPORT",
'alpha'),
'chaine', 0,
'', $conf->entity);
95llxHeader(
'', $langs->trans(
"IntracommReportSetup"));
97$linkback =
'<a href="'.DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToModuleList").
'</a>';
98print
load_fiche_titre($langs->trans(
"IntracommReportSetup"), $linkback,
'title_setup');
102print
dol_get_fiche_head($head,
'general', $langs->trans(
"IntracommReport"), -1,
"intracommreport");
104print
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="post">';
105print
'<input type="hidden" name="token" value="'.newToken().
'">';
106print
'<input type="hidden" name="action" value="update">';
110print
'<table class="noborder" width="100%">';
111print
'<tr class="liste_titre">';
112print
'<td>'.$langs->trans(
"Description").
'</td>';
113print
'<td>'.$langs->trans(
"Value").
'</td>';
116foreach ($list_DEB as $key) {
117 print
'<tr class="oddeven value">';
120 $label = $langs->trans($key);
121 print
'<td>'.$label.
'</td>';
123 print
'<td class="left">';
124 print
'<input type="text" class="maxwidth100" id="'.$key.
'" name="'.$key.
'" value="'.
getDolGlobalString($key).
'">';
130print
'<tr class="oddeven">';
131print
'<td>'.$langs->trans(
"INTRACOMMREPORT_TYPE_ACTEUR").
'</td>';
132$arraychoices = array(
''=>$langs->trans(
"None"),
'PSI'=>
'Déclarant pour son compte',
'TDP'=>
'Tiers déclarant');
134print $form->selectarray(
'INTRACOMMREPORT_TYPE_ACTEUR', $arraychoices, $conf->global->INTRACOMMREPORT_TYPE_ACTEUR, 0);
138print
'<tr class="oddeven">';
139print
'<td>'.$langs->trans(
"INTRACOMMREPORT_ROLE_ACTEUR").
'</td>';
140$arraychoices = array(
''=>$langs->trans(
"None"),
'sender'=>
'Emetteur',
'PSI'=>
'Déclarant');
142print $form->selectarray(
'INTRACOMMREPORT_ROLE_ACTEUR', $arraychoices, $conf->global->INTRACOMMREPORT_ROLE_ACTEUR, 0);
146print
'<tr class="oddeven">';
147print
'<td>'.$langs->trans(
"INTRACOMMREPORT_NIV_OBLIGATION_INTRODUCTION").
'</td>';
148$arraychoices = array(1=>
'Seuil de 460 000 €', 2=>
'En dessous de 460 000 €');
150print $form->selectarray(
'INTRACOMMREPORT_NIV_OBLIGATION_INTRODUCTION', $arraychoices, $conf->global->INTRACOMMREPORT_NIV_OBLIGATION_INTRODUCTION, 0);
154print
'<tr class="oddeven">';
155print
'<td>'.$langs->trans(
"INTRACOMMREPORT_NIV_OBLIGATION_EXPEDITION").
'</td>';
156$arraychoices = array(3=>
'Seuil de 460 000 €', 4=>
'En dessous de 460 000 €');
158print $form->selectarray(
'INTRACOMMREPORT_NIV_OBLIGATION_EXPEDITION', $arraychoices, $conf->global->INTRACOMMREPORT_NIV_OBLIGATION_EXPEDITION, 0);
162print
'<tr class="oddeven">';
163print
'<td>'.$langs->trans(
"INTRACOMMREPORT_CATEG_FRAISDEPORT").
'</td>';
165print $formother->select_categories(
'product', $conf->global->INTRACOMMREPORT_CATEG_FRAISDEPORT,
'INTRACOMMREPORT_CATEG_FRAISDEPORT');
174print
'<table class="noborder" width="100%">';
175print
'<tr class="liste_titre">';
176print
'<td>'.$langs->trans(
"Description").
'</td>';
177print
'<td>'.$langs->trans(
"Value").
'</td>';
180foreach ($list_DES as $key) {
181 print
'<tr class="oddeven value">';
184 $label = $langs->trans($key);
185 print
'<td>'.$label.
'</td>';
187 print
'<td class="left">';
188 print
'<input type="text" class="maxwidth100" id="'.$key.
'" name="'.$key.
'" value="'.
getDolGlobalString($key).
'">';
196print
'<div class="center">';
197print
'<input type="submit" name="bt_save" class="butAction button-save" value="'.$langs->trans(
"Update").
'" />';
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()
Empty header.
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0)
Show tabs of a record.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0)
Set event messages in dol_events session object.
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
intracommReportAdminPrepareHead()
Prepare array with list of admin tabs.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.