27 require
'../../main.inc.php';
28 require_once DOL_DOCUMENT_ROOT.
'/adherents/class/adherent.class.php';
29 require_once DOL_DOCUMENT_ROOT.
'/adherents/class/adherent_type.class.php';
30 require_once DOL_DOCUMENT_ROOT.
'/adherents/class/subscription.class.php';
31 require_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/account.class.php';
33 $langs->loadLangs(array(
"members",
"companies"));
35 $action =
GETPOST(
'action',
'aZ09');
36 $massaction =
GETPOST(
'massaction',
'alpha');
37 $confirm =
GETPOST(
'confirm',
'alpha');
38 $toselect =
GETPOST(
'toselect',
'array');
39 $contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'subscriptionlist';
40 $mode =
GETPOST(
'mode',
'alpha');
44 $search_ref =
GETPOST(
'search_ref',
'alpha');
45 $search_type =
GETPOST(
'search_type',
'alpha');
46 $search_lastname =
GETPOST(
'search_lastname',
'alpha');
47 $search_firstname =
GETPOST(
'search_firstname',
'alpha');
48 $search_login =
GETPOST(
'search_login',
'alpha');
49 $search_note =
GETPOST(
'search_note',
'alpha');
50 $search_account =
GETPOST(
'search_account',
'int');
51 $search_amount =
GETPOST(
'search_amount',
'alpha');
52 $optioncss =
GETPOST(
'optioncss',
'alpha');
55 $date_select =
GETPOST(
"date_select",
'alpha');
57 $limit =
GETPOST(
'limit',
'int') ?
GETPOST(
'limit',
'int') : $conf->liste_limit;
58 $sortfield =
GETPOST(
'sortfield',
'aZ09comma');
59 $sortorder =
GETPOST(
'sortorder',
'aZ09comma');
61 if (empty($page) || $page == -1) {
64 $offset = $limit * $page;
65 $pageprev = $page - 1;
66 $pagenext = $page + 1;
71 $sortfield =
"c.dateadh";
77 $hookmanager->initHooks(array(
'subscriptionlist'));
81 $extrafields->fetch_name_optionals_label($object->table_element);
83 $search_array_options = $extrafields->getOptionalsFromPost($object->table_element,
'',
'search_');
86 $fieldstosearchall = array(
89 'd.ref'=>array(
'label'=>
"Ref",
'checked'=>1),
90 'd.fk_type'=>array(
'label'=>
"Type",
'checked'=>1),
91 'd.lastname'=>array(
'label'=>
"Lastname",
'checked'=>1),
92 'd.firstname'=>array(
'label'=>
"Firstname",
'checked'=>1),
93 'd.login'=>array(
'label'=>
"Login",
'checked'=>1),
94 't.libelle'=>array(
'label'=>
"Label",
'checked'=>1),
95 'd.bank'=>array(
'label'=>
"BankAccount",
'checked'=>1,
'enabled'=>(
isModEnabled(
'banque'))),
98 'c.dateadh'=>array(
'label'=>
"DateSubscription",
'checked'=>1,
'position'=>100),
99 'c.datef'=>array(
'label'=>
"EndSubscription",
'checked'=>1,
'position'=>101),
100 'd.amount'=>array(
'label'=>
"Amount",
'checked'=>1,
'position'=>102),
101 'c.datec'=>array(
'label'=>
"DateCreation",
'checked'=>0,
'position'=>500),
102 'c.tms'=>array(
'label'=>
"DateModificationShort",
'checked'=>0,
'position'=>500),
107 $result =
restrictedArea($user,
'adherent',
'',
'',
'cotisation');
114 if (
GETPOST(
'cancel',
'alpha')) {
115 $action =
'list'; $massaction =
'';
117 if (!
GETPOST(
'confirmmassaction',
'alpha') && $massaction !=
'presend' && $massaction !=
'confirm_presend') {
121 $parameters = array(
'socid'=>isset($socid) ? $socid :
null);
122 $reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
127 if (empty($reshook)) {
129 include DOL_DOCUMENT_ROOT.
'/core/actions_changeselectedfields.inc.php';
132 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
135 $search_lastname =
"";
136 $search_firstname =
"";
140 $search_account =
"";
142 $search_array_options = array();
154 $accountstatic =
new Account($db);
159 $sql =
"SELECT d.rowid, d.login, d.firstname, d.lastname, d.societe, d.photo, d.statut,";
160 $sql .=
" d.gender, d.email, d.morphy,";
161 $sql .=
" c.rowid as crowid, c.fk_type, c.subscription,";
162 $sql .=
" c.dateadh, c.datef, c.datec as date_creation, c.tms as date_update,";
163 $sql .=
" c.fk_bank as bank, c.note,";
164 $sql .=
" b.fk_account";
165 $sql .=
" FROM ".MAIN_DB_PREFIX.
"adherent as d";
166 $sql .=
" JOIN ".MAIN_DB_PREFIX.
"subscription as c on d.rowid = c.fk_adherent";
167 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"adherent_extrafields as ef on (d.rowid = ef.fk_object)";
168 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"bank as b ON c.fk_bank=b.rowid";
169 $sql .=
" WHERE d.entity IN (".getEntity(
'adherent').
")";
170 if (isset($date_select) && $date_select !=
'') {
171 $sql .=
" AND c.dateadh >= '".((int) $date_select).
"-01-01 00:00:00'";
172 $sql .=
" AND c.dateadh < '".((int) $date_select + 1).
"-01-01 00:00:00'";
175 if (is_numeric($search_ref)) {
176 $sql .=
" AND c.rowid = ".((int) $search_ref);
178 $sql .=
" AND 1 = 2";
184 if ($search_lastname) {
185 $sql .=
natural_search(array(
'd.lastname',
'd.societe'), $search_lastname);
187 if ($search_firstname) {
196 if ($search_account > 0) {
197 $sql .=
" AND b.fk_account = ".((int) $search_account);
199 if ($search_amount) {
204 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_sql.tpl.php';
207 $parameters = array();
208 $reshook = $hookmanager->executeHooks(
'printFieldListWhere', $parameters);
209 $sql .= $hookmanager->resPrint;
211 $sql .= $db->order($sortfield, $sortorder);
215 if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
216 $resql = $db->query($sql);
228 $sql .= $db->plimit($limit + 1, $offset);
230 $result = $db->query($sql);
236 $num = $db->num_rows($result);
238 $arrayofselected = is_array($toselect) ? $toselect : array();
240 if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $sall) {
241 $obj = $db->fetch_object(
$resql);
243 header(
"Location: ".DOL_URL_ROOT.
'/adherents/subscription/card.php?id='.$id);
247 $title = $langs->trans(
"Subscriptions");
248 if (!empty($date_select)) {
249 $title .=
' ('.$langs->trans(
"Year").
' '.$date_select.
')';
252 $help_url =
'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros';
259 $param .=
'&mode='.urlencode($mode);
261 if (!empty($contextpage) && $contextpage != $_SERVER[
"PHP_SELF"]) {
262 $param .=
'&contextpage='.urlencode($contextpage);
264 if ($limit > 0 && $limit != $conf->liste_limit) {
265 $param .=
'&limit='.urlencode($limit);
268 $param .=
"&statut=".urlencode($statut);
271 $param .=
"&search_type=".urlencode($search_type);
274 $param .=
"&date_select=".urlencode($date_select);
276 if ($search_lastname) {
277 $param .=
"&search_lastname=".urlencode($search_lastname);
280 $param .=
"&search_login=".urlencode($search_login);
282 if ($search_account) {
283 $param .=
"&search_account=".urlencode($search_account);
285 if ($search_amount) {
286 $param .=
"&search_amount=".urlencode($search_amount);
288 if ($optioncss !=
'') {
289 $param .=
'&optioncss='.urlencode($optioncss);
292 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_param.tpl.php';
295 $arrayofmassactions = array(
300 if (in_array($massaction, array(
'presend',
'predelete'))) {
301 $arrayofmassactions = array();
303 $massactionbutton =
$form->selectMassAction(
'', $arrayofmassactions);
306 $newcardbutton .=
dolGetButtonTitle($langs->trans(
'ViewList'),
'',
'fa fa-bars imgforviewmode', $_SERVER[
"PHP_SELF"].
'?mode=common'.preg_replace(
'/(&|\?)*mode=[^&]+/',
'', $param),
'', ((empty($mode) || $mode ==
'common') ? 2 : 1), array(
'morecss'=>
'reposition'));
307 $newcardbutton .=
dolGetButtonTitle($langs->trans(
'ViewKanban'),
'',
'fa fa-th-list imgforviewmode', $_SERVER[
"PHP_SELF"].
'?mode=kanban'.preg_replace(
'/(&|\?)*mode=[^&]+/',
'', $param),
'', ($mode ==
'kanban' ? 2 : 1), array(
'morecss'=>
'reposition'));
309 if ($user->hasRight(
'adherent',
'cotisation',
'creer')) {
310 $newcardbutton .=
dolGetButtonTitle($langs->trans(
'NewSubscription'),
'',
'fa fa-plus-circle', DOL_URL_ROOT.
'/adherents/list.php?status=-1,1');
313 print
'<form method="POST" id="searchFormList" action="'.$_SERVER[
"PHP_SELF"].
'">';
314 if ($optioncss !=
'') {
315 print
'<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
317 print
'<input type="hidden" name="token" value="'.newToken().
'">';
318 print
'<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
319 print
'<input type="hidden" name="action" value="list">';
320 print
'<input type="hidden" name="sortfield" value="'.$sortfield.
'">';
321 print
'<input type="hidden" name="sortorder" value="'.$sortorder.
'">';
322 print
'<input type="hidden" name="contextpage" value="'.$contextpage.
'">';
323 print
'<input type="hidden" name="date_select" value="'.$date_select.
'">';
324 print
'<input type="hidden" name="mode" value="'.$mode.
'">';
327 print_barre_liste($title, $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num,
$nbtotalofrecords, $subscription->picto, 0, $newcardbutton,
'', $limit, 0, 0, 1);
329 $topicmail =
"Information";
330 $modelmail =
"subscription";
332 $trackid =
'sub'.$object->id;
333 include DOL_DOCUMENT_ROOT.
'/core/tpl/massactions_pre.tpl.php';
336 foreach ($fieldstosearchall as $key => $val) {
337 $fieldstosearchall[$key] = $langs->trans($val);
339 print
'<div class="divsearchfieldfilter">'.$langs->trans(
"FilterOnInto", $sall).join(
', ', $fieldstosearchall).
'</div>';
344 $varpage = empty($contextpage) ? $_SERVER[
"PHP_SELF"] : $contextpage;
345 $selectedfields =
$form->multiSelectArrayWithCheckbox(
'selectedfields', $arrayfields, $varpage);
346 if ($massactionbutton) {
347 $selectedfields .=
$form->showCheckAddButtons(
'checkforselect', 1);
350 print
'<div class="div-table-responsive">';
351 print
'<table class="tagtable nobottomiftotal liste'.($moreforfilter ?
" listwithfilterbefore" :
"").
'">'.
"\n";
355 print
'<tr class="liste_titre_filter">';
358 if (!empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) {
359 print
'<td class="liste_titre"> </td>';
363 if (!empty($arrayfields[
'd.ref'][
'checked'])) {
364 print
'<td class="liste_titre left">';
365 print
'<input class="flat maxwidth50" type="text" name="search_ref" value="'.dol_escape_htmltag($search_ref).
'"></td>';
369 if (!empty($arrayfields[
'd.fk_type'][
'checked'])) {
370 print
'<td class="liste_titre left">';
371 print
'<input class="flat maxwidth50" type="text" name="search_type" value="'.dol_escape_htmltag($search_type).
'">';
375 if (!empty($arrayfields[
'd.lastname'][
'checked'])) {
376 print
'<td class="liste_titre left">';
377 print
'<input class="flat maxwidth75" type="text" name="search_lastname" value="'.dol_escape_htmltag($search_lastname).
'"></td>';
380 if (!empty($arrayfields[
'd.firstname'][
'checked'])) {
381 print
'<td class="liste_titre left">';
382 print
'<input class="flat maxwidth75" type="text" name="search_firstname" value="'.dol_escape_htmltag($search_firstname).
'"></td>';
385 if (!empty($arrayfields[
'd.login'][
'checked'])) {
386 print
'<td class="liste_titre left">';
387 print
'<input class="flat maxwidth75" type="text" name="search_login" value="'.dol_escape_htmltag($search_login).
'"></td>';
390 if (!empty($arrayfields[
't.libelle'][
'checked'])) {
391 print
'<td class="liste_titre">';
396 if (!empty($arrayfields[
'd.bank'][
'checked'])) {
397 print
'<td class="liste_titre">';
398 $form->select_comptes($search_account,
'search_account', 0,
'', 1,
'', 0,
'maxwidth150');
402 if (!empty($arrayfields[
'c.dateadh'][
'checked'])) {
403 print
'<td class="liste_titre"> </td>';
406 if (!empty($arrayfields[
'c.datef'][
'checked'])) {
407 print
'<td class="liste_titre"> </td>';
410 if (!empty($arrayfields[
'd.amount'][
'checked'])) {
411 print
'<td class="liste_titre right">';
412 print
'<input class="flat" type="text" name="search_amount" value="'.dol_escape_htmltag($search_amount).
'" size="4">';
416 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_input.tpl.php';
419 $parameters = array(
'arrayfields'=>$arrayfields);
420 $reshook = $hookmanager->executeHooks(
'printFieldListOption', $parameters);
421 print $hookmanager->resPrint;
423 if (!empty($arrayfields[
'c.datec'][
'checked'])) {
424 print
'<td class="liste_titre">';
428 if (!empty($arrayfields[
'c.tms'][
'checked'])) {
429 print
'<td class="liste_titre">';
434 print
'<td class="liste_titre right">';
435 $searchpicto =
$form->showFilterButtons();
442 print
'<tr class="liste_titre">';
443 if (!empty($arrayfields[
'd.ref'][
'checked'])) {
444 print_liste_field_titre($arrayfields[
'd.ref'][
'label'], $_SERVER[
"PHP_SELF"],
"c.rowid", $param,
"",
"", $sortfield, $sortorder);
446 if (!empty($arrayfields[
'd.fk_type'][
'checked'])) {
447 print_liste_field_titre($arrayfields[
'd.fk_type'][
'label'], $_SERVER[
"PHP_SELF"],
"c.fk_type", $param,
"",
"", $sortfield, $sortorder);
449 if (!empty($arrayfields[
'd.lastname'][
'checked'])) {
450 print_liste_field_titre($arrayfields[
'd.lastname'][
'label'], $_SERVER[
"PHP_SELF"],
"d.lastname", $param,
"",
"", $sortfield, $sortorder);
452 if (!empty($arrayfields[
'd.firstname'][
'checked'])) {
453 print_liste_field_titre($arrayfields[
'd.firstname'][
'label'], $_SERVER[
"PHP_SELF"],
"d.firstname", $param,
"",
"", $sortfield, $sortorder);
455 if (!empty($arrayfields[
'd.login'][
'checked'])) {
456 print_liste_field_titre($arrayfields[
'd.login'][
'label'], $_SERVER[
"PHP_SELF"],
"d.login", $param,
"",
"", $sortfield, $sortorder);
458 if (!empty($arrayfields[
't.libelle'][
'checked'])) {
459 print_liste_field_titre($arrayfields[
't.libelle'][
'label'], $_SERVER[
"PHP_SELF"],
"c.note", $param,
"",
'', $sortfield, $sortorder);
461 if (!empty($arrayfields[
'd.bank'][
'checked'])) {
462 print_liste_field_titre($arrayfields[
'd.bank'][
'label'], $_SERVER[
"PHP_SELF"],
"b.fk_account", $param,
"",
"", $sortfield, $sortorder);
464 if (!empty($arrayfields[
'c.dateadh'][
'checked'])) {
465 print_liste_field_titre($arrayfields[
'c.dateadh'][
'label'], $_SERVER[
"PHP_SELF"],
"c.dateadh", $param,
"",
'', $sortfield, $sortorder,
'center nowraponall ');
467 if (!empty($arrayfields[
'c.datef'][
'checked'])) {
468 print_liste_field_titre($arrayfields[
'c.datef'][
'label'], $_SERVER[
"PHP_SELF"],
"c.datef", $param,
"",
'', $sortfield, $sortorder,
'center nowraponall ');
470 if (!empty($arrayfields[
'd.amount'][
'checked'])) {
471 print_liste_field_titre($arrayfields[
'd.amount'][
'label'], $_SERVER[
"PHP_SELF"],
"c.subscription", $param,
"",
'', $sortfield, $sortorder,
'right ');
475 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_title.tpl.php';
478 $parameters = array(
'arrayfields'=>$arrayfields,
'param'=>$param,
'sortfield'=>$sortfield,
'sortorder'=>$sortorder);
479 $reshook = $hookmanager->executeHooks(
'printFieldListTitle', $parameters);
480 print $hookmanager->resPrint;
481 if (!empty($arrayfields[
'c.datec'][
'checked'])) {
482 print_liste_field_titre($arrayfields[
'c.datec'][
'label'], $_SERVER[
"PHP_SELF"],
"c.datec",
"", $param,
'align="center" class="nowrap"', $sortfield, $sortorder);
484 if (!empty($arrayfields[
'c.tms'][
'checked'])) {
485 print_liste_field_titre($arrayfields[
'c.tms'][
'label'], $_SERVER[
"PHP_SELF"],
"c.tms",
"", $param,
'align="center" class="nowrap"', $sortfield, $sortorder);
487 print_liste_field_titre($selectedfields, $_SERVER[
"PHP_SELF"],
'',
'',
'',
'align="center"', $sortfield, $sortorder,
'maxwidthsearch ');
491 $totalarray = array();
492 $totalarray[
'nbfield'] = 0;
493 while ($i < min($num, $limit)) {
494 $obj = $db->fetch_object($result);
496 $subscription->ref = $obj->crowid;
497 $subscription->id = $obj->crowid;
498 $subscription->dateh = $db->jdate($obj->dateadh);
499 $subscription->datef = $db->jdate($obj->datef);
501 $adherent->lastname = $obj->lastname;
502 $adherent->firstname = $obj->firstname;
503 $adherent->ref = $obj->rowid;
504 $adherent->id = $obj->rowid;
505 $adherent->statut = $obj->statut;
506 $adherent->login = $obj->login;
507 $adherent->photo = $obj->photo;
508 $adherent->gender = $obj->gender;
509 $adherent->morphy = $obj->morphy;
510 $adherent->email = $obj->email;
511 $adherent->typeid = $obj->fk_type;
512 $adherent->datefin = $db->jdate($obj->datef);
514 $typeid = ($obj->fk_type > 0 ? $obj->fk_type : $adherent->typeid);
516 $adht->fetch($typeid);
518 $adherent->need_subscription = $adht->subscription;
520 if ($mode ==
'kanban') {
522 print
'<tr><td colspan="12">';
523 print
'<div class="box-flex-container">';
527 $subscription->fk_adherent = $adherent->getNomUrl(1);
528 $subscription->fk_type = $adht->getNomUrl(1);
529 $subscription->amount = $obj->subscription;
530 if ($obj->fk_account > 0) {
531 $accountstatic->id = $obj->fk_account;
532 $accountstatic->fetch($obj->fk_account);
533 $subscription->fk_bank = $accountstatic->getNomUrl(1);
536 print $subscription->getKanbanView(
'');
537 if ($i == (min($num, $limit) - 1)) {
542 print
'<tr class="oddeven">';
545 if (!empty($arrayfields[
'd.ref'][
'checked'])) {
546 print
'<td>'.$subscription->getNomUrl(1).
'</td>';
548 $totalarray[
'nbfield']++;
552 if (!empty($arrayfields[
'd.fk_type'][
'checked'])) {
553 print
'<td class="nowraponall">';
555 print $adht->getNomUrl(1);
559 $totalarray[
'nbfield']++;
564 if (!empty($arrayfields[
'd.lastname'][
'checked'])) {
565 print
'<td class="tdoverflowmax150">'.$adherent->getNomUrl(-1, 0,
'card',
'lastname').
'</td>';
567 $totalarray[
'nbfield']++;
571 if (!empty($arrayfields[
'd.firstname'][
'checked'])) {
572 print
'<td class="tdoverflowmax150" title="'.dol_escape_htmltag($adherent->firstname).
'">'.$adherent->firstname.
'</td>';
574 $totalarray[
'nbfield']++;
579 if (!empty($arrayfields[
'd.login'][
'checked'])) {
580 print
'<td class="tdoverflowmax150" title="'.dol_escape_htmltag($adherent->login).
'">'.$adherent->login.
'</td>';
582 $totalarray[
'nbfield']++;
587 if (!empty($arrayfields[
't.libelle'][
'checked'])) {
588 print
'<td class="tdoverflowmax400" title="'.dol_escape_htmltag($obj->note).
'">';
592 $totalarray[
'nbfield']++;
597 if (!empty($arrayfields[
'd.bank'][
'checked'])) {
598 print
'<td class="tdmaxoverflow150">';
599 if ($obj->fk_account > 0) {
600 $accountstatic->id = $obj->fk_account;
601 $accountstatic->fetch($obj->fk_account);
603 print $accountstatic->getNomUrl(1);
607 $totalarray[
'nbfield']++;
612 if (!empty($arrayfields[
'c.dateadh'][
'checked'])) {
613 print
'<td class="center">'.dol_print_date($db->jdate($obj->dateadh),
'day').
"</td>\n";
615 $totalarray[
'nbfield']++;
619 if (!empty($arrayfields[
'c.datef'][
'checked'])) {
620 print
'<td class="center">'.dol_print_date($db->jdate($obj->datef),
'day').
"</td>\n";
622 $totalarray[
'nbfield']++;
626 if (!empty($arrayfields[
'd.amount'][
'checked'])) {
627 print
'<td class="right amount">'.price($obj->subscription).
'</td>';
629 $totalarray[
'nbfield']++;
632 $totalarray[
'pos'][$totalarray[
'nbfield']] =
'd.amount';
634 if (empty($totalarray[
'val'][
'd.amount'])) {
635 $totalarray[
'val'][
'd.amount'] = $obj->subscription;
637 $totalarray[
'val'][
'd.amount'] += $obj->subscription;
641 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_print_fields.tpl.php';
643 $parameters = array(
'arrayfields'=>$arrayfields,
'obj'=>$obj,
'i'=>$i,
'totalarray'=>&$totalarray);
644 $reshook = $hookmanager->executeHooks(
'printFieldListValue', $parameters);
645 print $hookmanager->resPrint;
647 if (!empty($arrayfields[
'c.datec'][
'checked'])) {
648 print
'<td class="nowrap center">';
649 print
dol_print_date($db->jdate($obj->date_creation),
'dayhour',
'tzuser');
652 $totalarray[
'nbfield']++;
656 if (!empty($arrayfields[
'c.tms'][
'checked'])) {
657 print
'<td class="nowrap center">';
658 print
dol_print_date($db->jdate($obj->date_update),
'dayhour',
'tzuser');
661 $totalarray[
'nbfield']++;
665 print
'<td class="center">';
666 if ($massactionbutton || $massaction) {
668 if (in_array($obj->crowid, $arrayofselected)) {
671 print
'<input id="cb'.$obj->crowid.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->crowid.
'"'.($selected ?
' checked="checked"' :
'').
'>';
675 $totalarray[
'nbfield']++;
684 include DOL_DOCUMENT_ROOT.
'/core/tpl/list_print_total.tpl.php';
690 foreach ($arrayfields as $key => $val) {
691 if (!empty($val[
'checked'])) {
695 print
'<tr><td colspan="'.$colspan.
'" class="opacitymedium">'.$langs->trans(
"NoRecordFound").
'</td></tr>';
700 $parameters = array(
'sql' => $sql);
701 $reshook = $hookmanager->executeHooks(
'printFieldListFooter', $parameters);
702 print $hookmanager->resPrint;
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.
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 members of a foundation.
Class to manage members type.
Class to manage subscriptions of foundation members.
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_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.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs='', $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
dol_now($mode='auto')
Return date for now.
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.
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.