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()
|
function expedition_admin_prepare_head()
|
||||||
{
|
{
|
||||||
global $langs, $conf, $user;
|
global $langs, $conf, $user, $db;
|
||||||
$langs->load("sendings");
|
$langs->load("sendings");
|
||||||
|
|
||||||
|
$extrafields = new ExtraFields($db);
|
||||||
|
|
||||||
$h = 0;
|
$h = 0;
|
||||||
$head = array();
|
$head = array();
|
||||||
|
|
||||||
@ -87,23 +89,29 @@ function expedition_admin_prepare_head()
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
if (!empty($conf->global->MAIN_SUBMODULE_EXPEDITION)) {
|
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][0] = DOL_URL_ROOT."/admin/expedition.php";
|
||||||
$head[$h][1] = $langs->trans("Shipment");
|
$head[$h][1] = $langs->trans("Shipment");
|
||||||
$head[$h][2] = 'shipment';
|
$head[$h][2] = 'shipment';
|
||||||
$h++;
|
$h++;
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (!empty($conf->global->MAIN_SUBMODULE_EXPEDITION)) {
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/admin/expedition_extrafields.php';
|
$head[$h][0] = DOL_URL_ROOT.'/admin/expedition_extrafields.php';
|
||||||
$head[$h][1] = $langs->trans("ExtraFields");
|
$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';
|
$head[$h][2] = 'attributes_shipment';
|
||||||
$h++;
|
$h++;
|
||||||
}
|
|
||||||
|
|
||||||
if (!empty($conf->global->MAIN_SUBMODULE_EXPEDITION)) {
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/admin/expeditiondet_extrafields.php';
|
$head[$h][0] = DOL_URL_ROOT.'/admin/expeditiondet_extrafields.php';
|
||||||
$head[$h][1] = $langs->trans("ExtraFieldsLines");
|
$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';
|
$head[$h][2] = 'attributeslines_shipment';
|
||||||
$h++;
|
$h++;
|
||||||
}
|
}
|
||||||
@ -114,15 +122,24 @@ function expedition_admin_prepare_head()
|
|||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
if (!empty($conf->global->MAIN_SUBMODULE_DELIVERY)) {
|
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][0] = DOL_URL_ROOT.'/admin/delivery_extrafields.php';
|
||||||
$head[$h][1] = $langs->trans("ExtraFields");
|
$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';
|
$head[$h][2] = 'attributes_receivings';
|
||||||
$h++;
|
$h++;
|
||||||
}
|
|
||||||
|
|
||||||
if (!empty($conf->global->MAIN_SUBMODULE_DELIVERY)) {
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/admin/deliverydet_extrafields.php';
|
$head[$h][0] = DOL_URL_ROOT.'/admin/deliverydet_extrafields.php';
|
||||||
$head[$h][1] = $langs->trans("ExtraFieldsLines");
|
$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';
|
$head[$h][2] = 'attributeslines_receivings';
|
||||||
$h++;
|
$h++;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user