dolibarr 21.0.0-beta
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-2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
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 * Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
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
28require '../../main.inc.php';
29
30require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php';
31require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
32require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php';
33require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php';
34require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
35require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
36require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
37
46// Load translation files required by the page
47$langs->loadLangs(array("compta", "bills", "other", "accountancy", "trips", "productbatch", "hrm"));
48
49$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
50
51$account_parent = GETPOST('account_parent');
52$changeaccount = GETPOST('changeaccount');
53// Search Getpost
54$search_lineid = GETPOST('search_lineid', 'alpha'); // Can be '> 100'
55$search_login = GETPOST('search_login', 'alpha');
56$search_expensereport = GETPOST('search_expensereport', 'alpha');
57$search_label = GETPOST('search_label', 'alpha');
58$search_desc = GETPOST('search_desc', 'alpha');
59$search_amount = GETPOST('search_amount', 'alpha');
60$search_account = GETPOST('search_account', 'alpha');
61$search_vat = GETPOST('search_vat', 'alpha');
62$search_date_startday = GETPOSTINT('search_date_startday');
63$search_date_startmonth = GETPOSTINT('search_date_startmonth');
64$search_date_startyear = GETPOSTINT('search_date_startyear');
65$search_date_endday = GETPOSTINT('search_date_endday');
66$search_date_endmonth = GETPOSTINT('search_date_endmonth');
67$search_date_endyear = GETPOSTINT('search_date_endyear');
68$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver
69$search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear);
70
71// Load variable for pagination
72$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : getDolGlobalString('ACCOUNTING_LIMIT_LIST_VENTILATION', $conf->liste_limit);
73$sortfield = GETPOST('sortfield', 'aZ09comma');
74$sortorder = GETPOST('sortorder', 'aZ09comma');
75$page = GETPOSTISSET('pageplusone') ? (GETPOSTINT('pageplusone') - 1) : GETPOSTINT("page");
76if (empty($page) || $page < 0) {
77 $page = 0;
78}
79$offset = $limit * $page;
80$pageprev = $page - 1;
81$pagenext = $page + 1;
82if (!$sortfield) {
83 $sortfield = "erd.date, erd.rowid";
84}
85if (!$sortorder) {
86 if (getDolGlobalInt('ACCOUNTING_LIST_SORT_VENTILATION_DONE') > 0) {
87 $sortorder = "DESC";
88 } else {
89 $sortorder = "ASC";
90 }
91}
92
93// Security check
94if (!isModEnabled('accounting')) {
96}
97if ($user->socid > 0) {
99}
100if (!$user->hasRight('accounting', 'bind', 'write')) {
102}
103
104
105$formaccounting = new FormAccounting($db);
106
107
108/*
109 * Actions
110 */
111
112// Purge search criteria
113if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // Both test are required to be compatible with all browsers
114 $search_lineid = '';
115 $search_login = '';
116 $search_expensereport = '';
117 $search_label = '';
118 $search_desc = '';
119 $search_amount = '';
120 $search_account = '';
121 $search_vat = '';
122 $search_date_startday = '';
123 $search_date_startmonth = '';
124 $search_date_startyear = '';
125 $search_date_endday = '';
126 $search_date_endmonth = '';
127 $search_date_endyear = '';
128 $search_date_start = '';
129 $search_date_end = '';
130}
131
132if (is_array($changeaccount) && count($changeaccount) > 0 && $user->hasRight('accounting', 'bind', 'write')) {
133 $error = 0;
134
135 if (!(GETPOSTINT('account_parent') >= 0)) {
136 $error++;
137 setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Account")), null, 'errors');
138 }
139
140 if (!$error) {
141 $db->begin();
142
143 $sql1 = "UPDATE ".MAIN_DB_PREFIX."expensereport_det as erd";
144 $sql1 .= " SET erd.fk_code_ventilation=".(GETPOSTINT('account_parent') > 0 ? GETPOSTINT('account_parent') : '0');
145 $sql1 .= ' WHERE erd.rowid IN ('.$db->sanitize(implode(',', $changeaccount)).')';
146
147 dol_syslog('accountancy/expensereport/lines.php::changeaccount sql= '.$sql1);
148 $resql1 = $db->query($sql1);
149 if (!$resql1) {
150 $error++;
151 setEventMessages($db->lasterror(), null, 'errors');
152 }
153 if (!$error) {
154 $db->commit();
155 setEventMessages($langs->trans("Save"), null, 'mesgs');
156 } else {
157 $db->rollback();
158 setEventMessages($db->lasterror(), null, 'errors');
159 }
160
161 $account_parent = ''; // Protection to avoid to mass apply it a second time
162 }
163}
164
165if (GETPOST('sortfield') == 'erd.date, erd.rowid') {
166 $value = (GETPOST('sortorder') == 'asc,asc' ? 0 : 1);
167 require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
168 $res = dolibarr_set_const($db, "ACCOUNTING_LIST_SORT_VENTILATION_DONE", $value, 'yesno', 0, '', $conf->entity);
169}
170
171
172/*
173 * View
174 */
175
176$form = new Form($db);
177$formother = new FormOther($db);
178
179$help_url = 'EN:Module_Double_Entry_Accounting|FR:Module_Comptabilit&eacute;_en_Partie_Double#Liaisons_comptables';
180
181llxHeader('', $langs->trans("ExpenseReportsVentilation").' - '.$langs->trans("Dispatched"), $help_url, '', 0, 0, '', '', '', 'mod-accountancy accountancy-expensereport page-lines');
182
183print '<script type="text/javascript">
184 $(function () {
185 $(\'#select-all\').click(function(event) {
186 // Iterate each checkbox
187 $(\':checkbox\').each(function() {
188 this.checked = true;
189 });
190 });
191 $(\'#unselect-all\').click(function(event) {
192 // Iterate each checkbox
193 $(\':checkbox\').each(function() {
194 this.checked = false;
195 });
196 });
197 });
198 </script>';
199
200/*
201 * Expense reports lines
202 */
203$sql = "SELECT er.ref, er.rowid as erid,";
204$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,";
205$sql .= " f.id as type_fees_id, f.code as type_fees_code, f.label as type_fees_label,";
206$sql .= " u.rowid as userid, u.login, u.lastname, u.firstname, u.email, u.gender, u.employee, u.photo, u.statut,";
207$sql .= " aa.label, aa.labelshort, aa.account_number";
208$sql .= " FROM ".MAIN_DB_PREFIX."expensereport as er";
209$sql .= " INNER JOIN ".MAIN_DB_PREFIX."expensereport_det as erd ON er.rowid = erd.fk_expensereport";
210$sql .= " INNER JOIN ".MAIN_DB_PREFIX."accounting_account as aa ON aa.rowid = erd.fk_code_ventilation";
211$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_type_fees as f ON f.id = erd.fk_c_type_fees";
212$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."user as u ON u.rowid = er.fk_user_author";
213$sql .= " WHERE erd.fk_code_ventilation > 0";
214$sql .= " AND er.entity IN (".getEntity('expensereport', 0).")"; // We don't share object for accountancy
215$sql .= " AND er.fk_statut IN (".ExpenseReport::STATUS_APPROVED.", ".ExpenseReport::STATUS_CLOSED.")";
216// Add search filter like
217if (strlen($search_lineid)) {
218 $sql .= natural_search("fd.rowid", $search_lineid, 1);
219}
220if (strlen(trim($search_login))) {
221 $sql .= natural_search("u.login", $search_login);
222}
223if (strlen(trim($search_expensereport))) {
224 $sql .= natural_search("er.ref", $search_expensereport);
225}
226if (strlen(trim($search_label))) {
227 $sql .= natural_search("f.label", $search_label);
228}
229if (strlen(trim($search_desc))) {
230 $sql .= natural_search("erd.comments", $search_desc);
231}
232if (strlen(trim($search_amount))) {
233 $sql .= natural_search("erd.total_ht", $search_amount, 1);
234}
235if (strlen(trim($search_account))) {
236 $sql .= natural_search("aa.account_number", $search_account);
237}
238if (strlen(trim($search_vat))) {
239 $sql .= natural_search("erd.tva_tx", price2num($search_vat), 1);
240}
241if ($search_date_start) {
242 $sql .= " AND erd.date >= '".$db->idate($search_date_start)."'";
243}
244if ($search_date_end) {
245 $sql .= " AND erd.date <= '".$db->idate($search_date_end)."'";
246}
247$sql .= " AND er.entity IN (".getEntity('expensereport', 0).")"; // We don't share object for accountancy
248
249$sql .= $db->order($sortfield, $sortorder);
250
251// Count total nb of records
252$nbtotalofrecords = '';
253if (!getDolGlobalInt('MAIN_DISABLE_FULL_SCANLIST')) {
254 $result = $db->query($sql);
255 $nbtotalofrecords = $db->num_rows($result);
256 if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0
257 $page = 0;
258 $offset = 0;
259 }
260}
261
262$sql .= $db->plimit($limit + 1, $offset);
263
264dol_syslog("accountancy/expensereport/lines.php", LOG_DEBUG);
265$result = $db->query($sql);
266if ($result) {
267 $num_lines = $db->num_rows($result);
268 $i = 0;
269
270 $param = '';
271 if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
272 $param .= '&contextpage='.urlencode($contextpage);
273 }
274 if ($limit > 0 && $limit != $conf->liste_limit) {
275 $param .= '&limit='.((int) $limit);
276 }
277 if ($search_login) {
278 $param .= '&search_login='.urlencode($search_login);
279 }
280 if ($search_expensereport) {
281 $param .= "&search_expensereport=".urlencode($search_expensereport);
282 }
283 if ($search_label) {
284 $param .= "&search_label=".urlencode($search_label);
285 }
286 if ($search_desc) {
287 $param .= "&search_desc=".urlencode($search_desc);
288 }
289 if ($search_account) {
290 $param .= "&search_account=".urlencode($search_account);
291 }
292 if ($search_vat) {
293 $param .= "&search_vat=".urlencode($search_vat);
294 }
295 if ($search_date_startday) {
296 $param .= '&search_date_startday='.urlencode((string) ($search_date_startday));
297 }
298 if ($search_date_startmonth) {
299 $param .= '&search_date_startmonth='.urlencode((string) ($search_date_startmonth));
300 }
301 if ($search_date_startyear) {
302 $param .= '&search_date_startyear='.urlencode((string) ($search_date_startyear));
303 }
304 if ($search_date_endday) {
305 $param .= '&search_date_endday='.urlencode((string) ($search_date_endday));
306 }
307 if ($search_date_endmonth) {
308 $param .= '&search_date_endmonth='.urlencode((string) ($search_date_endmonth));
309 }
310 if ($search_date_endyear) {
311 $param .= '&search_date_endyear='.urlencode((string) ($search_date_endyear));
312 }
313
314 print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">'."\n";
315 print '<input type="hidden" name="action" value="ventil">';
316 if ($optioncss != '') {
317 print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
318 }
319 print '<input type="hidden" name="token" value="'.newToken().'">';
320 print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
321 print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
322 print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
323 print '<input type="hidden" name="page" value="'.$page.'">';
324
325 // @phan-suppress-next-line PhanPluginSuspiciousParamOrder
326 print_barre_liste($langs->trans("ExpenseReportLinesDone").'<br><span class="opacitymedium small">'.$langs->trans("DescVentilDoneExpenseReport").'</span>', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit, 0, 0, 1);
327
328 print '<br>'.$langs->trans("ChangeAccount").' <div class="inline-block paddingbottom marginbottomonly">';
329 print $formaccounting->select_account($account_parent, 'account_parent', 2, array(), 0, 0, 'maxwidth300 maxwidthonsmartphone valignmiddle');
330 print '<input type="submit" class="button small smallpaddingimp valignmiddle" value="'.$langs->trans("ChangeBinding").'"/></div>';
331
332 $moreforfilter = '';
333
334 print '<div class="div-table-responsive">';
335 print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
336
337 print '<tr class="liste_titre_filter">';
338 print '<td class="liste_titre"><input type="text" class="flat maxwidth40" name="search_lineid" value="'.dol_escape_htmltag($search_lineid).'"></td>';
339 print '<td class="liste_titre"><input type="text" name="search_login" class="maxwidth50" value="'.$search_login.'"></td>';
340 print '<td><input type="text" class="flat maxwidth50" name="search_expensereport" value="'.dol_escape_htmltag($search_expensereport).'"></td>';
341 if (getDolGlobalString('ACCOUNTANCY_USE_EXPENSE_REPORT_VALIDATION_DATE')) {
342 print '<td class="liste_titre"></td>';
343 }
344 print '<td class="liste_titre center">';
345 print '<div class="nowrapfordate">';
346 print $form->selectDate($search_date_start ? $search_date_start : -1, 'search_date_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From'));
347 print '</div>';
348 print '<div class="nowrapfordate">';
349 print $form->selectDate($search_date_end ? $search_date_end : -1, 'search_date_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to'));
350 print '</div>';
351 print '</td>';
352 print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_label" value="'.dol_escape_htmltag($search_label).'"></td>';
353 print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_desc" value="'.dol_escape_htmltag($search_desc).'"></td>';
354 print '<td class="liste_titre right"><input type="text" class="flat maxwidth50" name="search_amount" value="'.dol_escape_htmltag($search_amount).'"></td>';
355 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>';
356 print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_account" value="'.dol_escape_htmltag($search_account).'"></td>';
357 print '<td class="liste_titre center">';
358 $searchpicto = $form->showFilterButtons();
359 print $searchpicto;
360 print '</td>';
361 print "</tr>\n";
362
363 print '<tr class="liste_titre">';
364 print_liste_field_titre("LineId", $_SERVER["PHP_SELF"], "erd.rowid", "", $param, '', $sortfield, $sortorder);
365 print_liste_field_titre("Employees", $_SERVER['PHP_SELF'], "u.login", $param, "", "", $sortfield, $sortorder);
366 print_liste_field_titre("ExpenseReport", $_SERVER["PHP_SELF"], "er.ref", "", $param, '', $sortfield, $sortorder);
367 if (getDolGlobalString('ACCOUNTANCY_USE_EXPENSE_REPORT_VALIDATION_DATE')) {
368 print_liste_field_titre("DateValidation", $_SERVER["PHP_SELF"], "er.date_valid", "", $param, '', $sortfield, $sortorder, 'center ');
369 }
370 print_liste_field_titre("DateOfLine", $_SERVER["PHP_SELF"], "erd.date, erd.rowid", "", $param, '', $sortfield, $sortorder, 'center ');
371 print_liste_field_titre("TypeFees", $_SERVER["PHP_SELF"], "f.label", "", $param, '', $sortfield, $sortorder);
372 print_liste_field_titre("Description", $_SERVER["PHP_SELF"], "erd.comments", "", $param, '', $sortfield, $sortorder);
373 print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "erd.total_ht", "", $param, '', $sortfield, $sortorder, 'right ');
374 print_liste_field_titre("VATRate", $_SERVER["PHP_SELF"], "erd.tva_tx", "", $param, '', $sortfield, $sortorder, 'center ');
375 print_liste_field_titre("AccountAccounting", $_SERVER["PHP_SELF"], "aa.account_number", "", $param, '', $sortfield, $sortorder);
376 $checkpicto = $form->showCheckAddButtons();
377 print_liste_field_titre($checkpicto, '', '', '', '', '', '', '', 'center ');
378 print "</tr>\n";
379
380 $expensereportstatic = new ExpenseReport($db);
381 $accountingaccountstatic = new AccountingAccount($db);
382 $userstatic = new User($db);
383
384 $i = 0;
385 while ($i < min($num_lines, $limit)) {
386 $objp = $db->fetch_object($result);
387
388 $expensereportstatic->ref = $objp->ref;
389 $expensereportstatic->id = $objp->erid;
390
391 $userstatic->id = $objp->userid;
392 $userstatic->ref = $objp->label;
393 $userstatic->login = $objp->login;
394 $userstatic->status = $objp->statut;
395 $userstatic->email = $objp->email;
396 $userstatic->gender = $objp->gender;
397 $userstatic->firstname = $objp->firstname;
398 $userstatic->lastname = $objp->lastname;
399 $userstatic->employee = $objp->employee;
400 $userstatic->photo = $objp->photo;
401
402 $accountingaccountstatic->rowid = $objp->fk_compte;
403 $accountingaccountstatic->label = $objp->label;
404 $accountingaccountstatic->labelshort = $objp->labelshort;
405 $accountingaccountstatic->account_number = $objp->account_number;
406
407 print '<tr class="oddeven">';
408
409 // Line id
410 print '<td>'.$objp->rowid.'</td>';
411
412 // Login
413 print '<td class="nowraponall">';
414 print $userstatic->getNomUrl(-1, '', 0, 0, 24, 1, 'login', '', 1);
415 print '</td>';
416
417 // Ref Expense report
418 print '<td>'.$expensereportstatic->getNomUrl(1).'</td>';
419
420 // Date validation
421 if (getDolGlobalString('ACCOUNTANCY_USE_EXPENSE_REPORT_VALIDATION_DATE')) {
422 print '<td class="center">'.dol_print_date($db->jdate($objp->date_valid), 'day').'</td>';
423 }
424
425 print '<td class="center">'.dol_print_date($db->jdate($objp->date), 'day').'</td>';
426
427 // Fees label
428 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>';
429
430 // Fees description -- Can be null
431 print '<td>';
432 $text = dolGetFirstLineOfText(dol_string_nohtmltag($objp->comments, 1));
433 $trunclength = getDolGlobalInt('ACCOUNTING_LENGTH_DESCRIPTION', 32);
434 print $form->textwithtooltip(dol_trunc($text, $trunclength), $objp->comments);
435 print '</td>';
436
437 // Amount without taxes
438 print '<td class="right nowraponall amount">'.price($objp->total_ht).'</td>';
439
440 // Vat rate
441 print '<td class="center">'.vatrate($objp->tva_tx.($objp->vat_src_code ? ' ('.$objp->vat_src_code.')' : '')).'</td>';
442
443 // Accounting account affected
444 print '<td class="tdoverflowmax200" title="'.dol_escape_htmltag($accountingaccountstatic->label).'">';
445 print '<a class="editfielda reposition marginleftonly marginrightonly" href="./card.php?id='.$objp->rowid.'&backtopage='.urlencode($_SERVER["PHP_SELF"].($param ? '?'.$param : '')).'">';
446 print img_edit();
447 print '</a> ';
448 print $accountingaccountstatic->getNomUrl(0, 1, 1, '', 1);
449 print '</td>';
450
451 print '<td class="center"><input type="checkbox" class="checkforaction" name="changeaccount[]" value="'.$objp->rowid.'"/></td>';
452
453 print "</tr>";
454 $i++;
455 }
456 if ($num_lines == 0) {
457 $colspan = 10;
458 if (getDolGlobalString('ACCOUNTANCY_USE_EXPENSE_REPORT_VALIDATION_DATE')) {
459 $colspan++;
460 }
461 print '<tr><td colspan="'.$colspan.'"><span class="opacitymedium">'.$langs->trans("NoRecordFound").'</span></td></tr>';
462 }
463
464 print "</table>";
465 print "</div>";
466
467 if ($nbtotalofrecords > $limit) {
468 print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, '', 0, '', '', $limit, 1);
469 }
470
471 print '</form>';
472} else {
473 print $db->lasterror();
474}
475
476// End of page
477llxFooter();
478$db->close();
dolibarr_set_const($db, $name, $value, $type='chaine', $visible=0, $note='', $entity=1)
Insert a parameter (key,value) into database (delete old key then insert it again).
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
Definition wrapper.php:71
Class to manage accounting accounts.
Class to manage Trips and Expenses.
const STATUS_CLOSED
Classified paid.
Class to manage generation of HTML components for accounting management.
Class to manage generation of HTML components Only common components must be here.
Class permettant la generation de composants html autre Only common components are here.
Class to manage Dolibarr users.
llxFooter()
Footer empty.
Definition document.php:107
dol_mktime($hour, $minute, $second, $month, $day, $year, $gm='auto', $check=1)
Return a timestamp date built from detailed information (by default a local PHP server timestamp) Rep...
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
print_barre_liste($title, $page, $file, $options='', $sortfield='', $sortorder='', $morehtmlcenter='', $num=-1, $totalnboflines='', $picto='generic', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limit=-1, $selectlimitsuffix=0, $hidenavigation=0, $pagenavastextinput=0, $morehtmlrightbeforearrow='')
Print a title with navigation controls for pagination.
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
dolGetFirstLineOfText($text, $nboflines=1, $charset='UTF-8')
Return first line of text.
dol_string_nohtmltag($stringtoclean, $removelinefeed=1, $pagecodeto='UTF-8', $strip_tags=0, $removedoublespaces=1)
Clean a string from all HTML tags and entities.
price2num($amount, $rounding='', $option=0)
Function that return a number with universal decimal format (decimal separator is '.
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...
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
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.
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.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
img_edit($titlealt='default', $float=0, $other='')
Show logo edit/modify fiche.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
Definition member.php:79
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.