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