dolibarr  13.0.2
reassort.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2001-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3  * Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
4  * Copyright (C) 2005-2018 Regis Houssin <regis.houssin@inodbox.com>
5  * Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
6  * Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
7  * Copyright (C) 2019 Juanjo Menent <jmenent@2byte.es>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 3 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program. If not, see <https://www.gnu.org/licenses/>.
21  */
22 
29 require '../main.inc.php';
30 require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
31 require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
32 require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
33 require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
34 
35 // Load translation files required by the page
36 $langs->loadLangs(array('products', 'stocks'));
37 
38 // Security check
39 if ($user->socid) $socid = $user->socid;
40 $result = restrictedArea($user, 'produit|service');
41 
42 
43 $action = GETPOST('action', 'aZ09');
44 $sref = GETPOST("sref", 'alpha');
45 $snom = GETPOST("snom", 'alpha');
46 $sall = trim((GETPOST('search_all', 'alphanohtml') != '') ?GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml'));
47 $type = GETPOST("type", "int");
48 $search_barcode = GETPOST("search_barcode", 'alpha');
49 $catid = GETPOST('catid', 'int');
50 $toolowstock = GETPOST('toolowstock');
51 $tosell = GETPOST("tosell");
52 $tobuy = GETPOST("tobuy");
53 $fourn_id = GETPOST("fourn_id", 'int');
54 
55 $sortfield = GETPOST("sortfield", 'alpha');
56 $sortorder = GETPOST("sortorder", 'alpha');
57 $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
58 if (empty($page) || $page < 0) $page = 0;
59 if (!$sortfield) $sortfield = "p.ref";
60 if (!$sortorder) $sortorder = "ASC";
61 $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
62 if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
63 $offset = $limit * $page;
64 
65 // Load sale and categ filters
66 $search_sale = GETPOST("search_sale");
67 $search_categ = GETPOST("search_categ");
68 
69 // Get object canvas (By default, this is not defined, so standard usage of dolibarr)
70 $canvas = GETPOST("canvas");
71 $objcanvas = null;
72 if (!empty($canvas))
73 {
74  require_once DOL_DOCUMENT_ROOT.'/core/class/canvas.class.php';
75  $objcanvas = new Canvas($db, $action);
76  $objcanvas->getCanvas('product', 'list', $canvas);
77 }
78 
79 // Define virtualdiffersfromphysical
80 $virtualdiffersfromphysical = 0;
81 if (!empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT)
82  || !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER)
83  || !empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE)
84  || !empty($conf->global->STOCK_CALCULATE_ON_RECEPTION)
85  || !empty($conf->global->STOCK_CALCULATE_ON_RECEPTION_CLOSE)
86  || !empty($conf->mrp->enabled))
87 {
88  $virtualdiffersfromphysical = 1; // According to increase/decrease stock options, virtual and physical stock may differs.
89 }
90 
91 // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
92 $hookmanager->initHooks(array('productreassortlist'));
93 
94 
95 
96 /*
97  * Actions
98  */
99 
100 if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) // All tests are required to be compatible with all browsers
101 {
102  $sref = "";
103  $snom = "";
104  $sall = "";
105  $tosell = "";
106  $tobuy = "";
107  $search_sale = "";
108  $search_categ = "";
109  $type = "";
110  $catid = '';
111  $toolowstock = '';
112  $fourn_id = '';
113  $sbarcode = '';
114 }
115 
116 
117 
118 /*
119  * View
120  */
121 
122 $helpurl = 'EN:Module_Stocks_En|FR:Module_Stock|ES:M&oacute;dulo_Stocks';
123 
124 $form = new Form($db);
125 $htmlother = new FormOther($db);
126 
127 $sql = 'SELECT p.rowid, p.ref, p.label, p.barcode, p.price, p.price_ttc, p.price_base_type, p.entity,';
128 $sql .= ' p.fk_product_type, p.tms as datem,';
129 $sql .= ' p.duration, p.tosell as statut, p.tobuy, p.seuil_stock_alerte, p.desiredstock,';
130 $sql .= ' SUM(s.reel) as stock_physique';
131 if (!empty($conf->global->PRODUCT_USE_UNITS)) $sql .= ', u.short_label as unit_short';
132 // Add fields from hooks
133 $parameters = array();
134 $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook
135 $sql .= $hookmanager->resPrint;
136 $sql .= ' FROM '.MAIN_DB_PREFIX.'product as p';
137 $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_stock as s ON p.rowid = s.fk_product';
138 $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'entrepot as e ON s.fk_entrepot = e.rowid AND e.entity IN ('.getEntity('entrepot').')';
139 if (!empty($conf->global->PRODUCT_USE_UNITS)) $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_units as u on p.fk_unit = u.rowid';
140 // We'll need this table joined to the select in order to filter by categ
141 if ($search_categ) $sql .= ", ".MAIN_DB_PREFIX."categorie_product as cp";
142 $sql .= " WHERE p.entity IN (".getEntity('product').")";
143 if ($search_categ) $sql .= " AND p.rowid = cp.fk_product"; // Join for the needed table to filter by categ
144 if ($sall) $sql .= natural_search(array('p.ref', 'p.label', 'p.description', 'p.note'), $sall);
145 // if the type is not 1, we show all products (type = 0,2,3)
146 if (dol_strlen($type))
147 {
148  if ($type == 1)
149  {
150  $sql .= " AND p.fk_product_type = '1'";
151  } else {
152  $sql .= " AND p.fk_product_type <> '1'";
153  }
154 }
155 if ($sref) $sql .= natural_search('p.ref', $sref);
156 if ($search_barcode) $sql .= natural_search('p.barcode', $search_barcode);
157 if ($snom) $sql .= natural_search('p.label', $snom);
158 if (!empty($tosell)) $sql .= " AND p.tosell = ".$tosell;
159 if (!empty($tobuy)) $sql .= " AND p.tobuy = ".$tobuy;
160 if (!empty($canvas)) $sql .= " AND p.canvas = '".$db->escape($canvas)."'";
161 if ($catid) $sql .= " AND cp.fk_categorie = ".$catid;
162 if ($fourn_id > 0) $sql .= " AND p.rowid = pf.fk_product AND pf.fk_soc = ".$fourn_id;
163 // Insert categ filter
164 if ($search_categ) $sql .= " AND cp.fk_categorie = ".$db->escape($search_categ);
165 $sql .= " GROUP BY p.rowid, p.ref, p.label, p.barcode, p.price, p.price_ttc, p.price_base_type, p.entity,";
166 $sql .= " p.fk_product_type, p.tms, p.duration, p.tosell, p.tobuy, p.seuil_stock_alerte, p.desiredstock";
167 // Add fields from hooks
168 $parameters = array();
169 $reshook = $hookmanager->executeHooks('printFieldSelect', $parameters); // Note that $action and $object may have been modified by hook
170 $sql .= $hookmanager->resPrint;
171 if ($toolowstock) $sql .= " HAVING SUM(".$db->ifsql('s.reel IS NULL', '0', 's.reel').") < p.seuil_stock_alerte";
172 $sql .= $db->order($sortfield, $sortorder);
173 
174 // Count total nb of records
175 $nbtotalofrecords = '';
176 if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
177 {
178  $result = $db->query($sql);
179  $nbtotalofrecords = $db->num_rows($result);
180  if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0
181  {
182  $page = 0;
183  $offset = 0;
184  }
185 }
186 
187 $sql .= $db->plimit($limit + 1, $offset);
188 
189 $resql = $db->query($sql);
190 if ($resql)
191 {
192  $num = $db->num_rows($resql);
193 
194  $i = 0;
195 
196  if ($num == 1 && GETPOST('autojumpifoneonly') && ($sall || $snom || $sref))
197  {
198  $objp = $db->fetch_object($resql);
199  header("Location: card.php?id=$objp->rowid");
200  exit;
201  }
202 
203  if (isset($type))
204  {
205  if ($type == 1) { $texte = $langs->trans("Services"); } else { $texte = $langs->trans("Products"); }
206  } else {
207  $texte = $langs->trans("ProductsAndServices");
208  }
209  $texte .= ' ('.$langs->trans("MenuStocks").')';
210 
211  $param = '';
212  if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit);
213  if ($sall) $param .= "&sall=".urlencode($sall);
214  if ($tosell) $param .= "&tosell=".urlencode($tosell);
215  if ($tobuy) $param .= "&tobuy=".urlencode($tobuy);
216  if ($type) $param .= "&type=".urlencode($type);
217  if ($fourn_id) $param .= "&fourn_id=".urlencode($fourn_id);
218  if ($snom) $param .= "&snom=".urlencode($snom);
219  if ($sref) $param .= "&sref=".urlencode($sref);
220  if ($search_sale) $param .= "&search_sale=".urlencode($search_sale);
221  if ($search_categ) $param .= "&search_categ=".urlencode($search_categ);
222  if ($toolowstock) $param .= "&toolowstock=".urlencode($toolowstock);
223  if ($sbarcode) $param .= "&sbarcode=".urlencode($sbarcode);
224  if ($catid) $param .= "&catid=".urlencode($catid);
225 
226  llxHeader("", $texte, $helpurl);
227 
228  print '<form action="'.$_SERVER["PHP_SELF"].'" method="post" name="formulaire">';
229  print '<input type="hidden" name="token" value="'.newToken().'">';
230  print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
231  print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
232  print '<input type="hidden" name="page" value="'.$page.'">';
233  print '<input type="hidden" name="type" value="'.$type.'">';
234 
235  print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'product', 0, '', '', $limit);
236 
237  if (!empty($catid))
238  {
239  print "<div id='ways'>";
240  $c = new Categorie($db);
241  $c->fetch($catid);
242  $ways = $c->print_all_ways(' &gt; ', 'product/reassort.php');
243  print " &gt; ".$ways[0]."<br>\n";
244  print "</div><br>";
245  }
246 
247  // Filter on categories
248  $moreforfilter = '';
249  if (!empty($conf->categorie->enabled))
250  {
251  $moreforfilter .= '<div class="divsearchfield">';
252  $moreforfilter .= $langs->trans('Categories').': ';
253  $moreforfilter .= $htmlother->select_categories(Categorie::TYPE_PRODUCT, $search_categ, 'search_categ');
254  $moreforfilter .= '</div>';
255  }
256 
257  $moreforfilter .= '<div class="divsearchfield">';
258  $moreforfilter .= $langs->trans("StockTooLow").' <input type="checkbox" name="toolowstock" value="1"'.($toolowstock ? ' checked' : '').'>';
259  $moreforfilter .= '</div>';
260 
261  if (!empty($moreforfilter))
262  {
263  print '<div class="liste_titre liste_titre_bydiv centpercent">';
264  print $moreforfilter;
265  $parameters = array();
266  $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook
267  print $hookmanager->resPrint;
268  print '</div>';
269  }
270 
271  $param = '';
272  if ($tosell) $param .= "&tosell=".urlencode($tosell);
273  if ($tobuy) $param .= "&tobuy=".urlencode($tobuy);
274  if ($type) $param .= "&type=".urlencode($type);
275  if ($fourn_id) $param .= "&fourn_id=".urlencode($fourn_id);
276  if ($snom) $param .= "&snom=".urlencode($snom);
277  if ($sref) $param .= "&sref=".urlencode($sref);
278  if ($toolowstock) $param .= "&toolowstock=".urlencode($toolowstock);
279  if ($search_categ) $param .= "&search_categ=".urlencode($search_categ);
280 
281  $formProduct = new FormProduct($db);
282  $formProduct->loadWarehouses();
283  $warehouses_list = $formProduct->cache_warehouses;
284  $nb_warehouse = count($warehouses_list);
285  $colspan_warehouse = 1;
286  if (!empty($conf->global->STOCK_DETAIL_ON_WAREHOUSE)) { $colspan_warehouse = $nb_warehouse > 1 ? $nb_warehouse + 1 : 1; }
287 
288  print '<div class="div-table-responsive">';
289  print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">';
290 
291  // Fields title search
292  print '<tr class="liste_titre_filter">';
293  print '<td class="liste_titre">';
294  print '<input class="flat" type="text" name="sref" size="6" value="'.$sref.'">';
295  print '</td>';
296  print '<td class="liste_titre">';
297  print '<input class="flat" type="text" name="snom" size="8" value="'.$snom.'">';
298  print '</td>';
299  // Duration
300  if (!empty($conf->service->enabled) && $type == 1)
301  {
302  print '<td class="liste_titre">';
303  print '&nbsp;';
304  print '</td>';
305  }
306  // Stock limit
307  print '<td class="liste_titre">&nbsp;</td>';
308  print '<td class="liste_titre right">&nbsp;</td>';
309  print '<td class="liste_titre">&nbsp;</td>';
310  if ($virtualdiffersfromphysical) print '<td class="liste_titre">&nbsp;</td>';
311  print '<td class="liste_titre">&nbsp;</td>';
312  print '<td class="liste_titre" colspan="'.$colspan_warehouse.'">&nbsp;</td>';
313  print '<td class="liste_titre"></td>';
314  $parameters = array();
315  $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters); // Note that $action and $object may have been modified by hook
316  print $hookmanager->resPrint;
317  print '<td class="liste_titre maxwidthsearch">';
318  $searchpicto = $form->showFilterAndCheckAddButtons(0);
319  print $searchpicto;
320  print '</td>';
321  print '</tr>';
322 
323  //Line for column titles
324  print "<tr class=\"liste_titre\">";
325  print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "p.ref", $param, "", "", $sortfield, $sortorder);
326  print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "p.label", $param, "", "", $sortfield, $sortorder);
327  if (!empty($conf->service->enabled) && $type == 1) print_liste_field_titre("Duration", $_SERVER["PHP_SELF"], "p.duration", $param, "", '', $sortfield, $sortorder, 'center ');
328  print_liste_field_titre("StockLimit", $_SERVER["PHP_SELF"], "p.seuil_stock_alerte", $param, "", '', $sortfield, $sortorder, 'right ');
329  print_liste_field_titre("DesiredStock", $_SERVER["PHP_SELF"], "p.desiredstock", $param, "", '', $sortfield, $sortorder, 'right ');
330  print_liste_field_titre("PhysicalStock", $_SERVER["PHP_SELF"], "stock_physique", $param, "", '', $sortfield, $sortorder, 'right ');
331  // Details per warehouse
332  if (!empty($conf->global->STOCK_DETAIL_ON_WAREHOUSE)) // TODO This should be moved into the selection of fields on page product/list (page product/stock will be removed and replaced with product/list with its own context)
333  {
334  if ($nb_warehouse > 1) {
335  foreach ($warehouses_list as &$wh) {
336  print_liste_field_titre($wh['label'], '', '', '', '', '', '', '', 'right ');
337  }
338  }
339  }
340  if ($virtualdiffersfromphysical) print_liste_field_titre("VirtualStock", $_SERVER["PHP_SELF"], "", $param, "", '', $sortfield, $sortorder, 'right ', 'VirtualStockDesc');
341  // Units
342  if (!empty($conf->global->PRODUCT_USE_UNITS)) {
343  print_liste_field_titre("Unit", $_SERVER["PHP_SELF"], "unit_short", $param, "", 'align="right"', $sortfield, $sortorder);
344  }
346  print_liste_field_titre("ProductStatusOnSell", $_SERVER["PHP_SELF"], "p.tosell", $param, "", '', $sortfield, $sortorder, 'right ');
347  print_liste_field_titre("ProductStatusOnBuy", $_SERVER["PHP_SELF"], "p.tobuy", $param, "", '', $sortfield, $sortorder, 'right ');
348  // Hook fields
349  $parameters = array('param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder);
350  $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
351  print $hookmanager->resPrint;
353  print "</tr>\n";
354 
355  while ($i < min($num, $limit))
356  {
357  $objp = $db->fetch_object($resql);
358 
359  $product = new Product($db);
360  $product->fetch($objp->rowid);
361  $product->load_stock();
362 
363  print '<tr>';
364  print '<td class="nowrap">';
365  print $product->getNomUrl(1, '', 16);
366  //if ($objp->stock_theorique < $objp->seuil_stock_alerte) print ' '.img_warning($langs->trans("StockTooLow"));
367  print '</td>';
368  print '<td>'.$product->label.'</td>';
369 
370  if (!empty($conf->service->enabled) && $type == 1)
371  {
372  print '<td class="center">';
373  if (preg_match('/([0-9]+)y/i', $objp->duration, $regs)) print $regs[1].' '.$langs->trans("DurationYear");
374  elseif (preg_match('/([0-9]+)m/i', $objp->duration, $regs)) print $regs[1].' '.$langs->trans("DurationMonth");
375  elseif (preg_match('/([0-9]+)d/i', $objp->duration, $regs)) print $regs[1].' '.$langs->trans("DurationDay");
376  else print $objp->duration;
377  print '</td>';
378  }
379  //print '<td class="right">'.$objp->stock_theorique.'</td>';
380  print '<td class="right">'.$objp->seuil_stock_alerte.'</td>';
381  print '<td class="right">'.$objp->desiredstock.'</td>';
382  // Real stock
383  print '<td class="right">';
384  if ($objp->seuil_stock_alerte != '' && ($objp->stock_physique < $objp->seuil_stock_alerte)) print img_warning($langs->trans("StockTooLow")).' ';
385  print price2num($objp->stock_physique, 'MS');
386  print '</td>';
387 
388  // Details per warehouse
389  if (!empty($conf->global->STOCK_DETAIL_ON_WAREHOUSE)) // TODO This should be moved into the selection of fields on page product/list (page product/stock will be removed and replaced with product/list with its own context)
390  {
391  if ($nb_warehouse > 1) {
392  foreach ($warehouses_list as &$wh) {
393  print '<td class="right">';
394  print empty($product->stock_warehouse[$wh['id']]->real) ? '0' : $product->stock_warehouse[$wh['id']]->real;
395  print '</td>';
396  }
397  }
398  }
399 
400  // Virtual stock
401  if ($virtualdiffersfromphysical)
402  {
403  print '<td class="right">';
404  if ($objp->seuil_stock_alerte != '' && ($product->stock_theorique < $objp->seuil_stock_alerte)) print img_warning($langs->trans("StockTooLow")).' ';
405  print price2num($product->stock_theorique, 'MS');
406  print '</td>';
407  }
408  // Units
409  if (!empty($conf->global->PRODUCT_USE_UNITS)) {
410  print '<td class="left">'.$objp->unit_short.'</td>';
411  }
412  print '<td class="right"><a href="'.DOL_URL_ROOT.'/product/stock/movement_list.php?idproduct='.$product->id.'">'.$langs->trans("Movements").'</a></td>';
413  print '<td class="right nowrap">'.$product->LibStatut($objp->statut, 5, 0).'</td>';
414  print '<td class="right nowrap">'.$product->LibStatut($objp->tobuy, 5, 1).'</td>';
415  // Fields from hook
416  $parameters = array('obj'=>$objp);
417  $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook
418  print $hookmanager->resPrint;
419  print '<td></td>';
420  print "</tr>\n";
421  $i++;
422  }
423 
424  print "</table>";
425  print '</div>';
426 
427  print '</form>';
428 
429  $db->free($resql);
430 } else {
431  dol_print_error($db);
432 }
433 
434 // End of page
435 llxFooter();
436 $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 canvas.
Class to manage products or services.
img_warning($titlealt= 'default', $moreatt= '', $morecss= 'pictowarning')
Show warning logo.
Class with static methods for building HTML components related to products Only components common to ...
llxHeader()
Empty header.
Definition: wrapper.php:45
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.
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.
print_liste_field_titre($name, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $tooltip="", $forcenowrapcolumntitle=0)
Show title line of an array.
getEntity($element, $shared=1, $currentobject=null)
Get list of entity id to use.
Class to manage categories.
dol_strlen($string, $stringencoding= 'UTF-8')
Make a strlen call.
price2num($amount, $rounding= '', $option=0)
Function that return a number with universal decimal format (decimal separator is &#39;...
Classe permettant la generation de composants html autre Only common components are here...
if(!GETPOST('transkey', 'alphanohtml')&&!GETPOST('transphrase', 'alphanohtml')) else
View.
Definition: notice.php:44
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.
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...
print $_SERVER["PHP_SELF"]
Edit parameters.
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
dol_print_error($db= '', $error= '', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
llxFooter()
Empty footer.
Definition: wrapper.php:59
if(!defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN'
Draft customers invoices.