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