30 require
'../../main.inc.php';
32 require_once DOL_DOCUMENT_ROOT.
'/compta/tva/class/tva.class.php';
33 require_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/account.class.php';
34 require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
35 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
36 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
37 require_once DOL_DOCUMENT_ROOT.
'/accountancy/class/accountingjournal.class.php';
40 $langs->loadLangs(array(
'compta',
'bills'));
42 $action =
GETPOST(
'action',
'alpha');
43 $massaction =
GETPOST(
'massaction',
'alpha');
44 $confirm =
GETPOST(
'confirm',
'alpha');
45 $optioncss =
GETPOST(
'optioncss',
'alpha');
46 $contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'salestaxeslist';
48 $search_ref =
GETPOST(
'search_ref',
'alpha');
49 $search_label =
GETPOST(
'search_label',
'alpha');
50 $search_dateend_start =
dol_mktime(0, 0, 0,
GETPOST(
'search_dateend_startmonth',
'int'),
GETPOST(
'search_dateend_startday',
'int'),
GETPOST(
'search_dateend_startyear',
'int'));
51 $search_dateend_end =
dol_mktime(23, 59, 59,
GETPOST(
'search_dateend_endmonth',
'int'),
GETPOST(
'search_dateend_endday',
'int'),
GETPOST(
'search_dateend_endyear',
'int'));
52 $search_datepayment_start =
dol_mktime(0, 0, 0,
GETPOST(
'search_datepayment_startmonth',
'int'),
GETPOST(
'search_datepayment_startday',
'int'),
GETPOST(
'search_datepayment_startyear',
'int'));
53 $search_datepayment_end =
dol_mktime(23, 59, 59,
GETPOST(
'search_datepayment_endmonth',
'int'),
GETPOST(
'search_datepayment_endday',
'int'),
GETPOST(
'search_datepayment_endyear',
'int'));
54 $search_type =
GETPOST(
'search_type',
'int');
55 $search_account =
GETPOST(
'search_account',
'int');
56 $search_amount =
GETPOST(
'search_amount',
'alpha');
57 $search_status =
GETPOST(
'search_status',
'int');
60 $limit =
GETPOST(
'limit',
'int') ?
GETPOST(
'limit',
'int') : $conf->liste_limit;
61 $sortfield =
GETPOST(
'sortfield',
'aZ09comma');
62 $sortorder =
GETPOST(
'sortorder',
'aZ09comma');
65 if (empty($page) || $page == -1) {
68 $offset = $limit * $page;
69 $pageprev = $page - 1;
70 $pagenext = $page + 1;
73 $sortfield =
't.datev';
80 't.rowid' =>array(
'checked'=>1,
'position'=>10,
'label'=>
"Ref",),
81 't.label' =>array(
'checked'=>1,
'position'=>20,
'label'=>
"Label"),
82 't.datev' =>array(
'checked'=>1,
'position'=>30,
'label'=>
"PeriodEndDate"),
83 't.fk_typepayment' =>array(
'checked'=>1,
'position'=>50,
'label'=>
"DefaultPaymentMode"),
84 't.amount' =>array(
'checked'=>1,
'position'=>90,
'label'=>
"Amount"),
85 't.status' =>array(
'checked'=>1,
'position'=>90,
'label'=>
"Status"),
89 $arrayfields[
't.fk_account'] = array(
'checked'=>1,
'position'=>60,
'label'=>
"DefaultBankAccount");
95 $hookmanager->initHooks(array(
'salestaxeslist'));
96 $object =
new Tva($db);
99 $socid =
GETPOST(
'socid',
'int');
101 $socid = $user->socid;
110 $parameters = array(
'socid'=>$socid);
111 $reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
117 if (empty($reshook)) {
118 include DOL_DOCUMENT_ROOT.
'/core/actions_changeselectedfields.inc.php';
120 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
123 $search_dateend_start =
'';
124 $search_dateend_end =
'';
125 $search_datepayment_start =
'';
126 $search_datepayment_end =
'';
128 $search_account =
'';
142 $tva_static =
new Tva($db);
143 $bankstatic =
new Account($db);
147 llxHeader(
'', $langs->trans(
"VATDeclarations"));
149 $sql =
'SELECT t.rowid, t.amount, t.label, t.datev, t.datep, t.paye, t.fk_typepayment as type, t.fk_account,';
150 $sql.=
' ba.label as blabel, ba.ref as bref, ba.number as bnumber, ba.account_number, ba.iban_prefix as iban, ba.bic, ba.currency_code, ba.clos,';
151 $sql.=
' t.num_payment, pst.code as payment_code,';
152 $sql .=
' SUM(ptva.amount) as alreadypayed';
156 $sql .=
' FROM '.MAIN_DB_PREFIX.
'tva as t';
157 $sql .=
' LEFT JOIN '.MAIN_DB_PREFIX.
'c_paiement as pst ON (t.fk_typepayment = pst.id)';
158 $sql .=
' LEFT JOIN '.MAIN_DB_PREFIX.
'bank_account as ba ON (t.fk_account = ba.rowid)';
159 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"payment_vat as ptva ON (ptva.fk_tva = t.rowid)";
160 $sql .=
' WHERE t.entity IN ('.getEntity($object->element).
')';
162 if (!empty($search_ref)) {
165 if (!empty($search_label)) {
168 if (!empty($search_dateend_start)) {
169 $sql .=
" AND t.datev >= '".$db->idate($search_dateend_start).
"'";
171 if (!empty($search_dateend_end)) {
172 $sql .=
" AND t.datev <= '".$db->idate($search_dateend_end).
"'";
174 if (!empty($search_datepayment_start)) {
175 $sql .=
" AND t.datep >= '".$db->idate($search_datepayment_start).
"'";
177 if (!empty($search_datepayment_end)) {
178 $sql .=
" AND t.datep <= '".$db->idate($search_datepayment_end).
"'";
180 if (!empty($search_type) && $search_type > 0) {
181 $sql .=
' AND t.fk_typepayment = '.((int) $search_type);
183 if (!empty($search_account) && $search_account > 0) {
184 $sql .=
' AND t.fk_account = '.((int) $search_account);
186 if (!empty($search_amount)) {
189 if ($search_status !=
'' && $search_status >= 0) {
190 $sql .=
" AND t.paye = ".((int) $search_status);
193 $sql .=
" GROUP BY t.rowid, t.amount, t.label, t.datev, t.datep, t.paye, t.fk_typepayment, t.fk_account, ba.label, ba.ref, ba.number, ba.account_number, ba.iban_prefix, ba.bic, ba.currency_code, ba.clos, t.num_payment, pst.code";
197 if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
199 $sqlforcount = preg_replace(
'/^'.preg_quote($sqlfields,
'/').
'/',
'SELECT COUNT(*) as nbtotalofrecords', $sql);
200 $sqlforcount = preg_replace(
'/GROUP BY .*$/',
'', $sqlforcount);
201 $resql = $db->query($sqlforcount);
203 $objforcount = $db->fetch_object(
$resql);
217 $sql .= $db->order($sortfield, $sortorder);
219 $sql .= $db->plimit($limit + 1, $offset);
222 $resql = $db->query($sql);
230 $num = $db->num_rows(
$resql);
233 if (!empty($contextpage) && $contextpage != $_SERVER[
'PHP_SELF']) {
234 $param .=
'&contextpage='.$contextpage;
236 if ($limit > 0 && $limit != $conf->liste_limit) {
237 $param .=
'&limit='.$limit;
239 if ($optioncss !=
'') {
240 $param .=
'&optioncss='.urlencode($optioncss);
243 if (!empty($search_ref)) {
244 $param .=
'&search_ref="'.$search_ref.
'"';
246 if (!empty($search_label)) {
247 $param .=
'&search_label="'.$search_label.
'"';
249 if (!empty($search_dateend_start)) {
250 $param .=
'&search_dateend_startyear='.GETPOST(
'search_dateend_startyear',
'int');
252 if (!empty($search_dateend_start)) {
253 $param .=
'&search_dateend_startmonth='.GETPOST(
'search_dateend_startmonth',
'int');
255 if (!empty($search_dateend_start)) {
256 $param .=
'&search_dateend_startday='.GETPOST(
'search_dateend_startday',
'int');
258 if (!empty($search_dateend_end)) {
259 $param .=
'&search_dateend_endyear='.GETPOST(
'search_dateend_endyear',
'int');
261 if (!empty($search_dateend_end)) {
262 $param .=
'&search_dateend_endmonth='.GETPOST(
'search_dateend_endmonth',
'int');
264 if (!empty($search_dateend_end)) {
265 $param .=
'&search_dateend_endday='.GETPOST(
'search_dateend_endday',
'int');
267 if (!empty($search_datepayment_start)) {
268 $param .=
'&search_datepayment_startyear='.GETPOST(
'search_datepayment_startyear',
'int');
270 if (!empty($search_datepayment_start)) {
271 $param .=
'&search_datepayment_startmonth='.GETPOST(
'search_datepayment_startmonth',
'int');
273 if (!empty($search_datepayment_start)) {
274 $param .=
'&search_datepayment_startday='.GETPOST(
'search_datepayment_startday',
'int');
276 if (!empty($search_datepayment_end)) {
277 $param .=
'&search_datepayment_endyear='.GETPOST(
'search_datepayment_endyear',
'int');
279 if (!empty($search_datepayment_end)) {
280 $param .=
'&search_datepayment_endmonth='.GETPOST(
'search_datepayment_endmonth',
'int');
282 if (!empty($search_datepayment_end)) {
283 $param .=
'&search_datepayment_endday='.GETPOST(
'search_datepayment_endday',
'int');
285 if (!empty($search_type) && $search_type > 0) {
286 $param .=
'&search_type='.$search_type;
288 if (!empty($search_account) && $search_account > 0) {
289 $param .=
'&search_account='.$search_account;
291 if (!empty($search_amount)) {
292 $param .=
'&search_amount="'.$search_amount.
'"';
294 if ($search_status !=
'' && $search_status !=
'-1') {
295 $param .=
'&search_status='.urlencode($search_status);
297 $arrayofmassactions = array(
301 $massactionbutton =
$form->selectMassAction(
'', $arrayofmassactions);
305 print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'">';
306 if ($optioncss !=
'') {
307 print
'<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
309 print
'<input type="hidden" name="token" value="'.newToken().
'">';
310 print
'<input type="hidden" name="action" value="list">';
311 print
'<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
312 print
'<input type="hidden" name="sortfield" value="'.$sortfield.
'">';
313 print
'<input type="hidden" name="sortorder" value="'.$sortorder.
'">';
314 print
'<input type="hidden" name="contextpage" value="'.$contextpage.
'">';
316 $url = DOL_URL_ROOT.
'/compta/tva/card.php?action=create';
317 if (!empty($socid)) {
318 $url .=
'&socid='.$socid;
320 $newcardbutton =
dolGetButtonTitle($langs->trans(
'NewVATPayment'),
'',
'fa fa-plus-circle', $url,
'', $user->rights->tax->charges->creer);
321 print_barre_liste($langs->trans(
"VATDeclarations"), $page, $_SERVER[
'PHP_SELF'], $param, $sortfield, $sortorder,
'', $num,
$nbtotalofrecords,
'title_accountancy', 0, $newcardbutton,
'', $limit, 0, 0, 1);
323 $varpage = empty($contextpage) ? $_SERVER[
'PHP_SELF'] : $contextpage;
324 $selectedfields =
$form->multiSelectArrayWithCheckbox(
'selectedfields', $arrayfields, $varpage);
325 if ($massactionbutton) {
326 $selectedfields .=
$form->showCheckAddButtons(
'checkforselect', 1);
329 print
'<div class="div-table-responsive">';
330 print
'<table class="tagtable liste'.($moreforfilter ?
" listwithfilterbefore" :
'').
'">';
332 print
'<tr class="liste_titre_filter">';
335 if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER_IN_LIST)) {
336 print
'<td class="liste_titre">';
341 if (!empty($arrayfields[
't.rowid'][
'checked'])) {
342 print
'<td class="liste_titre">';
343 print
'<input type="text" class="flat" size="4" name="search_ref" value="'.dol_escape_htmltag($search_ref).
'">';
348 if (!empty($arrayfields[
't.label'][
'checked'])) {
349 print
'<td class="liste_titre">';
350 print
'<input type="text" class="flat" size="10" name="search_label" value="'.dol_escape_htmltag($search_label).
'">';
355 if (!empty($arrayfields[
't.datev'][
'checked'])) {
356 print
'<td class="liste_titre center">';
357 print
'<div class="nowrap">';
358 print
$form->selectDate($search_dateend_start ? $search_dateend_start : -1,
'search_dateend_start', 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
"From"));
360 print
'<div class="nowrap">';
361 print
$form->selectDate($search_dateend_end ? $search_dateend_end : -1,
'search_dateend_end', 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
"to"));
379 if (!empty($arrayfields[
't.fk_typepayment'][
'checked'])) {
380 print
'<td class="liste_titre left">';
381 print
$form->select_types_paiements($search_type,
'search_type',
'', 0, 1, 1, 16, 1,
'', 1);
386 if (!empty($arrayfields[
't.fk_account'][
'checked'])) {
387 print
'<td class="liste_titre left">';
388 $form->select_comptes($search_account,
'search_account', 0,
'', 1);
393 if (!empty($arrayfields[
't.amount'][
'checked'])) {
394 print
'<td class="liste_titre right">';
395 print
'<input name="search_amount" class="flat" type="text" size="8" value="'.$search_amount.
'">';
400 if (!empty($arrayfields[
't.status'][
'checked'])) {
401 print
'<td class="liste_titre maxwidthonsmartphone right">';
402 $liststatus = array(
'0' => $langs->trans(
"Unpaid"),
'1' => $langs->trans(
"Paid"));
403 print
$form->selectarray(
'search_status', $liststatus, $search_status, 1, 0, 0,
'', 0, 0, 0,
'',
'onrightofpage');
408 $parameters = array(
'arrayfields'=>$arrayfields);
409 $reshook = $hookmanager->executeHooks(
'printFieldListOption', $parameters);
410 print $hookmanager->resPrint;
413 print
'<td class="liste_titre maxwidthsearch">';
414 print
$form->showFilterAndCheckAddButtons(0);
419 print
'<tr class="liste_titre">';
420 if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER_IN_LIST)) {
423 if (!empty($arrayfields[
't.rowid'][
'checked'])) {
424 print_liste_field_titre($arrayfields[
't.rowid'][
'label'], $_SERVER[
'PHP_SELF'],
't.rowid',
'', $param,
'', $sortfield, $sortorder);
426 if (!empty($arrayfields[
't.label'][
'checked'])) {
427 print_liste_field_titre($arrayfields[
't.label'][
'label'], $_SERVER[
'PHP_SELF'],
't.label',
'', $param,
'align="left"', $sortfield, $sortorder);
429 if (!empty($arrayfields[
't.datev'][
'checked'])) {
430 print_liste_field_titre($arrayfields[
't.datev'][
'label'], $_SERVER[
'PHP_SELF'],
't.datev',
'', $param,
'align="center"', $sortfield, $sortorder);
432 if (!empty($arrayfields[
't.fk_typepayment'][
'checked'])) {
433 print_liste_field_titre($arrayfields[
't.fk_typepayment'][
'label'], $_SERVER[
'PHP_SELF'],
't.fk_typepayment',
'', $param,
'', $sortfield, $sortorder,
'left ');
435 if (!empty($arrayfields[
't.fk_account'][
'checked'])) {
436 print_liste_field_titre($arrayfields[
't.fk_account'][
'label'], $_SERVER[
'PHP_SELF'],
't.fk_account',
'', $param,
'', $sortfield, $sortorder,
'left ');
438 if (!empty($arrayfields[
't.amount'][
'checked'])) {
439 print_liste_field_titre($arrayfields[
't.amount'][
'label'], $_SERVER[
'PHP_SELF'],
't.amount',
'', $param,
'', $sortfield, $sortorder,
'right ');
441 if (!empty($arrayfields[
't.status'][
'checked'])) {
442 print_liste_field_titre($arrayfields[
't.status'][
'label'], $_SERVER[
"PHP_SELF"],
"t.paye",
"", $param,
'class="right"', $sortfield, $sortorder);
446 $parameters = array(
'arrayfields'=>$arrayfields,
'param'=>$param,
'sortfield'=>$sortfield,
'sortorder'=>$sortorder);
447 $reshook = $hookmanager->executeHooks(
'printFieldListTitle', $parameters);
448 print $hookmanager->resPrint;
450 print_liste_field_titre($selectedfields, $_SERVER[
'PHP_SELF'],
'',
'',
'',
'align="center"', $sortfield, $sortorder,
'maxwidthsearch ');
454 $totalarray = array();
455 $totalarray[
'nbfield'] = 0;
458 while ($i < min($num, $limit)) {
459 $obj = $db->fetch_object(
$resql);
461 $tva_static->id = $obj->rowid;
462 $tva_static->ref = $obj->rowid;
463 $tva_static->label = $obj->label;
465 print
'<tr class="oddeven">';
468 if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER_IN_LIST)) {
469 print
'<td>'.(($offset * $limit) + $i).
'</td>';
471 $totalarray[
'nbfield']++;
476 if (!empty($arrayfields[
't.rowid'][
'checked'])) {
478 print $tva_static->getNomUrl(1);
481 $urlsource = $_SERVER[
'PHP_SELF'].
'?id='.$tva_static->id;
482 print $formfile->getDocumentsLink($tva_static->element, $filename, $filedir,
'',
'valignmiddle paddingleft2imp');
485 $totalarray[
'nbfield']++;
490 if (!empty($arrayfields[
't.label'][
'checked'])) {
491 print
'<td>'.dol_trunc($obj->label, 40).
'</td>';
493 $totalarray[
'nbfield']++;
498 if (!empty($arrayfields[
't.datev'][
'checked'])) {
499 print
'<td class="center">'.dol_print_date($db->jdate($obj->datev),
'day').
'</td>';
501 $totalarray[
'nbfield']++;
512 if (!empty($arrayfields[
't.fk_typepayment'][
'checked'])) {
514 if (!empty($obj->payment_code)) print $langs->trans(
"PaymentTypeShort".$obj->payment_code);
517 $totalarray[
'nbfield']++;
522 if (!empty($arrayfields[
't.fk_account'][
'checked'])) {
524 if ($obj->fk_account > 0) {
525 $bankstatic->id = $obj->fk_account;
526 $bankstatic->ref = $obj->bref;
527 $bankstatic->number = $obj->bnumber;
528 $bankstatic->iban = $obj->iban;
529 $bankstatic->bic = $obj->bic;
530 $bankstatic->currency_code = $langs->trans(
"Currency".$obj->currency_code);
531 $bankstatic->account_number = $obj->account_number;
532 $bankstatic->clos = $obj->clos;
537 $bankstatic->label = $obj->blabel;
538 print $bankstatic->getNomUrl(1);
541 if (!$i) $totalarray[
'nbfield']++;
545 if (!empty($arrayfields[
't.amount'][
'checked'])) {
546 $total = $total + $obj->amount;
547 print
'<td class="nowrap right"><span class="amount">' .
price($obj->amount) .
'</span></td>';
549 $totalarray[
'nbfield']++;
551 $totalarray[
'pos'][$totalarray[
'nbfield']] =
'amount';
552 if (empty($totalarray[
'val'][
'amount'])) {
553 $totalarray[
'val'][
'amount'] = $obj->amount;
555 $totalarray[
'val'][
'amount'] += $obj->amount;
559 if (!empty($arrayfields[
't.status'][
'checked'])) {
560 print
'<td class="nowrap right">' . $tva_static->LibStatut($obj->paye, 5, $obj->alreadypayed) .
'</td>';
562 $totalarray[
'nbfield']++;
564 if (!empty($arrayfields[
't.amount'][
'checked'])) {
565 $totalarray[
'pos'][$totalarray[
'nbfield']] =
'';
578 $totalarray[
'nbfield']++;
581 include DOL_DOCUMENT_ROOT.
'/core/tpl/list_print_total.tpl.php';
586 foreach ($arrayfields as $key => $val) {
587 if (!empty($val[
'checked'])) {
591 print
'<tr><td colspan="'.$colspan.
'"><span class="opacitymedium">'.$langs->trans(
"NoRecordFound").
'</span></td></tr>';
596 $parameters = array(
'arrayfields'=>$arrayfields,
'sql'=>$sql);
597 $reshook = $hookmanager->executeHooks(
'printFieldListFooter', $parameters, $object);
598 print $hookmanager->resPrint;
600 print
'</table>'.
"\n";
603 print
'</form>'.
"\n";
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
Class to manage bank accounts.
Class to manage bank transaction lines.
Class to manage accounting accounts.
Put here description of your class.
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)) $resql
Social contributions to pay.
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
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...
price2num($amount, $rounding='', $option=0)
Function that return a number with universal decimal format (decimal separator is '.
dol_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
dolGetButtonTitle($label, $helpText='', $iconClass='fa fa-file', $url='', $id='', $status=1, $params=array())
Function dolGetButtonTitle : this kind of buttons are used in title in list.
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...
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='')
Set event messages in dol_events session object.
price($amount, $form=0, $outlangs='', $trunc=1, $rounding=-1, $forcerounding=-1, $currency_code='')
Function to format a value into an amount for visual output Function used into PDF and HTML pages.
dol_sort_array(&$array, $index, $order='asc', $natsort=0, $case_sensitive=0, $keepindex=0)
Advanced sort array by second index function, which produces ascending (default) or descending output...
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.
print_barre_liste($titre, $page, $file, $options='', $sortfield='', $sortorder='', $morehtmlcenter='', $num=-1, $totalnboflines='', $picto='generic', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limit=-1, $hideselectlimit=0, $hidenavigation=0, $pagenavastextinput=0, $morehtmlrightbeforearrow='')
Print a title with navigation controls for pagination.
dol_sanitizeFileName($str, $newstr='_', $unaccent=1)
Clean a string to use it as a file name.
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname from a POST of a form.
isModEnabled($module)
Is Dolibarr module enabled.
$nbtotalofrecords
Count total nb of records.
restrictedArea(User $user, $features, $object=0, $tableandshare='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid', $isdraft=0, $mode=0)
Check permissions of a user to show a page and an object.