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';
42 $search_ref =
GETPOST(
'search_ref',
'alpha');
43 $search_type =
GETPOST(
'search_type',
'alpha');
44 $search_lastname =
GETPOST(
'search_lastname',
'alpha');
45 $search_firstname =
GETPOST(
'search_firstname',
'alpha');
46 $search_login =
GETPOST(
'search_login',
'alpha');
47 $search_note =
GETPOST(
'search_note',
'alpha');
48 $search_account =
GETPOST(
'search_account',
'int');
49 $search_amount =
GETPOST(
'search_amount',
'alpha');
50 $optioncss =
GETPOST(
'optioncss',
'alpha');
53 $date_select =
GETPOST(
"date_select",
'alpha');
55 $limit =
GETPOST(
'limit',
'int') ?
GETPOST(
'limit',
'int') : $conf->liste_limit;
56 $sortfield =
GETPOST(
'sortfield',
'aZ09comma');
57 $sortorder =
GETPOST(
'sortorder',
'aZ09comma');
59 if (empty($page) || $page == -1) {
62 $offset = $limit * $page;
63 $pageprev = $page - 1;
64 $pagenext = $page + 1;
69 $sortfield =
"c.dateadh";
75 $hookmanager->initHooks(array(
'subscriptionlist'));
79 $extrafields->fetch_name_optionals_label($object->table_element);
81 $search_array_options = $extrafields->getOptionalsFromPost($object->table_element,
'',
'search_');
84 $fieldstosearchall = array(
87 'd.ref'=>array(
'label'=>
"Ref",
'checked'=>1),
88 'd.fk_type'=>array(
'label'=>
"Type",
'checked'=>1),
89 'd.lastname'=>array(
'label'=>
"Lastname",
'checked'=>1),
90 'd.firstname'=>array(
'label'=>
"Firstname",
'checked'=>1),
91 'd.login'=>array(
'label'=>
"Login",
'checked'=>1),
92 't.libelle'=>array(
'label'=>
"Label",
'checked'=>1),
93 'd.bank'=>array(
'label'=>
"BankAccount",
'checked'=>1,
'enabled'=>(
isModEnabled(
'banque'))),
96 'c.dateadh'=>array(
'label'=>
"DateSubscription",
'checked'=>1,
'position'=>100),
97 'c.datef'=>array(
'label'=>
"EndSubscription",
'checked'=>1,
'position'=>101),
98 'd.amount'=>array(
'label'=>
"Amount",
'checked'=>1,
'position'=>102),
99 'c.datec'=>array(
'label'=>
"DateCreation",
'checked'=>0,
'position'=>500),
100 'c.tms'=>array(
'label'=>
"DateModificationShort",
'checked'=>0,
'position'=>500),
105 $result =
restrictedArea($user,
'adherent',
'',
'',
'cotisation');
112 if (
GETPOST(
'cancel',
'alpha')) {
113 $action =
'list'; $massaction =
'';
115 if (!
GETPOST(
'confirmmassaction',
'alpha') && $massaction !=
'presend' && $massaction !=
'confirm_presend') {
119 $parameters = array(
'socid'=>isset($socid) ? $socid :
null);
120 $reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
125 if (empty($reshook)) {
127 include DOL_DOCUMENT_ROOT.
'/core/actions_changeselectedfields.inc.php';
130 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
133 $search_lastname =
"";
134 $search_firstname =
"";
138 $search_account =
"";
140 $search_array_options = array();
152 $accountstatic =
new Account($db);
157 $sql =
"SELECT d.rowid, d.login, d.firstname, d.lastname, d.societe, d.photo, d.statut,";
158 $sql .=
" d.gender, d.email, d.morphy,";
159 $sql .=
" c.rowid as crowid, c.fk_type, c.subscription,";
160 $sql .=
" c.dateadh, c.datef, c.datec as date_creation, c.tms as date_update,";
161 $sql .=
" c.fk_bank as bank, c.note as note_private,";
162 $sql .=
" b.fk_account";
163 $sql .=
" FROM ".MAIN_DB_PREFIX.
"adherent as d";
164 $sql .=
" JOIN ".MAIN_DB_PREFIX.
"subscription as c on d.rowid = c.fk_adherent";
165 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"adherent_extrafields as ef on (d.rowid = ef.fk_object)";
166 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"bank as b ON c.fk_bank=b.rowid";
167 $sql .=
" WHERE d.entity IN (".getEntity(
'adherent').
")";
168 if (isset($date_select) && $date_select !=
'') {
169 $sql .=
" AND c.dateadh >= '".((int) $date_select).
"-01-01 00:00:00'";
170 $sql .=
" AND c.dateadh < '".((int) $date_select + 1).
"-01-01 00:00:00'";
173 if (is_numeric($search_ref)) {
174 $sql .=
" AND c.rowid = ".((int) $search_ref);
176 $sql .=
" AND 1 = 2";
182 if ($search_lastname) {
183 $sql .=
natural_search(array(
'd.lastname',
'd.societe'), $search_lastname);
185 if ($search_firstname) {
194 if ($search_account > 0) {
195 $sql .=
" AND b.fk_account = ".((int) $search_account);
197 if ($search_amount) {
202 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_sql.tpl.php';
205 $parameters = array();
206 $reshook = $hookmanager->executeHooks(
'printFieldListWhere', $parameters);
207 $sql .= $hookmanager->resPrint;
209 $sql .= $db->order($sortfield, $sortorder);
213 if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
214 $resql = $db->query($sql);
226 $sql .= $db->plimit($limit + 1, $offset);
228 $result = $db->query($sql);
234 $num = $db->num_rows($result);
236 $arrayofselected = is_array($toselect) ? $toselect : array();
238 if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $sall) {
239 $obj = $db->fetch_object(
$resql);
241 header(
"Location: ".DOL_URL_ROOT.
'/adherents/subscription/card.php?id='.$id);
245 $title = $langs->trans(
"Subscriptions");
246 if (!empty($date_select)) {
247 $title .=
' ('.$langs->trans(
"Year").
' '.$date_select.
')';
250 $help_url =
'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros';
256 if (!empty($contextpage) && $contextpage != $_SERVER[
"PHP_SELF"]) {
257 $param .=
'&contextpage='.urlencode($contextpage);
259 if ($limit > 0 && $limit != $conf->liste_limit) {
260 $param .=
'&limit='.urlencode($limit);
263 $param .=
"&statut=".urlencode($statut);
266 $param .=
"&search_type=".urlencode($search_type);
269 $param .=
"&date_select=".urlencode($date_select);
271 if ($search_lastname) {
272 $param .=
"&search_lastname=".urlencode($search_lastname);
275 $param .=
"&search_login=".urlencode($search_login);
277 if ($search_account) {
278 $param .=
"&search_account=".urlencode($search_account);
280 if ($search_amount) {
281 $param .=
"&search_amount=".urlencode($search_amount);
283 if ($optioncss !=
'') {
284 $param .=
'&optioncss='.urlencode($optioncss);
287 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_param.tpl.php';
290 $arrayofmassactions = array(
295 if (in_array($massaction, array(
'presend',
'predelete'))) {
296 $arrayofmassactions = array();
298 $massactionbutton =
$form->selectMassAction(
'', $arrayofmassactions);
301 if ($user->rights->adherent->cotisation->creer) {
302 $newcardbutton .=
dolGetButtonTitle($langs->trans(
'NewSubscription'),
'',
'fa fa-plus-circle', DOL_URL_ROOT.
'/adherents/list.php?status=-1,1');
305 print
'<form method="POST" id="searchFormList" 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="formfilteraction" id="formfilteraction" value="list">';
311 print
'<input type="hidden" name="action" 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.
'">';
315 print
'<input type="hidden" name="date_select" value="'.$date_select.
'">';
317 print_barre_liste($title, $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num,
$nbtotalofrecords, $subscription->picto, 0, $newcardbutton,
'', $limit, 0, 0, 1);
319 $topicmail =
"Information";
320 $modelmail =
"subscription";
322 $trackid =
'sub'.$object->id;
323 include DOL_DOCUMENT_ROOT.
'/core/tpl/massactions_pre.tpl.php';
326 foreach ($fieldstosearchall as $key => $val) {
327 $fieldstosearchall[$key] = $langs->trans($val);
329 print
'<div class="divsearchfieldfilter">'.$langs->trans(
"FilterOnInto", $sall).join(
', ', $fieldstosearchall).
'</div>';
334 $varpage = empty($contextpage) ? $_SERVER[
"PHP_SELF"] : $contextpage;
335 $selectedfields =
$form->multiSelectArrayWithCheckbox(
'selectedfields', $arrayfields, $varpage);
336 if ($massactionbutton) {
337 $selectedfields .=
$form->showCheckAddButtons(
'checkforselect', 1);
340 print
'<div class="div-table-responsive">';
341 print
'<table class="tagtable nobottomiftotal liste'.($moreforfilter ?
" listwithfilterbefore" :
"").
'">'.
"\n";
345 print
'<tr class="liste_titre_filter">';
348 if (!empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) {
349 print
'<td class="liste_titre"> </td>';
353 if (!empty($arrayfields[
'd.ref'][
'checked'])) {
354 print
'<td class="liste_titre left">';
355 print
'<input class="flat maxwidth50" type="text" name="search_ref" value="'.dol_escape_htmltag($search_ref).
'"></td>';
359 if (!empty($arrayfields[
'd.fk_type'][
'checked'])) {
360 print
'<td class="liste_titre left">';
361 print
'<input class="flat maxwidth50" type="text" name="search_type" value="'.dol_escape_htmltag($search_type).
'">';
365 if (!empty($arrayfields[
'd.lastname'][
'checked'])) {
366 print
'<td class="liste_titre left">';
367 print
'<input class="flat maxwidth75" type="text" name="search_lastname" value="'.dol_escape_htmltag($search_lastname).
'"></td>';
370 if (!empty($arrayfields[
'd.firstname'][
'checked'])) {
371 print
'<td class="liste_titre left">';
372 print
'<input class="flat maxwidth75" type="text" name="search_firstname" value="'.dol_escape_htmltag($search_firstname).
'"></td>';
375 if (!empty($arrayfields[
'd.login'][
'checked'])) {
376 print
'<td class="liste_titre left">';
377 print
'<input class="flat maxwidth75" type="text" name="search_login" value="'.dol_escape_htmltag($search_login).
'"></td>';
380 if (!empty($arrayfields[
't.libelle'][
'checked'])) {
381 print
'<td class="liste_titre">';
386 if (!empty($arrayfields[
'd.bank'][
'checked'])) {
387 print
'<td class="liste_titre">';
388 $form->select_comptes($search_account,
'search_account', 0,
'', 1,
'', 0,
'maxwidth100');
392 if (!empty($arrayfields[
'c.dateadh'][
'checked'])) {
393 print
'<td class="liste_titre"> </td>';
396 if (!empty($arrayfields[
'c.datef'][
'checked'])) {
397 print
'<td class="liste_titre"> </td>';
400 if (!empty($arrayfields[
'd.amount'][
'checked'])) {
401 print
'<td class="liste_titre right">';
402 print
'<input class="flat" type="text" name="search_amount" value="'.dol_escape_htmltag($search_amount).
'" size="4">';
406 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_input.tpl.php';
409 $parameters = array(
'arrayfields'=>$arrayfields);
410 $reshook = $hookmanager->executeHooks(
'printFieldListOption', $parameters);
411 print $hookmanager->resPrint;
413 if (!empty($arrayfields[
'c.datec'][
'checked'])) {
414 print
'<td class="liste_titre">';
418 if (!empty($arrayfields[
'c.tms'][
'checked'])) {
419 print
'<td class="liste_titre">';
424 print
'<td class="liste_titre right">';
425 $searchpicto =
$form->showFilterButtons();
432 print
'<tr class="liste_titre">';
433 if (!empty($arrayfields[
'd.ref'][
'checked'])) {
434 print_liste_field_titre($arrayfields[
'd.ref'][
'label'], $_SERVER[
"PHP_SELF"],
"c.rowid", $param,
"",
"", $sortfield, $sortorder);
436 if (!empty($arrayfields[
'd.fk_type'][
'checked'])) {
437 print_liste_field_titre($arrayfields[
'd.fk_type'][
'label'], $_SERVER[
"PHP_SELF"],
"c.fk_type", $param,
"",
"", $sortfield, $sortorder);
439 if (!empty($arrayfields[
'd.lastname'][
'checked'])) {
440 print_liste_field_titre($arrayfields[
'd.lastname'][
'label'], $_SERVER[
"PHP_SELF"],
"d.lastname", $param,
"",
"", $sortfield, $sortorder);
442 if (!empty($arrayfields[
'd.firstname'][
'checked'])) {
443 print_liste_field_titre($arrayfields[
'd.firstname'][
'label'], $_SERVER[
"PHP_SELF"],
"d.firstname", $param,
"",
"", $sortfield, $sortorder);
445 if (!empty($arrayfields[
'd.login'][
'checked'])) {
446 print_liste_field_titre($arrayfields[
'd.login'][
'label'], $_SERVER[
"PHP_SELF"],
"d.login", $param,
"",
"", $sortfield, $sortorder);
448 if (!empty($arrayfields[
't.libelle'][
'checked'])) {
449 print_liste_field_titre($arrayfields[
't.libelle'][
'label'], $_SERVER[
"PHP_SELF"],
"c.note", $param,
"",
'', $sortfield, $sortorder);
451 if (!empty($arrayfields[
'd.bank'][
'checked'])) {
452 print_liste_field_titre($arrayfields[
'd.bank'][
'label'], $_SERVER[
"PHP_SELF"],
"b.fk_account", $param,
"",
"", $sortfield, $sortorder);
454 if (!empty($arrayfields[
'c.dateadh'][
'checked'])) {
455 print_liste_field_titre($arrayfields[
'c.dateadh'][
'label'], $_SERVER[
"PHP_SELF"],
"c.dateadh", $param,
"",
'', $sortfield, $sortorder,
'center nowraponall ');
457 if (!empty($arrayfields[
'c.datef'][
'checked'])) {
458 print_liste_field_titre($arrayfields[
'c.datef'][
'label'], $_SERVER[
"PHP_SELF"],
"c.datef", $param,
"",
'', $sortfield, $sortorder,
'center nowraponall ');
460 if (!empty($arrayfields[
'd.amount'][
'checked'])) {
461 print_liste_field_titre($arrayfields[
'd.amount'][
'label'], $_SERVER[
"PHP_SELF"],
"c.subscription", $param,
"",
'', $sortfield, $sortorder,
'right ');
465 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_title.tpl.php';
468 $parameters = array(
'arrayfields'=>$arrayfields,
'param'=>$param,
'sortfield'=>$sortfield,
'sortorder'=>$sortorder);
469 $reshook = $hookmanager->executeHooks(
'printFieldListTitle', $parameters);
470 print $hookmanager->resPrint;
471 if (!empty($arrayfields[
'c.datec'][
'checked'])) {
472 print_liste_field_titre($arrayfields[
'c.datec'][
'label'], $_SERVER[
"PHP_SELF"],
"c.datec",
"", $param,
'align="center" class="nowrap"', $sortfield, $sortorder);
474 if (!empty($arrayfields[
'c.tms'][
'checked'])) {
475 print_liste_field_titre($arrayfields[
'c.tms'][
'label'], $_SERVER[
"PHP_SELF"],
"c.tms",
"", $param,
'align="center" class="nowrap"', $sortfield, $sortorder);
477 print_liste_field_titre($selectedfields, $_SERVER[
"PHP_SELF"],
'',
'',
'',
'align="center"', $sortfield, $sortorder,
'maxwidthsearch ');
481 $totalarray = array();
482 $totalarray[
'nbfield'] = 0;
483 while ($i < min($num, $limit)) {
484 $obj = $db->fetch_object($result);
486 $subscription->ref = $obj->crowid;
487 $subscription->id = $obj->crowid;
488 $subscription->dateh = $db->jdate($obj->dateadh);
489 $subscription->datef = $db->jdate($obj->datef);
491 $adherent->lastname = $obj->lastname;
492 $adherent->firstname = $obj->firstname;
493 $adherent->ref = $obj->rowid;
494 $adherent->id = $obj->rowid;
495 $adherent->statut = $obj->statut;
496 $adherent->login = $obj->login;
497 $adherent->photo = $obj->photo;
498 $adherent->gender = $obj->gender;
499 $adherent->morphy = $obj->morphy;
500 $adherent->email = $obj->email;
501 $adherent->typeid = $obj->fk_type;
502 $adherent->datefin = $db->jdate($obj->datef);
504 $typeid = ($obj->fk_type > 0 ? $obj->fk_type : $adherent->typeid);
506 $adht->fetch($typeid);
508 $adherent->need_subscription = $adht->subscription;
510 print
'<tr class="oddeven">';
513 if (!empty($arrayfields[
'd.ref'][
'checked'])) {
514 print
'<td>'.$subscription->getNomUrl(1).
'</td>';
516 $totalarray[
'nbfield']++;
520 if (!empty($arrayfields[
'd.fk_type'][
'checked'])) {
521 print
'<td class="nowraponall">';
523 print $adht->getNomUrl(1);
527 $totalarray[
'nbfield']++;
532 if (!empty($arrayfields[
'd.lastname'][
'checked'])) {
533 print
'<td class="tdoverflowmax125">'.$adherent->getNomUrl(-1, 0,
'card',
'lastname').
'</td>';
535 $totalarray[
'nbfield']++;
539 if (!empty($arrayfields[
'd.firstname'][
'checked'])) {
540 print
'<td class="tdoverflowmax125" title="'.dol_escape_htmltag($adherent->firstname).
'">'.
dol_escape_htmltag($adherent->firstname).
'</td>';
542 $totalarray[
'nbfield']++;
547 if (!empty($arrayfields[
'd.login'][
'checked'])) {
548 print
'<td class="tdoverflowmax150" title="'.dol_escape_htmltag($adherent->login).
'">'.
dol_escape_htmltag($adherent->login).
'</td>';
550 $totalarray[
'nbfield']++;
555 if (!empty($arrayfields[
't.libelle'][
'checked'])) {
556 print
'<td class="tdoverflowmax400" title="'.dol_escape_htmltag($obj->note_private).
'" class="tooltip">';
560 $totalarray[
'nbfield']++;
565 if (!empty($arrayfields[
'd.bank'][
'checked'])) {
566 print
'<td class="tdmaxoverflow100">';
567 if ($obj->fk_account > 0) {
568 $accountstatic->id = $obj->fk_account;
569 $accountstatic->fetch($obj->fk_account);
571 print $accountstatic->getNomUrl(1);
575 $totalarray[
'nbfield']++;
580 if (!empty($arrayfields[
'c.dateadh'][
'checked'])) {
581 print
'<td class="center">'.dol_print_date($db->jdate($obj->dateadh),
'day').
"</td>\n";
583 $totalarray[
'nbfield']++;
587 if (!empty($arrayfields[
'c.datef'][
'checked'])) {
588 print
'<td class="center">'.dol_print_date($db->jdate($obj->datef),
'day').
"</td>\n";
590 $totalarray[
'nbfield']++;
594 if (!empty($arrayfields[
'd.amount'][
'checked'])) {
595 print
'<td class="right amount">'.price($obj->subscription).
'</td>';
597 $totalarray[
'nbfield']++;
600 $totalarray[
'pos'][$totalarray[
'nbfield']] =
'd.amount';
602 if (empty($totalarray[
'val'][
'd.amount'])) {
603 $totalarray[
'val'][
'd.amount'] = $obj->subscription;
605 $totalarray[
'val'][
'd.amount'] += $obj->subscription;
609 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_print_fields.tpl.php';
611 $parameters = array(
'arrayfields'=>$arrayfields,
'obj'=>$obj,
'i'=>$i,
'totalarray'=>&$totalarray);
612 $reshook = $hookmanager->executeHooks(
'printFieldListValue', $parameters);
613 print $hookmanager->resPrint;
615 if (!empty($arrayfields[
'c.datec'][
'checked'])) {
616 print
'<td class="nowrap center">';
617 print
dol_print_date($db->jdate($obj->date_creation),
'dayhour',
'tzuser');
620 $totalarray[
'nbfield']++;
624 if (!empty($arrayfields[
'c.tms'][
'checked'])) {
625 print
'<td class="nowrap center">';
626 print
dol_print_date($db->jdate($obj->date_update),
'dayhour',
'tzuser');
629 $totalarray[
'nbfield']++;
633 print
'<td class="center">';
634 if ($massactionbutton || $massaction) {
636 if (in_array($obj->crowid, $arrayofselected)) {
639 print
'<input id="cb'.$obj->crowid.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.((int) $obj->crowid).
'"'.($selected ?
' checked="checked"' :
'').
'>';
643 $totalarray[
'nbfield']++;
651 include DOL_DOCUMENT_ROOT.
'/core/tpl/list_print_total.tpl.php';
657 foreach ($arrayfields as $key => $val) {
658 if (!empty($val[
'checked'])) {
662 print
'<tr><td colspan="'.$colspan.
'" class="opacitymedium">'.$langs->trans(
"NoRecordFound").
'</td></tr>';
667 $parameters = array(
'sql' => $sql);
668 $reshook = $hookmanager->executeHooks(
'printFieldListFooter', $parameters);
669 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_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0)
Returns text escaped for inclusion in HTML alt or title tags, or into values of HTML input fields.
dolGetFirstLineOfText($text, $nboflines=1, $charset='UTF-8')
Return first line of text.
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.