dolibarr  18.0.0-alpha
subaccount.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
3  * Copyright (C) 2013-2020 Alexandre Spangaro <aspangaro@open-dsi.fr>
4  * Copyright (C) 2016-2018 Laurent Destailleur <eldy@users.sourceforge.net>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see <https://www.gnu.org/licenses/>.
18  */
19 
26 // Load Dolibarr environment
27 require '../../main.inc.php';
28 require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
29 require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
30 
31 
32 // Load translation files required by the page
33 $langs->loadLangs(array("accountancy", "admin", "bills", "compta", "errors", "hrm", "salaries"));
34 
35 $mesg = '';
36 $action = GETPOST('action', 'aZ09');
37 $cancel = GETPOST('cancel', 'alpha');
38 $id = GETPOST('id', 'int');
39 $rowid = GETPOST('rowid', 'int');
40 $massaction = GETPOST('massaction', 'aZ09');
41 $optioncss = GETPOST('optioncss', 'alpha');
42 $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'accountingsubaccountlist'; // To manage different context of search
43 
44 $search_subaccount = GETPOST('search_subaccount', 'alpha');
45 $search_label = GETPOST('search_label', 'alpha');
46 $search_type = GETPOST('search_type', 'int');
47 
48 // Security check
49 if ($user->socid > 0) {
51 }
52 if (!$user->hasRight('accounting', 'chartofaccount')) {
54 }
55 
56 // Load variable for pagination
57 $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
58 $sortfield = GETPOST('sortfield', 'aZ09comma');
59 $sortorder = GETPOST('sortorder', 'aZ09comma');
60 $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
61 if (empty($page) || $page == -1) {
62  $page = 0;
63 } // If $page is not defined, or '' or -1
64 $offset = $limit * $page;
65 $pageprev = $page - 1;
66 $pagenext = $page + 1;
67 if (!$sortfield) {
68  $sortfield = "label";
69 }
70 if (!$sortorder) {
71  $sortorder = "ASC";
72 }
73 
74 $arrayfields = array(
75  'subaccount'=>array('label'=>$langs->trans("AccountNumber"), 'checked'=>1),
76  'label'=>array('label'=>$langs->trans("Label"), 'checked'=>1),
77  'type'=>array('label'=>$langs->trans("Type"), 'checked'=>1),
78  'reconcilable'=>array('label'=>$langs->trans("Reconcilable"), 'checked'=>1)
79 );
80 
81 if ($conf->global->MAIN_FEATURES_LEVEL < 2) {
82  unset($arrayfields['reconcilable']);
83 }
84 
85 
86 /*
87  * Actions
88  */
89 
90 if (GETPOST('cancel', 'alpha')) {
91  $action = 'list'; $massaction = '';
92 }
93 if (!GETPOST('confirmmassaction', 'alpha')) {
94  $massaction = '';
95 }
96 
97 $parameters = array();
98 $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
99 if ($reshook < 0) {
100  setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
101 }
102 
103 if (empty($reshook)) {
104  if (!empty($cancel)) {
105  $action = '';
106  }
107 
108  include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
109 
110  if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // All test are required to be compatible with all browsers
111  $search_subaccount = "";
112  $search_label = "";
113  $search_type = "";
114  $search_array_options = array();
115  }
116 }
117 
118 
119 /*
120  * View
121  */
122 
123 $form = new Form($db);
124 
125 
126 // Page Header
127 $help_url = 'EN:Module_Double_Entry_Accounting#Setup';
128 $title = $langs->trans('ChartOfIndividualAccountsOfSubsidiaryLedger');
129 llxHeader('', $title, $help_url);
130 
131 
132 // Customer
133 $sql = "SELECT sa.rowid, sa.nom as label, sa.code_compta as subaccount, '1' as type, sa.entity";
134 $sql .= " FROM ".MAIN_DB_PREFIX."societe sa";
135 $sql .= " WHERE sa.entity IN (".getEntity('societe').")";
136 $sql .= " AND sa.code_compta <> ''";
137 //print $sql;
138 if (strlen(trim($search_subaccount))) {
139  $lengthpaddingaccount = 0;
140  if ($conf->global->ACCOUNTING_LENGTH_AACCOUNT) {
141  $lengthpaddingaccount = max($conf->global->ACCOUNTING_LENGTH_AACCOUNT);
142  }
143  $search_subaccount_tmp = $search_subaccount;
144  $weremovedsomezero = 0;
145  if (strlen($search_subaccount_tmp) <= $lengthpaddingaccount) {
146  for ($i = 0; $i < $lengthpaddingaccount; $i++) {
147  if (preg_match('/0$/', $search_subaccount_tmp)) {
148  $weremovedsomezero++;
149  $search_subaccount_tmp = preg_replace('/0$/', '', $search_subaccount_tmp);
150  }
151  }
152  }
153 
154  //var_dump($search_subaccount); exit;
155  if ($search_subaccount_tmp) {
156  if ($weremovedsomezero) {
157  $search_subaccount_tmp_clean = $search_subaccount_tmp;
158  $search_subaccount_clean = $search_subaccount;
159  $startchar = '%';
160  if (strpos($search_subaccount_tmp, '^') === 0) {
161  $startchar = '';
162  $search_subaccount_tmp_clean = preg_replace('/^\^/', '', $search_subaccount_tmp);
163  $search_subaccount_clean = preg_replace('/^\^/', '', $search_subaccount);
164  }
165  $sql .= " AND (sa.code_compta LIKE '".$db->escape($startchar.$search_subaccount_tmp_clean)."'";
166  $sql .= " OR sa.code_compta LIKE '".$db->escape($startchar.$search_subaccount_clean)."%')";
167  } else {
168  $sql .= natural_search("sa.code_compta", $search_subaccount_tmp);
169  }
170  }
171 }
172 if (strlen(trim($search_label))) {
173  $sql .= natural_search("sa.nom", $search_label);
174 }
175 if (!empty($search_type) && $search_type >= 0) {
176  $sql .= " HAVING type LIKE '".$db->escape($search_type)."'";
177 }
178 
179 // Supplier
180 $sql .= " UNION ";
181 $sql .= " SELECT sa.rowid, sa.nom as label, sa.code_compta_fournisseur as subaccount, '2' as type, sa.entity FROM ".MAIN_DB_PREFIX."societe sa";
182 $sql .= " WHERE sa.entity IN (".getEntity('societe').")";
183 $sql .= " AND sa.code_compta_fournisseur <> ''";
184 //print $sql;
185 if (strlen(trim($search_subaccount))) {
186  $lengthpaddingaccount = 0;
187  if ($conf->global->ACCOUNTING_LENGTH_AACCOUNT) {
188  $lengthpaddingaccount = max($conf->global->ACCOUNTING_LENGTH_AACCOUNT);
189  }
190  $search_subaccount_tmp = $search_subaccount;
191  $weremovedsomezero = 0;
192  if (strlen($search_subaccount_tmp) <= $lengthpaddingaccount) {
193  for ($i = 0; $i < $lengthpaddingaccount; $i++) {
194  if (preg_match('/0$/', $search_subaccount_tmp)) {
195  $weremovedsomezero++;
196  $search_subaccount_tmp = preg_replace('/0$/', '', $search_subaccount_tmp);
197  }
198  }
199  }
200 
201  //var_dump($search_subaccount); exit;
202  if ($search_subaccount_tmp) {
203  if ($weremovedsomezero) {
204  $search_subaccount_tmp_clean = $search_subaccount_tmp;
205  $search_subaccount_clean = $search_subaccount;
206  $startchar = '%';
207  if (strpos($search_subaccount_tmp, '^') === 0) {
208  $startchar = '';
209  $search_subaccount_tmp_clean = preg_replace('/^\^/', '', $search_subaccount_tmp);
210  $search_subaccount_clean = preg_replace('/^\^/', '', $search_subaccount);
211  }
212  $sql .= " AND (sa.code_compta_fournisseur LIKE '".$db->escape($startchar.$search_subaccount_tmp_clean)."'";
213  $sql .= " OR sa.code_compta_fournisseur LIKE '".$db->escape($startchar.$search_subaccount_clean)."%')";
214  } else {
215  $sql .= natural_search("sa.code_compta_fournisseur", $search_subaccount_tmp);
216  }
217  }
218 }
219 if (strlen(trim($search_label))) {
220  $sql .= natural_search("sa.nom", $search_label);
221 }
222 if (!empty($search_type) && $search_type >= 0) {
223  $sql .= " HAVING type LIKE '".$db->escape($search_type)."'";
224 }
225 
226 // User - Employee
227 $sql .= " UNION ";
228 $sql .= " SELECT u.rowid, u.lastname as label, u.accountancy_code as subaccount, '3' as type, u.entity FROM ".MAIN_DB_PREFIX."user u";
229 $sql .= " WHERE u.entity IN (".getEntity('user').")";
230 $sql .= " AND u.accountancy_code <> ''";
231 //print $sql;
232 if (strlen(trim($search_subaccount))) {
233  $lengthpaddingaccount = 0;
234  if ($conf->global->ACCOUNTING_LENGTH_AACCOUNT) {
235  $lengthpaddingaccount = max($conf->global->ACCOUNTING_LENGTH_AACCOUNT);
236  }
237  $search_subaccount_tmp = $search_subaccount;
238  $weremovedsomezero = 0;
239  if (strlen($search_subaccount_tmp) <= $lengthpaddingaccount) {
240  for ($i = 0; $i < $lengthpaddingaccount; $i++) {
241  if (preg_match('/0$/', $search_subaccount_tmp)) {
242  $weremovedsomezero++;
243  $search_subaccount_tmp = preg_replace('/0$/', '', $search_subaccount_tmp);
244  }
245  }
246  }
247 
248  //var_dump($search_subaccount); exit;
249  if ($search_subaccount_tmp) {
250  if ($weremovedsomezero) {
251  $search_subaccount_tmp_clean = $search_subaccount_tmp;
252  $search_subaccount_clean = $search_subaccount;
253  $startchar = '%';
254  if (strpos($search_subaccount_tmp, '^') === 0) {
255  $startchar = '';
256  $search_subaccount_tmp_clean = preg_replace('/^\^/', '', $search_subaccount_tmp);
257  $search_subaccount_clean = preg_replace('/^\^/', '', $search_subaccount);
258  }
259  $sql .= " AND (u.accountancy_code LIKE '".$db->escape($startchar.$search_subaccount_tmp_clean)."'";
260  $sql .= " OR u.accountancy_code LIKE '".$db->escape($startchar.$search_subaccount_clean)."%')";
261  } else {
262  $sql .= natural_search("u.accountancy_code", $search_subaccount_tmp);
263  }
264  }
265 }
266 if (strlen(trim($search_label))) {
267  $sql .= natural_search("u.lastname", $search_label);
268 }
269 if (!empty($search_type) && $search_type >= 0) {
270  $sql .= " HAVING type LIKE '".$db->escape($search_type)."'";
271 }
272 
273 $sql .= $db->order($sortfield, $sortorder);
274 
275 // Count total nb of records
276 $nbtotalofrecords = '';
277 if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
278  $resql = $db->query($sql);
279  $nbtotalofrecords = $db->num_rows($resql);
280  if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0
281  $page = 0;
282  $offset = 0;
283  }
284 }
285 
286 $sql .= $db->plimit($limit + 1, $offset);
287 
288 dol_syslog('accountancy/admin/subaccount.php:: $sql='.$sql);
289 $resql = $db->query($sql);
290 
291 if ($resql) {
292  $num = $db->num_rows($resql);
293 
294  $param = '';
295  if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
296  $param .= '&contextpage='.urlencode($contextpage);
297  }
298  if ($limit > 0 && $limit != $conf->liste_limit) {
299  $param .= '&limit='.urlencode($limit);
300  }
301  if ($search_subaccount) {
302  $param .= '&search_subaccount='.urlencode($search_subaccount);
303  }
304  if ($search_label) {
305  $param .= '&search_label='.urlencode($search_label);
306  }
307  if ($optioncss != '') {
308  $param .= '&optioncss='.urlencode($optioncss);
309  }
310 
311  print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
312  if ($optioncss != '') {
313  print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
314  }
315  print '<input type="hidden" name="token" value="'.newToken().'">';
316  print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
317  print '<input type="hidden" name="action" value="list">';
318  print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
319  print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
320  print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
321 
322  print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit, 0, 0, 1);
323 
324  print '<div class="info">'.$langs->trans("WarningCreateSubAccounts").'</div>';
325 
326  $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
327  $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
328 
329  $moreforfilter = '';
330  $massactionbutton = '';
331 
332  print '<div class="div-table-responsive">';
333  print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
334 
335  // Line for search fields
336  print '<tr class="liste_titre_filter">';
337  if (!empty($arrayfields['subaccount']['checked'])) {
338  print '<td class="liste_titre"><input type="text" class="flat" size="10" name="search_subaccount" value="'.$search_subaccount.'"></td>';
339  }
340  if (!empty($arrayfields['label']['checked'])) {
341  print '<td class="liste_titre"><input type="text" class="flat" size="20" name="search_label" value="'.$search_label.'"></td>';
342  }
343  if (!empty($arrayfields['type']['checked'])) {
344  print '<td class="liste_titre center">'.$form->selectarray('search_type', array('1'=>$langs->trans('Customer'), '2'=>$langs->trans('Supplier'), '3'=>$langs->trans('Employee')), $search_type, 1).'</td>';
345  }
346  if ($conf->global->MAIN_FEATURES_LEVEL >= 2) {
347  if (!empty($arrayfields['reconcilable']['checked'])) {
348  print '<td class="liste_titre">&nbsp;</td>';
349  }
350  }
351  print '<td class="liste_titre maxwidthsearch">';
352  $searchpicto = $form->showFilterAndCheckAddButtons($massactionbutton ? 1 : 0, 'checkforselect', 1);
353  print $searchpicto;
354  print '</td>';
355  print '</tr>';
356 
357  print '<tr class="liste_titre">';
358  if (!empty($arrayfields['subaccount']['checked'])) {
359  print_liste_field_titre($arrayfields['subaccount']['label'], $_SERVER["PHP_SELF"], "subaccount", "", $param, '', $sortfield, $sortorder);
360  }
361  if (!empty($arrayfields['label']['checked'])) {
362  print_liste_field_titre($arrayfields['label']['label'], $_SERVER["PHP_SELF"], "label", "", $param, '', $sortfield, $sortorder);
363  }
364  if (!empty($arrayfields['type']['checked'])) {
365  print_liste_field_titre($arrayfields['type']['label'], $_SERVER["PHP_SELF"], "type", "", $param, '', $sortfield, $sortorder, 'center ');
366  }
367  if ($conf->global->MAIN_FEATURES_LEVEL >= 2) {
368  if (!empty($arrayfields['reconcilable']['checked'])) {
369  print_liste_field_titre($arrayfields['reconcilable']['label'], $_SERVER["PHP_SELF"], 'reconcilable', '', $param, '', $sortfield, $sortorder, 'center ');
370  }
371  }
372  print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
373  print "</tr>\n";
374 
375  $totalarray = array();
376  $totalarray['nbfield'] = 0;
377  $i = 0;
378  while ($i < min($num, $limit)) {
379  $obj = $db->fetch_object($resql);
380 
381  print '<tr class="oddeven">';
382 
383  // Account number
384  if (!empty($arrayfields['subaccount']['checked'])) {
385  print "<td>";
386  print length_accounta($obj->subaccount);
387  print "</td>\n";
388  if (!$i) {
389  $totalarray['nbfield']++;
390  }
391  }
392 
393  // Subaccount label
394  if (!empty($arrayfields['label']['checked'])) {
395  print "<td>";
396  print $obj->label;
397  print "</td>\n";
398  if (!$i) {
399  $totalarray['nbfield']++;
400  }
401  }
402 
403  // Type
404  if (!empty($arrayfields['type']['checked'])) {
405  print '<td class="center">';
406  $s = '';
407 
408  // Customer
409  if ($obj->type == 1) {
410  $s .= '<a class="customer-back" style="padding-left: 6px; padding-right: 6px" title="'.$langs->trans("Customer").'" href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$obj->rowid.'">'.$langs->trans("Customer").'</a>';
411  } elseif ($obj->type == 2) {
412  // Supplier
413  $s .= '<a class="vendor-back" style="padding-left: 6px; padding-right: 6px" title="'.$langs->trans("Supplier").'" href="'.DOL_URL_ROOT.'/fourn/card.php?socid='.$obj->rowid.'">'.$langs->trans("Supplier").'</a>';
414  } elseif ($obj->type == 3) {
415  // User - Employee
416  $s .= '<a class="user-back" style="padding-left: 6px; padding-right: 6px" title="'.$langs->trans("Employee").'" href="'.DOL_URL_ROOT.'/user/card.php?id='.$obj->rowid.'">'.$langs->trans("Employee").'</a>';
417  }
418  print $s;
419  print '</td>';
420  if (!$i) {
421  $totalarray['nbfield']++;
422  }
423  }
424 
425  if ($conf->global->MAIN_FEATURES_LEVEL >= 2) {
426  // Activated or not reconciliation on accounting account
427  if (!empty($arrayfields['reconcilable']['checked'])) {
428  print '<td class="center">';
429  if (empty($obj->reconcilable)) {
430  print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$obj->rowid.'&action=enable&mode=1&token='.newToken().'">';
431  print img_picto($langs->trans("Disabled"), 'switch_off');
432  print '</a>';
433  } else {
434  print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$obj->rowid.'&action=disable&mode=1&token='.newToken().'">';
435  print img_picto($langs->trans("Activated"), 'switch_on');
436  print '</a>';
437  }
438  print '</td>';
439  if (!$i) {
440  $totalarray['nbfield']++;
441  }
442  }
443  }
444 
445  // Action
446  print '<td class="center">';
447  $e = '';
448 
449  // Customer
450  if ($obj->type == 1) {
451  $e .= '<a class="editfielda" title="'.$langs->trans("Customer").'" href="'.DOL_URL_ROOT.'/societe/card.php?action=edit&token='.newToken().'&socid='.$obj->rowid.'&backtopage='.urlencode($_SERVER["PHP_SELF"]).'">'.img_edit().'</a>';
452  } elseif ($obj->type == 2) {
453  // Supplier
454  $e .= '<a class="editfielda" title="'.$langs->trans("Supplier").'" href="'.DOL_URL_ROOT.'/societe/card.php?action=edit&token='.newToken().'&socid='.$obj->rowid.'&backtopage='.urlencode($_SERVER["PHP_SELF"]).'">'.img_edit().'</a>';
455  } elseif ($obj->type == 3) {
456  // User - Employee
457  $e .= '<a class="editfielda" title="'.$langs->trans("Employee").'" href="'.DOL_URL_ROOT.'/user/card.php?action=edit&token='.newToken().'&id='.$obj->rowid.'&backtopage='.urlencode($_SERVER["PHP_SELF"]).'">'.img_edit().'</a>';
458  }
459  print $e;
460  print '</td>'."\n";
461  if (!$i) {
462  $totalarray['nbfield']++;
463  }
464 
465  print '</tr>'."\n";
466  $i++;
467  }
468 
469  $db->free($resql);
470 
471  $parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql);
472  $reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters); // Note that $action and $object may have been modified by hook
473  print $hookmanager->resPrint;
474 
475  print "</table>";
476  print "</div>";
477 
478  print '</form>';
479 } else {
480  dol_print_error($db);
481 }
482 
483 // End of page
484 llxFooter();
485 $db->close();
length_accounta
length_accounta($accounta)
Return Auxiliary accounting account of thirdparties with defined length.
Definition: accounting.lib.php:133
llxFooter
llxFooter()
Empty footer.
Definition: wrapper.php:70
$sql
if(isModEnabled('facture') &&!empty($user->rights->facture->lire)) if((isModEnabled('fournisseur') &&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->hasRight("fournisseur", "facture", "lire"))||(isModEnabled('supplier_invoice') && $user->hasRight("supplier_invoice", "lire"))) if(isModEnabled('don') &&!empty($user->rights->don->lire)) if(isModEnabled('tax') &&!empty($user->rights->tax->charges->lire)) if(isModEnabled('facture') &&isModEnabled('commande') && $user->hasRight("commande", "lire") &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) $sql
Social contributions to pay.
Definition: index.php:745
GETPOST
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
Definition: functions.lib.php:551
dol_print_error
dol_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
Definition: functions.lib.php:5031
$form
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
Definition: card.php:143
img_edit
img_edit($titlealt='default', $float=0, $other='')
Show logo editer/modifier fiche.
Definition: functions.lib.php:4576
$help_url
if(GETPOST('button_removefilter_x', 'alpha')||GETPOST('button_removefilter.x', 'alpha')||GETPOST('button_removefilter', 'alpha')) if(GETPOST('button_search_x', 'alpha')||GETPOST('button_search.x', 'alpha')||GETPOST('button_search', 'alpha')) if($action=="save" &&empty($cancel)) $help_url
View.
Definition: agenda.php:118
img_picto
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
Definition: functions.lib.php:4061
llxHeader
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
Definition: wrapper.php:56
dol_syslog
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
Definition: functions.lib.php:1669
print_barre_liste
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.
Definition: functions.lib.php:5453
newToken
newToken()
Return the value of token currently saved into session with name 'newtoken'.
Definition: functions.lib.php:11438
GETPOSTISSET
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname from a POST of a form.
Definition: functions.lib.php:451
print_liste_field_titre
print_liste_field_titre($name, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $tooltip="", $forcenowrapcolumntitle=0)
Show title line of an array.
Definition: functions.lib.php:5218
natural_search
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...
Definition: functions.lib.php:9872
Form
Class to manage generation of HTML components Only common components must be here.
Definition: html.form.class.php:52
setEventMessages
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='')
Set event messages in dol_events session object.
Definition: functions.lib.php:8552
accessforbidden
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.
Definition: security.lib.php:1131
$nbtotalofrecords
$nbtotalofrecords
Count total nb of records.
Definition: list.php:329