@@ -49,157 +49,157 @@ discard block |
||
49 | 49 | */ |
50 | 50 | function print_actions_filter($form, $canedit, $status, $year, $month, $day, $showbirthday, $filtera, $filtert, $filterd, $pid, $socid, $action, $showextcals=array(), $actioncode='', $usergroupid='', $excludetype='', $resourceid=0) |
51 | 51 | { |
52 | - global $conf, $user, $langs, $db, $hookmanager; |
|
53 | - global $begin_h, $end_h, $begin_d, $end_d; |
|
54 | - |
|
55 | - $langs->load("companies"); |
|
56 | - |
|
57 | - include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php'; |
|
58 | - $formactions=new FormActions($db); |
|
59 | - |
|
60 | - // Filters |
|
61 | - //print '<form name="listactionsfilter" class="listactionsfilter" action="' . $_SERVER["PHP_SELF"] . '" method="get">'; |
|
62 | - print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">'; |
|
63 | - print '<input type="hidden" name="year" value="' . $year . '">'; |
|
64 | - print '<input type="hidden" name="month" value="' . $month . '">'; |
|
65 | - print '<input type="hidden" name="day" value="' . $day . '">'; |
|
66 | - print '<input type="hidden" name="action" value="' . $action . '">'; |
|
67 | - print '<input type="hidden" name="search_showbirthday" value="' . $showbirthday . '">'; |
|
68 | - |
|
69 | - print '<div class="fichecenter">'; |
|
70 | - |
|
71 | - if ($conf->browser->layout == 'phone') print '<div class="fichehalfleft">'; |
|
72 | - else print '<table class="nobordernopadding" width="100%"><tr><td class="borderright">'; |
|
73 | - |
|
74 | - print '<table class="nobordernopadding centpercent">'; |
|
75 | - |
|
76 | - if ($canedit) |
|
77 | - { |
|
78 | - print '<tr>'; |
|
79 | - print '<td class="nowrap" style="padding-bottom: 2px; padding-right: 4px;">'; |
|
80 | - print $langs->trans("ActionsToDoBy").' '; |
|
81 | - print '</td><td style="padding-bottom: 2px; padding-right: 4px;">'; |
|
82 | - print $form->select_dolusers($filtert, 'search_filtert', 1, '', ! $canedit, '', '', 0, 0, 0, '', 0, '', 'maxwidth300'); |
|
83 | - if (empty($conf->dol_optimize_smallscreen)) print ' '.$langs->trans("or") . ' '.$langs->trans("ToUserOfGroup").' '; |
|
84 | - print $form->select_dolgroups($usergroupid, 'usergroup', 1, '', ! $canedit); |
|
85 | - print '</td></tr>'; |
|
86 | - |
|
87 | - if ($conf->resource->enabled) |
|
88 | - { |
|
89 | - include_once DOL_DOCUMENT_ROOT . '/resource/class/html.formresource.class.php'; |
|
90 | - $formresource=new FormResource($db); |
|
91 | - |
|
92 | - // Resource |
|
93 | - print '<tr>'; |
|
94 | - print '<td class="nowrap" style="padding-bottom: 2px; padding-right: 4px;">'; |
|
95 | - print $langs->trans("Resource"); |
|
96 | - print ' </td><td class="nowrap maxwidthonsmartphone" style="padding-bottom: 2px; padding-right: 4px;">'; |
|
52 | + global $conf, $user, $langs, $db, $hookmanager; |
|
53 | + global $begin_h, $end_h, $begin_d, $end_d; |
|
54 | + |
|
55 | + $langs->load("companies"); |
|
56 | + |
|
57 | + include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php'; |
|
58 | + $formactions=new FormActions($db); |
|
59 | + |
|
60 | + // Filters |
|
61 | + //print '<form name="listactionsfilter" class="listactionsfilter" action="' . $_SERVER["PHP_SELF"] . '" method="get">'; |
|
62 | + print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">'; |
|
63 | + print '<input type="hidden" name="year" value="' . $year . '">'; |
|
64 | + print '<input type="hidden" name="month" value="' . $month . '">'; |
|
65 | + print '<input type="hidden" name="day" value="' . $day . '">'; |
|
66 | + print '<input type="hidden" name="action" value="' . $action . '">'; |
|
67 | + print '<input type="hidden" name="search_showbirthday" value="' . $showbirthday . '">'; |
|
68 | + |
|
69 | + print '<div class="fichecenter">'; |
|
70 | + |
|
71 | + if ($conf->browser->layout == 'phone') print '<div class="fichehalfleft">'; |
|
72 | + else print '<table class="nobordernopadding" width="100%"><tr><td class="borderright">'; |
|
73 | + |
|
74 | + print '<table class="nobordernopadding centpercent">'; |
|
75 | + |
|
76 | + if ($canedit) |
|
77 | + { |
|
78 | + print '<tr>'; |
|
79 | + print '<td class="nowrap" style="padding-bottom: 2px; padding-right: 4px;">'; |
|
80 | + print $langs->trans("ActionsToDoBy").' '; |
|
81 | + print '</td><td style="padding-bottom: 2px; padding-right: 4px;">'; |
|
82 | + print $form->select_dolusers($filtert, 'search_filtert', 1, '', ! $canedit, '', '', 0, 0, 0, '', 0, '', 'maxwidth300'); |
|
83 | + if (empty($conf->dol_optimize_smallscreen)) print ' '.$langs->trans("or") . ' '.$langs->trans("ToUserOfGroup").' '; |
|
84 | + print $form->select_dolgroups($usergroupid, 'usergroup', 1, '', ! $canedit); |
|
85 | + print '</td></tr>'; |
|
86 | + |
|
87 | + if ($conf->resource->enabled) |
|
88 | + { |
|
89 | + include_once DOL_DOCUMENT_ROOT . '/resource/class/html.formresource.class.php'; |
|
90 | + $formresource=new FormResource($db); |
|
91 | + |
|
92 | + // Resource |
|
93 | + print '<tr>'; |
|
94 | + print '<td class="nowrap" style="padding-bottom: 2px; padding-right: 4px;">'; |
|
95 | + print $langs->trans("Resource"); |
|
96 | + print ' </td><td class="nowrap maxwidthonsmartphone" style="padding-bottom: 2px; padding-right: 4px;">'; |
|
97 | 97 | print $formresource->select_resource_list($resourceid, "search_resourceid", '', 1, 0, 0, null, '', 2); |
98 | - print '</td></tr>'; |
|
99 | - } |
|
100 | - |
|
101 | - // Type |
|
102 | - print '<tr>'; |
|
103 | - print '<td class="nowrap" style="padding-bottom: 2px; padding-right: 4px;">'; |
|
104 | - print $langs->trans("Type"); |
|
105 | - print ' </td><td class="nowrap" style="padding-bottom: 2px; padding-right: 4px;">'; |
|
106 | - $multiselect=0; |
|
107 | - if (! empty($conf->global->MAIN_ENABLE_MULTISELECT_TYPE)) // We use an option here because it adds bugs when used on agenda page "peruser" and "list" |
|
108 | - { |
|
98 | + print '</td></tr>'; |
|
99 | + } |
|
100 | + |
|
101 | + // Type |
|
102 | + print '<tr>'; |
|
103 | + print '<td class="nowrap" style="padding-bottom: 2px; padding-right: 4px;">'; |
|
104 | + print $langs->trans("Type"); |
|
105 | + print ' </td><td class="nowrap" style="padding-bottom: 2px; padding-right: 4px;">'; |
|
106 | + $multiselect=0; |
|
107 | + if (! empty($conf->global->MAIN_ENABLE_MULTISELECT_TYPE)) // We use an option here because it adds bugs when used on agenda page "peruser" and "list" |
|
108 | + { |
|
109 | 109 | $multiselect=(!empty($conf->global->AGENDA_USE_EVENT_TYPE)); |
110 | - } |
|
110 | + } |
|
111 | 111 | print $formactions->select_type_actions($actioncode, "search_actioncode", $excludetype, (empty($conf->global->AGENDA_USE_EVENT_TYPE)?1:-1), 0, $multiselect); |
112 | - print '</td></tr>'; |
|
113 | - } |
|
114 | - |
|
115 | - if (! empty($conf->societe->enabled) && $user->rights->societe->lire) |
|
116 | - { |
|
117 | - print '<tr>'; |
|
118 | - print '<td class="nowrap" style="padding-bottom: 2px; padding-right: 4px;">'; |
|
119 | - print $langs->trans("ThirdParty").' '; |
|
120 | - print '</td><td class="nowrap" style="padding-bottom: 2px;">'; |
|
121 | - print $form->select_company($socid, 'search_socid', '', 'SelectThirdParty', 0, 0, null, 0); |
|
122 | - print '</td></tr>'; |
|
123 | - } |
|
124 | - |
|
125 | - if (! empty($conf->projet->enabled) && $user->rights->projet->lire) |
|
126 | - { |
|
127 | - require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; |
|
128 | - $formproject=new FormProjets($db); |
|
129 | - |
|
130 | - print '<tr>'; |
|
131 | - print '<td class="nowrap" style="padding-bottom: 2px;">'; |
|
132 | - print $langs->trans("Project").' '; |
|
133 | - print '</td><td class="nowrap" style="padding-bottom: 2px;">'; |
|
134 | - print $formproject->select_projects($socid?$socid:-1, $pid, 'search_projectid', 0, 0, 1, 0, 0, 0, 0, '', 1, 0, 'maxwidth500'); |
|
135 | - print '</td></tr>'; |
|
136 | - } |
|
137 | - |
|
138 | - if ($canedit && ! preg_match('/list/', $_SERVER["PHP_SELF"])) |
|
139 | - { |
|
140 | - // Status |
|
141 | - print '<tr>'; |
|
142 | - print '<td class="nowrap" style="padding-bottom: 2px; padding-right: 4px;">'; |
|
143 | - print $langs->trans("Status"); |
|
144 | - print ' </td><td class="nowrap" style="padding-bottom: 2px; padding-right: 4px;">'; |
|
145 | - $formactions->form_select_status_action('formaction', $status, 1, 'search_status', 1, 2, 'minwidth100'); |
|
146 | - print '</td></tr>'; |
|
147 | - } |
|
148 | - |
|
149 | - if ($canedit && $action == 'show_peruser') |
|
150 | - { |
|
151 | - // Filter on hours |
|
152 | - print '<tr>'; |
|
153 | - print '<td class="nowrap" style="padding-bottom: 2px; padding-right: 4px;">'.$langs->trans("VisibleTimeRange").'</td>'; |
|
154 | - print "<td class='nowrap'>"; |
|
155 | - print '<div class="ui-grid-a"><div class="ui-block-a">'; |
|
156 | - print '<input type="number" class="short" name="begin_h" value="'.$begin_h.'" min="0" max="23">'; |
|
157 | - if (empty($conf->dol_use_jmobile)) print ' - '; |
|
158 | - else print '</div><div class="ui-block-b">'; |
|
159 | - print '<input type="number" class="short" name="end_h" value="'.$end_h.'" min="1" max="24">'; |
|
160 | - if (empty($conf->dol_use_jmobile)) print ' '.$langs->trans("H"); |
|
161 | - print '</div></div>'; |
|
162 | - print '</td></tr>'; |
|
163 | - |
|
164 | - // Filter on days |
|
165 | - print '<tr>'; |
|
166 | - print '<td class="nowrap">'.$langs->trans("VisibleDaysRange").'</td>'; |
|
167 | - print "<td class='nowrap'>"; |
|
168 | - print '<div class="ui-grid-a"><div class="ui-block-a">'; |
|
169 | - print '<input type="number" class="short" name="begin_d" value="'.$begin_d.'" min="1" max="7">'; |
|
170 | - if (empty($conf->dol_use_jmobile)) print ' - '; |
|
171 | - else print '</div><div class="ui-block-b">'; |
|
172 | - print '<input type="number" class="short" name="end_d" value="'.$end_d.'" min="1" max="7">'; |
|
173 | - print '</div></div>'; |
|
174 | - print '</td></tr>'; |
|
175 | - } |
|
176 | - |
|
177 | - // Hooks |
|
178 | - $parameters = array('canedit'=>$canedit, 'pid'=>$pid, 'socid'=>$socid); |
|
179 | - $reshook = $hookmanager->executeHooks('searchAgendaFrom', $parameters, $object, $action); // Note that $action and $object may have been |
|
180 | - |
|
181 | - print '</table>'; |
|
182 | - |
|
183 | - if ($conf->browser->layout == 'phone') print '</div>'; |
|
184 | - else print '</td>'; |
|
185 | - |
|
186 | - if ($conf->browser->layout == 'phone') print '<div class="fichehalfright">'; |
|
187 | - else print '<td align="center" valign="middle" class="nowrap">'; |
|
188 | - |
|
189 | - print '<table class="centpercent"><tr><td align="center">'; |
|
190 | - print '<div class="formleftzone">'; |
|
191 | - print '<input type="submit" class="button" style="min-width:120px" name="refresh" value="' . $langs->trans("Refresh") . '">'; |
|
192 | - print '</div>'; |
|
193 | - print '</td></tr>'; |
|
194 | - print '</table>'; |
|
195 | - |
|
196 | - if ($conf->browser->layout == 'phone') print '</div>'; |
|
197 | - else print '</td></tr></table>'; |
|
198 | - |
|
199 | - print '</div>'; // Close fichecenter |
|
200 | - print '<div style="clear:both"></div>'; |
|
201 | - |
|
202 | - //print '</form>'; |
|
112 | + print '</td></tr>'; |
|
113 | + } |
|
114 | + |
|
115 | + if (! empty($conf->societe->enabled) && $user->rights->societe->lire) |
|
116 | + { |
|
117 | + print '<tr>'; |
|
118 | + print '<td class="nowrap" style="padding-bottom: 2px; padding-right: 4px;">'; |
|
119 | + print $langs->trans("ThirdParty").' '; |
|
120 | + print '</td><td class="nowrap" style="padding-bottom: 2px;">'; |
|
121 | + print $form->select_company($socid, 'search_socid', '', 'SelectThirdParty', 0, 0, null, 0); |
|
122 | + print '</td></tr>'; |
|
123 | + } |
|
124 | + |
|
125 | + if (! empty($conf->projet->enabled) && $user->rights->projet->lire) |
|
126 | + { |
|
127 | + require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; |
|
128 | + $formproject=new FormProjets($db); |
|
129 | + |
|
130 | + print '<tr>'; |
|
131 | + print '<td class="nowrap" style="padding-bottom: 2px;">'; |
|
132 | + print $langs->trans("Project").' '; |
|
133 | + print '</td><td class="nowrap" style="padding-bottom: 2px;">'; |
|
134 | + print $formproject->select_projects($socid?$socid:-1, $pid, 'search_projectid', 0, 0, 1, 0, 0, 0, 0, '', 1, 0, 'maxwidth500'); |
|
135 | + print '</td></tr>'; |
|
136 | + } |
|
137 | + |
|
138 | + if ($canedit && ! preg_match('/list/', $_SERVER["PHP_SELF"])) |
|
139 | + { |
|
140 | + // Status |
|
141 | + print '<tr>'; |
|
142 | + print '<td class="nowrap" style="padding-bottom: 2px; padding-right: 4px;">'; |
|
143 | + print $langs->trans("Status"); |
|
144 | + print ' </td><td class="nowrap" style="padding-bottom: 2px; padding-right: 4px;">'; |
|
145 | + $formactions->form_select_status_action('formaction', $status, 1, 'search_status', 1, 2, 'minwidth100'); |
|
146 | + print '</td></tr>'; |
|
147 | + } |
|
148 | + |
|
149 | + if ($canedit && $action == 'show_peruser') |
|
150 | + { |
|
151 | + // Filter on hours |
|
152 | + print '<tr>'; |
|
153 | + print '<td class="nowrap" style="padding-bottom: 2px; padding-right: 4px;">'.$langs->trans("VisibleTimeRange").'</td>'; |
|
154 | + print "<td class='nowrap'>"; |
|
155 | + print '<div class="ui-grid-a"><div class="ui-block-a">'; |
|
156 | + print '<input type="number" class="short" name="begin_h" value="'.$begin_h.'" min="0" max="23">'; |
|
157 | + if (empty($conf->dol_use_jmobile)) print ' - '; |
|
158 | + else print '</div><div class="ui-block-b">'; |
|
159 | + print '<input type="number" class="short" name="end_h" value="'.$end_h.'" min="1" max="24">'; |
|
160 | + if (empty($conf->dol_use_jmobile)) print ' '.$langs->trans("H"); |
|
161 | + print '</div></div>'; |
|
162 | + print '</td></tr>'; |
|
163 | + |
|
164 | + // Filter on days |
|
165 | + print '<tr>'; |
|
166 | + print '<td class="nowrap">'.$langs->trans("VisibleDaysRange").'</td>'; |
|
167 | + print "<td class='nowrap'>"; |
|
168 | + print '<div class="ui-grid-a"><div class="ui-block-a">'; |
|
169 | + print '<input type="number" class="short" name="begin_d" value="'.$begin_d.'" min="1" max="7">'; |
|
170 | + if (empty($conf->dol_use_jmobile)) print ' - '; |
|
171 | + else print '</div><div class="ui-block-b">'; |
|
172 | + print '<input type="number" class="short" name="end_d" value="'.$end_d.'" min="1" max="7">'; |
|
173 | + print '</div></div>'; |
|
174 | + print '</td></tr>'; |
|
175 | + } |
|
176 | + |
|
177 | + // Hooks |
|
178 | + $parameters = array('canedit'=>$canedit, 'pid'=>$pid, 'socid'=>$socid); |
|
179 | + $reshook = $hookmanager->executeHooks('searchAgendaFrom', $parameters, $object, $action); // Note that $action and $object may have been |
|
180 | + |
|
181 | + print '</table>'; |
|
182 | + |
|
183 | + if ($conf->browser->layout == 'phone') print '</div>'; |
|
184 | + else print '</td>'; |
|
185 | + |
|
186 | + if ($conf->browser->layout == 'phone') print '<div class="fichehalfright">'; |
|
187 | + else print '<td align="center" valign="middle" class="nowrap">'; |
|
188 | + |
|
189 | + print '<table class="centpercent"><tr><td align="center">'; |
|
190 | + print '<div class="formleftzone">'; |
|
191 | + print '<input type="submit" class="button" style="min-width:120px" name="refresh" value="' . $langs->trans("Refresh") . '">'; |
|
192 | + print '</div>'; |
|
193 | + print '</td></tr>'; |
|
194 | + print '</table>'; |
|
195 | + |
|
196 | + if ($conf->browser->layout == 'phone') print '</div>'; |
|
197 | + else print '</td></tr></table>'; |
|
198 | + |
|
199 | + print '</div>'; // Close fichecenter |
|
200 | + print '<div style="clear:both"></div>'; |
|
201 | + |
|
202 | + //print '</form>'; |
|
203 | 203 | } |
204 | 204 | |
205 | 205 | |
@@ -211,42 +211,42 @@ discard block |
||
211 | 211 | */ |
212 | 212 | function show_array_actions_to_do($max=5) |
213 | 213 | { |
214 | - global $langs, $conf, $user, $db, $bc, $socid; |
|
214 | + global $langs, $conf, $user, $db, $bc, $socid; |
|
215 | 215 | |
216 | - $now=dol_now(); |
|
216 | + $now=dol_now(); |
|
217 | 217 | |
218 | - include_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; |
|
219 | - include_once DOL_DOCUMENT_ROOT.'/societe/class/client.class.php'; |
|
218 | + include_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; |
|
219 | + include_once DOL_DOCUMENT_ROOT.'/societe/class/client.class.php'; |
|
220 | 220 | |
221 | - $sql = "SELECT a.id, a.label, a.datep as dp, a.datep2 as dp2, a.fk_user_author, a.percent,"; |
|
222 | - $sql.= " c.code, c.libelle as type_label,"; |
|
223 | - $sql.= " s.nom as sname, s.rowid, s.client"; |
|
224 | - $sql.= " FROM ".MAIN_DB_PREFIX."actioncomm as a LEFT JOIN "; |
|
225 | - $sql.= " ".MAIN_DB_PREFIX."c_actioncomm as c ON c.id = a.fk_action"; |
|
221 | + $sql = "SELECT a.id, a.label, a.datep as dp, a.datep2 as dp2, a.fk_user_author, a.percent,"; |
|
222 | + $sql.= " c.code, c.libelle as type_label,"; |
|
223 | + $sql.= " s.nom as sname, s.rowid, s.client"; |
|
224 | + $sql.= " FROM ".MAIN_DB_PREFIX."actioncomm as a LEFT JOIN "; |
|
225 | + $sql.= " ".MAIN_DB_PREFIX."c_actioncomm as c ON c.id = a.fk_action"; |
|
226 | 226 | $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid"; |
227 | - if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; |
|
228 | - $sql.= " WHERE a.entity = ".$conf->entity; |
|
227 | + if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; |
|
228 | + $sql.= " WHERE a.entity = ".$conf->entity; |
|
229 | 229 | $sql.= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep2 > '".$db->idate($now)."'))"; |
230 | - if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; |
|
231 | - if ($socid) $sql.= " AND s.rowid = ".$socid; |
|
232 | - $sql.= " ORDER BY a.datep DESC, a.id DESC"; |
|
233 | - $sql.= $db->plimit($max, 0); |
|
230 | + if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; |
|
231 | + if ($socid) $sql.= " AND s.rowid = ".$socid; |
|
232 | + $sql.= " ORDER BY a.datep DESC, a.id DESC"; |
|
233 | + $sql.= $db->plimit($max, 0); |
|
234 | 234 | |
235 | - $resql=$db->query($sql); |
|
236 | - if ($resql) |
|
237 | - { |
|
238 | - $num = $db->num_rows($resql); |
|
235 | + $resql=$db->query($sql); |
|
236 | + if ($resql) |
|
237 | + { |
|
238 | + $num = $db->num_rows($resql); |
|
239 | 239 | |
240 | - print '<table class="noborder" width="100%">'; |
|
241 | - print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("LastActionsToDo",$max).'</th>'; |
|
242 | - print '<th colspan="2" align="right"><a class="commonlink" href="'.DOL_URL_ROOT.'/comm/action/list.php?status=todo">'.$langs->trans("FullList").'</a></th>'; |
|
243 | - print '</tr>'; |
|
240 | + print '<table class="noborder" width="100%">'; |
|
241 | + print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("LastActionsToDo",$max).'</th>'; |
|
242 | + print '<th colspan="2" align="right"><a class="commonlink" href="'.DOL_URL_ROOT.'/comm/action/list.php?status=todo">'.$langs->trans("FullList").'</a></th>'; |
|
243 | + print '</tr>'; |
|
244 | 244 | |
245 | - $var = true; |
|
246 | - $i = 0; |
|
245 | + $var = true; |
|
246 | + $i = 0; |
|
247 | 247 | |
248 | - $staticaction=new ActionComm($db); |
|
249 | - $customerstatic=new Client($db); |
|
248 | + $staticaction=new ActionComm($db); |
|
249 | + $customerstatic=new Client($db); |
|
250 | 250 | |
251 | 251 | while ($i < $num) |
252 | 252 | { |
@@ -260,15 +260,15 @@ discard block |
||
260 | 260 | $staticaction->id=$obj->id; |
261 | 261 | print '<td>'.$staticaction->getNomUrl(1,34).'</td>'; |
262 | 262 | |
263 | - // print '<td>'.dol_trunc($obj->label,22).'</td>'; |
|
263 | + // print '<td>'.dol_trunc($obj->label,22).'</td>'; |
|
264 | 264 | |
265 | 265 | print '<td>'; |
266 | 266 | if ($obj->rowid > 0) |
267 | 267 | { |
268 | - $customerstatic->id=$obj->rowid; |
|
269 | - $customerstatic->name=$obj->sname; |
|
270 | - $customerstatic->client=$obj->client; |
|
271 | - print $customerstatic->getNomUrl(1,'',16); |
|
268 | + $customerstatic->id=$obj->rowid; |
|
269 | + $customerstatic->name=$obj->sname; |
|
270 | + $customerstatic->client=$obj->client; |
|
271 | + print $customerstatic->getNomUrl(1,'',16); |
|
272 | 272 | } |
273 | 273 | print '</td>'; |
274 | 274 | |
@@ -276,30 +276,30 @@ discard block |
||
276 | 276 | $datep2=$db->jdate($obj->dp2); |
277 | 277 | |
278 | 278 | // Date |
279 | - print '<td width="100" align="right">'.dol_print_date($datep,'day').' '; |
|
280 | - $late=0; |
|
281 | - if ($obj->percent == 0 && $datep && $datep < time()) $late=1; |
|
282 | - if ($obj->percent == 0 && ! $datep && $datep2 && $datep2 < time()) $late=1; |
|
283 | - if ($obj->percent > 0 && $obj->percent < 100 && $datep2 && $datep2 < time()) $late=1; |
|
284 | - if ($obj->percent > 0 && $obj->percent < 100 && ! $datep2 && $datep && $datep < time()) $late=1; |
|
285 | - if ($late) print img_warning($langs->trans("Late")); |
|
286 | - print "</td>"; |
|
279 | + print '<td width="100" align="right">'.dol_print_date($datep,'day').' '; |
|
280 | + $late=0; |
|
281 | + if ($obj->percent == 0 && $datep && $datep < time()) $late=1; |
|
282 | + if ($obj->percent == 0 && ! $datep && $datep2 && $datep2 < time()) $late=1; |
|
283 | + if ($obj->percent > 0 && $obj->percent < 100 && $datep2 && $datep2 < time()) $late=1; |
|
284 | + if ($obj->percent > 0 && $obj->percent < 100 && ! $datep2 && $datep && $datep < time()) $late=1; |
|
285 | + if ($late) print img_warning($langs->trans("Late")); |
|
286 | + print "</td>"; |
|
287 | 287 | |
288 | - // Statut |
|
289 | - print "<td align=\"right\" width=\"14\">".$staticaction->LibStatut($obj->percent,3)."</td>\n"; |
|
288 | + // Statut |
|
289 | + print "<td align=\"right\" width=\"14\">".$staticaction->LibStatut($obj->percent,3)."</td>\n"; |
|
290 | 290 | |
291 | - print "</tr>\n"; |
|
291 | + print "</tr>\n"; |
|
292 | 292 | |
293 | 293 | $i++; |
294 | 294 | } |
295 | - print "</table><br>"; |
|
296 | - |
|
297 | - $db->free($resql); |
|
298 | - } |
|
299 | - else |
|
300 | - { |
|
301 | - dol_print_error($db); |
|
302 | - } |
|
295 | + print "</table><br>"; |
|
296 | + |
|
297 | + $db->free($resql); |
|
298 | + } |
|
299 | + else |
|
300 | + { |
|
301 | + dol_print_error($db); |
|
302 | + } |
|
303 | 303 | } |
304 | 304 | |
305 | 305 | |
@@ -311,83 +311,83 @@ discard block |
||
311 | 311 | */ |
312 | 312 | function show_array_last_actions_done($max=5) |
313 | 313 | { |
314 | - global $langs, $conf, $user, $db, $bc, $socid; |
|
314 | + global $langs, $conf, $user, $db, $bc, $socid; |
|
315 | 315 | |
316 | - $now=dol_now(); |
|
316 | + $now=dol_now(); |
|
317 | 317 | |
318 | - $sql = "SELECT a.id, a.percent, a.datep as da, a.datep2 as da2, a.fk_user_author, a.label,"; |
|
319 | - $sql.= " c.code, c.libelle,"; |
|
320 | - $sql.= " s.rowid, s.nom as sname, s.client"; |
|
321 | - $sql.= " FROM ".MAIN_DB_PREFIX."actioncomm as a LEFT JOIN "; |
|
322 | - $sql.= " ".MAIN_DB_PREFIX."c_actioncomm as c ON c.id = a.fk_action "; |
|
318 | + $sql = "SELECT a.id, a.percent, a.datep as da, a.datep2 as da2, a.fk_user_author, a.label,"; |
|
319 | + $sql.= " c.code, c.libelle,"; |
|
320 | + $sql.= " s.rowid, s.nom as sname, s.client"; |
|
321 | + $sql.= " FROM ".MAIN_DB_PREFIX."actioncomm as a LEFT JOIN "; |
|
322 | + $sql.= " ".MAIN_DB_PREFIX."c_actioncomm as c ON c.id = a.fk_action "; |
|
323 | 323 | $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid"; |
324 | - if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; |
|
325 | - $sql.= " WHERE a.entity = ".$conf->entity; |
|
324 | + if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; |
|
325 | + $sql.= " WHERE a.entity = ".$conf->entity; |
|
326 | 326 | $sql.= " AND (a.percent >= 100 OR (a.percent = -1 AND a.datep2 <= '".$db->idate($now)."'))"; |
327 | - if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; |
|
327 | + if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; |
|
328 | 328 | if ($socid) $sql.= " AND s.rowid = ".$socid; |
329 | - $sql .= " ORDER BY a.datep2 DESC"; |
|
330 | - $sql .= $db->plimit($max, 0); |
|
329 | + $sql .= " ORDER BY a.datep2 DESC"; |
|
330 | + $sql .= $db->plimit($max, 0); |
|
331 | 331 | |
332 | - $resql=$db->query($sql); |
|
333 | - if ($resql) |
|
334 | - { |
|
335 | - $num = $db->num_rows($resql); |
|
332 | + $resql=$db->query($sql); |
|
333 | + if ($resql) |
|
334 | + { |
|
335 | + $num = $db->num_rows($resql); |
|
336 | 336 | |
337 | - print '<table class="noborder" width="100%">'; |
|
338 | - print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("LastDoneTasks",$max).'</th>'; |
|
339 | - print '<th colspan="2" align="right"><a class="commonlink" href="'.DOL_URL_ROOT.'/comm/action/list.php?status=done">'.$langs->trans("FullList").'</a></th>'; |
|
340 | - print '</tr>'; |
|
341 | - $var = true; |
|
342 | - $i = 0; |
|
337 | + print '<table class="noborder" width="100%">'; |
|
338 | + print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("LastDoneTasks",$max).'</th>'; |
|
339 | + print '<th colspan="2" align="right"><a class="commonlink" href="'.DOL_URL_ROOT.'/comm/action/list.php?status=done">'.$langs->trans("FullList").'</a></th>'; |
|
340 | + print '</tr>'; |
|
341 | + $var = true; |
|
342 | + $i = 0; |
|
343 | 343 | |
344 | - $staticaction=new ActionComm($db); |
|
345 | - $customerstatic=new Societe($db); |
|
344 | + $staticaction=new ActionComm($db); |
|
345 | + $customerstatic=new Societe($db); |
|
346 | 346 | |
347 | - while ($i < $num) |
|
348 | - { |
|
349 | - $obj = $db->fetch_object($resql); |
|
347 | + while ($i < $num) |
|
348 | + { |
|
349 | + $obj = $db->fetch_object($resql); |
|
350 | 350 | |
351 | 351 | |
352 | - print '<tr class="oddeven">'; |
|
352 | + print '<tr class="oddeven">'; |
|
353 | 353 | |
354 | - $staticaction->type_code=$obj->code; |
|
355 | - $staticaction->libelle=$obj->label; |
|
356 | - $staticaction->id=$obj->id; |
|
357 | - print '<td>'.$staticaction->getNomUrl(1,34).'</td>'; |
|
354 | + $staticaction->type_code=$obj->code; |
|
355 | + $staticaction->libelle=$obj->label; |
|
356 | + $staticaction->id=$obj->id; |
|
357 | + print '<td>'.$staticaction->getNomUrl(1,34).'</td>'; |
|
358 | 358 | |
359 | 359 | //print '<td>'.dol_trunc($obj->label,24).'</td>'; |
360 | 360 | |
361 | - print '<td>'; |
|
362 | - if ($obj->rowid > 0) |
|
363 | - { |
|
361 | + print '<td>'; |
|
362 | + if ($obj->rowid > 0) |
|
363 | + { |
|
364 | 364 | $customerstatic->id=$obj->rowid; |
365 | 365 | $customerstatic->name=$obj->sname; |
366 | 366 | $customerstatic->client=$obj->client; |
367 | - print $customerstatic->getNomUrl(1,'',24); |
|
368 | - } |
|
369 | - print '</td>'; |
|
370 | - |
|
371 | - // Date |
|
372 | - print '<td width="100" align="right">'.dol_print_date($db->jdate($obj->da2),'day'); |
|
373 | - print "</td>"; |
|
374 | - |
|
375 | - // Statut |
|
376 | - print "<td align=\"right\" width=\"14\">".$staticaction->LibStatut($obj->percent,3)."</td>\n"; |
|
377 | - |
|
378 | - print "</tr>\n"; |
|
379 | - $i++; |
|
380 | - } |
|
381 | - // TODO Ajouter rappel pour "il y a des contrats a mettre en service" |
|
382 | - // TODO Ajouter rappel pour "il y a des contrats qui arrivent a expiration" |
|
383 | - print "</table><br>"; |
|
384 | - |
|
385 | - $db->free($resql); |
|
386 | - } |
|
387 | - else |
|
388 | - { |
|
389 | - dol_print_error($db); |
|
390 | - } |
|
367 | + print $customerstatic->getNomUrl(1,'',24); |
|
368 | + } |
|
369 | + print '</td>'; |
|
370 | + |
|
371 | + // Date |
|
372 | + print '<td width="100" align="right">'.dol_print_date($db->jdate($obj->da2),'day'); |
|
373 | + print "</td>"; |
|
374 | + |
|
375 | + // Statut |
|
376 | + print "<td align=\"right\" width=\"14\">".$staticaction->LibStatut($obj->percent,3)."</td>\n"; |
|
377 | + |
|
378 | + print "</tr>\n"; |
|
379 | + $i++; |
|
380 | + } |
|
381 | + // TODO Ajouter rappel pour "il y a des contrats a mettre en service" |
|
382 | + // TODO Ajouter rappel pour "il y a des contrats qui arrivent a expiration" |
|
383 | + print "</table><br>"; |
|
384 | + |
|
385 | + $db->free($resql); |
|
386 | + } |
|
387 | + else |
|
388 | + { |
|
389 | + dol_print_error($db); |
|
390 | + } |
|
391 | 391 | } |
392 | 392 | |
393 | 393 | |
@@ -398,49 +398,49 @@ discard block |
||
398 | 398 | */ |
399 | 399 | function agenda_prepare_head() |
400 | 400 | { |
401 | - global $langs, $conf, $user; |
|
402 | - $h = 0; |
|
403 | - $head = array(); |
|
401 | + global $langs, $conf, $user; |
|
402 | + $h = 0; |
|
403 | + $head = array(); |
|
404 | 404 | |
405 | - $head[$h][0] = DOL_URL_ROOT."/admin/agenda_other.php"; |
|
406 | - $head[$h][1] = $langs->trans("Miscellaneous"); |
|
407 | - $head[$h][2] = 'other'; |
|
408 | - $h++; |
|
405 | + $head[$h][0] = DOL_URL_ROOT."/admin/agenda_other.php"; |
|
406 | + $head[$h][1] = $langs->trans("Miscellaneous"); |
|
407 | + $head[$h][2] = 'other'; |
|
408 | + $h++; |
|
409 | 409 | |
410 | - $head[$h][0] = DOL_URL_ROOT."/admin/agenda.php"; |
|
411 | - $head[$h][1] = $langs->trans("AutoActions"); |
|
412 | - $head[$h][2] = 'autoactions'; |
|
413 | - $h++; |
|
410 | + $head[$h][0] = DOL_URL_ROOT."/admin/agenda.php"; |
|
411 | + $head[$h][1] = $langs->trans("AutoActions"); |
|
412 | + $head[$h][2] = 'autoactions'; |
|
413 | + $h++; |
|
414 | 414 | |
415 | - if ($conf->global->MAIN_FEATURES_LEVEL > 0) |
|
416 | - { |
|
417 | - $head[$h][0] = DOL_URL_ROOT."/admin/agenda_reminder.php"; |
|
418 | - $head[$h][1] = $langs->trans("Reminders"); |
|
419 | - $head[$h][2] = 'reminders'; |
|
420 | - $h++; |
|
421 | - } |
|
415 | + if ($conf->global->MAIN_FEATURES_LEVEL > 0) |
|
416 | + { |
|
417 | + $head[$h][0] = DOL_URL_ROOT."/admin/agenda_reminder.php"; |
|
418 | + $head[$h][1] = $langs->trans("Reminders"); |
|
419 | + $head[$h][2] = 'reminders'; |
|
420 | + $h++; |
|
421 | + } |
|
422 | 422 | |
423 | - $head[$h][0] = DOL_URL_ROOT."/admin/agenda_xcal.php"; |
|
424 | - $head[$h][1] = $langs->trans("ExportCal"); |
|
425 | - $head[$h][2] = 'xcal'; |
|
426 | - $h++; |
|
423 | + $head[$h][0] = DOL_URL_ROOT."/admin/agenda_xcal.php"; |
|
424 | + $head[$h][1] = $langs->trans("ExportCal"); |
|
425 | + $head[$h][2] = 'xcal'; |
|
426 | + $h++; |
|
427 | 427 | |
428 | - $head[$h][0] = DOL_URL_ROOT."/admin/agenda_extsites.php"; |
|
429 | - $head[$h][1] = $langs->trans("ExtSites"); |
|
430 | - $head[$h][2] = 'extsites'; |
|
431 | - $h++; |
|
428 | + $head[$h][0] = DOL_URL_ROOT."/admin/agenda_extsites.php"; |
|
429 | + $head[$h][1] = $langs->trans("ExtSites"); |
|
430 | + $head[$h][2] = 'extsites'; |
|
431 | + $h++; |
|
432 | 432 | |
433 | - complete_head_from_modules($conf,$langs,null,$head,$h,'agenda_admin'); |
|
433 | + complete_head_from_modules($conf,$langs,null,$head,$h,'agenda_admin'); |
|
434 | 434 | |
435 | - $head[$h][0] = DOL_URL_ROOT."/admin/agenda_extrafields.php"; |
|
436 | - $head[$h][1] = $langs->trans("ExtraFields"); |
|
437 | - $head[$h][2] = 'attributes'; |
|
438 | - $h++; |
|
435 | + $head[$h][0] = DOL_URL_ROOT."/admin/agenda_extrafields.php"; |
|
436 | + $head[$h][1] = $langs->trans("ExtraFields"); |
|
437 | + $head[$h][2] = 'attributes'; |
|
438 | + $h++; |
|
439 | 439 | |
440 | - complete_head_from_modules($conf,$langs,null,$head,$h,'agenda_admin','remove'); |
|
440 | + complete_head_from_modules($conf,$langs,null,$head,$h,'agenda_admin','remove'); |
|
441 | 441 | |
442 | 442 | |
443 | - return $head; |
|
443 | + return $head; |
|
444 | 444 | } |
445 | 445 | |
446 | 446 | /** |
@@ -451,30 +451,30 @@ discard block |
||
451 | 451 | */ |
452 | 452 | function actions_prepare_head($object) |
453 | 453 | { |
454 | - global $db, $langs, $conf, $user; |
|
454 | + global $db, $langs, $conf, $user; |
|
455 | 455 | |
456 | - $h = 0; |
|
457 | - $head = array(); |
|
456 | + $h = 0; |
|
457 | + $head = array(); |
|
458 | 458 | |
459 | - $head[$h][0] = DOL_URL_ROOT.'/comm/action/card.php?id='.$object->id; |
|
460 | - $head[$h][1] = $langs->trans("CardAction"); |
|
461 | - $head[$h][2] = 'card'; |
|
462 | - $h++; |
|
459 | + $head[$h][0] = DOL_URL_ROOT.'/comm/action/card.php?id='.$object->id; |
|
460 | + $head[$h][1] = $langs->trans("CardAction"); |
|
461 | + $head[$h][2] = 'card'; |
|
462 | + $h++; |
|
463 | 463 | |
464 | 464 | // Tab to link resources |
465 | - if ($conf->resource->enabled) |
|
466 | - { |
|
467 | - include_once DOL_DOCUMENT_ROOT.'/resource/class/dolresource.class.php'; |
|
468 | - $resource=new DolResource($db); |
|
465 | + if ($conf->resource->enabled) |
|
466 | + { |
|
467 | + include_once DOL_DOCUMENT_ROOT.'/resource/class/dolresource.class.php'; |
|
468 | + $resource=new DolResource($db); |
|
469 | 469 | |
470 | - $head[$h][0] = DOL_URL_ROOT.'/resource/element_resource.php?element=action&element_id='.$object->id; |
|
470 | + $head[$h][0] = DOL_URL_ROOT.'/resource/element_resource.php?element=action&element_id='.$object->id; |
|
471 | 471 | $listofresourcelinked = $resource->getElementResources($object->element, $object->id); |
472 | 472 | $nbResources=count($listofresourcelinked); |
473 | - $head[$h][1] = $langs->trans("Resources"); |
|
474 | - if ($nbResources > 0) $head[$h][1].= ' <span class="badge">'.($nbResources).'</span>'; |
|
475 | - $head[$h][2] = 'resources'; |
|
476 | - $h++; |
|
477 | - } |
|
473 | + $head[$h][1] = $langs->trans("Resources"); |
|
474 | + if ($nbResources > 0) $head[$h][1].= ' <span class="badge">'.($nbResources).'</span>'; |
|
475 | + $head[$h][2] = 'resources'; |
|
476 | + $h++; |
|
477 | + } |
|
478 | 478 | |
479 | 479 | // Attached files |
480 | 480 | require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; |
@@ -484,20 +484,20 @@ discard block |
||
484 | 484 | $nbLinks=Link::count($db, $object->element, $object->id); |
485 | 485 | $head[$h][0] = DOL_URL_ROOT.'/comm/action/document.php?id='.$object->id; |
486 | 486 | $head[$h][1] = $langs->trans("Documents"); |
487 | - if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' <span class="badge">'.($nbFiles+$nbLinks).'</span>'; |
|
487 | + if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' <span class="badge">'.($nbFiles+$nbLinks).'</span>'; |
|
488 | 488 | $head[$h][2] = 'documents'; |
489 | 489 | $h++; |
490 | 490 | |
491 | - $head[$h][0] = DOL_URL_ROOT.'/comm/action/info.php?id='.$object->id; |
|
492 | - $head[$h][1] = $langs->trans('Info'); |
|
493 | - $head[$h][2] = 'info'; |
|
494 | - $h++; |
|
491 | + $head[$h][0] = DOL_URL_ROOT.'/comm/action/info.php?id='.$object->id; |
|
492 | + $head[$h][1] = $langs->trans('Info'); |
|
493 | + $head[$h][2] = 'info'; |
|
494 | + $h++; |
|
495 | 495 | |
496 | - complete_head_from_modules($conf,$langs,$object,$head,$h,'action'); |
|
496 | + complete_head_from_modules($conf,$langs,$object,$head,$h,'action'); |
|
497 | 497 | |
498 | - complete_head_from_modules($conf,$langs,$object,$head,$h,'action','remove'); |
|
498 | + complete_head_from_modules($conf,$langs,$object,$head,$h,'action','remove'); |
|
499 | 499 | |
500 | - return $head; |
|
500 | + return $head; |
|
501 | 501 | } |
502 | 502 | |
503 | 503 | |
@@ -549,7 +549,7 @@ discard block |
||
549 | 549 | $h++; |
550 | 550 | |
551 | 551 | |
552 | - $object=new stdClass(); |
|
552 | + $object=new stdClass(); |
|
553 | 553 | |
554 | 554 | // Show more tabs from modules |
555 | 555 | // Entries must be declared in modules descriptor with line |
@@ -35,33 +35,33 @@ discard block |
||
35 | 35 | */ |
36 | 36 | function facture_prepare_head($object) |
37 | 37 | { |
38 | - global $db, $langs, $conf; |
|
39 | - |
|
40 | - $h = 0; |
|
41 | - $head = array(); |
|
42 | - |
|
43 | - $head[$h][0] = DOL_URL_ROOT.'/compta/facture/card.php?facid='.$object->id; |
|
44 | - $head[$h][1] = $langs->trans('Card'); |
|
45 | - $head[$h][2] = 'compta'; |
|
46 | - $h++; |
|
47 | - |
|
48 | - if (empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) |
|
49 | - { |
|
50 | - $nbContact = count($object->liste_contact(-1,'internal')) + count($object->liste_contact(-1,'external')); |
|
51 | - $head[$h][0] = DOL_URL_ROOT.'/compta/facture/contact.php?facid='.$object->id; |
|
52 | - $head[$h][1] = $langs->trans('ContactsAddresses'); |
|
53 | - if ($nbContact > 0) $head[$h][1].= ' <span class="badge">'.$nbContact.'</span>'; |
|
54 | - $head[$h][2] = 'contact'; |
|
55 | - $h++; |
|
56 | - } |
|
57 | - |
|
58 | - //if ($fac->mode_reglement_code == 'PRE') |
|
59 | - if (! empty($conf->prelevement->enabled)) |
|
60 | - { |
|
61 | - $nbStandingOrders=0; |
|
62 | - $sql = "SELECT COUNT(pfd.rowid) as nb"; |
|
63 | - $sql .= " FROM ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd"; |
|
64 | - $sql .= " WHERE pfd.fk_facture = ".$object->id; |
|
38 | + global $db, $langs, $conf; |
|
39 | + |
|
40 | + $h = 0; |
|
41 | + $head = array(); |
|
42 | + |
|
43 | + $head[$h][0] = DOL_URL_ROOT.'/compta/facture/card.php?facid='.$object->id; |
|
44 | + $head[$h][1] = $langs->trans('Card'); |
|
45 | + $head[$h][2] = 'compta'; |
|
46 | + $h++; |
|
47 | + |
|
48 | + if (empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) |
|
49 | + { |
|
50 | + $nbContact = count($object->liste_contact(-1,'internal')) + count($object->liste_contact(-1,'external')); |
|
51 | + $head[$h][0] = DOL_URL_ROOT.'/compta/facture/contact.php?facid='.$object->id; |
|
52 | + $head[$h][1] = $langs->trans('ContactsAddresses'); |
|
53 | + if ($nbContact > 0) $head[$h][1].= ' <span class="badge">'.$nbContact.'</span>'; |
|
54 | + $head[$h][2] = 'contact'; |
|
55 | + $h++; |
|
56 | + } |
|
57 | + |
|
58 | + //if ($fac->mode_reglement_code == 'PRE') |
|
59 | + if (! empty($conf->prelevement->enabled)) |
|
60 | + { |
|
61 | + $nbStandingOrders=0; |
|
62 | + $sql = "SELECT COUNT(pfd.rowid) as nb"; |
|
63 | + $sql .= " FROM ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd"; |
|
64 | + $sql .= " WHERE pfd.fk_facture = ".$object->id; |
|
65 | 65 | $resql=$db->query($sql); |
66 | 66 | if ($resql) |
67 | 67 | { |
@@ -69,12 +69,12 @@ discard block |
||
69 | 69 | if ($obj) $nbStandingOrders = $obj->nb; |
70 | 70 | } |
71 | 71 | else dol_print_error($db); |
72 | - $head[$h][0] = DOL_URL_ROOT.'/compta/facture/prelevement.php?facid='.$object->id; |
|
73 | - $head[$h][1] = $langs->trans('StandingOrders'); |
|
74 | - if ($nbStandingOrders > 0) $head[$h][1].= ' <span class="badge">'.$nbStandingOrders.'</span>'; |
|
75 | - $head[$h][2] = 'standingorders'; |
|
76 | - $h++; |
|
77 | - } |
|
72 | + $head[$h][0] = DOL_URL_ROOT.'/compta/facture/prelevement.php?facid='.$object->id; |
|
73 | + $head[$h][1] = $langs->trans('StandingOrders'); |
|
74 | + if ($nbStandingOrders > 0) $head[$h][1].= ' <span class="badge">'.$nbStandingOrders.'</span>'; |
|
75 | + $head[$h][2] = 'standingorders'; |
|
76 | + $h++; |
|
77 | + } |
|
78 | 78 | |
79 | 79 | // Show more tabs from modules |
80 | 80 | // Entries must be declared in modules descriptor with line |
@@ -84,35 +84,35 @@ discard block |
||
84 | 84 | |
85 | 85 | if (empty($conf->global->MAIN_DISABLE_NOTES_TAB)) |
86 | 86 | { |
87 | - $nbNote = 0; |
|
87 | + $nbNote = 0; |
|
88 | 88 | if(!empty($object->note_private)) $nbNote++; |
89 | - if(!empty($object->note_public)) $nbNote++; |
|
90 | - $head[$h][0] = DOL_URL_ROOT.'/compta/facture/note.php?facid='.$object->id; |
|
91 | - $head[$h][1] = $langs->trans('Notes'); |
|
92 | - if ($nbNote > 0) $head[$h][1].= ' <span class="badge">'.$nbNote.'</span>'; |
|
93 | - $head[$h][2] = 'note'; |
|
94 | - $h++; |
|
89 | + if(!empty($object->note_public)) $nbNote++; |
|
90 | + $head[$h][0] = DOL_URL_ROOT.'/compta/facture/note.php?facid='.$object->id; |
|
91 | + $head[$h][1] = $langs->trans('Notes'); |
|
92 | + if ($nbNote > 0) $head[$h][1].= ' <span class="badge">'.$nbNote.'</span>'; |
|
93 | + $head[$h][2] = 'note'; |
|
94 | + $h++; |
|
95 | 95 | } |
96 | 96 | |
97 | - require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; |
|
97 | + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; |
|
98 | 98 | require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php'; |
99 | - $upload_dir = $conf->facture->dir_output . "/" . dol_sanitizeFileName($object->ref); |
|
100 | - $nbFiles = count(dol_dir_list($upload_dir,'files',0,'','(\.meta|_preview.*\.png)$')); |
|
99 | + $upload_dir = $conf->facture->dir_output . "/" . dol_sanitizeFileName($object->ref); |
|
100 | + $nbFiles = count(dol_dir_list($upload_dir,'files',0,'','(\.meta|_preview.*\.png)$')); |
|
101 | 101 | $nbLinks=Link::count($db, $object->element, $object->id); |
102 | - $head[$h][0] = DOL_URL_ROOT.'/compta/facture/document.php?facid='.$object->id; |
|
103 | - $head[$h][1] = $langs->trans('Documents'); |
|
104 | - if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' <span class="badge">'.($nbFiles+$nbLinks).'</span>'; |
|
105 | - $head[$h][2] = 'documents'; |
|
106 | - $h++; |
|
102 | + $head[$h][0] = DOL_URL_ROOT.'/compta/facture/document.php?facid='.$object->id; |
|
103 | + $head[$h][1] = $langs->trans('Documents'); |
|
104 | + if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' <span class="badge">'.($nbFiles+$nbLinks).'</span>'; |
|
105 | + $head[$h][2] = 'documents'; |
|
106 | + $h++; |
|
107 | 107 | |
108 | - $head[$h][0] = DOL_URL_ROOT.'/compta/facture/info.php?facid='.$object->id; |
|
109 | - $head[$h][1] = $langs->trans('Info'); |
|
110 | - $head[$h][2] = 'info'; |
|
111 | - $h++; |
|
108 | + $head[$h][0] = DOL_URL_ROOT.'/compta/facture/info.php?facid='.$object->id; |
|
109 | + $head[$h][1] = $langs->trans('Info'); |
|
110 | + $head[$h][2] = 'info'; |
|
111 | + $h++; |
|
112 | 112 | |
113 | - complete_head_from_modules($conf,$langs,$object,$head,$h,'invoice','remove'); |
|
113 | + complete_head_from_modules($conf,$langs,$object,$head,$h,'invoice','remove'); |
|
114 | 114 | |
115 | - return $head; |
|
115 | + return $head; |
|
116 | 116 | } |
117 | 117 | |
118 | 118 | /** |
@@ -122,50 +122,50 @@ discard block |
||
122 | 122 | */ |
123 | 123 | function invoice_admin_prepare_head() |
124 | 124 | { |
125 | - global $langs, $conf, $user; |
|
126 | - |
|
127 | - $h = 0; |
|
128 | - $head = array(); |
|
129 | - |
|
130 | - $head[$h][0] = DOL_URL_ROOT.'/admin/facture.php'; |
|
131 | - $head[$h][1] = $langs->trans("Miscellaneous"); |
|
132 | - $head[$h][2] = 'general'; |
|
133 | - $h++; |
|
134 | - |
|
135 | - $head[$h][0] = DOL_URL_ROOT.'/admin/payment.php'; |
|
136 | - $head[$h][1] = $langs->trans("Payments"); |
|
137 | - $head[$h][2] = 'payment'; |
|
138 | - $h++; |
|
139 | - |
|
140 | - // Show more tabs from modules |
|
141 | - // Entries must be declared in modules descriptor with line |
|
142 | - // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab |
|
143 | - // $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab |
|
144 | - complete_head_from_modules($conf,$langs,null,$head,$h,'invoice_admin'); |
|
145 | - |
|
146 | - $head[$h][0] = DOL_URL_ROOT.'/compta/facture/admin/facture_cust_extrafields.php'; |
|
147 | - $head[$h][1] = $langs->trans("ExtraFieldsCustomerInvoices"); |
|
148 | - $head[$h][2] = 'attributes'; |
|
149 | - $h++; |
|
150 | - |
|
151 | - $head[$h][0] = DOL_URL_ROOT.'/compta/facture/admin/facturedet_cust_extrafields.php'; |
|
152 | - $head[$h][1] = $langs->trans("ExtraFieldsLines"); |
|
153 | - $head[$h][2] = 'attributeslines'; |
|
154 | - $h++; |
|
155 | - |
|
156 | - $head[$h][0] = DOL_URL_ROOT.'/compta/facture/admin/facture_rec_cust_extrafields.php'; |
|
157 | - $head[$h][1] = $langs->trans("ExtraFieldsCustomerInvoicesRec"); |
|
158 | - $head[$h][2] = 'attributesrec'; |
|
159 | - $h++; |
|
160 | - |
|
161 | - $head[$h][0] = DOL_URL_ROOT.'/compta/facture/admin/facturedet_rec_cust_extrafields.php'; |
|
162 | - $head[$h][1] = $langs->trans("ExtraFieldsLinesRec"); |
|
163 | - $head[$h][2] = 'attributeslinesrec'; |
|
164 | - $h++; |
|
165 | - |
|
166 | - complete_head_from_modules($conf,$langs,null,$head,$h,'invoice_admin','remove'); |
|
167 | - |
|
168 | - return $head; |
|
125 | + global $langs, $conf, $user; |
|
126 | + |
|
127 | + $h = 0; |
|
128 | + $head = array(); |
|
129 | + |
|
130 | + $head[$h][0] = DOL_URL_ROOT.'/admin/facture.php'; |
|
131 | + $head[$h][1] = $langs->trans("Miscellaneous"); |
|
132 | + $head[$h][2] = 'general'; |
|
133 | + $h++; |
|
134 | + |
|
135 | + $head[$h][0] = DOL_URL_ROOT.'/admin/payment.php'; |
|
136 | + $head[$h][1] = $langs->trans("Payments"); |
|
137 | + $head[$h][2] = 'payment'; |
|
138 | + $h++; |
|
139 | + |
|
140 | + // Show more tabs from modules |
|
141 | + // Entries must be declared in modules descriptor with line |
|
142 | + // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab |
|
143 | + // $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab |
|
144 | + complete_head_from_modules($conf,$langs,null,$head,$h,'invoice_admin'); |
|
145 | + |
|
146 | + $head[$h][0] = DOL_URL_ROOT.'/compta/facture/admin/facture_cust_extrafields.php'; |
|
147 | + $head[$h][1] = $langs->trans("ExtraFieldsCustomerInvoices"); |
|
148 | + $head[$h][2] = 'attributes'; |
|
149 | + $h++; |
|
150 | + |
|
151 | + $head[$h][0] = DOL_URL_ROOT.'/compta/facture/admin/facturedet_cust_extrafields.php'; |
|
152 | + $head[$h][1] = $langs->trans("ExtraFieldsLines"); |
|
153 | + $head[$h][2] = 'attributeslines'; |
|
154 | + $h++; |
|
155 | + |
|
156 | + $head[$h][0] = DOL_URL_ROOT.'/compta/facture/admin/facture_rec_cust_extrafields.php'; |
|
157 | + $head[$h][1] = $langs->trans("ExtraFieldsCustomerInvoicesRec"); |
|
158 | + $head[$h][2] = 'attributesrec'; |
|
159 | + $h++; |
|
160 | + |
|
161 | + $head[$h][0] = DOL_URL_ROOT.'/compta/facture/admin/facturedet_rec_cust_extrafields.php'; |
|
162 | + $head[$h][1] = $langs->trans("ExtraFieldsLinesRec"); |
|
163 | + $head[$h][2] = 'attributeslinesrec'; |
|
164 | + $h++; |
|
165 | + |
|
166 | + complete_head_from_modules($conf,$langs,null,$head,$h,'invoice_admin','remove'); |
|
167 | + |
|
168 | + return $head; |
|
169 | 169 | } |
170 | 170 | |
171 | 171 | |
@@ -177,15 +177,15 @@ discard block |
||
177 | 177 | */ |
178 | 178 | function invoice_rec_prepare_head($object) |
179 | 179 | { |
180 | - global $db, $langs, $conf; |
|
180 | + global $db, $langs, $conf; |
|
181 | 181 | |
182 | - $h = 0; |
|
183 | - $head = array(); |
|
182 | + $h = 0; |
|
183 | + $head = array(); |
|
184 | 184 | |
185 | - $head[$h][0] = DOL_URL_ROOT.'/compta/facture/fiche-rec.php?id='.$object->id; |
|
186 | - $head[$h][1] = $langs->trans("CardBill"); |
|
187 | - $head[$h][2] = 'card'; |
|
188 | - $h++; |
|
185 | + $head[$h][0] = DOL_URL_ROOT.'/compta/facture/fiche-rec.php?id='.$object->id; |
|
186 | + $head[$h][1] = $langs->trans("CardBill"); |
|
187 | + $head[$h][2] = 'card'; |
|
188 | + $h++; |
|
189 | 189 | |
190 | 190 | // Show more tabs from modules |
191 | 191 | // Entries must be declared in modules descriptor with line |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | // $this->tabs = array('entity:-tabname); to remove a tab |
194 | 194 | complete_head_from_modules($conf,$langs,$object,$head,$h,'invoice-rec'); |
195 | 195 | |
196 | - complete_head_from_modules($conf,$langs,$object,$head,$h,'invoice-rec','remove'); |
|
196 | + complete_head_from_modules($conf,$langs,$object,$head,$h,'invoice-rec','remove'); |
|
197 | 197 | |
198 | - return $head; |
|
198 | + return $head; |
|
199 | 199 | } |
@@ -30,30 +30,30 @@ discard block |
||
30 | 30 | */ |
31 | 31 | function establishment_prepare_head($object) |
32 | 32 | { |
33 | - global $langs, $conf; |
|
33 | + global $langs, $conf; |
|
34 | 34 | |
35 | - $h = 0; |
|
36 | - $head = array(); |
|
35 | + $h = 0; |
|
36 | + $head = array(); |
|
37 | 37 | |
38 | - $head[$h][0] = DOL_URL_ROOT.'/hrm/establishment/card.php?id=' . $object->id; |
|
39 | - $head[$h][1] = $langs->trans("Card"); |
|
40 | - $head[$h][2] = 'card'; |
|
41 | - $h++; |
|
38 | + $head[$h][0] = DOL_URL_ROOT.'/hrm/establishment/card.php?id=' . $object->id; |
|
39 | + $head[$h][1] = $langs->trans("Card"); |
|
40 | + $head[$h][2] = 'card'; |
|
41 | + $h++; |
|
42 | 42 | |
43 | - // Show more tabs from modules |
|
44 | - // Entries must be declared in modules descriptor with line |
|
43 | + // Show more tabs from modules |
|
44 | + // Entries must be declared in modules descriptor with line |
|
45 | 45 | // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab |
46 | 46 | // $this->tabs = array('entity:-tabname); to remove a tab |
47 | - complete_head_from_modules($conf,$langs,$object,$head,$h,'establishment'); |
|
47 | + complete_head_from_modules($conf,$langs,$object,$head,$h,'establishment'); |
|
48 | 48 | |
49 | - $head[$h][0] = DOL_URL_ROOT.'/hrm/establishment/info.php?id=' . $object->id; |
|
50 | - $head[$h][1] = $langs->trans("Info"); |
|
51 | - $head[$h][2] = 'info'; |
|
52 | - $h++; |
|
49 | + $head[$h][0] = DOL_URL_ROOT.'/hrm/establishment/info.php?id=' . $object->id; |
|
50 | + $head[$h][1] = $langs->trans("Info"); |
|
51 | + $head[$h][2] = 'info'; |
|
52 | + $h++; |
|
53 | 53 | |
54 | - complete_head_from_modules($conf,$langs,$object,$head,$h,'establishment','remove'); |
|
54 | + complete_head_from_modules($conf,$langs,$object,$head,$h,'establishment','remove'); |
|
55 | 55 | |
56 | - return $head; |
|
56 | + return $head; |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | /** |
@@ -68,12 +68,12 @@ discard block |
||
68 | 68 | $h = 0; |
69 | 69 | $head = array(); |
70 | 70 | |
71 | - $head[$h][0] = DOL_URL_ROOT.'/hrm/admin/admin_hrm.php'; |
|
71 | + $head[$h][0] = DOL_URL_ROOT.'/hrm/admin/admin_hrm.php'; |
|
72 | 72 | $head[$h][1] = $langs->trans("Parameters"); |
73 | 73 | $head[$h][2] = 'parameters'; |
74 | 74 | $h++; |
75 | 75 | |
76 | - $head[$h][0] = DOL_URL_ROOT.'/hrm/admin/admin_establishment.php'; |
|
76 | + $head[$h][0] = DOL_URL_ROOT.'/hrm/admin/admin_establishment.php'; |
|
77 | 77 | $head[$h][1] = $langs->trans("Establishments"); |
78 | 78 | $head[$h][2] = 'establishments'; |
79 | 79 | $h++; |
@@ -28,15 +28,15 @@ discard block |
||
28 | 28 | function payment_prepare_head(Paiement $object) |
29 | 29 | { |
30 | 30 | |
31 | - global $langs, $conf; |
|
31 | + global $langs, $conf; |
|
32 | 32 | |
33 | - $h = 0; |
|
34 | - $head = array(); |
|
33 | + $h = 0; |
|
34 | + $head = array(); |
|
35 | 35 | |
36 | - $head[$h][0] = DOL_URL_ROOT.'/compta/paiement/card.php?id='.$object->id; |
|
37 | - $head[$h][1] = $langs->trans("Card"); |
|
38 | - $head[$h][2] = 'payment'; |
|
39 | - $h++; |
|
36 | + $head[$h][0] = DOL_URL_ROOT.'/compta/paiement/card.php?id='.$object->id; |
|
37 | + $head[$h][1] = $langs->trans("Card"); |
|
38 | + $head[$h][2] = 'payment'; |
|
39 | + $h++; |
|
40 | 40 | |
41 | 41 | // Show more tabs from modules |
42 | 42 | // Entries must be declared in modules descriptor with line |
@@ -44,14 +44,14 @@ discard block |
||
44 | 44 | // $this->tabs = array('entity:-tabname); to remove a tab |
45 | 45 | complete_head_from_modules($conf,$langs,$object,$head,$h,'payment'); |
46 | 46 | |
47 | - $head[$h][0] = DOL_URL_ROOT.'/compta/paiement/info.php?id='.$object->id; |
|
48 | - $head[$h][1] = $langs->trans("Info"); |
|
49 | - $head[$h][2] = 'info'; |
|
50 | - $h++; |
|
47 | + $head[$h][0] = DOL_URL_ROOT.'/compta/paiement/info.php?id='.$object->id; |
|
48 | + $head[$h][1] = $langs->trans("Info"); |
|
49 | + $head[$h][2] = 'info'; |
|
50 | + $h++; |
|
51 | 51 | |
52 | - complete_head_from_modules($conf,$langs,$object,$head,$h,'payment', 'remove'); |
|
52 | + complete_head_from_modules($conf,$langs,$object,$head,$h,'payment', 'remove'); |
|
53 | 53 | |
54 | - return $head; |
|
54 | + return $head; |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | /** |
@@ -63,15 +63,15 @@ discard block |
||
63 | 63 | */ |
64 | 64 | function payment_supplier_prepare_head(Paiement $object) |
65 | 65 | { |
66 | - global $langs, $conf; |
|
66 | + global $langs, $conf; |
|
67 | 67 | |
68 | - $h = 0; |
|
69 | - $head = array(); |
|
68 | + $h = 0; |
|
69 | + $head = array(); |
|
70 | 70 | |
71 | - $head[$h][0] = DOL_URL_ROOT.'/fourn/paiement/card.php?id='.$object->id; |
|
72 | - $head[$h][1] = $langs->trans("Card"); |
|
73 | - $head[$h][2] = 'payment'; |
|
74 | - $h++; |
|
71 | + $head[$h][0] = DOL_URL_ROOT.'/fourn/paiement/card.php?id='.$object->id; |
|
72 | + $head[$h][1] = $langs->trans("Card"); |
|
73 | + $head[$h][2] = 'payment'; |
|
74 | + $h++; |
|
75 | 75 | |
76 | 76 | // Show more tabs from modules |
77 | 77 | // Entries must be declared in modules descriptor with line |
@@ -79,14 +79,14 @@ discard block |
||
79 | 79 | // $this->tabs = array('entity:-tabname); to remove a tab |
80 | 80 | complete_head_from_modules($conf,$langs,$object,$head,$h,'payment_supplier'); |
81 | 81 | |
82 | - $head[$h][0] = DOL_URL_ROOT.'/fourn/paiement/info.php?id='.$object->id; |
|
83 | - $head[$h][1] = $langs->trans('Info'); |
|
84 | - $head[$h][2] = 'info'; |
|
85 | - $h++; |
|
82 | + $head[$h][0] = DOL_URL_ROOT.'/fourn/paiement/info.php?id='.$object->id; |
|
83 | + $head[$h][1] = $langs->trans('Info'); |
|
84 | + $head[$h][2] = 'info'; |
|
85 | + $h++; |
|
86 | 86 | |
87 | - complete_head_from_modules($conf,$langs,$object,$head,$h,'payment_supplier', 'remove'); |
|
87 | + complete_head_from_modules($conf,$langs,$object,$head,$h,'payment_supplier', 'remove'); |
|
88 | 88 | |
89 | - return $head; |
|
89 | + return $head; |
|
90 | 90 | } |
91 | 91 | |
92 | 92 | /** |
@@ -97,23 +97,23 @@ discard block |
||
97 | 97 | */ |
98 | 98 | function getValidOnlinePaymentMethods($paymentmethod='') |
99 | 99 | { |
100 | - global $conf; |
|
101 | - |
|
102 | - $validpaymentmethod=array(); |
|
103 | - |
|
104 | - if ((empty($paymentmethod) || $paymentmethod == 'paypal') && ! empty($conf->paypal->enabled)) |
|
105 | - { |
|
106 | - $validpaymentmethod['paypal']='valid'; |
|
107 | - } |
|
108 | - if ((empty($paymentmethod) || $paymentmethod == 'paybox') && ! empty($conf->paybox->enabled)) |
|
109 | - { |
|
110 | - $validpaymentmethod['paybox']='valid'; |
|
111 | - } |
|
112 | - if ((empty($paymentmethod) || $paymentmethod == 'stripe') && ! empty($conf->stripe->enabled)) |
|
113 | - { |
|
114 | - $validpaymentmethod['stripe']='valid'; |
|
115 | - } |
|
116 | - return $validpaymentmethod; |
|
100 | + global $conf; |
|
101 | + |
|
102 | + $validpaymentmethod=array(); |
|
103 | + |
|
104 | + if ((empty($paymentmethod) || $paymentmethod == 'paypal') && ! empty($conf->paypal->enabled)) |
|
105 | + { |
|
106 | + $validpaymentmethod['paypal']='valid'; |
|
107 | + } |
|
108 | + if ((empty($paymentmethod) || $paymentmethod == 'paybox') && ! empty($conf->paybox->enabled)) |
|
109 | + { |
|
110 | + $validpaymentmethod['paybox']='valid'; |
|
111 | + } |
|
112 | + if ((empty($paymentmethod) || $paymentmethod == 'stripe') && ! empty($conf->stripe->enabled)) |
|
113 | + { |
|
114 | + $validpaymentmethod['stripe']='valid'; |
|
115 | + } |
|
116 | + return $validpaymentmethod; |
|
117 | 117 | } |
118 | 118 | |
119 | 119 | /** |
@@ -125,18 +125,18 @@ discard block |
||
125 | 125 | */ |
126 | 126 | function showOnlinePaymentUrl($type,$ref) |
127 | 127 | { |
128 | - global $conf, $langs; |
|
128 | + global $conf, $langs; |
|
129 | 129 | |
130 | - // Load translation files required by the page |
|
130 | + // Load translation files required by the page |
|
131 | 131 | $langs->loadLangs(array('payment', 'paybox')); |
132 | 132 | |
133 | - $servicename='Online'; |
|
133 | + $servicename='Online'; |
|
134 | 134 | |
135 | - $out = img_picto('','object_globe.png').' '.$langs->trans("ToOfferALinkForOnlinePayment",$servicename).'<br>'; |
|
136 | - $url = getOnlinePaymentUrl(0,$type,$ref); |
|
137 | - $out.= '<input type="text" id="onlinepaymenturl" class="quatrevingtpercent" value="'.$url.'">'; |
|
138 | - $out.= ajax_autoselect("onlinepaymenturl", 0); |
|
139 | - return $out; |
|
135 | + $out = img_picto('','object_globe.png').' '.$langs->trans("ToOfferALinkForOnlinePayment",$servicename).'<br>'; |
|
136 | + $url = getOnlinePaymentUrl(0,$type,$ref); |
|
137 | + $out.= '<input type="text" id="onlinepaymenturl" class="quatrevingtpercent" value="'.$url.'">'; |
|
138 | + $out.= ajax_autoselect("onlinepaymenturl", 0); |
|
139 | + return $out; |
|
140 | 140 | } |
141 | 141 | |
142 | 142 | /** |
@@ -151,115 +151,115 @@ discard block |
||
151 | 151 | */ |
152 | 152 | function getOnlinePaymentUrl($mode, $type, $ref='', $amount='9.99', $freetag='your_free_tag') |
153 | 153 | { |
154 | - global $conf; |
|
155 | - |
|
156 | - $ref=str_replace(' ','',$ref); |
|
157 | - $out=''; |
|
158 | - |
|
159 | - if ($type == 'free') |
|
160 | - { |
|
161 | - $out=DOL_MAIN_URL_ROOT.'/public/payment/newpayment.php?amount='.($mode?'<font color="#666666">':'').$amount.($mode?'</font>':'').'&tag='.($mode?'<font color="#666666">':'').$freetag.($mode?'</font>':''); |
|
162 | - if (! empty($conf->global->PAYMENT_SECURITY_TOKEN)) |
|
163 | - { |
|
164 | - if (empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) $out.='&securekey='.$conf->global->PAYMENT_SECURITY_TOKEN; |
|
165 | - else $out.='&securekey='.dol_hash($conf->global->PAYMENT_SECURITY_TOKEN, 2); |
|
166 | - } |
|
167 | - } |
|
168 | - elseif ($type == 'order') |
|
169 | - { |
|
170 | - $out=DOL_MAIN_URL_ROOT.'/public/payment/newpayment.php?source=order&ref='.($mode?'<font color="#666666">':''); |
|
171 | - if ($mode == 1) $out.='order_ref'; |
|
172 | - if ($mode == 0) $out.=urlencode($ref); |
|
173 | - $out.=($mode?'</font>':''); |
|
174 | - if (! empty($conf->global->PAYMENT_SECURITY_TOKEN)) |
|
175 | - { |
|
176 | - if (empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) $out.='&securekey='.$conf->global->PAYMENT_SECURITY_TOKEN; |
|
177 | - else |
|
178 | - { |
|
179 | - $out.='&securekey='.($mode?'<font color="#666666">':''); |
|
180 | - if ($mode == 1) $out.="hash('".$conf->global->PAYMENT_SECURITY_TOKEN."' + '".$type."' + order_ref)"; |
|
181 | - if ($mode == 0) $out.= dol_hash($conf->global->PAYMENT_SECURITY_TOKEN . $type . $ref, 2); |
|
182 | - $out.=($mode?'</font>':''); |
|
183 | - } |
|
184 | - } |
|
185 | - } |
|
186 | - elseif ($type == 'invoice') |
|
187 | - { |
|
188 | - $out=DOL_MAIN_URL_ROOT.'/public/payment/newpayment.php?source=invoice&ref='.($mode?'<font color="#666666">':''); |
|
189 | - if ($mode == 1) $out.='invoice_ref'; |
|
190 | - if ($mode == 0) $out.=urlencode($ref); |
|
191 | - $out.=($mode?'</font>':''); |
|
192 | - if (! empty($conf->global->PAYMENT_SECURITY_TOKEN)) |
|
193 | - { |
|
194 | - if (empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) $out.='&securekey='.$conf->global->PAYMENT_SECURITY_TOKEN; |
|
195 | - else |
|
196 | - { |
|
197 | - $out.='&securekey='.($mode?'<font color="#666666">':''); |
|
198 | - if ($mode == 1) $out.="hash('".$conf->global->PAYMENT_SECURITY_TOKEN."' + '".$type."' + invoice_ref)"; |
|
199 | - if ($mode == 0) $out.= dol_hash($conf->global->PAYMENT_SECURITY_TOKEN . $type . $ref, 2); |
|
200 | - $out.=($mode?'</font>':''); |
|
201 | - } |
|
202 | - } |
|
203 | - } |
|
204 | - elseif ($type == 'contractline') |
|
205 | - { |
|
206 | - $out=DOL_MAIN_URL_ROOT.'/public/payment/newpayment.php?source=contractline&ref='.($mode?'<font color="#666666">':''); |
|
207 | - if ($mode == 1) $out.='contractline_ref'; |
|
208 | - if ($mode == 0) $out.=urlencode($ref); |
|
209 | - $out.=($mode?'</font>':''); |
|
210 | - if (! empty($conf->global->PAYMENT_SECURITY_TOKEN)) |
|
211 | - { |
|
212 | - if (empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) $out.='&securekey='.$conf->global->PAYMENT_SECURITY_TOKEN; |
|
213 | - else |
|
214 | - { |
|
215 | - $out.='&securekey='.($mode?'<font color="#666666">':''); |
|
216 | - if ($mode == 1) $out.="hash('".$conf->global->PAYMENT_SECURITY_TOKEN."' + '".$type."' + contractline_ref)"; |
|
217 | - if ($mode == 0) $out.= dol_hash($conf->global->PAYMENT_SECURITY_TOKEN . $type . $ref, 2); |
|
218 | - $out.=($mode?'</font>':''); |
|
219 | - } |
|
220 | - } |
|
221 | - } |
|
222 | - elseif ($type == 'member' || $type == 'membersubscription') |
|
223 | - { |
|
224 | - $out=DOL_MAIN_URL_ROOT.'/public/payment/newpayment.php?source=membersubscription&ref='.($mode?'<font color="#666666">':''); |
|
225 | - if ($mode == 1) $out.='member_ref'; |
|
226 | - if ($mode == 0) $out.=urlencode($ref); |
|
227 | - $out.=($mode?'</font>':''); |
|
228 | - if (! empty($conf->global->PAYMENT_SECURITY_TOKEN)) |
|
229 | - { |
|
230 | - if (empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) $out.='&securekey='.$conf->global->PAYMENT_SECURITY_TOKEN; |
|
231 | - else |
|
232 | - { |
|
233 | - $out.='&securekey='.($mode?'<font color="#666666">':''); |
|
234 | - if ($mode == 1) $out.="hash('".$conf->global->PAYMENT_SECURITY_TOKEN."' + '".$type."' + member_ref)"; |
|
235 | - if ($mode == 0) $out.= dol_hash($conf->global->PAYMENT_SECURITY_TOKEN . $type . $ref, 2); |
|
236 | - $out.=($mode?'</font>':''); |
|
237 | - } |
|
238 | - } |
|
239 | - } |
|
240 | - if ($type == 'donation') |
|
241 | - { |
|
242 | - $out=DOL_MAIN_URL_ROOT.'/public/payment/newpayment.php?source=donation&ref='.($mode?'<font color="#666666">':''); |
|
243 | - if ($mode == 1) $out.='donation_ref'; |
|
244 | - if ($mode == 0) $out.=urlencode($ref); |
|
245 | - $out.=($mode?'</font>':''); |
|
246 | - if (! empty($conf->global->PAYMENT_SECURITY_TOKEN)) |
|
247 | - { |
|
248 | - if (empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) $out.='&securekey='.$conf->global->PAYMENT_SECURITY_TOKEN; |
|
249 | - else |
|
250 | - { |
|
251 | - $out.='&securekey='.($mode?'<font color="#666666">':''); |
|
252 | - if ($mode == 1) $out.="hash('".$conf->global->PAYMENT_SECURITY_TOKEN."' + '".$type."' + donation_ref)"; |
|
253 | - if ($mode == 0) $out.= dol_hash($conf->global->PAYMENT_SECURITY_TOKEN . $type . $ref, 2); |
|
254 | - $out.=($mode?'</font>':''); |
|
255 | - } |
|
256 | - } |
|
257 | - } |
|
258 | - |
|
259 | - // For multicompany |
|
260 | - if (! empty($out) && ! empty($conf->multicompany->enabled)) $out.="&entity=".$conf->entity; // Check the entity because we may have the same reference in several entities |
|
261 | - |
|
262 | - return $out; |
|
154 | + global $conf; |
|
155 | + |
|
156 | + $ref=str_replace(' ','',$ref); |
|
157 | + $out=''; |
|
158 | + |
|
159 | + if ($type == 'free') |
|
160 | + { |
|
161 | + $out=DOL_MAIN_URL_ROOT.'/public/payment/newpayment.php?amount='.($mode?'<font color="#666666">':'').$amount.($mode?'</font>':'').'&tag='.($mode?'<font color="#666666">':'').$freetag.($mode?'</font>':''); |
|
162 | + if (! empty($conf->global->PAYMENT_SECURITY_TOKEN)) |
|
163 | + { |
|
164 | + if (empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) $out.='&securekey='.$conf->global->PAYMENT_SECURITY_TOKEN; |
|
165 | + else $out.='&securekey='.dol_hash($conf->global->PAYMENT_SECURITY_TOKEN, 2); |
|
166 | + } |
|
167 | + } |
|
168 | + elseif ($type == 'order') |
|
169 | + { |
|
170 | + $out=DOL_MAIN_URL_ROOT.'/public/payment/newpayment.php?source=order&ref='.($mode?'<font color="#666666">':''); |
|
171 | + if ($mode == 1) $out.='order_ref'; |
|
172 | + if ($mode == 0) $out.=urlencode($ref); |
|
173 | + $out.=($mode?'</font>':''); |
|
174 | + if (! empty($conf->global->PAYMENT_SECURITY_TOKEN)) |
|
175 | + { |
|
176 | + if (empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) $out.='&securekey='.$conf->global->PAYMENT_SECURITY_TOKEN; |
|
177 | + else |
|
178 | + { |
|
179 | + $out.='&securekey='.($mode?'<font color="#666666">':''); |
|
180 | + if ($mode == 1) $out.="hash('".$conf->global->PAYMENT_SECURITY_TOKEN."' + '".$type."' + order_ref)"; |
|
181 | + if ($mode == 0) $out.= dol_hash($conf->global->PAYMENT_SECURITY_TOKEN . $type . $ref, 2); |
|
182 | + $out.=($mode?'</font>':''); |
|
183 | + } |
|
184 | + } |
|
185 | + } |
|
186 | + elseif ($type == 'invoice') |
|
187 | + { |
|
188 | + $out=DOL_MAIN_URL_ROOT.'/public/payment/newpayment.php?source=invoice&ref='.($mode?'<font color="#666666">':''); |
|
189 | + if ($mode == 1) $out.='invoice_ref'; |
|
190 | + if ($mode == 0) $out.=urlencode($ref); |
|
191 | + $out.=($mode?'</font>':''); |
|
192 | + if (! empty($conf->global->PAYMENT_SECURITY_TOKEN)) |
|
193 | + { |
|
194 | + if (empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) $out.='&securekey='.$conf->global->PAYMENT_SECURITY_TOKEN; |
|
195 | + else |
|
196 | + { |
|
197 | + $out.='&securekey='.($mode?'<font color="#666666">':''); |
|
198 | + if ($mode == 1) $out.="hash('".$conf->global->PAYMENT_SECURITY_TOKEN."' + '".$type."' + invoice_ref)"; |
|
199 | + if ($mode == 0) $out.= dol_hash($conf->global->PAYMENT_SECURITY_TOKEN . $type . $ref, 2); |
|
200 | + $out.=($mode?'</font>':''); |
|
201 | + } |
|
202 | + } |
|
203 | + } |
|
204 | + elseif ($type == 'contractline') |
|
205 | + { |
|
206 | + $out=DOL_MAIN_URL_ROOT.'/public/payment/newpayment.php?source=contractline&ref='.($mode?'<font color="#666666">':''); |
|
207 | + if ($mode == 1) $out.='contractline_ref'; |
|
208 | + if ($mode == 0) $out.=urlencode($ref); |
|
209 | + $out.=($mode?'</font>':''); |
|
210 | + if (! empty($conf->global->PAYMENT_SECURITY_TOKEN)) |
|
211 | + { |
|
212 | + if (empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) $out.='&securekey='.$conf->global->PAYMENT_SECURITY_TOKEN; |
|
213 | + else |
|
214 | + { |
|
215 | + $out.='&securekey='.($mode?'<font color="#666666">':''); |
|
216 | + if ($mode == 1) $out.="hash('".$conf->global->PAYMENT_SECURITY_TOKEN."' + '".$type."' + contractline_ref)"; |
|
217 | + if ($mode == 0) $out.= dol_hash($conf->global->PAYMENT_SECURITY_TOKEN . $type . $ref, 2); |
|
218 | + $out.=($mode?'</font>':''); |
|
219 | + } |
|
220 | + } |
|
221 | + } |
|
222 | + elseif ($type == 'member' || $type == 'membersubscription') |
|
223 | + { |
|
224 | + $out=DOL_MAIN_URL_ROOT.'/public/payment/newpayment.php?source=membersubscription&ref='.($mode?'<font color="#666666">':''); |
|
225 | + if ($mode == 1) $out.='member_ref'; |
|
226 | + if ($mode == 0) $out.=urlencode($ref); |
|
227 | + $out.=($mode?'</font>':''); |
|
228 | + if (! empty($conf->global->PAYMENT_SECURITY_TOKEN)) |
|
229 | + { |
|
230 | + if (empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) $out.='&securekey='.$conf->global->PAYMENT_SECURITY_TOKEN; |
|
231 | + else |
|
232 | + { |
|
233 | + $out.='&securekey='.($mode?'<font color="#666666">':''); |
|
234 | + if ($mode == 1) $out.="hash('".$conf->global->PAYMENT_SECURITY_TOKEN."' + '".$type."' + member_ref)"; |
|
235 | + if ($mode == 0) $out.= dol_hash($conf->global->PAYMENT_SECURITY_TOKEN . $type . $ref, 2); |
|
236 | + $out.=($mode?'</font>':''); |
|
237 | + } |
|
238 | + } |
|
239 | + } |
|
240 | + if ($type == 'donation') |
|
241 | + { |
|
242 | + $out=DOL_MAIN_URL_ROOT.'/public/payment/newpayment.php?source=donation&ref='.($mode?'<font color="#666666">':''); |
|
243 | + if ($mode == 1) $out.='donation_ref'; |
|
244 | + if ($mode == 0) $out.=urlencode($ref); |
|
245 | + $out.=($mode?'</font>':''); |
|
246 | + if (! empty($conf->global->PAYMENT_SECURITY_TOKEN)) |
|
247 | + { |
|
248 | + if (empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) $out.='&securekey='.$conf->global->PAYMENT_SECURITY_TOKEN; |
|
249 | + else |
|
250 | + { |
|
251 | + $out.='&securekey='.($mode?'<font color="#666666">':''); |
|
252 | + if ($mode == 1) $out.="hash('".$conf->global->PAYMENT_SECURITY_TOKEN."' + '".$type."' + donation_ref)"; |
|
253 | + if ($mode == 0) $out.= dol_hash($conf->global->PAYMENT_SECURITY_TOKEN . $type . $ref, 2); |
|
254 | + $out.=($mode?'</font>':''); |
|
255 | + } |
|
256 | + } |
|
257 | + } |
|
258 | + |
|
259 | + // For multicompany |
|
260 | + if (! empty($out) && ! empty($conf->multicompany->enabled)) $out.="&entity=".$conf->entity; // Check the entity because we may have the same reference in several entities |
|
261 | + |
|
262 | + return $out; |
|
263 | 263 | } |
264 | 264 | |
265 | 265 | |
@@ -331,20 +331,20 @@ discard block |
||
331 | 331 | print '<div class="center">'."\n"; |
332 | 332 | if ($addformmessage) |
333 | 333 | { |
334 | - print '<!-- object = '.$object->element.' -->'; |
|
335 | - print '<br>'; |
|
336 | - |
|
337 | - $parammessageform='ONLINE_PAYMENT_MESSAGE_FORM_'.$suffix; |
|
338 | - if (! empty($conf->global->$parammessageform)) print $langs->transnoentities($conf->global->$parammessageform); |
|
339 | - elseif (! empty($conf->global->ONLINE_PAYMENT_MESSAGE_FORM)) print $langs->transnoentities($conf->global->ONLINE_PAYMENT_MESSAGE_FORM); |
|
340 | - |
|
341 | - // Add other message if VAT exists |
|
342 | - if ($object->total_vat != 0 || $object->total_tva != 0) |
|
343 | - { |
|
344 | - $parammessageform='ONLINE_PAYMENT_MESSAGE_FORMIFVAT_'.$suffix; |
|
345 | - if (! empty($conf->global->$parammessageform)) print $langs->transnoentities($conf->global->$parammessageform); |
|
346 | - elseif (! empty($conf->global->ONLINE_PAYMENT_MESSAGE_FORMIFVAT)) print $langs->transnoentities($conf->global->ONLINE_PAYMENT_MESSAGE_FORMIFVAT); |
|
347 | - } |
|
334 | + print '<!-- object = '.$object->element.' -->'; |
|
335 | + print '<br>'; |
|
336 | + |
|
337 | + $parammessageform='ONLINE_PAYMENT_MESSAGE_FORM_'.$suffix; |
|
338 | + if (! empty($conf->global->$parammessageform)) print $langs->transnoentities($conf->global->$parammessageform); |
|
339 | + elseif (! empty($conf->global->ONLINE_PAYMENT_MESSAGE_FORM)) print $langs->transnoentities($conf->global->ONLINE_PAYMENT_MESSAGE_FORM); |
|
340 | + |
|
341 | + // Add other message if VAT exists |
|
342 | + if ($object->total_vat != 0 || $object->total_tva != 0) |
|
343 | + { |
|
344 | + $parammessageform='ONLINE_PAYMENT_MESSAGE_FORMIFVAT_'.$suffix; |
|
345 | + if (! empty($conf->global->$parammessageform)) print $langs->transnoentities($conf->global->$parammessageform); |
|
346 | + elseif (! empty($conf->global->ONLINE_PAYMENT_MESSAGE_FORMIFVAT)) print $langs->transnoentities($conf->global->ONLINE_PAYMENT_MESSAGE_FORMIFVAT); |
|
347 | + } |
|
348 | 348 | } |
349 | 349 | |
350 | 350 | print '<font style="font-size: 10px;"><br><hr>'."\n"; |
@@ -28,41 +28,41 @@ discard block |
||
28 | 28 | */ |
29 | 29 | function asset_admin_prepare_head() |
30 | 30 | { |
31 | - global $langs, $conf; |
|
31 | + global $langs, $conf; |
|
32 | 32 | |
33 | - $langs->load("assets"); |
|
33 | + $langs->load("assets"); |
|
34 | 34 | |
35 | - $h = 0; |
|
36 | - $head = array(); |
|
35 | + $h = 0; |
|
36 | + $head = array(); |
|
37 | 37 | |
38 | - $head[$h][0] = DOL_URL_ROOT . '/asset/admin/setup.php'; |
|
39 | - $head[$h][1] = $langs->trans("Settings"); |
|
40 | - $head[$h][2] = 'settings'; |
|
41 | - $h++; |
|
38 | + $head[$h][0] = DOL_URL_ROOT . '/asset/admin/setup.php'; |
|
39 | + $head[$h][1] = $langs->trans("Settings"); |
|
40 | + $head[$h][2] = 'settings'; |
|
41 | + $h++; |
|
42 | 42 | |
43 | - // Show more tabs from modules |
|
44 | - // Entries must be declared in modules descriptor with line |
|
45 | - //$this->tabs = array( |
|
46 | - // 'entity:+tabname:Title:@assets:/asset/mypage.php?id=__ID__' |
|
47 | - //); // to add new tab |
|
48 | - //$this->tabs = array( |
|
49 | - // 'entity:-tabname:Title:@assets:/asset/mypage.php?id=__ID__' |
|
50 | - //); // to remove a tab |
|
51 | - complete_head_from_modules($conf, $langs, $object, $head, $h, 'assets_admin'); |
|
43 | + // Show more tabs from modules |
|
44 | + // Entries must be declared in modules descriptor with line |
|
45 | + //$this->tabs = array( |
|
46 | + // 'entity:+tabname:Title:@assets:/asset/mypage.php?id=__ID__' |
|
47 | + //); // to add new tab |
|
48 | + //$this->tabs = array( |
|
49 | + // 'entity:-tabname:Title:@assets:/asset/mypage.php?id=__ID__' |
|
50 | + //); // to remove a tab |
|
51 | + complete_head_from_modules($conf, $langs, $object, $head, $h, 'assets_admin'); |
|
52 | 52 | |
53 | - $head[$h][0] = DOL_URL_ROOT . '/asset/admin/assets_extrafields.php'; |
|
54 | - $head[$h][1] = $langs->trans("ExtraFields"); |
|
55 | - $head[$h][2] = 'attributes'; |
|
56 | - $h++; |
|
53 | + $head[$h][0] = DOL_URL_ROOT . '/asset/admin/assets_extrafields.php'; |
|
54 | + $head[$h][1] = $langs->trans("ExtraFields"); |
|
55 | + $head[$h][2] = 'attributes'; |
|
56 | + $h++; |
|
57 | 57 | |
58 | - $head[$h][0] = DOL_URL_ROOT . '/asset/admin/assets_type_extrafields.php'; |
|
59 | - $head[$h][1] = $langs->trans("ExtraFieldsAssetsType"); |
|
60 | - $head[$h][2] = 'attributes_type'; |
|
61 | - $h++; |
|
58 | + $head[$h][0] = DOL_URL_ROOT . '/asset/admin/assets_type_extrafields.php'; |
|
59 | + $head[$h][1] = $langs->trans("ExtraFieldsAssetsType"); |
|
60 | + $head[$h][2] = 'attributes_type'; |
|
61 | + $h++; |
|
62 | 62 | |
63 | - complete_head_from_modules($conf, $langs, $object, $head, $h, 'assets_admin', 'remove'); |
|
63 | + complete_head_from_modules($conf, $langs, $object, $head, $h, 'assets_admin', 'remove'); |
|
64 | 64 | |
65 | - return $head; |
|
65 | + return $head; |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | /** |
@@ -72,56 +72,56 @@ discard block |
||
72 | 72 | */ |
73 | 73 | function asset_prepare_head() |
74 | 74 | { |
75 | - global $langs, $conf; |
|
76 | - |
|
77 | - $langs->load("assets"); |
|
78 | - |
|
79 | - $h = 0; |
|
80 | - $head = array(); |
|
81 | - |
|
82 | - $head[$h][0] = DOL_URL_ROOT . '/asset/card.php'; |
|
83 | - $head[$h][1] = $langs->trans("Card"); |
|
84 | - $head[$h][2] = 'card'; |
|
85 | - $h++; |
|
86 | - |
|
87 | - // Show more tabs from modules |
|
88 | - // Entries must be declared in modules descriptor with line |
|
89 | - //$this->tabs = array( |
|
90 | - // 'entity:+tabname:Title:@assets:/assets/mypage.php?id=__ID__' |
|
91 | - //); // to add new tab |
|
92 | - //$this->tabs = array( |
|
93 | - // 'entity:-tabname:Title:@assets:/assets/mypage.php?id=__ID__' |
|
94 | - //); // to remove a tab |
|
95 | - complete_head_from_modules($conf, $langs, $object, $head, $h, 'assets'); |
|
96 | - |
|
97 | - require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; |
|
98 | - require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php'; |
|
99 | - $upload_dir = $conf->assets->dir_output . '/' . get_exdir($filename,2,0,1,$object,'assets'). '/'. dol_sanitizeFileName($object->ref); |
|
100 | - $nbFiles = count(dol_dir_list($upload_dir,'files',0,'','(\.meta|_preview.*\.png)$')); |
|
101 | - $nbLinks=Link::count($db, $object->element, $object->id); |
|
102 | - $head[$h][0] = DOL_URL_ROOT.'/asset/document.php?id='.$object->id; |
|
103 | - $head[$h][1] = $langs->trans('Documents'); |
|
104 | - if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' <span class="badge">'.($nbFiles+$nbLinks).'</span>'; |
|
105 | - $head[$h][2] = 'documents'; |
|
106 | - $h++; |
|
107 | - |
|
108 | - $nbNote = 0; |
|
109 | - if(!empty($object->note_private)) $nbNote++; |
|
110 | - if(!empty($object->note_public)) $nbNote++; |
|
111 | - $head[$h][0] = DOL_URL_ROOT.'/asset/note.php?id='.$object->id; |
|
112 | - $head[$h][1] = $langs->trans("Notes"); |
|
113 | - if ($nbNote > 0) $head[$h][1].= ' <span class="badge">'.$nbNote.'</span>'; |
|
114 | - $head[$h][2] = 'note'; |
|
115 | - $h++; |
|
116 | - |
|
117 | - $head[$h][0] = DOL_URL_ROOT . '/asset/info.php?id=' . $object->id; |
|
118 | - $head[$h][1] = $langs->trans("Info"); |
|
119 | - $head[$h][2] = 'info'; |
|
120 | - $h++; |
|
121 | - |
|
122 | - complete_head_from_modules($conf, $langs, $object, $head, $h, 'asset', 'remove'); |
|
123 | - |
|
124 | - return $head; |
|
75 | + global $langs, $conf; |
|
76 | + |
|
77 | + $langs->load("assets"); |
|
78 | + |
|
79 | + $h = 0; |
|
80 | + $head = array(); |
|
81 | + |
|
82 | + $head[$h][0] = DOL_URL_ROOT . '/asset/card.php'; |
|
83 | + $head[$h][1] = $langs->trans("Card"); |
|
84 | + $head[$h][2] = 'card'; |
|
85 | + $h++; |
|
86 | + |
|
87 | + // Show more tabs from modules |
|
88 | + // Entries must be declared in modules descriptor with line |
|
89 | + //$this->tabs = array( |
|
90 | + // 'entity:+tabname:Title:@assets:/assets/mypage.php?id=__ID__' |
|
91 | + //); // to add new tab |
|
92 | + //$this->tabs = array( |
|
93 | + // 'entity:-tabname:Title:@assets:/assets/mypage.php?id=__ID__' |
|
94 | + //); // to remove a tab |
|
95 | + complete_head_from_modules($conf, $langs, $object, $head, $h, 'assets'); |
|
96 | + |
|
97 | + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; |
|
98 | + require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php'; |
|
99 | + $upload_dir = $conf->assets->dir_output . '/' . get_exdir($filename,2,0,1,$object,'assets'). '/'. dol_sanitizeFileName($object->ref); |
|
100 | + $nbFiles = count(dol_dir_list($upload_dir,'files',0,'','(\.meta|_preview.*\.png)$')); |
|
101 | + $nbLinks=Link::count($db, $object->element, $object->id); |
|
102 | + $head[$h][0] = DOL_URL_ROOT.'/asset/document.php?id='.$object->id; |
|
103 | + $head[$h][1] = $langs->trans('Documents'); |
|
104 | + if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' <span class="badge">'.($nbFiles+$nbLinks).'</span>'; |
|
105 | + $head[$h][2] = 'documents'; |
|
106 | + $h++; |
|
107 | + |
|
108 | + $nbNote = 0; |
|
109 | + if(!empty($object->note_private)) $nbNote++; |
|
110 | + if(!empty($object->note_public)) $nbNote++; |
|
111 | + $head[$h][0] = DOL_URL_ROOT.'/asset/note.php?id='.$object->id; |
|
112 | + $head[$h][1] = $langs->trans("Notes"); |
|
113 | + if ($nbNote > 0) $head[$h][1].= ' <span class="badge">'.$nbNote.'</span>'; |
|
114 | + $head[$h][2] = 'note'; |
|
115 | + $h++; |
|
116 | + |
|
117 | + $head[$h][0] = DOL_URL_ROOT . '/asset/info.php?id=' . $object->id; |
|
118 | + $head[$h][1] = $langs->trans("Info"); |
|
119 | + $head[$h][2] = 'info'; |
|
120 | + $h++; |
|
121 | + |
|
122 | + complete_head_from_modules($conf, $langs, $object, $head, $h, 'asset', 'remove'); |
|
123 | + |
|
124 | + return $head; |
|
125 | 125 | } |
126 | 126 | |
127 | 127 | /** |
@@ -132,23 +132,23 @@ discard block |
||
132 | 132 | */ |
133 | 133 | function asset_type_prepare_head(AssetType $object) |
134 | 134 | { |
135 | - global $langs, $conf, $user; |
|
135 | + global $langs, $conf, $user; |
|
136 | 136 | |
137 | - $h=0; |
|
138 | - $head = array(); |
|
137 | + $h=0; |
|
138 | + $head = array(); |
|
139 | 139 | |
140 | - $head[$h][0] = DOL_URL_ROOT.'/asset/type.php?rowid='.$object->id; |
|
141 | - $head[$h][1] = $langs->trans("Card"); |
|
142 | - $head[$h][2] = 'card'; |
|
143 | - $h++; |
|
140 | + $head[$h][0] = DOL_URL_ROOT.'/asset/type.php?rowid='.$object->id; |
|
141 | + $head[$h][1] = $langs->trans("Card"); |
|
142 | + $head[$h][2] = 'card'; |
|
143 | + $h++; |
|
144 | 144 | |
145 | - // Show more tabs from modules |
|
146 | - // Entries must be declared in modules descriptor with line |
|
147 | - // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab |
|
148 | - // $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab |
|
149 | - complete_head_from_modules($conf,$langs,$object,$head,$h,'assettype'); |
|
145 | + // Show more tabs from modules |
|
146 | + // Entries must be declared in modules descriptor with line |
|
147 | + // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab |
|
148 | + // $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab |
|
149 | + complete_head_from_modules($conf,$langs,$object,$head,$h,'assettype'); |
|
150 | 150 | |
151 | - complete_head_from_modules($conf,$langs,$object,$head,$h,'assettype','remove'); |
|
151 | + complete_head_from_modules($conf,$langs,$object,$head,$h,'assettype','remove'); |
|
152 | 152 | |
153 | - return $head; |
|
153 | + return $head; |
|
154 | 154 | } |
@@ -36,10 +36,10 @@ discard block |
||
36 | 36 | $tab = 0; |
37 | 37 | $head = array(); |
38 | 38 | |
39 | - $head[$tab][0] = DOL_URL_ROOT.'/compta/tva/card.php?id='.$object->id; |
|
40 | - $head[$tab][1] = $langs->trans('Card'); |
|
41 | - $head[$tab][2] = 'card'; |
|
42 | - $tab++; |
|
39 | + $head[$tab][0] = DOL_URL_ROOT.'/compta/tva/card.php?id='.$object->id; |
|
40 | + $head[$tab][1] = $langs->trans('Card'); |
|
41 | + $head[$tab][2] = 'card'; |
|
42 | + $tab++; |
|
43 | 43 | |
44 | 44 | // Show more tabs from modules |
45 | 45 | // Entries must be declared in modules descriptor with line |
@@ -47,16 +47,16 @@ discard block |
||
47 | 47 | // $this->tabs = array('entity:-tabname); to remove a tab |
48 | 48 | complete_head_from_modules($conf, $langs, $object, $head, $tab,'vat'); |
49 | 49 | |
50 | - require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; |
|
50 | + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; |
|
51 | 51 | require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php'; |
52 | - $upload_dir = $conf->tax->dir_output . "/" . dol_sanitizeFileName($object->ref); |
|
53 | - $nbFiles = count(dol_dir_list($upload_dir,'files',0,'','(\.meta|_preview.*\.png)$')); |
|
52 | + $upload_dir = $conf->tax->dir_output . "/" . dol_sanitizeFileName($object->ref); |
|
53 | + $nbFiles = count(dol_dir_list($upload_dir,'files',0,'','(\.meta|_preview.*\.png)$')); |
|
54 | 54 | $nbLinks=Link::count($db, $object->element, $object->id); |
55 | - $head[$tab][0] = DOL_URL_ROOT.'/compta/tva/document.php?id='.$object->id; |
|
56 | - $head[$tab][1] = $langs->trans("Documents"); |
|
57 | - if (($nbFiles+$nbLinks) > 0) $head[$tab][1].= ' <span class="badge">'.($nbFiles+$nbLinks).'</span>'; |
|
58 | - $head[$tab][2] = 'documents'; |
|
59 | - $tab++; |
|
55 | + $head[$tab][0] = DOL_URL_ROOT.'/compta/tva/document.php?id='.$object->id; |
|
56 | + $head[$tab][1] = $langs->trans("Documents"); |
|
57 | + if (($nbFiles+$nbLinks) > 0) $head[$tab][1].= ' <span class="badge">'.($nbFiles+$nbLinks).'</span>'; |
|
58 | + $head[$tab][2] = 'documents'; |
|
59 | + $tab++; |
|
60 | 60 | |
61 | 61 | $head[$tab][0] = DOL_URL_ROOT.'/compta/tva/info.php?id='.$object->id; |
62 | 62 | $head[$tab][1] = $langs->trans("Info"); |
@@ -28,30 +28,30 @@ discard block |
||
28 | 28 | */ |
29 | 29 | function donation_admin_prepare_head() |
30 | 30 | { |
31 | - global $langs, $conf; |
|
31 | + global $langs, $conf; |
|
32 | 32 | |
33 | - $h = 0; |
|
34 | - $head = array(); |
|
33 | + $h = 0; |
|
34 | + $head = array(); |
|
35 | 35 | |
36 | - $head[$h][0] = DOL_URL_ROOT . '/don/admin/donation.php'; |
|
37 | - $head[$h][1] = $langs->trans("Miscellaneous"); |
|
38 | - $head[$h][2] = 'general'; |
|
39 | - $h ++; |
|
36 | + $head[$h][0] = DOL_URL_ROOT . '/don/admin/donation.php'; |
|
37 | + $head[$h][1] = $langs->trans("Miscellaneous"); |
|
38 | + $head[$h][2] = 'general'; |
|
39 | + $h ++; |
|
40 | 40 | |
41 | - // Show more tabs from modules |
|
42 | - // Entries must be declared in modules descriptor with line |
|
43 | - // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab |
|
44 | - // $this->tabs = array('entity:-tabname); to remove a tab |
|
45 | - complete_head_from_modules($conf, $langs, null, $head, $h, 'donation_admin'); |
|
41 | + // Show more tabs from modules |
|
42 | + // Entries must be declared in modules descriptor with line |
|
43 | + // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab |
|
44 | + // $this->tabs = array('entity:-tabname); to remove a tab |
|
45 | + complete_head_from_modules($conf, $langs, null, $head, $h, 'donation_admin'); |
|
46 | 46 | |
47 | - $head[$h][0] = DOL_URL_ROOT . '/don/admin/donation_extrafields.php'; |
|
48 | - $head[$h][1] = $langs->trans("ExtraFields"); |
|
47 | + $head[$h][0] = DOL_URL_ROOT . '/don/admin/donation_extrafields.php'; |
|
48 | + $head[$h][1] = $langs->trans("ExtraFields"); |
|
49 | 49 | $head[$h][2] = 'attributes'; |
50 | - $h++; |
|
50 | + $h++; |
|
51 | 51 | |
52 | - complete_head_from_modules($conf, $langs, null, $head, $h, 'donation_admin', 'remove'); |
|
52 | + complete_head_from_modules($conf, $langs, null, $head, $h, 'donation_admin', 'remove'); |
|
53 | 53 | |
54 | - return $head; |
|
54 | + return $head; |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | /** |
@@ -62,48 +62,48 @@ discard block |
||
62 | 62 | */ |
63 | 63 | function donation_prepare_head($object) |
64 | 64 | { |
65 | - global $db, $langs, $conf; |
|
65 | + global $db, $langs, $conf; |
|
66 | 66 | |
67 | - $h = 0; |
|
68 | - $head = array(); |
|
67 | + $h = 0; |
|
68 | + $head = array(); |
|
69 | 69 | |
70 | - $head[$h][0] = DOL_URL_ROOT . '/don/card.php?id=' . $object->id; |
|
71 | - $head[$h][1] = $langs->trans("Card"); |
|
72 | - $head[$h][2] = 'card'; |
|
73 | - $h ++; |
|
70 | + $head[$h][0] = DOL_URL_ROOT . '/don/card.php?id=' . $object->id; |
|
71 | + $head[$h][1] = $langs->trans("Card"); |
|
72 | + $head[$h][2] = 'card'; |
|
73 | + $h ++; |
|
74 | 74 | |
75 | - // Show more tabs from modules |
|
76 | - // Entries must be declared in modules descriptor with line |
|
77 | - // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab |
|
78 | - // $this->tabs = array('entity:-tabname); to remove a tab |
|
79 | - complete_head_from_modules($conf, $langs, $object, $head, $h, 'donation'); |
|
75 | + // Show more tabs from modules |
|
76 | + // Entries must be declared in modules descriptor with line |
|
77 | + // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab |
|
78 | + // $this->tabs = array('entity:-tabname); to remove a tab |
|
79 | + complete_head_from_modules($conf, $langs, $object, $head, $h, 'donation'); |
|
80 | 80 | |
81 | - require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; |
|
81 | + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; |
|
82 | 82 | require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php'; |
83 | - $upload_dir = $conf->don->dir_output . '/' . get_exdir($filename,2,0,1,$object,'donation'). '/'. dol_sanitizeFileName($object->ref); |
|
84 | - $nbFiles = count(dol_dir_list($upload_dir,'files',0,'','(\.meta|_preview.*\.png)$')); |
|
83 | + $upload_dir = $conf->don->dir_output . '/' . get_exdir($filename,2,0,1,$object,'donation'). '/'. dol_sanitizeFileName($object->ref); |
|
84 | + $nbFiles = count(dol_dir_list($upload_dir,'files',0,'','(\.meta|_preview.*\.png)$')); |
|
85 | 85 | $nbLinks=Link::count($db, $object->element, $object->id); |
86 | - $head[$h][0] = DOL_URL_ROOT.'/don/document.php?id='.$object->id; |
|
87 | - $head[$h][1] = $langs->trans('Documents'); |
|
88 | - if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' <span class="badge">'.($nbFiles+$nbLinks).'</span>'; |
|
89 | - $head[$h][2] = 'documents'; |
|
90 | - $h++; |
|
86 | + $head[$h][0] = DOL_URL_ROOT.'/don/document.php?id='.$object->id; |
|
87 | + $head[$h][1] = $langs->trans('Documents'); |
|
88 | + if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' <span class="badge">'.($nbFiles+$nbLinks).'</span>'; |
|
89 | + $head[$h][2] = 'documents'; |
|
90 | + $h++; |
|
91 | 91 | |
92 | - $nbNote = 0; |
|
93 | - if(!empty($object->note_private)) $nbNote++; |
|
94 | - if(!empty($object->note_public)) $nbNote++; |
|
95 | - $head[$h][0] = DOL_URL_ROOT.'/don/note.php?id='.$object->id; |
|
96 | - $head[$h][1] = $langs->trans("Notes"); |
|
97 | - if ($nbNote > 0) $head[$h][1].= ' <span class="badge">'.$nbNote.'</span>'; |
|
98 | - $head[$h][2] = 'note'; |
|
99 | - $h++; |
|
92 | + $nbNote = 0; |
|
93 | + if(!empty($object->note_private)) $nbNote++; |
|
94 | + if(!empty($object->note_public)) $nbNote++; |
|
95 | + $head[$h][0] = DOL_URL_ROOT.'/don/note.php?id='.$object->id; |
|
96 | + $head[$h][1] = $langs->trans("Notes"); |
|
97 | + if ($nbNote > 0) $head[$h][1].= ' <span class="badge">'.$nbNote.'</span>'; |
|
98 | + $head[$h][2] = 'note'; |
|
99 | + $h++; |
|
100 | 100 | |
101 | - $head[$h][0] = DOL_URL_ROOT . '/don/info.php?id=' . $object->id; |
|
102 | - $head[$h][1] = $langs->trans("Info"); |
|
103 | - $head[$h][2] = 'info'; |
|
104 | - $h++; |
|
101 | + $head[$h][0] = DOL_URL_ROOT . '/don/info.php?id=' . $object->id; |
|
102 | + $head[$h][1] = $langs->trans("Info"); |
|
103 | + $head[$h][2] = 'info'; |
|
104 | + $h++; |
|
105 | 105 | |
106 | - complete_head_from_modules($conf, $langs, $object, $head, $h, 'donation', 'remove'); |
|
106 | + complete_head_from_modules($conf, $langs, $object, $head, $h, 'donation', 'remove'); |
|
107 | 107 | |
108 | - return $head; |
|
108 | + return $head; |
|
109 | 109 | } |
@@ -29,33 +29,33 @@ |
||
29 | 29 | */ |
30 | 30 | function trip_prepare_head(Deplacement $object) |
31 | 31 | { |
32 | - global $langs, $conf; |
|
32 | + global $langs, $conf; |
|
33 | 33 | |
34 | - $h = 0; |
|
35 | - $head = array(); |
|
34 | + $h = 0; |
|
35 | + $head = array(); |
|
36 | 36 | |
37 | - $head[$h][0] = DOL_URL_ROOT . '/compta/deplacement/card.php?id=' . $object->id; |
|
38 | - $head[$h][1] = $langs->trans("Card"); |
|
39 | - $head[$h][2] = 'card'; |
|
40 | - $h++; |
|
37 | + $head[$h][0] = DOL_URL_ROOT . '/compta/deplacement/card.php?id=' . $object->id; |
|
38 | + $head[$h][1] = $langs->trans("Card"); |
|
39 | + $head[$h][2] = 'card'; |
|
40 | + $h++; |
|
41 | 41 | |
42 | - // Show more tabs from modules |
|
43 | - // Entries must be declared in modules descriptor with line |
|
42 | + // Show more tabs from modules |
|
43 | + // Entries must be declared in modules descriptor with line |
|
44 | 44 | // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab |
45 | 45 | // $this->tabs = array('entity:-tabname); to remove a tab |
46 | - complete_head_from_modules($conf,$langs,$object,$head,$h,'trip'); |
|
46 | + complete_head_from_modules($conf,$langs,$object,$head,$h,'trip'); |
|
47 | 47 | |
48 | - $head[$h][0] = DOL_URL_ROOT.'/compta/deplacement/document.php?id='.$object->id; |
|
49 | - $head[$h][1] = $langs->trans("Documents"); |
|
50 | - $head[$h][2] = 'documents'; |
|
51 | - $h++; |
|
48 | + $head[$h][0] = DOL_URL_ROOT.'/compta/deplacement/document.php?id='.$object->id; |
|
49 | + $head[$h][1] = $langs->trans("Documents"); |
|
50 | + $head[$h][2] = 'documents'; |
|
51 | + $h++; |
|
52 | 52 | |
53 | - $head[$h][0] = DOL_URL_ROOT . '/compta/deplacement/info.php?id=' . $object->id; |
|
54 | - $head[$h][1] = $langs->trans("Info"); |
|
55 | - $head[$h][2] = 'info'; |
|
56 | - $h++; |
|
53 | + $head[$h][0] = DOL_URL_ROOT . '/compta/deplacement/info.php?id=' . $object->id; |
|
54 | + $head[$h][1] = $langs->trans("Info"); |
|
55 | + $head[$h][2] = 'info'; |
|
56 | + $h++; |
|
57 | 57 | |
58 | - complete_head_from_modules($conf,$langs,$object,$head,$h,'trip','remove'); |
|
58 | + complete_head_from_modules($conf,$langs,$object,$head,$h,'trip','remove'); |
|
59 | 59 | |
60 | - return $head; |
|
60 | + return $head; |
|
61 | 61 | } |
@@ -31,31 +31,31 @@ discard block |
||
31 | 31 | */ |
32 | 32 | function categories_prepare_head($object,$type) |
33 | 33 | { |
34 | - global $langs, $conf, $user; |
|
34 | + global $langs, $conf, $user; |
|
35 | 35 | |
36 | - // Load translation files required by the page |
|
36 | + // Load translation files required by the page |
|
37 | 37 | $langs->loadLangs(array('categories', 'products')); |
38 | 38 | |
39 | - $h = 0; |
|
40 | - $head = array(); |
|
39 | + $h = 0; |
|
40 | + $head = array(); |
|
41 | 41 | |
42 | - $head[$h][0] = DOL_URL_ROOT.'/categories/viewcat.php?id='.$object->id.'&type='.$type; |
|
43 | - $head[$h][1] = $langs->trans("Card"); |
|
44 | - $head[$h][2] = 'card'; |
|
45 | - $h++; |
|
42 | + $head[$h][0] = DOL_URL_ROOT.'/categories/viewcat.php?id='.$object->id.'&type='.$type; |
|
43 | + $head[$h][1] = $langs->trans("Card"); |
|
44 | + $head[$h][2] = 'card'; |
|
45 | + $h++; |
|
46 | 46 | |
47 | - $head[$h][0] = DOL_URL_ROOT.'/categories/photos.php?id='.$object->id.'&type='.$type; |
|
48 | - $head[$h][1] = $langs->trans("Photos"); |
|
49 | - $head[$h][2] = 'photos'; |
|
50 | - $h++; |
|
47 | + $head[$h][0] = DOL_URL_ROOT.'/categories/photos.php?id='.$object->id.'&type='.$type; |
|
48 | + $head[$h][1] = $langs->trans("Photos"); |
|
49 | + $head[$h][2] = 'photos'; |
|
50 | + $h++; |
|
51 | 51 | |
52 | - if (! empty($conf->global->MAIN_MULTILANGS)) |
|
53 | - { |
|
54 | - $head[$h][0] = DOL_URL_ROOT.'/categories/traduction.php?id='.$object->id.'&type='.$type; |
|
55 | - $head[$h][1] = $langs->trans("Translation"); |
|
56 | - $head[$h][2] = 'translation'; |
|
57 | - $h++; |
|
58 | - } |
|
52 | + if (! empty($conf->global->MAIN_MULTILANGS)) |
|
53 | + { |
|
54 | + $head[$h][0] = DOL_URL_ROOT.'/categories/traduction.php?id='.$object->id.'&type='.$type; |
|
55 | + $head[$h][1] = $langs->trans("Translation"); |
|
56 | + $head[$h][2] = 'translation'; |
|
57 | + $h++; |
|
58 | + } |
|
59 | 59 | |
60 | 60 | // Show more tabs from modules |
61 | 61 | // Entries must be declared in modules descriptor with line |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | |
66 | 66 | complete_head_from_modules($conf,$langs,$object,$head,$h,'categories_'.$type,'remove'); |
67 | 67 | |
68 | - return $head; |
|
68 | + return $head; |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | |
@@ -76,32 +76,32 @@ discard block |
||
76 | 76 | */ |
77 | 77 | function categoriesadmin_prepare_head() |
78 | 78 | { |
79 | - global $langs, $conf, $user; |
|
79 | + global $langs, $conf, $user; |
|
80 | 80 | |
81 | - $langs->load("categories"); |
|
81 | + $langs->load("categories"); |
|
82 | 82 | |
83 | - $h = 0; |
|
84 | - $head = array(); |
|
83 | + $h = 0; |
|
84 | + $head = array(); |
|
85 | 85 | |
86 | - $head[$h][0] = DOL_URL_ROOT.'/categories/admin/categorie.php'; |
|
87 | - $head[$h][1] = $langs->trans("Setup"); |
|
88 | - $head[$h][2] = 'setup'; |
|
89 | - $h++; |
|
86 | + $head[$h][0] = DOL_URL_ROOT.'/categories/admin/categorie.php'; |
|
87 | + $head[$h][1] = $langs->trans("Setup"); |
|
88 | + $head[$h][2] = 'setup'; |
|
89 | + $h++; |
|
90 | 90 | |
91 | - $head[$h][0] = DOL_URL_ROOT.'/categories/admin/categorie_extrafields.php'; |
|
92 | - $head[$h][1] = $langs->trans("ExtraFieldsCategories"); |
|
93 | - $head[$h][2] = 'attributes_categories'; |
|
94 | - $h++; |
|
91 | + $head[$h][0] = DOL_URL_ROOT.'/categories/admin/categorie_extrafields.php'; |
|
92 | + $head[$h][1] = $langs->trans("ExtraFieldsCategories"); |
|
93 | + $head[$h][2] = 'attributes_categories'; |
|
94 | + $h++; |
|
95 | 95 | |
96 | - // Show more tabs from modules |
|
97 | - // Entries must be declared in modules descriptor with line |
|
98 | - // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab |
|
99 | - // $this->tabs = array('entity:-tabname); to remove a tab |
|
100 | - complete_head_from_modules($conf,$langs,null,$head,$h,'categoriesadmin'); |
|
96 | + // Show more tabs from modules |
|
97 | + // Entries must be declared in modules descriptor with line |
|
98 | + // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab |
|
99 | + // $this->tabs = array('entity:-tabname); to remove a tab |
|
100 | + complete_head_from_modules($conf,$langs,null,$head,$h,'categoriesadmin'); |
|
101 | 101 | |
102 | - complete_head_from_modules($conf,$langs,null,$head,$h,'categoriesadmin','remove'); |
|
102 | + complete_head_from_modules($conf,$langs,null,$head,$h,'categoriesadmin','remove'); |
|
103 | 103 | |
104 | - return $head; |
|
104 | + return $head; |
|
105 | 105 | } |
106 | 106 | |
107 | 107 |