dolibarr  16.0.5
card.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3  * Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
4  * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
5  * Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
6  * Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
7  * Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 3 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program. If not, see <https://www.gnu.org/licenses/>.
21  */
22 
28 require '../../main.inc.php';
29 require_once DOL_DOCUMENT_ROOT.'/core/lib/trip.lib.php';
30 require_once DOL_DOCUMENT_ROOT.'/compta/deplacement/class/deplacement.class.php';
31 require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
32 if (isModEnabled('project')) {
33  require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
34 }
35 
36 // Load translation files required by the page
37 $langs->load("trips");
38 
39 
40 // Security check
41 $id = GETPOST('id', 'int');
42 if ($user->socid) {
43  $socid = $user->socid;
44 }
45 $result = restrictedArea($user, 'deplacement', $id, '');
46 
47 $action = GETPOST('action', 'aZ09');
48 $confirm = GETPOST('confirm', 'alpha');
49 
50 $object = new Deplacement($db);
51 
52 // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
53 $hookmanager->initHooks(array('tripsandexpensescard', 'globalcard'));
54 
55 $permissionnote = $user->rights->deplacement->creer; // Used by the include of actions_setnotes.inc.php
56 
57 
58 /*
59  * Actions
60  */
61 
62 include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not includ_once
63 
64 if ($action == 'validate' && $user->rights->deplacement->creer) {
65  $object->fetch($id);
66  if ($object->statut == Deplacement::STATUS_DRAFT) {
67  $result = $object->setStatut(1);
68  if ($result > 0) {
69  header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id);
70  exit;
71  } else {
72  setEventMessages($object->error, $object->errors, 'errors');
73  }
74  }
75 } elseif ($action == 'classifyrefunded' && $user->rights->deplacement->creer) {
76  $object->fetch($id);
77  if ($object->statut == Deplacement::STATUS_VALIDATED) {
78  $result = $object->setStatut(Deplacement::STATUS_REFUNDED);
79  if ($result > 0) {
80  header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id);
81  exit;
82  } else {
83  setEventMessages($object->error, $object->errors, 'errors');
84  }
85  }
86 } elseif ($action == 'confirm_delete' && $confirm == "yes" && $user->rights->deplacement->supprimer) {
87  $result = $object->delete($user);
88  if ($result >= 0) {
89  header("Location: index.php");
90  exit;
91  } else {
92  setEventMessages($object->error, $object->errors, 'errors');
93  }
94 } elseif ($action == 'add' && $user->rights->deplacement->creer) {
95  if (!GETPOST('cancel', 'alpha')) {
96  $error = 0;
97 
98  $object->date = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int'));
99  $object->km = price2num(GETPOST('km', 'alpha'), 'MU'); // Not 'int', it may be a formated amount
100  $object->type = GETPOST('type', 'alpha');
101  $object->socid = (int) GETPOST('socid', 'int');
102  $object->fk_user = (int) GETPOST('fk_user', 'int');
103  $object->note_private = GETPOST('note_private', 'alpha');
104  $object->note_public = GETPOST('note_public', 'alpha');
105  $object->statut = Deplacement::STATUS_DRAFT;
106 
107  if (!$object->date) {
108  setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")), null, 'errors');
109  $error++;
110  }
111  if ($object->type == '-1') {
112  setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type")), null, 'errors');
113  $error++;
114  }
115  if (!($object->fk_user > 0)) {
116  setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Person")), null, 'errors');
117  $error++;
118  }
119 
120  if (!$error) {
121  $id = $object->create($user);
122 
123  if ($id > 0) {
124  header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id);
125  exit;
126  } else {
127  setEventMessages($object->error, $object->errors, 'errors');
128  $action = 'create';
129  }
130  } else {
131  $action = 'create';
132  }
133  } else {
134  header("Location: index.php");
135  exit;
136  }
137 } elseif ($action == 'update' && $user->rights->deplacement->creer) {
138  // Update record
139  if (!GETPOST('cancel', 'alpha')) {
140  $result = $object->fetch($id);
141 
142  $object->date = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int'));
143  $object->km = price2num(GETPOST('km', 'alpha'), 'MU'); // Not 'int', it may be a formated amount
144  $object->type = GETPOST('type', 'alpha');
145  $object->socid = (int) GETPOST('socid', 'int');
146  $object->fk_user = (int) GETPOST('fk_user', 'int');
147  $object->note_private = GETPOST('note_private', 'alpha');
148  $object->note_public = GETPOST('note_public', 'alpha');
149 
150  $result = $object->update($user);
151 
152  if ($result > 0) {
153  header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id);
154  exit;
155  } else {
156  setEventMessages($object->error, $object->errors, 'errors');
157  }
158  } else {
159  header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id);
160  exit;
161  }
162 } elseif ($action == 'classin' && $user->rights->deplacement->creer) {
163  // Set into a project
164  $object->fetch($id);
165  $result = $object->setProject(GETPOST('projectid', 'int'));
166  if ($result < 0) {
167  dol_print_error($db, $object->error);
168  }
169 } elseif ($action == 'setdated' && $user->rights->deplacement->creer) {
170  // Set fields
171  $dated = dol_mktime(GETPOST('datedhour', 'int'), GETPOST('datedmin', 'int'), GETPOST('datedsec', 'int'), GETPOST('datedmonth', 'int'), GETPOST('datedday', 'int'), GETPOST('datedyear', 'int'));
172  $object->fetch($id);
173  $result = $object->setValueFrom('dated', $dated, '', '', 'date', '', $user, 'DEPLACEMENT_MODIFY');
174  if ($result < 0) {
175  dol_print_error($db, $object->error);
176  }
177 } elseif ($action == 'setkm' && $user->rights->deplacement->creer) {
178  $object->fetch($id);
179  $result = $object->setValueFrom('km', GETPOST('km', 'int'), '', null, 'text', '', $user, 'DEPLACEMENT_MODIFY');
180  if ($result < 0) {
181  dol_print_error($db, $object->error);
182  }
183 }
184 
185 
186 /*
187  * View
188  */
189 
190 llxHeader();
191 
192 $form = new Form($db);
193 
194 /*
195  * Action create
196 */
197 if ($action == 'create') {
198  //WYSIWYG Editor
199  require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
200 
201  print load_fiche_titre($langs->trans("NewTrip"));
202 
203  $datec = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int'));
204 
205  print '<form name="add" action="'.$_SERVER["PHP_SELF"].'" method="POST">'."\n";
206  print '<input type="hidden" name="token" value="'.newToken().'">';
207  print '<input type="hidden" name="action" value="add">';
208 
209  print '<table class="border centpercent">';
210 
211  print "<tr>";
212  print '<td class="fieldrequired">'.$langs->trans("Type").'</td><td>';
213  $form->select_type_fees(GETPOST('type', 'int'), 'type', 1);
214  print '</td></tr>';
215 
216  print "<tr>";
217  print '<td class="fieldrequired">'.$langs->trans("Person").'</td><td>';
218  print $form->select_dolusers(GETPOST('fk_user', 'int'), 'fk_user', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
219  print '</td></tr>';
220 
221  print "<tr>";
222  print '<td class="fieldrequired">'.$langs->trans("Date").'</td><td>';
223  print $form->selectDate($datec ? $datec : -1, '', '', '', '', 'add', 1, 1);
224  print '</td></tr>';
225 
226  // Km
227  print '<tr><td class="fieldrequired">'.$langs->trans("FeesKilometersOrAmout").'</td><td><input name="km" size="10" value="'.GETPOST("km").'"></td></tr>';
228 
229  // Company
230  print "<tr>";
231  print '<td>'.$langs->trans("CompanyVisited").'</td><td>';
232  print $form->select_company(GETPOST('socid', 'int'), 'socid', '', 1);
233  print '</td></tr>';
234 
235  // Public note
236  print '<tr>';
237  print '<td class="tdtop">'.$langs->trans('NotePublic').'</td>';
238  print '<td>';
239 
240  $doleditor = new DolEditor('note_public', GETPOST('note_public', 'restricthtml'), '', 200, 'dolibarr_notes', 'In', false, true, empty($conf->global->FCKEDITOR_ENABLE_NOTE_PUBLIC) ? 0 : 1, ROWS_8, '90%');
241  print $doleditor->Create(1);
242 
243  print '</td></tr>';
244 
245  // Private note
246  if (empty($user->socid)) {
247  print '<tr>';
248  print '<td class="tdtop">'.$langs->trans('NotePrivate').'</td>';
249  print '<td>';
250 
251  $doleditor = new DolEditor('note_private', GETPOST('note_private', 'restricthtml'), '', 200, 'dolibarr_notes', 'In', false, true, empty($conf->global->FCKEDITOR_ENABLE_NOTE_PRIVATE) ? 0 : 1, ROWS_8, '90%');
252  print $doleditor->Create(1);
253 
254  print '</td></tr>';
255  }
256 
257  // Other attributes
258  $parameters = array();
259  $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
260  print $hookmanager->resPrint;
261 
262  print '</table>';
263 
264  print '<br><div class="center">';
265  print '<input class="button button-save" type="submit" value="'.$langs->trans("Save").'">';
266  print '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
267  print '<input class="button button-cancel" type="submit" name="cancel" value="'.$langs->trans("Cancel").'">';
268  print '</div>';
269 
270  print '</form>';
271 } elseif ($id) {
272  $result = $object->fetch($id);
273  if ($result > 0) {
274  $head = trip_prepare_head($object);
275 
276  print dol_get_fiche_head($head, 'card', $langs->trans("TripCard"), 0, 'trip');
277 
278  if ($action == 'edit' && $user->rights->deplacement->creer) {
279  //WYSIWYG Editor
280  require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
281 
282  $soc = new Societe($db);
283  if ($object->socid) {
284  $soc->fetch($object->socid);
285  }
286 
287  print '<form name="update" action="'.$_SERVER["PHP_SELF"].'" method="POST">'."\n";
288  print '<input type="hidden" name="token" value="'.newToken().'">';
289  print '<input type="hidden" name="action" value="update">';
290  print '<input type="hidden" name="id" value="'.$id.'">';
291 
292  print '<table class="border centpercent">';
293 
294  // Ref
295  print "<tr>";
296  print '<td class="titlefield">'.$langs->trans("Ref").'</td><td>';
297  print $object->ref;
298  print '</td></tr>';
299 
300  // Type
301  print "<tr>";
302  print '<td class="fieldrequired">'.$langs->trans("Type").'</td><td>';
303  $form->select_type_fees(GETPOST('type', 'int') ?GETPOST('type', 'int') : $object->type, 'type', 0);
304  print '</td></tr>';
305 
306  // Who
307  print "<tr>";
308  print '<td class="fieldrequired">'.$langs->trans("Person").'</td><td>';
309  print $form->select_dolusers(GETPOST('fk_user', 'int') ?GETPOST('fk_user', 'int') : $object->fk_user, 'fk_user', 0, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
310  print '</td></tr>';
311 
312  // Date
313  print '<tr><td class="fieldrequired">'.$langs->trans("Date").'</td><td>';
314  print $form->selectDate($object->date, '', 0, 0, 0, 'update', 1, 0);
315  print '</td></tr>';
316 
317  // Km
318  print '<tr><td class="fieldrequired">'.$langs->trans("FeesKilometersOrAmout").'</td><td>';
319  print '<input name="km" class="flat" size="10" value="'.$object->km.'">';
320  print '</td></tr>';
321 
322  // Where
323  print "<tr>";
324  print '<td>'.$langs->trans("CompanyVisited").'</td><td>';
325  print $form->select_company($soc->id, 'socid', '', 1);
326  print '</td></tr>';
327 
328  // Public note
329  print '<tr><td class="tdtop">'.$langs->trans("NotePublic").'</td>';
330  print '<td>';
331 
332  $doleditor = new DolEditor('note_public', $object->note_public, '', 200, 'dolibarr_notes', 'In', false, true, empty($conf->global->FCKEDITOR_ENABLE_NOTE_PUBLIC) ? 0 : 1, ROWS_8, '90%');
333  print $doleditor->Create(1);
334 
335  print "</td></tr>";
336 
337  // Private note
338  if (empty($user->socid)) {
339  print '<tr><td class="tdtop">'.$langs->trans("NotePrivate").'</td>';
340  print '<td>';
341 
342  $doleditor = new DolEditor('note_private', $object->note_private, '', 200, 'dolibarr_notes', 'In', false, true, empty($conf->global->FCKEDITOR_ENABLE_NOTE_PRIVATE) ? 0 : 1, ROWS_8, '90%');
343  print $doleditor->Create(1);
344 
345  print "</td></tr>";
346  }
347 
348  // Other attributes
349  $parameters = array();
350  $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
351  print $hookmanager->resPrint;
352 
353  print '</table>';
354 
355  print '<br><div class="center">';
356  print '<input type="submit" class="button button-save" value="'.$langs->trans("Save").'">';
357  print '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
358  print '<input type="submit" name="cancel" class="button button-cancel" value="'.$langs->trans("Cancel").'">';
359  print '</div>';
360 
361  print '</form>';
362 
363  print '</div>';
364  } else {
365  /*
366  * Confirm delete trip
367  */
368  if ($action == 'delete') {
369  print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".urlencode($id), $langs->trans("DeleteTrip"), $langs->trans("ConfirmDeleteTrip"), "confirm_delete");
370  }
371 
372  $soc = new Societe($db);
373  if ($object->socid) {
374  $soc->fetch($object->socid);
375  }
376 
377  print '<table class="border centpercent">';
378 
379  $linkback = '<a href="'.DOL_URL_ROOT.'/compta/deplacement/list.php'.(!empty($socid) ? '?socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>';
380 
381  // Ref
382  print '<tr><td width="25%">'.$langs->trans("Ref").'</td><td>';
383  print $form->showrefnav($object, 'id', $linkback, 1, 'rowid', 'ref', '');
384  print '</td></tr>';
385 
386  $form->load_cache_types_fees();
387 
388  // Type
389  print '<tr><td>';
390  print $form->editfieldkey("Type", 'type', $langs->trans($object->type), $object, $user->rights->deplacement->creer, 'select:types_fees');
391  print '</td><td>';
392  print $form->editfieldval("Type", 'type', $form->cache_types_fees[$object->type], $object, $user->rights->deplacement->creer, 'select:types_fees');
393  print '</td></tr>';
394 
395  // Who
396  print '<tr><td>'.$langs->trans("Person").'</td><td>';
397  $userfee = new User($db);
398  $userfee->fetch($object->fk_user);
399  print $userfee->getNomUrl(1);
400  print '</td></tr>';
401 
402  // Date
403  print '<tr><td>';
404  print $form->editfieldkey("Date", 'dated', $object->date, $object, $user->rights->deplacement->creer, 'datepicker');
405  print '</td><td>';
406  print $form->editfieldval("Date", 'dated', $object->date, $object, $user->rights->deplacement->creer, 'datepicker');
407  print '</td></tr>';
408 
409  // Km/Price
410  print '<tr><td class="tdtop">';
411  print $form->editfieldkey("FeesKilometersOrAmout", 'km', $object->km, $object, $user->rights->deplacement->creer, 'numeric:6');
412  print '</td><td>';
413  print $form->editfieldval("FeesKilometersOrAmout", 'km', $object->km, $object, $user->rights->deplacement->creer, 'numeric:6');
414  print "</td></tr>";
415 
416  // Where
417  print '<tr><td>'.$langs->trans("CompanyVisited").'</td>';
418  print '<td>';
419  if ($soc->id) {
420  print $soc->getNomUrl(1);
421  }
422  print '</td></tr>';
423 
424  // Project
425  if (isModEnabled('project')) {
426  $langs->load('projects');
427  print '<tr>';
428  print '<td>';
429 
430  print '<table class="nobordernopadding" width="100%"><tr><td>';
431  print $langs->trans('Project');
432  print '</td>';
433  if ($action != 'classify' && $user->rights->deplacement->creer) {
434  print '<td class="right"><a href="'.$_SERVER["PHP_SELF"].'?action=classify&token='.newToken().'&id='.$object->id.'">';
435  print img_edit($langs->trans('SetProject'), 1);
436  print '</a></td>';
437  }
438  print '</tr></table>';
439  print '</td><td colspan="3">';
440  if ($action == 'classify') {
441  $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1);
442  } else {
443  $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'none', 0, 0);
444  }
445  print '</td>';
446  print '</tr>';
447  }
448 
449  // Statut
450  print '<tr><td>'.$langs->trans("Status").'</td><td>'.$object->getLibStatut(4).'</td></tr>';
451 
452  // Other attributes
453  $parameters = array('socid'=>$object->id);
454  include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
455 
456  print "</table><br>";
457 
458  // Notes
459  $blocname = 'notes';
460  $title = $langs->trans('Notes');
461  include DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php';
462 
463  print '</div>';
464 
465  /*
466  * Action bar
467  */
468  print '<div class="tabsAction">';
469 
470  if ($object->statut < Deplacement::STATUS_REFUNDED) { // if not refunded
471  if ($user->rights->deplacement->creer) {
472  print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit&token='.newToken().'&id='.$id.'">'.$langs->trans('Modify').'</a>';
473  } else {
474  print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotAllowed")).'">'.$langs->trans('Modify').'</a>';
475  }
476  }
477 
478  if ($object->statut == Deplacement::STATUS_DRAFT) { // if draft
479  if ($user->rights->deplacement->creer) {
480  print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=validate&id='.$id.'">'.$langs->trans('Validate').'</a>';
481  } else {
482  print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotAllowed")).'">'.$langs->trans('Validate').'</a>';
483  }
484  }
485 
486  if ($object->statut == Deplacement::STATUS_VALIDATED) { // if validated
487  if ($user->rights->deplacement->creer) {
488  print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=classifyrefunded&token='.newToken().'&id='.$id.'">'.$langs->trans('ClassifyRefunded').'</a>';
489  } else {
490  print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotAllowed")).'">'.$langs->trans('ClassifyRefunded').'</a>';
491  }
492  }
493 
494  if ($user->rights->deplacement->supprimer) {
495  print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&id='.$id.'">'.$langs->trans('Delete').'</a>';
496  } else {
497  print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotAllowed")).'">'.$langs->trans('Delete').'</a>';
498  }
499 
500  print '</div>';
501  }
502  } else {
503  dol_print_error($db);
504  }
505 }
506 
507 // End of page
508 llxFooter();
509 $db->close();
Societe
Class to manage third parties objects (customers, suppliers, prospects...)
Definition: societe.class.php:48
restrictedArea
restrictedArea($user, $features, $objectid=0, $tableandshare='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid', $isdraft=0, $mode=0)
Check permissions of a user to show a page and an object.
Definition: security.lib.php:234
llxFooter
llxFooter()
Empty footer.
Definition: wrapper.php:73
Deplacement\STATUS_DRAFT
const STATUS_DRAFT
Draft status.
Definition: deplacement.class.php:109
load_fiche_titre
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
Definition: functions.lib.php:5204
GETPOST
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
Definition: functions.lib.php:484
dol_print_error
dol_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
Definition: functions.lib.php:4844
Deplacement\STATUS_REFUNDED
const STATUS_REFUNDED
Refunded status.
Definition: deplacement.class.php:119
$form
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
Definition: card.php:142
trip_prepare_head
trip_prepare_head(Deplacement $object)
Prepare array with list of tabs.
Definition: trip.lib.php:30
Deplacement\STATUS_VALIDATED
const STATUS_VALIDATED
Validated status.
Definition: deplacement.class.php:114
img_edit
img_edit($titlealt='default', $float=0, $other='')
Show logo editer/modifier fiche.
Definition: functions.lib.php:4389
price2num
price2num($amount, $rounding='', $option=0)
Function that return a number with universal decimal format (decimal separator is '.
Definition: functions.lib.php:5661
dol_get_fiche_head
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='')
Show tabs of a record.
Definition: functions.lib.php:1822
newToken
newToken()
Return the value of token currently saved into session with name 'newtoken'.
Definition: functions.lib.php:10878
isModEnabled
isModEnabled($module)
Is Dolibarr module enabled.
Definition: functions.lib.php:105
User
Class to manage Dolibarr users.
Definition: user.class.php:44
Form
Class to manage generation of HTML components Only common components must be here.
Definition: html.form.class.php:52
$parameters
$parameters
Actions.
Definition: card.php:78
Deplacement
Class to manage trips and working credit notes.
Definition: deplacement.class.php:33
setEventMessages
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='')
Set event messages in dol_events session object.
Definition: functions.lib.php:8137
dol_mktime
dol_mktime($hour, $minute, $second, $month, $day, $year, $gm='auto', $check=1)
Return a timestamp date built from detailed informations (by default a local PHP server timestamp) Re...
Definition: functions.lib.php:2757
llxHeader
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOCSRFCHECK')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
Definition: wrapper.php:59
DolEditor
Class to manage a WYSIWYG editor.
Definition: doleditor.class.php:30