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