28require
'../../main.inc.php';
29require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
30require_once DOL_DOCUMENT_ROOT.
'/intracommreport/lib/intracommreport.lib.php';
31require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
42$langs->loadLangs(array(
"admin",
"intracommreport"));
50$action =
GETPOST(
'action',
'aZ09');
54 'INTRACOMMREPORT_NUM_AGREMENT',
58 'INTRACOMMREPORT_NUM_DECLARATION',
61if ($action ==
'update') {
65 foreach ($list_DEB as $constname) {
66 $constvalue =
GETPOST($constname,
'alpha');
73 foreach ($list_DES as $constname) {
74 $constvalue =
GETPOST($constname,
'alpha');
83 dolibarr_set_const($db,
"INTRACOMMREPORT_NIV_OBLIGATION_INTRODUCTION",
GETPOST(
"INTRACOMMREPORT_NIV_OBLIGATION_INTRODUCTION",
'alpha'),
'chaine', 0,
'',
$conf->entity);
84 dolibarr_set_const($db,
"INTRACOMMREPORT_NIV_OBLIGATION_EXPEDITION",
GETPOST(
"INTRACOMMREPORT_NIV_OBLIGATION_EXPEDITION",
'alpha'),
'chaine', 0,
'',
$conf->entity);
85 dolibarr_set_const($db,
"INTRACOMMREPORT_CATEG_FRAISDEPORT",
GETPOST(
"INTRACOMMREPORT_CATEG_FRAISDEPORT",
'alpha'),
'chaine', 0,
'',
$conf->entity);
102$form =
new Form($db);
105llxHeader(
'', $langs->trans(
"IntracommReportSetup"),
'',
'', 0, 0,
'',
'',
'',
'mod-intracommreport page-admin_intracommreport');
107$linkback =
'<a href="'.DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToModuleList").
'</a>';
108print
load_fiche_titre($langs->trans(
"IntracommReportSetup"), $linkback,
'title_setup');
112print
dol_get_fiche_head($head,
'general', $langs->trans(
"IntracommReport"), -1,
"intracommreport");
114print
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="post">';
115print
'<input type="hidden" name="token" value="'.newToken().
'">';
116print
'<input type="hidden" name="action" value="update">';
120print
'<table class="noborder" width="100%">';
121print
'<tr class="liste_titre">';
122print
'<td>'.$langs->trans(
"Description").
'</td>';
123print
'<td>'.$langs->trans(
"Value").
'</td>';
126foreach ($list_DEB as $key) {
127 print
'<tr class="oddeven value">';
130 $label = $langs->trans($key);
131 print
'<td>'.$label.
'</td>';
133 print
'<td class="left">';
134 print
'<input type="text" class="maxwidth100" id="'.$key.
'" name="'.$key.
'" value="'.
getDolGlobalString($key).
'">';
140print
'<tr class="oddeven">';
141print
'<td>'.$langs->trans(
"INTRACOMMREPORT_TYPE_ACTEUR").
'</td>';
142$arraychoices = array(
'' => $langs->trans(
"None"),
'PSI' =>
'Déclarant pour son compte',
'TDP' =>
'Tiers déclarant');
144print $form->selectarray(
'INTRACOMMREPORT_TYPE_ACTEUR', $arraychoices,
$conf->global->INTRACOMMREPORT_TYPE_ACTEUR, 0);
148print
'<tr class="oddeven">';
149print
'<td>'.$langs->trans(
"INTRACOMMREPORT_ROLE_ACTEUR").
'</td>';
150$arraychoices = array(
'' => $langs->trans(
"None"),
'sender' =>
'Emetteur',
'PSI' =>
'Déclarant');
152print $form->selectarray(
'INTRACOMMREPORT_ROLE_ACTEUR', $arraychoices,
$conf->global->INTRACOMMREPORT_ROLE_ACTEUR, 0);
156print
'<tr class="oddeven">';
157print
'<td>'.$langs->trans(
"INTRACOMMREPORT_NIV_OBLIGATION_INTRODUCTION").
'</td>';
158$arraychoices = array(1 =>
'Seuil de 460 000 €', 2 =>
'En dessous de 460 000 €');
160print $form->selectarray(
'INTRACOMMREPORT_NIV_OBLIGATION_INTRODUCTION', $arraychoices,
$conf->global->INTRACOMMREPORT_NIV_OBLIGATION_INTRODUCTION, 0);
164print
'<tr class="oddeven">';
165print
'<td>'.$langs->trans(
"INTRACOMMREPORT_NIV_OBLIGATION_EXPEDITION").
'</td>';
166$arraychoices = array(3 =>
'Seuil de 460 000 €', 4 =>
'En dessous de 460 000 €');
168print $form->selectarray(
'INTRACOMMREPORT_NIV_OBLIGATION_EXPEDITION', $arraychoices,
$conf->global->INTRACOMMREPORT_NIV_OBLIGATION_EXPEDITION, 0);
172print
'<tr class="oddeven">';
173print
'<td>'.$langs->trans(
"INTRACOMMREPORT_CATEG_FRAISDEPORT").
'</td>';
175print $formother->select_categories(
'product',
$conf->global->INTRACOMMREPORT_CATEG_FRAISDEPORT,
'INTRACOMMREPORT_CATEG_FRAISDEPORT');
184print
'<table class="noborder" width="100%">';
185print
'<tr class="liste_titre">';
186print
'<td>'.$langs->trans(
"Description").
'</td>';
187print
'<td>'.$langs->trans(
"Value").
'</td>';
190foreach ($list_DES as $key) {
191 print
'<tr class="oddeven value">';
194 $label = $langs->trans($key);
195 print
'<td>'.$label.
'</td>';
197 print
'<td class="left">';
198 print
'<input type="text" class="maxwidth100" id="'.$key.
'" name="'.$key.
'" value="'.
getDolGlobalString($key).
'">';
206print
'<div class="center">';
207print
'<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($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.
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.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
intracommreportAdminPrepareHead()
Prepare admin pages header.
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.