28 require
'../main.inc.php';
29 require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
30 require_once DOL_DOCUMENT_ROOT.
'/core/lib/expedition.lib.php';
33 $langs->loadLangs(array(
'admin',
'sendings',
'deliveries'));
38 $action =
GETPOST(
'action',
'aZ09');
46 if (!empty($conf->expedition->enabled) && empty($conf->global->MAIN_SUBMODULE_EXPEDITION))
49 dolibarr_set_const($db,
"MAIN_SUBMODULE_EXPEDITION",
"1",
'chaine', 0,
'', $conf->entity);
67 if ($action ==
'activate_delivery')
69 dolibarr_set_const($db,
"MAIN_SUBMODULE_EXPEDITION",
"1",
'chaine', 0,
'', $conf->entity);
70 dolibarr_set_const($db,
"MAIN_SUBMODULE_DELIVERY",
"1",
'chaine', 0,
'', $conf->entity);
71 header(
"Location: confexped.php");
73 } elseif ($action ==
'disable_delivery')
76 header(
"Location: confexped.php");
85 $dir = DOL_DOCUMENT_ROOT.
"/core/modules/expedition/";
86 $form =
new Form($db);
88 llxHeader(
"", $langs->trans(
"SendingsSetup"));
90 $linkback =
'<a href="'.DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToModuleList").
'</a>';
99 print
'<table class="noborder centpercent">';
100 print
'<tr class="liste_titre">';
101 print
'<td>'.$langs->trans(
"Feature").
'</td>';
102 print
'<td width="20"> </td>';
103 print
'<td class="center">'.$langs->trans(
"Status").
'</td>';
108 print
'<td>'.$langs->trans(
"SendingsAbility").
'</td>';
111 print
'<td class="center">';
112 print $langs->trans(
"Required");
127 print $langs->trans(
"DeliveriesOrderAbility");
128 print
'<br>'.info_admin($langs->trans(
"NoNeedForDeliveryReceipts"), 0, 1);
132 print
'<td class="center">';
134 if (empty($conf->global->MAIN_SUBMODULE_DELIVERY))
136 print
'<a href="confexped.php?action=activate_delivery">'.img_picto($langs->trans(
"Disabled"),
'switch_off').
'</a>';
138 print
'<a href="confexped.php?action=disable_delivery">'.img_picto($langs->trans(
"Enabled"),
'switch_on').
'</a>';
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
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).
expedition_admin_prepare_head()
Return array head with list of tabs to view object informations.
load_fiche_titre($titre, $morehtmlright= '', $picto= 'generic', $pictoisfullpath=0, $id= '', $morecssontable= '', $morehtmlcenter= '')
Load a title with picto.
dolibarr_del_const($db, $name, $entity=1)
Effacement d'une constante dans la base de donnees.
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.