dolibarr  16.0.5
lines.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
3  * Copyright (C) 2013-2022 Alexandre Spangaro <aspangaro@open-dsi.fr>
4  * Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com>
5  * Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
6  * Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <https://www.gnu.org/licenses/>.
20  */
21 
27 require '../../main.inc.php';
28 
29 require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php';
30 require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
31 require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php';
32 require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php';
33 require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
34 require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
35 require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
36 
37 // Load translation files required by the page
38 $langs->loadLangs(array("compta", "bills", "other", "accountancy", "trips", "productbatch", "hrm"));
39 
40 $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
41 
42 $account_parent = GETPOST('account_parent', 'int');
43 $changeaccount = GETPOST('changeaccount');
44 // Search Getpost
45 $search_login = GETPOST('search_login', 'alpha');
46 $search_expensereport = GETPOST('search_expensereport', 'alpha');
47 $search_label = GETPOST('search_label', 'alpha');
48 $search_desc = GETPOST('search_desc', 'alpha');
49 $search_amount = GETPOST('search_amount', 'alpha');
50 $search_account = GETPOST('search_account', 'alpha');
51 $search_vat = GETPOST('search_vat', 'alpha');
52 $search_date_startday = GETPOST('search_date_startday', 'int');
53 $search_date_startmonth = GETPOST('search_date_startmonth', 'int');
54 $search_date_startyear = GETPOST('search_date_startyear', 'int');
55 $search_date_endday = GETPOST('search_date_endday', 'int');
56 $search_date_endmonth = GETPOST('search_date_endmonth', 'int');
57 $search_date_endyear = GETPOST('search_date_endyear', 'int');
58 $search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver
59 $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear);
60 
61 // Load variable for pagination
62 $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : (empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION) ? $conf->liste_limit : $conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION);
63 $sortfield = GETPOST('sortfield', 'aZ09comma');
64 $sortorder = GETPOST('sortorder', 'aZ09comma');
65 $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
66 if (empty($page) || $page < 0) {
67  $page = 0;
68 }
69 $offset = $limit * $page;
70 $pageprev = $page - 1;
71 $pagenext = $page + 1;
72 if (!$sortfield) {
73  $sortfield = "erd.date, erd.rowid";
74 }
75 if (!$sortorder) {
76  if ($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_DONE > 0) {
77  $sortorder = "DESC";
78  }
79 }
80 
81 // Security check
82 if (!isModEnabled('accounting')) {
84 }
85 if ($user->socid > 0) {
87 }
88 if (empty($user->rights->accounting->mouvements->lire)) {
90 }
91 
92 
93 $formaccounting = new FormAccounting($db);
94 
95 
96 /*
97  * Actions
98  */
99 
100 // Purge search criteria
101 if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // Both test are required to be compatible with all browsers
102  $search_login = '';
103  $search_expensereport = '';
104  $search_label = '';
105  $search_desc = '';
106  $search_amount = '';
107  $search_account = '';
108  $search_vat = '';
109  $search_date_startday = '';
110  $search_date_startmonth = '';
111  $search_date_startyear = '';
112  $search_date_endday = '';
113  $search_date_endmonth = '';
114  $search_date_endyear = '';
115  $search_date_start = '';
116  $search_date_end = '';
117 }
118 
119 if (is_array($changeaccount) && count($changeaccount) > 0 && $user->rights->accounting->bind->write) {
120  $error = 0;
121 
122  if (!(GETPOST('account_parent', 'int') >= 0)) {
123  $error++;
124  setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Account")), null, 'errors');
125  }
126 
127  if (!$error) {
128  $db->begin();
129 
130  $sql1 = "UPDATE ".MAIN_DB_PREFIX."expensereport_det as erd";
131  $sql1 .= " SET erd.fk_code_ventilation=".(GETPOST('account_parent', 'int') > 0 ? GETPOST('account_parent', 'int') : '0');
132  $sql1 .= ' WHERE erd.rowid IN ('.$db->sanitize(implode(',', $changeaccount)).')';
133 
134  dol_syslog('accountancy/expensereport/lines.php::changeaccount sql= '.$sql1);
135  $resql1 = $db->query($sql1);
136  if (!$resql1) {
137  $error++;
138  setEventMessages($db->lasterror(), null, 'errors');
139  }
140  if (!$error) {
141  $db->commit();
142  setEventMessages($langs->trans("Save"), null, 'mesgs');
143  } else {
144  $db->rollback();
145  setEventMessages($db->lasterror(), null, 'errors');
146  }
147 
148  $account_parent = ''; // Protection to avoid to mass apply it a second time
149  }
150 }
151 
152 
153 /*
154  * View
155  */
156 
157 $form = new Form($db);
158 $formother = new FormOther($db);
159 
160 llxHeader('', $langs->trans("ExpenseReportsVentilation").' - '.$langs->trans("Dispatched"));
161 
162 print '<script type="text/javascript">
163  $(function () {
164  $(\'#select-all\').click(function(event) {
165  // Iterate each checkbox
166  $(\':checkbox\').each(function() {
167  this.checked = true;
168  });
169  });
170  $(\'#unselect-all\').click(function(event) {
171  // Iterate each checkbox
172  $(\':checkbox\').each(function() {
173  this.checked = false;
174  });
175  });
176  });
177  </script>';
178 
179 /*
180  * Expense reports lines
181  */
182 $sql = "SELECT er.ref, er.rowid as erid,";
183 $sql .= " erd.rowid, erd.fk_c_type_fees, erd.comments, erd.total_ht, erd.fk_code_ventilation, erd.tva_tx, erd.vat_src_code, erd.date,";
184 $sql .= " f.id as type_fees_id, f.code as type_fees_code, f.label as type_fees_label,";
185 $sql .= " u.rowid as userid, u.login, u.lastname, u.firstname, u.email, u.gender, u.employee, u.photo, u.statut,";
186 $sql .= " aa.label, aa.labelshort, aa.account_number";
187 $sql .= " FROM ".MAIN_DB_PREFIX."expensereport as er";
188 $sql .= " INNER JOIN ".MAIN_DB_PREFIX."expensereport_det as erd ON er.rowid = erd.fk_expensereport";
189 $sql .= " INNER JOIN ".MAIN_DB_PREFIX."accounting_account as aa ON aa.rowid = erd.fk_code_ventilation";
190 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_type_fees as f ON f.id = erd.fk_c_type_fees";
191 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."user as u ON u.rowid = er.fk_user_author";
192 $sql .= " WHERE erd.fk_code_ventilation > 0";
193 $sql .= " AND er.entity IN (".getEntity('expensereport', 0).")"; // We don't share object for accountancy
194 $sql .= " AND er.fk_statut IN (".ExpenseReport::STATUS_APPROVED.", ".ExpenseReport::STATUS_CLOSED.")";
195 // Add search filter like
196 if (strlen(trim($search_login))) {
197  $sql .= natural_search("u.login", $search_login);
198 }
199 if (strlen(trim($search_expensereport))) {
200  $sql .= natural_search("er.ref", $search_expensereport);
201 }
202 if (strlen(trim($search_label))) {
203  $sql .= natural_search("f.label", $search_label);
204 }
205 if (strlen(trim($search_desc))) {
206  $sql .= natural_search("er.comments", $search_desc);
207 }
208 if (strlen(trim($search_amount))) {
209  $sql .= natural_search("erd.total_ht", $search_amount, 1);
210 }
211 if (strlen(trim($search_account))) {
212  $sql .= natural_search("aa.account_number", $search_account);
213 }
214 if (strlen(trim($search_vat))) {
215  $sql .= natural_search("erd.tva_tx", price2num($search_vat), 1);
216 }
217 if ($search_date_start) {
218  $sql .= " AND erd.date >= '".$db->idate($search_date_start)."'";
219 }
220 if ($search_date_end) {
221  $sql .= " AND erd.date <= '".$db->idate($search_date_end)."'";
222 }
223 $sql .= " AND er.entity IN (".getEntity('expensereport', 0).")"; // We don't share object for accountancy
224 
225 $sql .= $db->order($sortfield, $sortorder);
226 
227 // Count total nb of records
228 $nbtotalofrecords = '';
229 if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
230  $result = $db->query($sql);
231  $nbtotalofrecords = $db->num_rows($result);
232  if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0
233  $page = 0;
234  $offset = 0;
235  }
236 }
237 
238 $sql .= $db->plimit($limit + 1, $offset);
239 
240 dol_syslog("accountancy/expensereport/lines.php", LOG_DEBUG);
241 $result = $db->query($sql);
242 if ($result) {
243  $num_lines = $db->num_rows($result);
244  $i = 0;
245 
246  $param = '';
247  if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
248  $param .= '&contextpage='.urlencode($contextpage);
249  }
250  if ($limit > 0 && $limit != $conf->liste_limit) {
251  $param .= '&limit='.urlencode($limit);
252  }
253  if ($search_login) {
254  $param .= '&search_login='.urlencode($search_login);
255  }
256  if ($search_expensereport) {
257  $param .= "&search_expensereport=".urlencode($search_expensereport);
258  }
259  if ($search_label) {
260  $param .= "&search_label=".urlencode($search_label);
261  }
262  if ($search_desc) {
263  $param .= "&search_desc=".urlencode($search_desc);
264  }
265  if ($search_account) {
266  $param .= "&search_account=".urlencode($search_account);
267  }
268  if ($search_vat) {
269  $param .= "&search_vat=".urlencode($search_vat);
270  }
271  if ($search_date_startday) {
272  $param .= '&search_date_startday='.urlencode($search_date_startday);
273  }
274  if ($search_date_startmonth) {
275  $param .= '&search_date_startmonth='.urlencode($search_date_startmonth);
276  }
277  if ($search_date_startyear) {
278  $param .= '&search_date_startyear='.urlencode($search_date_startyear);
279  }
280  if ($search_date_endday) {
281  $param .= '&search_date_endday='.urlencode($search_date_endday);
282  }
283  if ($search_date_endmonth) {
284  $param .= '&search_date_endmonth='.urlencode($search_date_endmonth);
285  }
286  if ($search_date_endyear) {
287  $param .= '&search_date_endyear='.urlencode($search_date_endyear);
288  }
289 
290  print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">'."\n";
291  print '<input type="hidden" name="action" value="ventil">';
292  if ($optioncss != '') {
293  print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
294  }
295  print '<input type="hidden" name="token" value="'.newToken().'">';
296  print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
297  print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
298  print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
299  print '<input type="hidden" name="page" value="'.$page.'">';
300 
301  print_barre_liste($langs->trans("ExpenseReportLinesDone"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit);
302  print '<span class="opacitymedium">'.$langs->trans("DescVentilDoneExpenseReport").'</span><br>';
303 
304  print '<br><div class="inline-block divButAction paddingbottom">'.$langs->trans("ChangeAccount").' ';
305  print $formaccounting->select_account($account_parent, 'account_parent', 2, array(), 0, 0, 'maxwidth300 maxwidthonsmartphone valignmiddle');
306  print '<input type="submit" class="button small valignmiddle" value="'.$langs->trans("ChangeBinding").'"/></div>';
307 
308  $moreforfilter = '';
309 
310  print '<div class="div-table-responsive">';
311  print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
312 
313  print '<tr class="liste_titre_filter">';
314  print '<td class="liste_titre"><input type="text" name="search_login" class="maxwidth50" value="'.$search_login.'"></td>';
315  print '<td class="liste_titre"></td>';
316  print '<td><input type="text" class="flat maxwidth50" name="search_expensereport" value="'.dol_escape_htmltag($search_expensereport).'"></td>';
317  if (!empty($conf->global->ACCOUNTANCY_USE_EXPENSE_REPORT_VALIDATION_DATE)) {
318  print '<td class="liste_titre"></td>';
319  }
320  print '<td class="liste_titre center">';
321  print '<div class="nowrap">';
322  print $form->selectDate($search_date_start ? $search_date_start : -1, 'search_date_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From'));
323  print '</div>';
324  print '<div class="nowrap">';
325  print $form->selectDate($search_date_end ? $search_date_end : -1, 'search_date_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to'));
326  print '</div>';
327  print '</td>';
328  print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_label" value="'.dol_escape_htmltag($search_label).'"></td>';
329  print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_desc" value="'.dol_escape_htmltag($search_desc).'"></td>';
330  print '<td class="liste_titre right"><input type="text" class="flat maxwidth50" name="search_amount" value="'.dol_escape_htmltag($search_amount).'"></td>';
331  print '<td class="liste_titre center"><input type="text" class="flat maxwidth50" name="search_vat" size="1" placeholder="%" value="'.dol_escape_htmltag($search_vat).'"></td>';
332  print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_account" value="'.dol_escape_htmltag($search_account).'"></td>';
333  print '<td class="liste_titre center">';
334  $searchpicto = $form->showFilterButtons();
335  print $searchpicto;
336  print '</td>';
337  print "</tr>\n";
338 
339  print '<tr class="liste_titre">';
340  print_liste_field_titre("Employees", $_SERVER['PHP_SELF'], "u.login", $param, "", "", $sortfield, $sortorder);
341  print_liste_field_titre("LineId", $_SERVER["PHP_SELF"], "erd.rowid", "", $param, '', $sortfield, $sortorder);
342  print_liste_field_titre("ExpenseReport", $_SERVER["PHP_SELF"], "er.ref", "", $param, '', $sortfield, $sortorder);
343  if (!empty($conf->global->ACCOUNTANCY_USE_EXPENSE_REPORT_VALIDATION_DATE)) {
344  print_liste_field_titre("DateValidation", $_SERVER["PHP_SELF"], "er.date_valid", "", $param, '', $sortfield, $sortorder, 'center ');
345  }
346  print_liste_field_titre("DateOfLine", $_SERVER["PHP_SELF"], "erd.date, erd.rowid", "", $param, '', $sortfield, $sortorder, 'center ');
347  print_liste_field_titre("TypeFees", $_SERVER["PHP_SELF"], "f.label", "", $param, '', $sortfield, $sortorder);
348  print_liste_field_titre("Description", $_SERVER["PHP_SELF"], "erd.comments", "", $param, '', $sortfield, $sortorder);
349  print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "erd.total_ht", "", $param, '', $sortfield, $sortorder, 'right ');
350  print_liste_field_titre("VATRate", $_SERVER["PHP_SELF"], "erd.tva_tx", "", $param, '', $sortfield, $sortorder, 'center ');
351  print_liste_field_titre("AccountAccounting", $_SERVER["PHP_SELF"], "aa.account_number", "", $param, '', $sortfield, $sortorder);
352  $checkpicto = $form->showCheckAddButtons();
353  print_liste_field_titre($checkpicto, '', '', '', '', '', '', '', 'center ');
354  print "</tr>\n";
355 
356  $expensereportstatic = new ExpenseReport($db);
357  $accountingaccountstatic = new AccountingAccount($db);
358  $userstatic = new User($db);
359 
360  $i = 0;
361  while ($i < min($num_lines, $limit)) {
362  $objp = $db->fetch_object($result);
363 
364  $expensereportstatic->ref = $objp->ref;
365  $expensereportstatic->id = $objp->erid;
366 
367  $userstatic->id = $objp->userid;
368  $userstatic->ref = $objp->label;
369  $userstatic->login = $objp->login;
370  $userstatic->statut = $objp->statut;
371  $userstatic->email = $objp->email;
372  $userstatic->gender = $objp->gender;
373  $userstatic->firstname = $objp->firstname;
374  $userstatic->lastname = $objp->lastname;
375  $userstatic->employee = $objp->employee;
376  $userstatic->photo = $objp->photo;
377 
378  $accountingaccountstatic->rowid = $objp->fk_compte;
379  $accountingaccountstatic->label = $objp->label;
380  $accountingaccountstatic->labelshort = $objp->labelshort;
381  $accountingaccountstatic->account_number = $objp->account_number;
382 
383  print '<tr class="oddeven">';
384 
385  // Login
386  print '<td class="nowraponall">';
387  print $userstatic->getNomUrl(-1, '', 0, 0, 24, 1, 'login', '', 1);
388  print '</td>';
389 
390  // Line id
391  print '<td>'.$objp->rowid.'</td>';
392 
393  // Ref Expense report
394  print '<td>'.$expensereportstatic->getNomUrl(1).'</td>';
395 
396  // Date validation
397  if (!empty($conf->global->ACCOUNTANCY_USE_EXPENSE_REPORT_VALIDATION_DATE)) {
398  print '<td class="center">'.dol_print_date($db->jdate($objp->date_valid), 'day').'</td>';
399  }
400 
401  print '<td class="center">'.dol_print_date($db->jdate($objp->date), 'day').'</td>';
402 
403  // Fees label
404  print '<td class="tdoverflow">'.($langs->trans($objp->type_fees_code) == $objp->type_fees_code ? $objp->type_fees_label : $langs->trans(($objp->type_fees_code))).'</td>';
405 
406  // Fees description -- Can be null
407  print '<td>';
408  $text = dolGetFirstLineOfText(dol_string_nohtmltag($objp->comments, 1));
409  $trunclength = empty($conf->global->ACCOUNTING_LENGTH_DESCRIPTION) ? 32 : $conf->global->ACCOUNTING_LENGTH_DESCRIPTION;
410  print $form->textwithtooltip(dol_trunc($text, $trunclength), $objp->comments);
411  print '</td>';
412 
413  // Amount without taxes
414  print '<td class="right nowraponall amount">'.price($objp->total_ht).'</td>';
415 
416  // Vat rate
417  print '<td class="center">'.vatrate($objp->tva_tx.($objp->vat_src_code ? ' ('.$objp->vat_src_code.')' : '')).'</td>';
418 
419  // Accounting account affected
420  print '<td class="center">';
421  print $accountingaccountstatic->getNomUrl(0, 1, 1, '', 1);
422  print ' <a class="editfielda reposition marginleftonly marginrightonly" href="./card.php?id='.$objp->rowid.'&backtopage='.urlencode($_SERVER["PHP_SELF"].($param ? '?'.$param : '')).'">';
423  print img_edit();
424  print '</a></td>';
425  print '<td class="center"><input type="checkbox" class="checkforaction" name="changeaccount[]" value="'.$objp->rowid.'"/></td>';
426 
427  print "</tr>";
428  $i++;
429  }
430 
431  print "</table>";
432  print "</div>";
433 
434  if ($nbtotalofrecords > $limit) {
435  print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, '', 0, '', '', $limit, 1);
436  }
437 
438  print '</form>';
439 } else {
440  print $db->lasterror();
441 }
442 
443 // End of page
444 llxFooter();
445 $db->close();
dol_trunc
dol_trunc($string, $size=40, $trunc='right', $stringencoding='UTF-8', $nodot=0, $display=0)
Truncate a string to a particular length adding '…' if string larger than length.
Definition: functions.lib.php:3805
llxFooter
llxFooter()
Empty footer.
Definition: wrapper.php:73
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:484
$form
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
Definition: card.php:142
FormOther
Classe permettant la generation de composants html autre Only common components are here.
Definition: html.formother.class.php:39
img_edit
img_edit($titlealt='default', $float=0, $other='')
Show logo editer/modifier fiche.
Definition: functions.lib.php:4389
FormAccounting
Class to manage generation of HTML components for accounting management.
Definition: html.formaccounting.class.php:33
price2num
price2num($amount, $rounding='', $option=0)
Function that return a number with universal decimal format (decimal separator is '.
Definition: functions.lib.php:5661
ExpenseReport\STATUS_CLOSED
const STATUS_CLOSED
Classified paid.
Definition: expensereport.class.php:165
dol_string_nohtmltag
dol_string_nohtmltag($stringtoclean, $removelinefeed=1, $pagecodeto='UTF-8', $strip_tags=0, $removedoublespaces=1)
Clean a string from all HTML tags and entities.
Definition: functions.lib.php:6694
dol_syslog
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
Definition: functions.lib.php:1603
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:5257
isModEnabled
isModEnabled($module)
Is Dolibarr module enabled.
Definition: functions.lib.php:105
AccountingAccount
Class to manage accounting accounts.
Definition: accountingaccount.class.php:36
User
Class to manage Dolibarr users.
Definition: user.class.php:44
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:386
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:5026
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:9420
Form
Class to manage generation of HTML components Only common components must be here.
Definition: html.form.class.php:52
ExpenseReport
Class to manage Trips and Expenses.
Definition: expensereport.class.php:36
setEventMessages
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='')
Set event messages in dol_events session object.
Definition: functions.lib.php:8137
dolGetFirstLineOfText
dolGetFirstLineOfText($text, $nboflines=1, $charset='UTF-8')
Return first line of text.
Definition: functions.lib.php:6907
accessforbidden
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
Definition: security.lib.php:933
dol_mktime
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...
Definition: functions.lib.php:2757
llxHeader
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOCSRFCHECK')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
Definition: wrapper.php:59