dolibarr  16.0.5
card.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2007-2017 Laurent Destailleur <eldy@users.sourceforge.net>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
24 require '../../main.inc.php';
25 require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
26 require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
27 require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
28 require_once DOL_DOCUMENT_ROOT.'/product/inventory/class/inventory.class.php';
29 require_once DOL_DOCUMENT_ROOT.'/product/inventory/lib/inventory.lib.php';
30 
31 // Load translation files required by the page
32 $langs->loadLangs(array("stocks", "other"));
33 
34 // Get parameters
35 $id = GETPOST('id', 'int');
36 $ref = GETPOST('ref', 'alpha');
37 $action = GETPOST('action', 'aZ09');
38 $confirm = GETPOST('confirm', 'alpha');
39 $cancel = GETPOST('cancel', 'aZ09');
40 $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'inventorycard'; // To manage different context of search
41 $backtopage = GETPOST('backtopage', 'alpha');
42 
43 if (empty($conf->global->MAIN_USE_ADVANCED_PERMS)) {
44  $result = restrictedArea($user, 'stock', $id);
45 } else {
46  $result = restrictedArea($user, 'stock', $id, '', 'inventory_advance');
47 }
48 
49 // Initialize technical objects
50 $object = new Inventory($db);
51 $extrafields = new ExtraFields($db);
52 // no inventory docs yet
53 $includedocgeneration = false;
54 $diroutputmassaction = null;
55 // $diroutputmassaction = $conf->stock->dir_output.'/temp/massgeneration/'.$user->id;
56 $hookmanager->initHooks(array('inventorycard', 'globalcard')); // Note that conf->hooks_modules contains array
57 
58 // Fetch optionals attributes and labels
59 $extrafields->fetch_name_optionals_label($object->table_element);
60 
61 $search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_');
62 
63 // Initialize array of search criterias
64 $search_all = GETPOST("search_all", 'alpha');
65 $search = array();
66 foreach ($object->fields as $key => $val) {
67  if (GETPOST('search_'.$key, 'alpha')) {
68  $search[$key] = GETPOST('search_'.$key, 'alpha');
69  }
70 }
71 
72 if (empty($action) && empty($id) && empty($ref)) {
73  $action = 'view';
74 }
75 
76 // Load object
77 include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once.
78 
79 // Security check - Protection if external user
80 //if ($user->socid > 0) accessforbidden();
81 //if ($user->socid > 0) $socid = $user->socid;
82 //$result = restrictedArea($user, 'mymodule', $id);
83 
84 if (empty($conf->global->MAIN_USE_ADVANCED_PERMS)) {
85  $permissiontoread = $user->rights->stock->lire;
86  $permissiontoadd = $user->rights->stock->creer;
87  $permissiontodelete = $user->rights->stock->supprimer;
88  $permissionnote = $user->rights->stock->creer; // Used by the include of actions_setnotes.inc.php
89  $permissiondellink = $user->rights->stock->creer; // Used by the include of actions_dellink.inc.php
90  $upload_dir = $conf->stock->multidir_output[isset($object->entity) ? $object->entity : 1];
91 } else {
92  $permissiontoread = $user->rights->stock->inventory_advance->read;
93  $permissiontoadd = $user->rights->stock->inventory_advance->write;
94  $permissiontodelete = $user->rights->stock->inventory_advance->write;
95  $permissionnote = $user->rights->stock->inventory_advance->write; // Used by the include of actions_setnotes.inc.php
96  $permissiondellink = $user->rights->stock->inventory_advance->write; // Used by the include of actions_dellink.inc.php
97  $upload_dir = $conf->stock->multidir_output[isset($object->entity) ? $object->entity : 1];
98 }
99 
100 
101 /*
102  * Actions
103  */
104 
105 $parameters = array();
106 $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
107 if ($reshook < 0) {
108  setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
109 }
110 
111 if (empty($reshook)) {
112  $savaction = $action;
113  $error = 0;
114 
115  $backurlforlist = DOL_URL_ROOT.'/product/inventory/list.php';
116 
117  if (empty($backtopage) || ($cancel && empty($id))) {
118  if (empty($backtopage) || ($cancel && strpos($backtopage, '__ID__'))) {
119  if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) {
120  $backtopage = $backurlforlist;
121  } else {
122  $backtopage = dol_buildpath('/product/inventory/card.php', 1).'?id='.($id > 0 ? $id : '__ID__');
123  }
124  }
125  }
126  $triggermodname = 'STOCK_INVENTORY_MODIFY'; // Name of trigger action code to execute when we modify record
127 
128  // Actions cancel, add, update, update_extras, confirm_validate, confirm_delete, confirm_deleteline, confirm_clone, confirm_close, confirm_setdraft, confirm_reopen
129  include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php';
130 
131  // Actions when linking object each other
132  include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php';
133 
134  // Actions when printing a doc from card
135  include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php';
136 
137  // Action to move up and down lines of object
138  //include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php';
139 
140  // Action to build doc
141  include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php';
142 
143  /*if ($action == 'set_thirdparty' && $permissiontoadd)
144  {
145  $object->setValueFrom('fk_soc', GETPOST('fk_soc', 'int'), '', '', 'date', '', $user, 'MYOBJECT_MODIFY');
146  }*/
147  if ($action == 'classin' && $permissiontoadd) {
148  $object->setProject(GETPOST('projectid', 'int'));
149  }
150 
151  // Actions to send emails
152  $triggersendname = 'INVENTORY_SENTBYMAIL';
153  $autocopy = 'MAIN_MAIL_AUTOCOPY_INVENTORY_TO';
154  $trackid = 'stockinv'.$object->id;
155  include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';
156 
157  if (!$error && $savaction == 'confirm_validate' && $action == '' && $object->id > 0) {
158  // Switch to the tab inventory
159  header("Location: ".DOL_URL_ROOT.'/product/inventory/inventory.php?id='.$object->id);
160  exit;
161  }
162 }
163 
164 
165 
166 
167 /*
168  * View
169  */
170 
171 $form = new Form($db);
172 $formfile = new FormFile($db);
173 $formproject = new FormProjets($db);
174 
175 $title = $langs->trans("Inventory");
176 
177 $help_url = 'EN:Module_Stocks_En|FR:Module_Stock|ES:Módulo_Stocks|DE:Modul_Bestände';
178 
179 llxHeader('', $title, $help_url);
180 
181 
182 
183 // Part to create
184 if ($action == 'create') {
185  print load_fiche_titre($langs->trans("NewInventory"), '', 'product');
186 
187  print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
188  print '<input type="hidden" name="token" value="'.newToken().'">';
189  print '<input type="hidden" name="action" value="add">';
190  if ($backtopage) {
191  print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
192  }
193  if (!empty($backtopageforcancel)) {
194  print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">';
195  }
196 
197  print dol_get_fiche_head(array(), '');
198 
199  print '<table class="border centpercent tableforfieldcreate">'."\n";
200 
201  // Common attributes
202  include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_add.tpl.php';
203 
204  // Other attributes
205  include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php';
206 
207  //print '<tr><td class="titlefield fieldname_invcode">'.$langs->trans("InventoryCode").'</td><td>INV'.$object->id.'</td></tr>';
208 
209  print '</table>'."\n";
210 
211  print dol_get_fiche_end();
212 
213  print $form->buttonsSaveCancel("Create");
214 
215  print '</form>';
216 
217  dol_set_focus('input[name="ref"]');
218 }
219 
220 // Part to edit record
221 if (($id || $ref) && $action == 'edit') {
222  print load_fiche_titre($langs->trans("Inventory"), '', 'product');
223 
224  print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
225  print '<input type="hidden" name="token" value="'.newToken().'">';
226  print '<input type="hidden" name="action" value="update">';
227  print '<input type="hidden" name="id" value="'.$object->id.'">';
228  if ($backtopage) {
229  print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
230  }
231  if ($backtopageforcancel) {
232  print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">';
233  }
234 
235  print dol_get_fiche_head();
236 
237  print '<table class="border centpercent tableforfieldedit">'."\n";
238 
239  // Common attributes
240  include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_edit.tpl.php';
241 
242  // Other attributes
243  include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_edit.tpl.php';
244 
245  print '</table>';
246 
247  print dol_get_fiche_end();
248 
249  print $form->buttonsSaveCancel();
250 
251  print '</form>';
252 }
253 
254 // Part to show record
255 if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) {
256  $res = $object->fetch_optionals();
257 
258  $head = inventoryPrepareHead($object);
259  print dol_get_fiche_head($head, 'card', $langs->trans("Inventory"), -1, 'stock');
260 
261  $formconfirm = '';
262 
263  // Confirmation to delete
264  if ($action == 'delete') {
265  $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteInventory'), $langs->trans('ConfirmDeleteObject'), 'confirm_delete', '', 0, 1);
266  }
267 
268  // Clone confirmation
269  if ($action == 'clone') {
270  // Create an array for form
271  $formquestion = array();
272  $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneAsk', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
273  }
274 
275  // Confirmation of action xxxx
276  if ($action == 'xxx') {
277  $formquestion = array();
278  /*
279  $forcecombo=0;
280  if ($conf->browser->name == 'ie') $forcecombo = 1; // There is a bug in IE10 that make combo inside popup crazy
281  $formquestion = array(
282  // 'text' => $langs->trans("ConfirmClone"),
283  // array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1),
284  // array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1),
285  // array('type' => 'other', 'name' => 'idwarehouse', 'label' => $langs->trans("SelectWarehouseForStockDecrease"), 'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse')?GETPOST('idwarehouse'):'ifone', 'idwarehouse', '', 1, 0, 0, '', 0, $forcecombo))
286  );
287  */
288  $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('XXX'), $text, 'confirm_xxx', $formquestion, 0, 1, 220);
289  }
290 
291  // Call Hook formConfirm
292  $parameters = array('formConfirm' => $formconfirm);
293  $reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
294  if (empty($reshook)) {
295  $formconfirm .= $hookmanager->resPrint;
296  } elseif ($reshook > 0) {
297  $formconfirm = $hookmanager->resPrint;
298  }
299 
300  // Print form confirm
301  print $formconfirm;
302 
303 
304  // Object card
305  // ------------------------------------------------------------
306  $linkback = '<a href="'.DOL_URL_ROOT.'/product/inventory/list.php'.(!empty($socid) ? '?socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>';
307 
308  $morehtmlref = '<div class="refidno">';
309  /*
310  // Ref bis
311  $morehtmlref.=$form->editfieldkey("RefBis", 'ref_client', $object->ref_client, $object, $user->rights->inventory->creer, 'string', '', 0, 1);
312  $morehtmlref.=$form->editfieldval("RefBis", 'ref_client', $object->ref_client, $object, $user->rights->inventory->creer, 'string', '', null, null, '', 1);
313  // Thirdparty
314  $morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . $soc->getNomUrl(1);
315  // Project
316  if (! empty($conf->project->enabled))
317  {
318  $langs->load("projects");
319  $morehtmlref.='<br>'.$langs->trans('Project') . ' ';
320  if ($permissiontoadd)
321  {
322  if ($action != 'classify')
323  {
324  $morehtmlref .= '<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&token='.newToken().'&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
325  if ($action == 'classify') {
326  //$morehtmlref .= $form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
327  $morehtmlref .= '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
328  $morehtmlref .= '<input type="hidden" name="action" value="classin">';
329  $morehtmlref .= '<input type="hidden" name="token" value="'.newToken().'">';
330  $morehtmlref .= $formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1);
331  $morehtmlref .= '<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">';
332  $morehtmlref .= '</form>';
333  } else {
334  $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1);
335  }
336  }
337  } else {
338  if (! empty($object->fk_project)) {
339  $proj = new Project($db);
340  $proj->fetch($object->fk_project);
341  $morehtmlref .= $proj->getNomUrl();
342  } else {
343  $morehtmlref.='';
344  }
345  }
346  }
347  */
348  $morehtmlref .= '</div>';
349 
350 
351  dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
352 
353 
354  print '<div class="fichecenter">';
355  print '<div class="fichehalfleft">';
356  print '<div class="underbanner clearboth"></div>';
357  print '<table class="border centpercent tableforfield">'."\n";
358 
359  // Common attributes
360  include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php';
361 
362  // Other attributes. Fields from hook formObjectOptions and Extrafields.
363  include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
364 
365  print '</table>';
366  print '</div>';
367  print '</div>';
368 
369  print '<div class="clearboth"></div>';
370 
371  print dol_get_fiche_end();
372 
373 
374  // Buttons for actions
375  if ($action != 'presend' && $action != 'editline') {
376  print '<div class="tabsAction">'."\n";
377  $parameters = array();
378  $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
379  if ($reshook < 0) {
380  setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
381  }
382 
383  if (empty($reshook)) {
384  // Send
385  if (empty($user->socid)) {
386  print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init&token='.newToken().'#formmailbeforetitle">'.$langs->trans('SendMail').'</a>'."\n";
387  }
388 
389  // Back to draft
390  if ($object->status == $object::STATUS_VALIDATED) {
391  if ($permissiontoadd) {
392  print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=confirm_setdraft&confirm=yes&token='.newToken().'">'.$langs->trans("SetToDraft").'</a>';
393  }
394  }
395  // Back to validate
396  if ($object->status == $object::STATUS_RECORDED) {
397  if ($permissiontoadd) {
398  print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=confirm_validate&confirm=yes&token='.newToken().'">'.$langs->trans("ReOpen").'</a>';
399  }
400  }
401 
402  // Modify
403  if ($object->status == $object::STATUS_DRAFT) {
404  if ($permissiontoadd) {
405  print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit&token='.newToken().'">'.$langs->trans("Modify").'</a>'."\n";
406  } else {
407  print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans('Modify').'</a>'."\n";
408  }
409  }
410 
411  // Validate
412  if ($object->status == $object::STATUS_DRAFT || $object->status == $object::STATUS_CANCELED) {
413  if ($permissiontoadd) {
414  print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=confirm_validate&confirm=yes&token='.newToken().'">'.$langs->trans("Validate").' ('.$langs->trans("ToStart").')</a>';
415  }
416  }
417 
418  // Clone
419  /*if ($permissiontoadd)
420  {
421  print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&socid='.$object->socid.'&action=clone&object=myobject">'.$langs->trans("ToClone").'</a>'."\n";
422  }*/
423 
424  // Delete (need delete permission, or if draft, just need create/modify permission)
425  if ($permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd)) {
426  print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken().'">'.$langs->trans('Delete').'</a>'."\n";
427  } else {
428  print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans('Delete').'</a>'."\n";
429  }
430  }
431  print '</div>'."\n";
432  }
433 
434 
435  // Select mail models is same action as presend
436  if (GETPOST('modelselected')) {
437  $action = 'presend';
438  }
439 
440  if ($action != 'presend') {
441  print '<div class="fichecenter"><div class="fichehalfleft">';
442  print '<a name="builddoc"></a>'; // ancre
443 
444  // Documents
445  if ($includedocgeneration) {
446  $objref = dol_sanitizeFileName($object->ref);
447  $relativepath = $objref.'/'.$objref.'.pdf';
448  $filedir = $conf->mymodule->dir_output.'/'.$object->element.'/'.$objref;
449  $urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id;
450  $genallowed = $user->rights->mymodule->myobject->read; // If you can read, you can build the PDF to read content
451  $delallowed = $user->rights->mymodule->myobject->write; // If you can create/edit, you can remove a file on card
452  print $formfile->showdocuments('mymodule:MyObject', $object->element.'/'.$objref, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0, '', '', '', $langs->defaultlang);
453  }
454 
455  // Show links to link elements
456  $linktoelem = $form->showLinkToObjectBlock($object, null, array('inventory'));
457  $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem);
458 
459 
460  print '</div><div class="fichehalfright">';
461 
462  $MAXEVENT = 10;
463 
464  //$morehtmlcenter = dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-bars imgforviewmode', DOL_URL_ROOT.'/product/inventory/inventory_info.php?id='.$object->id);
465  $morehtmlcenter = '';
466 
467  // List of actions on element
468  include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
469  $formactions = new FormActions($db);
470  $somethingshown = $formactions->showactions($object, $object->element, 0, 1, '', $MAXEVENT, '', $morehtmlcenter);
471 
472  print '</div></div>';
473  }
474 
475 
476  //Select mail models is same action as presend
477  if (GETPOST('modelselected')) {
478  $action = 'presend';
479  }
480 
481  // Presend form
482  $modelmail = 'inventory';
483  $defaulttopic = 'InformationMessage';
484  $diroutput = $conf->product->dir_output.'/inventory';
485  $trackid = 'stockinv'.$object->id;
486 
487  include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php';
488 }
489 
490 // End of page
491 llxFooter();
492 $db->close();
dol_sanitizeFileName
dol_sanitizeFileName($str, $newstr='_', $unaccent=1)
Clean a string to use it as a file name.
Definition: functions.lib.php:1226
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
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
FormActions
Class to manage building of HTML components.
Definition: html.formactions.class.php:30
dol_buildpath
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
Definition: functions.lib.php:1062
FormProjets
Class to manage building of HTML components.
Definition: html.formprojet.class.php:30
$form
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
Definition: card.php:142
Inventory
Class for Inventory.
Definition: inventory.class.php:36
dol_banner_tab
dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='rowid', $fieldref='ref', $morehtmlref='', $moreparam='', $nodbprefix=0, $morehtmlleft='', $morehtmlstatus='', $onlybanner=0, $morehtmlright='')
Show tab footer of a card.
Definition: functions.lib.php:2046
$help_url
if(GETPOST('button_removefilter_x', 'alpha')||GETPOST('button_removefilter.x', 'alpha')||GETPOST('button_removefilter', 'alpha')) if(GETPOST('button_search_x', 'alpha')||GETPOST('button_search.x', 'alpha')||GETPOST('button_search', 'alpha')) if($action=="save" &&empty($cancel)) $help_url
View.
Definition: agenda.php:116
$formactions
if(preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) if(preg_match('/del_([a-z0-9_\-]+)/i', $action, $reg)) if($action=='set') elseif($action=='specimen') elseif($action=='setmodel') elseif($action=='del') elseif($action=='setdoc') $formactions
View.
Definition: agenda_other.php:178
$formconfirm
$formconfirm
if ($action == 'delbookkeepingyear') {
Definition: listbyaccount.php:576
FormFile
Class to offer components to list and upload files.
Definition: html.formfile.class.php:36
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
dol_get_fiche_end
dol_get_fiche_end($notab=0)
Return tab footer of a card.
Definition: functions.lib.php:2018
ExtraFields
Class to manage standard extra fields.
Definition: extrafields.class.php:39
Form
Class to manage generation of HTML components Only common components must be here.
Definition: html.form.class.php:52
dol_set_focus
dol_set_focus($selector)
Set focus onto field with selector (similar behaviour of 'autofocus' HTML5 tag)
Definition: functions.lib.php:9379
$parameters
$parameters
Actions.
Definition: card.php:78
setEventMessages
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='')
Set event messages in dol_events session object.
Definition: functions.lib.php:8137
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
inventoryPrepareHead
inventoryPrepareHead(&$inventory, $title='Inventory', $get='')
Define head array for tabs of inventory tools setup pages.
Definition: inventory.lib.php:67