dolibarr  13.0.2
inventory.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2019 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 include_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
26 include_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
27 include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
28 include_once DOL_DOCUMENT_ROOT.'/product/inventory/class/inventory.class.php';
29 include_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", "productbatch"));
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 $fk_warehouse = GETPOST('fk_warehouse', 'int');
44 $fk_product = GETPOST('fk_product', 'int');
45 $lineid = GETPOST('lineid', 'int');
46 $batch = GETPOST('batch', 'alphanohtml');
47 
48 if (empty($conf->global->MAIN_USE_ADVANCED_PERMS))
49 {
50  $result = restrictedArea($user, 'stock', $id);
51 } else {
52  $result = restrictedArea($user, 'stock', $id, '', 'inventory_advance');
53 }
54 
55 // Initialize technical objects
56 $object = new Inventory($db);
57 $extrafields = new ExtraFields($db);
58 $diroutputmassaction = $conf->stock->dir_output.'/temp/massgeneration/'.$user->id;
59 $hookmanager->initHooks(array('inventorycard')); // Note that conf->hooks_modules contains array
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 criterias
67 $search_all = GETPOST("search_all", 'alpha');
68 $search = array();
69 foreach ($object->fields as $key => $val)
70 {
71  if (GETPOST('search_'.$key, 'alpha')) $search[$key] = GETPOST('search_'.$key, 'alpha');
72 }
73 
74 if (empty($action) && empty($id) && empty($ref)) $action = 'view';
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 {
86  $permissiontoadd = $user->rights->stock->creer;
87  $permissiontodelete = $user->rights->stock->supprimer;
88 } else {
89  $permissiontoadd = $user->rights->stock->inventory_advance->write;
90  $permissiontodelete = $user->rights->stock->inventory_advance->write;
91 }
92 
93 $now = dol_now();
94 
95 
96 /*
97  * Actions
98  */
99 
100 $parameters = array();
101 $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
102 if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
103 
104 if (empty($reshook))
105 {
106  $error = 0;
107 
108  $backurlforlist = DOL_URL_ROOT.'/product/inventory/list.php';
109  $backtopage = DOL_URL_ROOT.'/product/inventory/inventory.php?id='.$object->id;
110 
111  // Actions cancel, add, update, delete or clone
112  include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php';
113 
114  // Actions when linking object each other
115  include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php';
116 
117  // Actions when printing a doc from card
118  include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php';
119 
120  // Actions to send emails
121  /*$triggersendname = 'MYOBJECT_SENTBYMAIL';
122  $autocopy='MAIN_MAIL_AUTOCOPY_MYOBJECT_TO';
123  $trackid='stockinv'.$object->id;
124  include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';*/
125 
126  if (GETPOST('addline', 'alpha')) {
127  if ($fk_warehouse <= 0) {
128  $error++;
129  setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Warehouse")), null, 'errors');
130  }
131  if ($fk_product <= 0) {
132  $error++;
133  setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Product")), null, 'errors');
134  }
135 
136  if (!$error && !empty($conf->productbatch->enabled)) {
137  $tmpproduct = new Product($db);
138  $result = $tmpproduct->fetch($fk_product);
139 
140  if (!$error && $tmpproduct->status_batch && !$batch) {
141  $error++;
142  $langs->load("errors");
143  setEventMessages($langs->trans("ErrorProductNeedBatchNumber", $tmpproduct->ref), null, 'errors');
144  }
145  if (!$error && !$tmpproduct->status_batch && $batch) {
146  $error++;
147  $langs->load("errors");
148  setEventMessages($langs->trans("ErrorProductDoesNotNeedBatchNumber", $tmpproduct->ref), null, 'errors');
149  }
150  }
151  if (!$error) {
152  $tmp = new InventoryLine($db);
153  $tmp->fk_inventory = $object->id;
154  $tmp->fk_warehouse = $fk_warehouse;
155  $tmp->fk_product = $fk_product;
156  $tmp->batch = $batch;
157  $tmp->datec = $now;
158 
159  $result = $tmp->create($user);
160  if ($result < 0) {
161  if ($db->lasterrno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') {
162  setEventMessages($langs->trans("DuplicateRecord"), null, 'errors');
163  } else {
164  dol_print_error($db, $tmp->error, $tmp->errors);
165  }
166  }
167  }
168  }
169 }
170 
171 
172 
173 
174 /*
175  * View
176  */
177 
178 $form = new Form($db);
179 $formproduct = new FormProduct($db);
180 
181 llxHeader('', $langs->trans('Inventory'), '');
182 
183 // Example : Adding jquery code
184 print '<script type="text/javascript" language="javascript">
185 jQuery(document).ready(function() {
186  function init_myfunc()
187  {
188  jQuery("#myid").removeAttr(\'disabled\');
189  jQuery("#myid").attr(\'disabled\',\'disabled\');
190  }
191  init_myfunc();
192  jQuery("#mybutton").click(function() {
193  init_myfunc();
194  });
195 });
196 </script>';
197 
198 
199 // Part to show record
200 if ($object->id > 0)
201 {
202  $res = $object->fetch_optionals();
203 
204  $head = inventoryPrepareHead($object);
205  print dol_get_fiche_head($head, 'inventory', $langs->trans("Inventory"), -1, 'stock');
206 
207  $formconfirm = '';
208 
209  // Confirmation to delete
210  if ($action == 'delete') {
211  $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteInventory'), $langs->trans('ConfirmDeleteOrder'), 'confirm_delete', '', 0, 1);
212  }
213  // Confirmation to delete line
214  if ($action == 'deleteline')
215  {
216  $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_deleteline', '', 0, 1);
217  }
218 
219  // Clone confirmation
220  if ($action == 'clone') {
221  // Create an array for form
222  $formquestion = array();
223  $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneMyObject', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
224  }
225 
226  // Call Hook formConfirm
227  $parameters = array('formConfirm' => $formconfirm, 'lineid' => $lineid);
228  $reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
229  if (empty($reshook)) $formconfirm .= $hookmanager->resPrint;
230  elseif ($reshook > 0) $formconfirm = $hookmanager->resPrint;
231 
232  // Print form confirm
233  print $formconfirm;
234 
235 
236  // Object card
237  // ------------------------------------------------------------
238  $linkback = '<a href="'.DOL_URL_ROOT.'/product/inventory/list.php'.(!empty($socid) ? '?socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>';
239 
240  $morehtmlref = '<div class="refidno">';
241  /*
242  // Ref bis
243  $morehtmlref.=$form->editfieldkey("RefBis", 'ref_client', $object->ref_client, $object, $user->rights->inventory->creer, 'string', '', 0, 1);
244  $morehtmlref.=$form->editfieldval("RefBis", 'ref_client', $object->ref_client, $object, $user->rights->inventory->creer, 'string', '', null, null, '', 1);
245  // Thirdparty
246  $morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . $soc->getNomUrl(1);
247  // Project
248  if (! empty($conf->projet->enabled))
249  {
250  $langs->load("projects");
251  $morehtmlref.='<br>'.$langs->trans('Project') . ' ';
252  if ($user->rights->inventory->creer)
253  {
254  if ($action != 'classify')
255  {
256  $morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
257  if ($action == 'classify') {
258  //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
259  $morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
260  $morehtmlref.='<input type="hidden" name="action" value="classin">';
261  $morehtmlref.='<input type="hidden" name="token" value="'.newToken().'">';
262  $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1);
263  $morehtmlref.='<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">';
264  $morehtmlref.='</form>';
265  } else {
266  $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1);
267  }
268  }
269  } else {
270  if (! empty($object->fk_project)) {
271  $proj = new Project($db);
272  $proj->fetch($object->fk_project);
273  $morehtmlref.=$proj->getNomUrl();
274  } else {
275  $morehtmlref.='';
276  }
277  }
278  }
279  */
280  $morehtmlref .= '</div>';
281 
282 
283  dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
284 
285 
286  print '<div class="fichecenter">';
287  print '<div class="fichehalfleft">';
288  print '<div class="underbanner clearboth"></div>';
289  print '<table class="border centpercent tableforfield">'."\n";
290 
291  // Common attributes
292  include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php';
293 
294  // Other attributes. Fields from hook formObjectOptions and Extrafields.
295  include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
296 
297  print '</table>';
298  print '</div>';
299  print '</div>';
300 
301  print '<div class="clearboth"></div>';
302 
303  print dol_get_fiche_end();
304 
305 
306  // Buttons for actions
307  if ($action == 'record') {
308  print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
309  print '<input type="hidden" name="token" value="'.newToken().'">';
310  print '<input type="hidden" name="action" value="update">';
311  print '<input type="hidden" name="id" value="'.$object->id.'">';
312  if ($backtopage) print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
313 
314  print '<div class="center">';
315  print '<span class="opacitymedium">'.$langs->trans("InventoryDesc").'</span><br>';
316  print '<input type="submit" class="button button-save" name="save" value="'.$langs->trans("Save").'">';
317  print ' &nbsp; ';
318  print '<input type="submit" class="button button-cancel" name="cancel" value="'.$langs->trans("Cancel").'">';
319  print '</div>';
320  print '<br>';
321  print '</form>';
322  } else {
323  print '<div class="tabsAction">'."\n";
324  $parameters = array();
325  $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
326  if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
327 
328  if (empty($reshook))
329  {
330  if ($object->status == Inventory::STATUS_DRAFT)
331  {
332  if ($permissiontoadd)
333  {
334  print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=confirm_validate&confirm=yes">'.$langs->trans("Validate").' ('.$langs->trans("Start").')</a>'."\n";
335  } else {
336  print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans('Validate').' ('.$langs->trans("Start").')</a>'."\n";
337  }
338  }
339 
340  if ($object->status == Inventory::STATUS_VALIDATED)
341  {
342  if ($permissiontoadd)
343  {
344  /*
345  if (!empty($conf->barcode->enabled)) {
346  print '<a href="#" class="butAction">'.$langs->trans("UpdateByScaningProductBarcode").'</a>';
347  }
348  if (!empty($conf->productbatch->enabled)) {
349  print '<a href="#" class="butAction">'.$langs->trans('UpdateByScaningLot').'</a>';
350  }*/
351  if (!empty($conf->barcode->enabled) || !empty($conf->productbatch->enabled)) {
352  print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=updatebyscaning" class="butAction">'.$langs->trans("UpdateByScaning").'</a>';
353  }
354  } else {
355  print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("Save").'</a>'."\n";
356  }
357  }
358 
359  if ($object->status == Inventory::STATUS_VALIDATED)
360  {
361  if ($permissiontoadd)
362  {
363  print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=record">'.$langs->trans("Finish").'</a>'."\n";
364  } else {
365  print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans('Finish').'</a>'."\n";
366  }
367  }
368 
369  /*if ($object->status == Inventory::STATUS_VALIDATED)
370  {
371  if ($permissiontoadd)
372  {
373  print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=edit">'.$langs->trans("RecordVerb").'</a>'."\n";
374  }
375  else
376  {
377  print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans('RecordVerb').'</a>'."\n";
378  }
379  }*/
380  }
381  print '</div>'."\n";
382  }
383 
384  if ($action == 'updatebyscaning') {
385  print '<div class="div-for-modal">';
386 
387  print 'TODO';
388 
389  print '</div>';
390  }
391 
392 
393  print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
394  print '<input type="hidden" name="token" value="'.newToken().'">';
395  print '<input type="hidden" name="action" value="updateinventorylines">';
396  print '<input type="hidden" name="id" value="'.$object->id.'">';
397  if ($backtopage) print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
398 
399  print '<div class="fichecenter">';
400  //print '<div class="fichehalfleft">';
401  print '<div class="clearboth"></div>';
402 
403  //print load_fiche_titre($langs->trans('Consumption'), '', '');
404 
405  print '<div class="div-table-responsive-no-min">';
406  print '<table id="tablelines" class="noborder noshadow centpercent">';
407 
408  print '<tr class="liste_titre">';
409  print '<td>'.$langs->trans("Warehouse").'</td>';
410  print '<td>'.$langs->trans("Product").'</td>';
411  if ($conf->productbatch->enabled) {
412  print '<td>';
413  print $langs->trans("Batch");
414  print '</td>';
415  }
416  print '<td class="right">'.$langs->trans("ExpectedQty").'</td>';
417  print '<td class="center">';
418  print $form->textwithpicto($langs->trans("RealQty"), $langs->trans("InventoryRealQtyHelp"));
419  print '</td>';
420  // Actions
421  print '<td class="center">';
422  print '</td>';
423  print '</tr>';
424 
425  // Line to add a new line in inventory
426  if ($object->status == $object::STATUS_VALIDATED) {
427  print '<tr>';
428  print '<td>';
429  print $formproduct->selectWarehouses((GETPOSTISSET('fk_warehouse') ? GETPOST('fk_warehouse', 'int') : $object->fk_warehouse), 'fk_warehouse', 'warehouseopen', 1, 0, 0, '', 0, 0, array(), 'maxwidth300');
430  print '</td>';
431  print '<td>';
432  print $form->select_produits((GETPOSTISSET('fk_product') ? GETPOST('fk_product', 'int') : $object->fk_product), 'fk_product', '', 0, 0, 1, 2, '', 0, null, 0, '1', 0, 'maxwidth300');
433  print '</td>';
434  if ($conf->productbatch->enabled) {
435  print '<td>';
436  print '<input type="text" name="batch" class="maxwidth100" value="'.(GETPOSTISSET('batch') ? GETPOST('batch') : '').'">';
437  print '</td>';
438  }
439  print '<td class="right"></td>';
440  print '<td class="center">';
441  print '<input type="submit" class="button paddingrightonly" name="addline" value="'.$langs->trans("Add").'">';
442  //print '<input type="submit" class="button paddingrightonly button-cancel" name="canceladdline" value="'.$langs->trans("Cancel").'">';
443  print '</td>';
444  // Actions
445  print '<td class="center">';
446  print '</td>';
447  print '</tr>';
448  }
449 
450  // Request to show lines of inventory (prefilled during creation)
451  $sql = 'SELECT id.rowid, id.datec as date_creation, id.tms as date_modification, id.fk_inventory, id.fk_warehouse,';
452  $sql .= ' id.fk_product, id.batch, id.qty_stock, id.qty_view, id.qty_regulated';
453  $sql .= ' FROM '.MAIN_DB_PREFIX.'inventorydet as id';
454  $sql .= ' WHERE id.fk_inventory = '.$object->id;
455 
456  $cacheOfProducts = array();
457  $cacheOfWarehouses = array();
458 
459  //$sql = '';
460  $resql = $db->query($sql);
461  if ($resql)
462  {
463  $num = $db->num_rows($resql);
464 
465  $i = 0;
466  $totalarray = array();
467  while ($i < $num)
468  {
469  $obj = $db->fetch_object($resql);
470 
471  if (is_object($cacheOfWarehouses[$obj->fk_warehouse])) {
472  $warehouse_static = $cacheOfWarehouses[$obj->fk_warehouse];
473  } else {
474  $warehouse_static = new Entrepot($db);
475  $warehouse_static->fetch($obj->fk_warehouse);
476 
477  $cacheOfWarehouses[$warehouse_static->id] = $warehouse_static;
478  }
479 
480  if (is_object($cacheOfProducts[$obj->fk_product])) {
481  $product_static = $cacheOfProducts[$obj->fk_product];
482  } else {
483  $product_static = new Product($db);
484  $product_static->fetch($obj->fk_product);
485 
486  $option = 'nobatch';
487  $option .= ',novirtual';
488  $product_static->load_stock($option); // Load stock_reel + stock_warehouse. This can also call load_virtual_stock()
489 
490  $cacheOfProducts[$product_static->id] = $product_static;
491  }
492 
493  print '<tr class="oddeven">';
494  print '<td>';
495  print $warehouse_static->getNomUrl(1);
496  print '</td>';
497  print '<td>';
498  print $product_static->getNomUrl(1);
499  print '</td>';
500 
501  if ($conf->productbatch->enabled) {
502  print '<td>';
503  print $obj->batch;
504  print '</td>';
505  }
506 
507  print '<td class="right">';
508  print 'TODO';
509  print '</td>';
510  print '<td class="center">';
511  print '<input type="text" class="maxwidth75" name="id_'.$obj->rowid.' value="'.GETPOST("id_".$obj->rowid).'">';
512  print '</td>';
513  print '<td class="right">';
514  print '<a class="reposition" href="'.DOL_URL_ROOT.'/product/inventory/inventory.php?id='.$object->id.'&lineid='.$obj->rowid.'&action=deleteline&token='.newToken().'">'.img_delete().'</a>';
515  print '</td>';
516 
517  print '</tr>';
518 
519  $i++;
520  }
521  } else {
522  dol_print_error($db);
523  }
524 
525  print '</table>';
526 
527  // Save
528  if ($object->status == $object::STATUS_VALIDATED) {
529  print '<div class="center">';
530  print '<input type="submit" class="button button-save" name="save" value="'.$langs->trans("Save").'">';
531  print '</div>';
532  }
533 
534  print '</div>';
535 
536  print '</div>';
537 
538  print '</form>';
539 }
540 
541 // End of page
542 llxFooter();
543 $db->close();
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
Class to manage products or services.
dol_now($mode= 'auto')
Return date for now.
Class for Inventory.
Class with static methods for building HTML components related to products Only components common to ...
llxHeader()
Empty header.
Definition: wrapper.php:45
Class to manage standard extra fields.
setEventMessages($mesg, $mesgs, $style= 'mesgs', $messagekey= '')
Set event messages in dol_events session object.
Class to manage generation of HTML components Only common components must be here.
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname.
restrictedArea($user, $features, $objectid=0, $tableandshare= '', $feature2= '', $dbt_keyfield= 'fk_soc', $dbt_select= 'rowid', $isdraft=0)
Check permissions of a user to show a page and an object.
print $_SERVER["PHP_SELF"]
Edit parameters.
dol_get_fiche_head($links=array(), $active= '', $title= '', $notab=0, $picto= '', $pictoisfullpath=0, $morehtmlright= '', $morecss= '', $limittoshow=0, $moretabssuffix= '')
Show tabs of a record.
print
Draft customers invoices.
Definition: index.php:89
if(!empty($conf->facture->enabled)&&$user->rights->facture->lire) if((!empty($conf->fournisseur->enabled)&&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)||!empty($conf->supplier_invoice->enabled))&&$user->rights->fournisseur->facture->lire) if(!empty($conf->don->enabled)&&$user->rights->don->lire) if(!empty($conf->tax->enabled)&&$user->rights->tax->charges->lire) if(!empty($conf->facture->enabled)&&!empty($conf->commande->enabled)&&$user->rights->commande->lire &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) if(!empty($conf->facture->enabled)&&$user->rights->facture->lire) if((!empty($conf->fournisseur->enabled)&&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)||!empty($conf->supplier_invoice->enabled))&&$user->rights->fournisseur->facture->lire) $resql
Social contributions to pay.
Definition: index.php:1232
Class InventoryLine.
dol_print_error($db= '', $error= '', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
newToken()
Return the value of token currently saved into session with name &#39;newtoken&#39;.
inventoryPrepareHead(&$inventory, $title= 'Inventory', $get= '')
Define head array for tabs of inventory tools setup pages.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
print $_SERVER["PHP_SELF"] n
Edit parameters.
Definition: categories.php:101
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.
llxFooter()
Empty footer.
Definition: wrapper.php:59
img_delete($titlealt= 'default', $other= 'class="pictodelete"', $morecss= '')
Show delete logo.
if(!defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN'
Draft customers invoices.
Class to manage warehouses.