mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Update expedition.lib.php
This commit is contained in:
parent
85d79edfe6
commit
141a321ff6
|
|
@ -73,9 +73,11 @@ function expedition_prepare_head(Expedition $object)
|
|||
*/
|
||||
function expedition_admin_prepare_head()
|
||||
{
|
||||
global $langs, $conf, $user;
|
||||
global $langs, $conf, $user, $db;
|
||||
$langs->load("sendings");
|
||||
|
||||
$extrafields = new ExtraFields($db);
|
||||
|
||||
$h = 0;
|
||||
$head = array();
|
||||
|
||||
|
|
@ -87,23 +89,29 @@ function expedition_admin_prepare_head()
|
|||
*/
|
||||
|
||||
if (!empty($conf->global->MAIN_SUBMODULE_EXPEDITION)) {
|
||||
$extrafields->fetch_name_optionals_label('expedition');
|
||||
$extrafields->fetch_name_optionals_label('expeditiondet');
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT."/admin/expedition.php";
|
||||
$head[$h][1] = $langs->trans("Shipment");
|
||||
$head[$h][2] = 'shipment';
|
||||
$h++;
|
||||
}
|
||||
|
||||
|
||||
if (!empty($conf->global->MAIN_SUBMODULE_EXPEDITION)) {
|
||||
$head[$h][0] = DOL_URL_ROOT.'/admin/expedition_extrafields.php';
|
||||
$head[$h][1] = $langs->trans("ExtraFields");
|
||||
$nbExtrafields = $extrafields->attributes['expedition']['count'];
|
||||
if ($nbExtrafields > 0) {
|
||||
$head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbExtrafields.'</span>';
|
||||
}
|
||||
$head[$h][2] = 'attributes_shipment';
|
||||
$h++;
|
||||
}
|
||||
|
||||
if (!empty($conf->global->MAIN_SUBMODULE_EXPEDITION)) {
|
||||
$head[$h][0] = DOL_URL_ROOT.'/admin/expeditiondet_extrafields.php';
|
||||
$head[$h][1] = $langs->trans("ExtraFieldsLines");
|
||||
$nbExtrafields = $extrafields->attributes['expeditiondet']['count'];
|
||||
if ($nbExtrafields > 0) {
|
||||
$head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbExtrafields.'</span>';
|
||||
}
|
||||
$head[$h][2] = 'attributeslines_shipment';
|
||||
$h++;
|
||||
}
|
||||
|
|
@ -114,15 +122,24 @@ function expedition_admin_prepare_head()
|
|||
$h++;
|
||||
|
||||
if (!empty($conf->global->MAIN_SUBMODULE_DELIVERY)) {
|
||||
$extrafields->fetch_name_optionals_label('delivery');
|
||||
$extrafields->fetch_name_optionals_label('deliverydet');
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/admin/delivery_extrafields.php';
|
||||
$head[$h][1] = $langs->trans("ExtraFields");
|
||||
$nbExtrafields = $extrafields->attributes['delivery']['count'];
|
||||
if ($nbExtrafields > 0) {
|
||||
$head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbExtrafields.'</span>';
|
||||
}
|
||||
$head[$h][2] = 'attributes_receivings';
|
||||
$h++;
|
||||
}
|
||||
|
||||
if (!empty($conf->global->MAIN_SUBMODULE_DELIVERY)) {
|
||||
$head[$h][0] = DOL_URL_ROOT.'/admin/deliverydet_extrafields.php';
|
||||
$head[$h][1] = $langs->trans("ExtraFieldsLines");
|
||||
$nbExtrafields = $extrafields->attributes['deliverydet']['count'];
|
||||
if ($nbExtrafields > 0) {
|
||||
$head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbExtrafields.'</span>';
|
||||
}
|
||||
$head[$h][2] = 'attributeslines_receivings';
|
||||
$h++;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user