dolibarr  7.0.0-beta
expedition.lib.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2006-2012 Laurent Destailleur <eldy@users.sourceforge.net>
3  * Copyright (C) 2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
4  * Copyright (C) 2010-2012 Regis Houssin <regis.houssin@capnetworks.com>
5  * Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
6  * Copyright (C) 2015 Claudio Aschieri <c.aschieri@19.coop>
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  * or see http://www.gnu.org/
21  */
22 
36 {
37  global $langs, $conf, $user;
38  if (! empty($conf->expedition->enabled)) $langs->load("sendings");
39  $langs->load("orders");
40 
41  $h = 0;
42  $head = array();
43  $h = 0;
44 
45  $head[$h][0] = DOL_URL_ROOT."/admin/confexped.php";
46  $head[$h][1] = $langs->trans("Setup");
47  $h++;
48 
49  $head[$h][0] = DOL_URL_ROOT."/admin/expedition.php";
50  $head[$h][1] = $langs->trans("Shipment");
51  $hselected=$h;
52  $h++;
53 
54  if (! empty($conf->global->MAIN_SUBMODULE_LIVRAISON))
55  {
56  $head[$h][0] = DOL_URL_ROOT."/admin/livraison.php";
57  $head[$h][1] = $langs->trans("Receivings");
58  $h++;
59  }
60 
61 
62  complete_head_from_modules($conf,$langs,$object,$head,$h,'order','remove');
63 
64  return $head;
65 }
66 
73 {
74  global $langs, $conf, $user;
75  $langs->load("sendings");
76 
77  $h = 0;
78  $head = array();
79 
80  $head[$h][0] = DOL_URL_ROOT."/admin/confexped.php";
81  $head[$h][1] = $langs->trans("Setup");
82  $head[$h][2] = 'general';
83  $h++;
84 
85 
86  if (! empty($conf->global->MAIN_SUBMODULE_EXPEDITION))
87  {
88  $head[$h][0] = DOL_URL_ROOT."/admin/expedition.php";
89  $head[$h][1] = $langs->trans("Shipment");
90  $head[$h][2] = 'shipment';
91  $h++;
92  }
93 
94 
95  if (! empty($conf->global->MAIN_SUBMODULE_EXPEDITION))
96  {
97  $head[$h][0] = DOL_URL_ROOT.'/admin/expedition_extrafields.php';
98  $head[$h][1] = $langs->trans("ExtraFields");
99  $head[$h][2] = 'attributes_shipment';
100  $h++;
101  }
102 
103  if (! empty($conf->global->MAIN_SUBMODULE_EXPEDITION))
104  {
105  $head[$h][0] = DOL_URL_ROOT.'/admin/expeditiondet_extrafields.php';
106  $head[$h][1] = $langs->trans("ExtraFieldsLines");
107  $head[$h][2] = 'attributeslines_shipment';
108  $h++;
109  }
110 
111  if (! empty($conf->global->MAIN_SUBMODULE_LIVRAISON))
112  {
113  $head[$h][0] = DOL_URL_ROOT."/admin/livraison.php";
114  $head[$h][1] = $langs->trans("Receivings");
115  $head[$h][2] = 'receivings';
116  $h++;
117  }
118 
119  if (! empty($conf->global->MAIN_SUBMODULE_LIVRAISON))
120  {
121  $head[$h][0] = DOL_URL_ROOT.'/admin/livraison_extrafields.php';
122  $head[$h][1] = $langs->trans("ExtraFields");
123  $head[$h][2] = 'attributes_receivings';
124  $h++;
125  }
126 
127  if (! empty($conf->global->MAIN_SUBMODULE_LIVRAISON))
128  {
129  $head[$h][0] = DOL_URL_ROOT.'/admin/livraisondet_extrafields.php';
130  $head[$h][1] = $langs->trans("ExtraFieldsLines");
131  $head[$h][2] = 'attributeslines_receivings';
132  $h++;
133  }
134 
135 
136 
137  complete_head_from_modules($conf,$langs,null,$head,$h,'expedition_admin','remove');
138 
139  return $head;
140 }
141 
142 
expedition_prepare_head(Expedition $object)
Prepare array with list of tabs.
complete_head_from_modules($conf, $langs, $object, &$head, &$h, $type, $mode='add')
Complete or removed entries into a head array (used to build tabs).
expedition_admin_prepare_head()
Return array head with list of tabs to view object informations.
Class to manage shipments.