30require
'../../main.inc.php';
31require_once DOL_DOCUMENT_ROOT.
'/product/class/product.class.php';
32require_once DOL_DOCUMENT_ROOT.
'/product/stock/class/entrepot.class.php';
33require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
34require_once DOL_DOCUMENT_ROOT.
'/core/class/html.form.class.php';
35require_once DOL_DOCUMENT_ROOT.
'/fourn/class/fournisseur.commande.class.php';
36require_once DOL_DOCUMENT_ROOT.
'/product/class/html.formproduct.class.php';
37require_once
'./lib/replenishment.lib.php';
40$langs->loadLangs(array(
'products',
'stocks',
'orders'));
43$hookmanager->initHooks(array(
'stockatdate'));
47 $socid = $user->socid;
53$action =
GETPOST(
'action',
'aZ09');
55$mode =
GETPOST(
'mode',
'alpha');
59if (GETPOSTISSET(
'dateday') && GETPOSTISSET(
'datemonth') && GETPOSTISSET(
'dateyear')) {
64$search_ref =
GETPOST(
'search_ref',
'alphanohtml');
65$search_nom =
GETPOST(
'search_nom',
'alphanohtml');
69$productid =
GETPOST(
'productid',
'int');
71 $search_fk_warehouse =
GETPOST(
'search_fk_warehouse',
'array:int');
73 $search_fk_warehouse = array(
GETPOST(
'search_fk_warehouse',
'int'));
76if (
GETPOST(
'fk_warehouse',
'int')) {
77 $search_fk_warehouse = array(
GETPOST(
'fk_warehouse',
'int'));
80foreach ($search_fk_warehouse as $key => $val) {
81 if ($val == -1 || empty($val)) {
82 unset($search_fk_warehouse[$key]);
86$sortfield =
GETPOST(
'sortfield',
'aZ09comma');
87$sortorder =
GETPOST(
'sortorder',
'aZ09comma');
88$page = GETPOSTISSET(
'pageplusone') ? (
GETPOST(
'pageplusone') - 1) :
GETPOST(
"page",
'int');
89if (empty($page) || $page == -1) {
92$limit =
GETPOST(
'limit',
'int') ?
GETPOST(
'limit',
'int') : $conf->liste_limit;
93$offset = $limit * $page;
101$parameters = array();
102$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
108if ($mode ==
'future') {
109 if ($date && $date < $now) {
111 $dateIsValid =
false;
114 if ($date && $date > $now) {
115 setEventMessages($langs->trans(
"ErrorDateMustBeBeforeToday"),
null,
'errors');
116 $dateIsValid =
false;
125if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
128 $search_fk_warehouse = array();
133$warehouseStatus = array();
134if (!empty($conf->global->ENTREPOT_EXTRA_STATUS)) {
141$stock_prod_warehouse = array();
142$stock_prod = array();
143if ($date && $dateIsValid) {
144 $sql =
"SELECT ps.fk_product, ps.fk_entrepot as fk_warehouse,";
145 $sql .=
" SUM(ps.reel) AS stock";
146 $sql .=
" FROM ".MAIN_DB_PREFIX.
"product_stock as ps";
147 $sql .=
", ".MAIN_DB_PREFIX.
"entrepot as w";
148 $sql .=
", ".MAIN_DB_PREFIX.
"product as p";
149 $sql .=
" WHERE w.entity IN (".getEntity(
'stock').
")";
150 $sql .=
" AND w.rowid = ps.fk_entrepot AND p.rowid = ps.fk_product";
151 if (!empty($conf->global->ENTREPOT_EXTRA_STATUS) && count($warehouseStatus)) {
152 $sql .=
" AND w.statut IN (".$db->sanitize(implode(
',', $warehouseStatus)).
")";
154 if ($productid > 0) {
155 $sql .=
" AND ps.fk_product = ".((int) $productid);
157 if (! empty($search_fk_warehouse)) {
158 $sql .=
" AND ps.fk_entrepot IN (".$db->sanitize(join(
",", $search_fk_warehouse)).
")";
166 $sql .=
" GROUP BY fk_product, fk_entrepot";
169 $resql = $db->query($sql);
171 $num = $db->num_rows($resql);
175 $obj = $db->fetch_object($resql);
177 $tmp_fk_product = $obj->fk_product;
178 $tmp_fk_warehouse = $obj->fk_warehouse;
179 $stock = $obj->stock;
181 $stock_prod_warehouse[$tmp_fk_product][$tmp_fk_warehouse] = $stock;
182 $stock_prod[$tmp_fk_product] = (isset($stock_prod[$tmp_fk_product]) ? $stock_prod[$tmp_fk_product] : 0) + $stock;
192} elseif ($action ==
'filter') {
193 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Date")),
null,
'errors');
197$movements_prod_warehouse = array();
198$movements_prod = array();
199$movements_prod_warehouse_nb = array();
200$movements_prod_nb = array();
201if ($date && $dateIsValid) {
202 $sql =
"SELECT sm.fk_product, sm.fk_entrepot, SUM(sm.value) AS stock, COUNT(sm.rowid) AS nbofmovement";
203 $sql .=
" FROM ".MAIN_DB_PREFIX.
"stock_mouvement as sm";
204 $sql .=
", ".MAIN_DB_PREFIX.
"entrepot as w";
205 $sql .=
", ".MAIN_DB_PREFIX.
"product as p";
206 $sql .=
" WHERE w.entity IN (".getEntity(
'stock').
")";
207 $sql .=
" AND w.rowid = sm.fk_entrepot AND p.rowid = sm.fk_product ";
208 if (!empty($conf->global->ENTREPOT_EXTRA_STATUS) && count($warehouseStatus)) {
209 $sql .=
" AND w.statut IN (".$db->sanitize(implode(
',', $warehouseStatus)).
")";
211 if ($mode ==
'future') {
212 $sql .=
" AND sm.datem <= '".$db->idate($dateendofday).
"'";
214 $sql .=
" AND sm.datem >= '".$db->idate($dateendofday).
"'";
216 if ($productid > 0) {
217 $sql .=
" AND sm.fk_product = ".((int) $productid);
219 if (!empty($search_fk_warehouse)) {
220 $sql .=
" AND sm.fk_entrepot IN (".$db->sanitize(join(
",", $search_fk_warehouse)).
")";
223 $sql .=
" AND p.ref LIKE '%".$db->escape($search_ref).
"%' ";
226 $sql .=
" AND p.label LIKE '%".$db->escape($search_nom).
"%' ";
228 $sql .=
" GROUP BY sm.fk_product, sm.fk_entrepot";
230 $resql = $db->query($sql);
233 $num = $db->num_rows($resql);
237 $obj = $db->fetch_object($resql);
238 $fk_product = $obj->fk_product;
239 $fk_entrepot = $obj->fk_entrepot;
240 $stock = $obj->stock;
241 $nbofmovement = $obj->nbofmovement;
244 $movements_prod_warehouse[$fk_product][$fk_entrepot] = $stock;
245 $movements_prod_warehouse_nb[$fk_product][$fk_entrepot] = $nbofmovement;
248 $movements_prod[$fk_product] += $stock;
249 $movements_prod_nb[$fk_product] += $nbofmovement;
267$form =
new Form($db);
273$title = $langs->trans(
'StockAtDate');
275$sql =
'SELECT p.rowid, p.ref, p.label, p.description, p.price, p.pmp,';
276$sql .=
' p.price_ttc, p.price_base_type, p.fk_product_type, p.desiredstock, p.seuil_stock_alerte,';
277$sql .=
' p.tms as datem, p.duration, p.tobuy, p.stock, ';
278if (!empty($search_fk_warehouse)) {
279 $sql .=
" SUM(p.pmp * ps.reel) as estimatedvalue, SUM(p.price * ps.reel) as sellvalue";
280 $sql .=
', SUM(ps.reel) as stock_reel';
282 $sql .=
" SUM(p.pmp * p.stock) as estimatedvalue, SUM(p.price * p.stock) as sellvalue";
285$parameters = array();
286$reshook = $hookmanager->executeHooks(
'printFieldListSelect', $parameters);
287$sql .= $hookmanager->resPrint;
289$sql .=
' FROM '.MAIN_DB_PREFIX.
'product as p';
290if (!empty($search_fk_warehouse)) {
291 $sql .=
' LEFT JOIN '.MAIN_DB_PREFIX.
'product_stock as ps ON p.rowid = ps.fk_product AND ps.fk_entrepot IN ('.$db->sanitize(join(
",", $search_fk_warehouse)).
")";
294$parameters = array();
295$reshook = $hookmanager->executeHooks(
'printFieldListJoin', $parameters);
296$sql .= $hookmanager->resPrint;
297$sql .=
' WHERE p.entity IN ('.getEntity(
'product').
')';
299 $sql .=
" AND p.rowid = ".((int) $productid);
301if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) {
302 $sql .=
" AND p.fk_product_type = 0";
304if (!empty($canvas)) {
305 $sql .=
" AND p.canvas = '".$db->escape($canvas).
"'";
313$sql .=
' GROUP BY p.rowid, p.ref, p.label, p.description, p.price, p.pmp, p.price_ttc, p.price_base_type, p.fk_product_type, p.desiredstock, p.seuil_stock_alerte,';
314$sql .=
' p.tms, p.duration, p.tobuy, p.stock';
316$parameters = array();
317$reshook = $hookmanager->executeHooks(
'printFieldListWhere', $parameters);
318$sql .= $hookmanager->resPrint;
320if ($sortfield ==
'stock_reel' && empty($search_fk_warehouse)) {
321 $sortfield =
'stock';
323if ($sortfield ==
'stock' && !empty($search_fk_warehouse)) {
324 $sortfield =
'stock_reel';
326$sql .= $db->order($sortfield, $sortorder);
328$nbtotalofrecords =
'';
329if ($date && $dateIsValid) {
331 $result = $db->query($sql);
332 $nbtotalofrecords = $db->num_rows($result);
333 if (($page * $limit) > $nbtotalofrecords) {
339 $sql .= $db->plimit($limit + 1, $offset);
342 $resql = $db->query($sql);
348 $num = $db->num_rows($resql);
353$helpurl =
'EN:Module_Stocks_En|FR:Module_Stock|';
354$helpurl .=
'ES:Módulo_Stocks';
360$head[0][0] = DOL_URL_ROOT.
'/product/stock/stockatdate.php';
361$head[0][1] = $langs->trans(
"StockAtDateInPast");
362$head[0][2] =
'stockatdatepast';
364$head[1][0] = DOL_URL_ROOT.
'/product/stock/stockatdate.php?mode=future';
365$head[1][1] = $langs->trans(
"StockAtDateInFuture");
366$head[1][2] =
'stockatdatefuture';
371print
dol_get_fiche_head($head, ($mode ==
'future' ?
'stockatdatefuture' :
'stockatdatepast'),
'', -1,
'');
373$desc = $langs->trans(
"StockAtDatePastDesc");
374if ($mode ==
'future') {
375 $desc = $langs->trans(
"StockAtDateFutureDesc");
377print
'<span class="opacitymedium">'.$desc.
'</span><br>'.
"\n";
380print
'<form name="formFilterWarehouse" method="POST" action="'.$_SERVER[
"PHP_SELF"].
'">';
381print
'<input type="hidden" name="token" value="'.newToken().
'">';
382print
'<input type="hidden" name="action" value="filter">';
383print
'<input type="hidden" name="mode" value="'.$mode.
'">';
385print
'<div class="inline-block valignmiddle" style="padding-right: 20px;">';
386print
'<span class="fieldrequired">'.$langs->trans(
'Date').
'</span> '.$form->selectDate(($date ? $date : -1),
'date');
388print
' <span class="clearbothonsmartphone marginleftonly paddingleftonly marginrightonly paddingrightonly"> </span> ';
389print
img_picto(
'',
'product',
'class="pictofiwedwidth"').
' ';
391print $form->select_produits($productid,
'productid',
'', 0, 0, -1, 2,
'', 0, array(), 0, $langs->trans(
'Product'), 0,
'maxwidth300', 0,
'',
null, 1);
393if ($mode !=
'future') {
395 print
' <span class="clearbothonsmartphone marginleftonly paddingleftonly marginrightonly paddingrightonly"> </span> ';
396 print
img_picto(
'',
'stock',
'class="pictofixedwidth"').$langs->trans(
"Warehouse").
' :';
398 $selected = ((GETPOSTISSET(
'search_fk_warehouse') || GETPOSTISSET(
'fk_warehouse')) ? $search_fk_warehouse :
'ifonenodefault');
399 print $formproduct->selectWarehouses($selected,
'search_fk_warehouse',
'', 1, 0, 0, $langs->trans(
'Warehouse'), 0, 0,
null,
'minwidth200',
null, 1,
false,
'e.ref', 1);
404$parameters = array();
405$reshook = $hookmanager->executeHooks(
'printFieldPreListTitle', $parameters);
406if (empty($reshook)) {
407 print $hookmanager->resPrint;
410print
'<div class="inline-block valignmiddle">';
411print
'<input type="submit" class="button" name="valid" value="'.$langs->trans(
'Refresh').
'">';
417if (!empty($contextpage) && $contextpage != $_SERVER[
"PHP_SELF"]) {
418 $param .=
'&contextpage='.urlencode($contextpage);
420if ($limit > 0 && $limit != $conf->liste_limit) {
421 $param .=
'&limit='.((int) $limit);
423$param .=
'&mode='.$mode;
424if (!empty($search_fk_warehouse)) {
425 foreach ($search_fk_warehouse as $val) {
426 $param .=
'&search_fk_warehouse[]='.$val;
430 $param .=
'&productid='.(int) $productid;
432if (
GETPOST(
'dateday',
'int') > 0) {
433 $param .=
'&dateday='.GETPOST(
'dateday',
'int');
435if (
GETPOST(
'datemonth',
'int') > 0) {
436 $param .=
'&datemonth='.GETPOST(
'datemonth',
'int');
438if (
GETPOST(
'dateyear',
'int') > 0) {
439 $param .=
'&dateyear='.GETPOST(
'dateyear',
'int');
443print_barre_liste(
'', $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder,
'', $num, $nbtotalofrecords,
'stock', 0,
'',
'', $limit, 0, 0, 1);
445print
'<div class="div-table-responsive">';
446print
'<table class="liste centpercent">';
448$stocklabel = $langs->trans(
'StockAtDate');
449if ($mode ==
'future') {
450 $stocklabel = $langs->trans(
"VirtualStockAtDate");
453print
'<input type="hidden" name="token" value="'.newToken().
'">';
454print
'<input type="hidden" name="sortfield" value="'.$sortfield.
'">';
455print
'<input type="hidden" name="sortorder" value="'.$sortorder.
'">';
456print
'<input type="hidden" name="type" value="'.$type.
'">';
457print
'<input type="hidden" name="mode" value="'.$mode.
'">';
460print
'<tr class="liste_titre_filter">';
461print
'<td class="liste_titre"><input class="flat" type="text" name="search_ref" size="8" value="'.dol_escape_htmltag($search_ref).
'"></td>';
462print
'<td class="liste_titre"><input class="flat" type="text" name="search_nom" size="8" value="'.dol_escape_htmltag($search_nom).
'"></td>';
463print
'<td class="liste_titre"></td>';
464print
'<td class="liste_titre"></td>';
465print
'<td class="liste_titre"></td>';
466if ($mode ==
'future') {
467 print
'<td class="liste_titre"></td>';
469 print
'<td class="liste_titre"></td>';
470 print
'<td class="liste_titre"></td>';
473$parameters = array(
'param'=>$param,
'sortfield'=>$sortfield,
'sortorder'=>$sortorder);
474$reshook = $hookmanager->executeHooks(
'printFieldListOption', $parameters);
475print $hookmanager->resPrint;
477print
'<td class="liste_titre maxwidthsearch">';
478$searchpicto = $form->showFilterAndCheckAddButtons(0);
483$fieldtosortcurrentstock =
'stock';
484if (!empty($search_fk_warehouse)) {
485 $fieldtosortcurrentstock =
'stock_reel';
489print
'<tr class="liste_titre">';
493if ($mode ==
'future') {
494 print_liste_field_titre(
'CurrentStock', $_SERVER[
"PHP_SELF"], $fieldtosortcurrentstock, $param,
'',
'', $sortfield, $sortorder,
'right ');
496 print_liste_field_titre($stocklabel, $_SERVER[
"PHP_SELF"],
'', $param,
'',
'', $sortfield, $sortorder,
'right ',
'VirtualStockAtDateDesc');
497 print_liste_field_titre(
'VirtualStock', $_SERVER[
"PHP_SELF"],
'', $param,
'',
'', $sortfield, $sortorder,
'right ',
'VirtualStockDesc');
499 print_liste_field_titre($stocklabel, $_SERVER[
"PHP_SELF"],
'', $param,
'',
'', $sortfield, $sortorder,
'right ');
500 print_liste_field_titre(
"EstimatedStockValue", $_SERVER[
"PHP_SELF"],
"estimatedvalue",
'', $param,
'', $sortfield, $sortorder,
'right ', $langs->trans(
"AtDate"), 1);
501 print_liste_field_titre(
"EstimatedStockValueSell", $_SERVER[
"PHP_SELF"],
"",
'', $param,
'', $sortfield, $sortorder,
'right ', $langs->trans(
"AtDate"), 1);
503 print_liste_field_titre(
'CurrentStock', $_SERVER[
"PHP_SELF"], $fieldtosortcurrentstock, $param,
'',
'', $sortfield, $sortorder,
'right ');
507$parameters = array(
'param'=>$param,
'sortfield'=>$sortfield,
'sortorder'=>$sortorder);
508$reshook = $hookmanager->executeHooks(
'printFieldListTitle', $parameters);
509print $hookmanager->resPrint;
515$totalbuyingprice = 0;
516$totalcurrentstock = 0;
517$totalvirtualstock = 0;
520while ($i < ($limit ? min($num, $limit) : $num)) {
521 $objp = $db->fetch_object($resql);
523 if (!empty($conf->global->STOCK_SUPPORTS_SERVICES) || $objp->fk_product_type == 0) {
524 $prod->fetch($objp->rowid);
545 if (!empty($search_fk_warehouse)) {
547 foreach ($search_fk_warehouse as $val) {
548 if (!is_numeric($currentstock)) {
551 $currentstock += $stock_prod_warehouse[$objp->rowid][$val];
558 $currentstock = $stock_prod[$objp->rowid];
564 if ($mode ==
'future') {
565 $prod->load_stock(
'warehouseopen,warehouseinternal,nobatch', 0, $dateendofday);
566 $stock = $prod->stock_theorique;
567 $prod->load_stock(
'warehouseopen,warehouseinternal,nobatch', 0);
568 $virtualstock = $prod->stock_theorique;
570 $stock = $currentstock;
572 if (!empty($search_fk_warehouse)) {
573 foreach ($search_fk_warehouse as $val) {
574 $stock -= $movements_prod_warehouse[$objp->rowid][$val];
575 $nbofmovement += $movements_prod_warehouse_nb[$objp->rowid][$val];
578 $stock -= $movements_prod[$objp->rowid];
579 $nbofmovement += $movements_prod_nb[$objp->rowid];
584 print
'<tr class="oddeven">';
587 print
'<td class="nowrap">'.$prod->getNomUrl(1,
'').
'</td>';
594 if ($mode ==
'future') {
596 print
'<td class="right">'.$currentstock.
'</td>';
597 $totalcurrentstock += $currentstock;
599 print
'<td class="right"></td>';
602 print
'<td class="right">'.$stock.
'</td>';
605 print
'<td class="right">'.$virtualstock.
'</td>';
606 $totalvirtualstock += $virtualstock;
609 print
'<td class="right">'.($stock ? $stock :
'<span class="opacitymedium">'.$stock.
'</span>').
'</td>';
612 print
'<td class="right">';
613 if (
price2num($stock * $objp->pmp,
'MT')) {
614 print
'<span class="amount">'.price(
price2num($stock * $objp->pmp,
'MT'), 1).
'</span>';
618 $totalbuyingprice += $stock * $objp->pmp;
622 print
'<td class="right">';
623 if (empty($conf->global->PRODUIT_MULTIPRICES)) {
626 $htmltext = $langs->trans(
"OptionMULTIPRICESIsOn");
627 print $form->textwithtooltip(
'<span class="opacitymedium">'.$langs->trans(
"Variable").
'</span>', $htmltext);
631 print
'<td class="right">';
632 if ($nbofmovement > 0) {
633 print
'<a href="'.DOL_URL_ROOT.
'/product/stock/movement_list.php?idproduct='.$objp->rowid;
634 foreach ($search_fk_warehouse as $val) {
635 print ($val > 0 ?
'&search_warehouse='.$val :
'');
637 print
'">'.$langs->trans(
"Movements").
'</a>';
638 print
' <span class="tabs"><span class="badge">'.$nbofmovement.
'</span></span>';
643 print
'<td class="right">'.($currentstock ? $currentstock :
'<span class="opacitymedium">0</span>').
'</td>';
644 $totalcurrentstock += $currentstock;
648 $parameters = array(
'objp'=>$objp);
649 $reshook = $hookmanager->executeHooks(
'printFieldListValue', $parameters);
650 print $hookmanager->resPrint;
653 print
'<td class="right"></td>';
660$parameters = array(
'sql'=>$sql);
661$reshook = $hookmanager->executeHooks(
'printFieldListFooter', $parameters);
662print $hookmanager->resPrint;
665if ($mode ==
'future') {
670if (empty($date) || !$dateIsValid) {
671 print
'<tr><td colspan="'.$colspan.
'"><span class="opacitymedium">'.$langs->trans(
"EnterADateCriteria").
'</span></td></tr>';
673 print
'<tr class="liste_total">';
674 print
'<td>'.$langs->trans(
"Totalforthispage").
'</td>';
676 if ($mode ==
'future') {
677 print
'<td class="right">'.price(
price2num($totalcurrentstock,
'MS')).
'</td>';
680 print
'<td class="right">'.price(
price2num($totalvirtualstock,
'MS')).
'</td>';
683 print
'<td class="right">'.price(
price2num($totalbuyingprice,
'MT')).
'</td>';
686 print
'<td class="right">'.($productid > 0 ?
price(
price2num($totalcurrentstock,
'MS')) :
'').
'</td>';
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
const STATUS_OPEN_INTERNAL
Warehouse open and only operations for stock transfers/corrections allowed (not for customer shipping...
const STATUS_OPEN_ALL
Warehouse open and any operations are allowed (customer shipping, supplier dispatch,...
Class to manage products or services.
dol_mktime($hour, $minute, $second, $month, $day, $year, $gm='auto', $check=1)
Return a timestamp date built from detailed informations (by default a local PHP server timestamp) Re...
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.
price2num($amount, $rounding='', $option=0)
Function that return a number with universal decimal format (decimal separator is '.
dol_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
dol_get_fiche_end($notab=0)
Return tab footer of a card.
natural_search($fields, $value, $mode=0, $nofirstand=0)
Generate natural SQL search string for a criteria (this criteria can be tested on one or several fiel...
price($amount, $form=0, $outlangs='', $trunc=1, $rounding=-1, $forcerounding=-1, $currency_code='')
Function to format a value into an amount for visual output Function used into PDF and HTML pages.
GETPOSTISARRAY($paramname, $method=0)
Return true if the parameter $paramname is submit from a POST OR GET as an array.
dol_now($mode='auto')
Return date for now.
getDolGlobalInt($key, $default=0)
Return dolibarr global constant int value.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
print_liste_field_titre($name, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $tooltip="", $forcenowrapcolumntitle=0)
Show title line of an array.
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.
print_barre_liste($titre, $page, $file, $options='', $sortfield='', $sortorder='', $morehtmlcenter='', $num=-1, $totalnboflines='', $picto='generic', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limit=-1, $hideselectlimit=0, $hidenavigation=0, $pagenavastextinput=0, $morehtmlrightbeforearrow='')
Print a title with navigation controls for pagination.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0, $cleanalsojavascript=0)
Returns text escaped for inclusion in HTML alt or title or value tags, or into values of HTML input f...
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.