26 require
'../../main.inc.php';
27 require_once DOL_DOCUMENT_ROOT.
'/adherents/class/adherent.class.php';
28 require_once DOL_DOCUMENT_ROOT.
'/adherents/class/adherent_type.class.php';
29 require_once DOL_DOCUMENT_ROOT.
'/adherents/class/subscription.class.php';
30 require_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/account.class.php';
32 $langs->loadLangs(array(
"members",
"companies"));
34 $action =
GETPOST(
'action',
'aZ09');
35 $massaction =
GETPOST(
'massaction',
'alpha');
36 $confirm =
GETPOST(
'confirm',
'alpha');
37 $toselect =
GETPOST(
'toselect',
'array');
38 $contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'subscriptionlist';
41 $search_ref =
GETPOST(
'search_ref',
'alpha');
42 $search_type =
GETPOST(
'search_type',
'alpha');
43 $search_lastname =
GETPOST(
'search_lastname',
'alpha');
44 $search_firstname =
GETPOST(
'search_firstname',
'alpha');
45 $search_login =
GETPOST(
'search_login',
'alpha');
46 $search_note =
GETPOST(
'search_note',
'alpha');
47 $search_account =
GETPOST(
'search_account',
'int');
48 $search_amount =
GETPOST(
'search_amount',
'alpha');
49 $optioncss =
GETPOST(
'optioncss',
'alpha');
52 $date_select =
GETPOST(
"date_select",
'alpha');
54 $limit =
GETPOST(
'limit',
'int') ?
GETPOST(
'limit',
'int') : $conf->liste_limit;
55 $sortfield =
GETPOST(
"sortfield",
'alpha');
56 $sortorder =
GETPOST(
"sortorder",
'alpha');
58 if (empty($page) || $page == -1) { $page = 0; }
59 $offset = $limit * $page;
60 $pageprev = $page - 1;
61 $pagenext = $page + 1;
62 if (!$sortorder) { $sortorder =
"DESC"; }
63 if (!$sortfield) { $sortfield =
"c.dateadh"; }
68 $hookmanager->initHooks(array(
'subscriptionlist'));
72 $extrafields->fetch_name_optionals_label($object->table_element);
74 $search_array_options = $extrafields->getOptionalsFromPost($object->table_element,
'',
'search_');
77 $fieldstosearchall = array(
80 'd.ref'=>array(
'label'=>
"Ref",
'checked'=>1),
81 'd.fk_type'=>array(
'label'=>
"Type",
'checked'=>1),
82 'd.lastname'=>array(
'label'=>
"Lastname",
'checked'=>1),
83 'd.firstname'=>array(
'label'=>
"Firstname",
'checked'=>1),
84 'd.login'=>array(
'label'=>
"Login",
'checked'=>1),
85 't.libelle'=>array(
'label'=>
"Label",
'checked'=>1),
86 'd.bank'=>array(
'label'=>
"BankAccount",
'checked'=>1,
'enabled'=>(!empty($conf->banque->enabled))),
89 'c.dateadh'=>array(
'label'=>
"DateSubscription",
'checked'=>1,
'position'=>100),
90 'c.datef'=>array(
'label'=>
"EndSubscription",
'checked'=>1,
'position'=>101),
91 'd.amount'=>array(
'label'=>
"Amount",
'checked'=>1,
'position'=>102),
92 'c.datec'=>array(
'label'=>
"DateCreation",
'checked'=>0,
'position'=>500),
93 'c.tms'=>array(
'label'=>
"DateModificationShort",
'checked'=>0,
'position'=>500),
105 if (
GETPOST(
'cancel',
'alpha')) { $action =
'list'; $massaction =
''; }
106 if (!
GETPOST(
'confirmmassaction',
'alpha') && $massaction !=
'presend' && $massaction !=
'confirm_presend' && $massaction !=
'confirm_createbills') { $massaction =
''; }
108 $parameters = array(
'socid'=>$socid);
109 $reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
110 if ($reshook < 0)
setEventMessages($hookmanager->error, $hookmanager->errors,
'errors');
112 if (empty($reshook)) {
114 include DOL_DOCUMENT_ROOT.
'/core/actions_changeselectedfields.inc.php';
117 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
120 $search_lastname =
"";
121 $search_firstname =
"";
125 $search_account =
"";
127 $search_array_options = array();
136 $form =
new Form($db);
139 $accountstatic =
new Account($db);
144 $sql =
"SELECT d.rowid, d.login, d.firstname, d.lastname, d.societe, d.photo, d.statut,";
145 $sql .=
" d.gender, d.email, d.morphy,";
146 $sql .=
" c.rowid as crowid, c.fk_type, c.subscription,";
147 $sql .=
" c.dateadh, c.datef, c.datec as date_creation, c.tms as date_update,";
148 $sql .=
" c.fk_bank as bank, c.note,";
149 $sql .=
" b.fk_account";
150 $sql .=
" FROM ".MAIN_DB_PREFIX.
"adherent as d";
151 $sql .=
" JOIN ".MAIN_DB_PREFIX.
"subscription as c on d.rowid = c.fk_adherent";
152 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"adherent_extrafields as ef on (d.rowid = ef.fk_object)";
153 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"bank as b ON c.fk_bank=b.rowid";
154 $sql .=
" WHERE d.entity IN (".getEntity(
'adherent').
")";
155 if (isset($date_select) && $date_select !=
'') {
156 $sql .=
" AND c.dateadh >= '".((int) $date_select).
"-01-01 00:00:00'";
157 $sql .=
" AND c.dateadh < '".((int) $date_select + 1).
"-01-01 00:00:00'";
160 if (is_numeric($search_ref)) $sql .=
" AND (c.rowid = ".$db->escape($search_ref).
")";
161 else $sql .=
" AND 1 = 2";
163 if ($search_type) $sql .=
natural_search(array(
'c.fk_type'), $search_type);
164 if ($search_lastname) $sql .=
natural_search(array(
'd.lastname',
'd.societe'), $search_lastname);
165 if ($search_firstname) $sql .=
natural_search(array(
'd.firstname'), $search_firstname);
166 if ($search_login) $sql .=
natural_search(
'd.login', $search_login);
168 if ($search_account > 0) $sql .=
" AND b.fk_account = ".urldecode($search_account);
169 if ($search_amount) $sql .=
natural_search(
'c.subscription', $search_amount, 1);
172 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_sql.tpl.php';
175 $parameters = array();
176 $reshook = $hookmanager->executeHooks(
'printFieldListWhere', $parameters);
177 $sql .= $hookmanager->resPrint;
179 $sql .= $db->order($sortfield, $sortorder);
182 $nbtotalofrecords =
'';
183 if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
184 $resql = $db->query($sql);
187 if (($page * $limit) > $nbtotalofrecords) {
193 $sql .= $db->plimit($limit + 1, $offset);
195 $result = $db->query($sql);
201 $num = $db->num_rows($result);
203 $arrayofselected = is_array($toselect) ? $toselect : array();
205 if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $sall) {
206 $obj = $db->fetch_object(
$resql);
208 header(
"Location: ".DOL_URL_ROOT.
'/adherents/subscription/card.php?id='.$id);
212 llxHeader(
'', $langs->trans(
"ListOfSubscriptions"),
'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros');
216 $title = $langs->trans(
"ListOfSubscriptions");
217 if (!empty($date_select)) $title .=
' ('.$langs->trans(
"Year").
' '.$date_select.
')';
220 if (!empty($contextpage) && $contextpage !=
$_SERVER[
"PHP_SELF"]) $param .=
'&contextpage='.urlencode($contextpage);
221 if ($limit > 0 && $limit != $conf->liste_limit) $param .=
'&limit='.urlencode($limit);
222 if ($statut !=
'') $param .=
"&statut=".urlencode($statut);
223 if ($search_type) $param .=
"&search_type=".urlencode($search_type);
224 if ($date_select) $param .=
"&date_select=".urlencode($date_select);
225 if ($search_lastname) $param .=
"&search_lastname=".urlencode($search_lastname);
226 if ($search_login) $param .=
"&search_login=".urlencode($search_login);
227 if ($search_account) $param .=
"&search_account=".urlencode($search_account);
228 if ($search_amount) $param .=
"&search_amount=".urlencode($search_amount);
229 if ($optioncss !=
'') $param .=
'&optioncss='.urlencode($optioncss);
231 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_param.tpl.php';
234 $arrayofmassactions = array(
239 if (in_array($massaction, array(
'presend',
'predelete'))) $arrayofmassactions = array();
240 $massactionbutton = $form->selectMassAction(
'', $arrayofmassactions);
243 if ($user->rights->adherent->cotisation->creer) {
244 $newcardbutton .=
dolGetButtonTitle($langs->trans(
'NewSubscription'),
'',
'fa fa-plus-circle', DOL_URL_ROOT.
'/adherents/list.php?status=-1,1');
247 print '<form method="POST" id="searchFormList" action="'.$_SERVER[
"PHP_SELF"].
'">';
248 if ($optioncss !=
'')
print '<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
249 print '<input type="hidden" name="token" value="'.newToken().
'">';
250 print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
251 print '<input type="hidden" name="action" value="list">';
252 print '<input type="hidden" name="sortfield" value="'.$sortfield.
'">';
253 print '<input type="hidden" name="sortorder" value="'.$sortorder.
'">';
254 print '<input type="hidden" name="contextpage" value="'.$contextpage.
'">';
256 print_barre_liste($title, $page,
$_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords,
'members', 0, $newcardbutton,
'', $limit, 0, 0, 1);
258 $topicmail =
"Information";
259 $modelmail =
"subscription";
261 $trackid =
'sub'.$object->id;
262 include DOL_DOCUMENT_ROOT.
'/core/tpl/massactions_pre.tpl.php';
265 foreach ($fieldstosearchall as $key => $val) $fieldstosearchall[$key] = $langs->trans($val);
266 print '<div class="divsearchfieldfilter">'.$langs->trans(
"FilterOnInto", $sall).join(
', ', $fieldstosearchall).
'</div>';
271 $varpage = empty($contextpage) ?
$_SERVER[
"PHP_SELF"] : $contextpage;
272 $selectedfields = $form->multiSelectArrayWithCheckbox(
'selectedfields', $arrayfields, $varpage);
273 if ($massactionbutton) $selectedfields .= $form->showCheckAddButtons(
'checkforselect', 1);
275 print '<div class="div-table-responsive">';
276 print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ?
" listwithfilterbefore" :
"").
'">'.
"\n";
280 print '<tr class="liste_titre_filter">';
283 if (!empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) {
284 print
'<td class="liste_titre"> </td>';
288 if (!empty($arrayfields[
'd.ref'][
'checked'])) {
289 print
'<td class="liste_titre left">';
290 print
'<input class="flat maxwidth50" type="text" name="search_ref" value="'.dol_escape_htmltag($search_ref).
'"></td>';
294 if (!empty($arrayfields[
'd.fk_type'][
'checked'])) {
295 print
'<td class="liste_titre left">';
296 print
'<input class="flat maxwidth50" type="text" name="search_type" value="'.dol_escape_htmltag($search_type).
'">';
300 if (!empty($arrayfields[
'd.lastname'][
'checked'])) {
301 print
'<td class="liste_titre left">';
302 print
'<input class="flat maxwidth75" type="text" name="search_lastname" value="'.dol_escape_htmltag($search_lastname).
'"></td>';
305 if (!empty($arrayfields[
'd.firstname'][
'checked'])) {
306 print
'<td class="liste_titre left">';
307 print
'<input class="flat maxwidth75" type="text" name="search_firstname" value="'.dol_escape_htmltag($search_firstname).
'"></td>';
310 if (!empty($arrayfields[
'd.login'][
'checked'])) {
311 print
'<td class="liste_titre left">';
312 print
'<input class="flat maxwidth75" type="text" name="search_login" value="'.dol_escape_htmltag($search_login).
'"></td>';
315 if (!empty($arrayfields[
't.libelle'][
'checked'])) {
316 print
'<td class="liste_titre">';
321 if (!empty($arrayfields[
'd.bank'][
'checked'])) {
322 print
'<td class="liste_titre">';
323 $form->select_comptes($search_account,
'search_account', 0,
'', 1,
'', 0,
'maxwidth150');
327 if (!empty($arrayfields[
'c.dateadh'][
'checked'])) {
328 print
'<td class="liste_titre"> </td>';
331 if (!empty($arrayfields[
'c.datef'][
'checked'])) {
332 print
'<td class="liste_titre"> </td>';
335 if (!empty($arrayfields[
'd.amount'][
'checked'])) {
336 print
'<td class="liste_titre right">';
337 print
'<input class="flat" type="text" name="search_amount" value="'.dol_escape_htmltag($search_amount).
'" size="4">';
341 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_input.tpl.php';
344 $parameters = array(
'arrayfields'=>$arrayfields);
345 $reshook = $hookmanager->executeHooks(
'printFieldListOption', $parameters);
346 print $hookmanager->resPrint;
348 if (!empty($arrayfields[
'c.datec'][
'checked'])) {
349 print
'<td class="liste_titre">';
353 if (!empty($arrayfields[
'c.tms'][
'checked'])) {
354 print
'<td class="liste_titre">';
359 print
'<td class="liste_titre right">';
360 $searchpicto = $form->showFilterButtons();
367 print
'<tr class="liste_titre">';
368 if (!empty($arrayfields[
'd.ref'][
'checked']))
print_liste_field_titre($arrayfields[
'd.ref'][
'label'],
$_SERVER[
"PHP_SELF"],
"c.rowid", $param,
"",
"", $sortfield, $sortorder);
369 if (!empty($arrayfields[
'd.fk_type'][
'checked']))
print_liste_field_titre($arrayfields[
'd.fk_type'][
'label'],
$_SERVER[
"PHP_SELF"],
"c.fk_type", $param,
"",
"", $sortfield, $sortorder);
370 if (!empty($arrayfields[
'd.lastname'][
'checked']))
print_liste_field_titre($arrayfields[
'd.lastname'][
'label'],
$_SERVER[
"PHP_SELF"],
"d.lastname", $param,
"",
"", $sortfield, $sortorder);
371 if (!empty($arrayfields[
'd.firstname'][
'checked']))
print_liste_field_titre($arrayfields[
'd.firstname'][
'label'],
$_SERVER[
"PHP_SELF"],
"d.firstname", $param,
"",
"", $sortfield, $sortorder);
372 if (!empty($arrayfields[
'd.login'][
'checked']))
print_liste_field_titre($arrayfields[
'd.login'][
'label'],
$_SERVER[
"PHP_SELF"],
"d.login", $param,
"",
"", $sortfield, $sortorder);
373 if (!empty($arrayfields[
't.libelle'][
'checked']))
print_liste_field_titre($arrayfields[
't.libelle'][
'label'],
$_SERVER[
"PHP_SELF"],
"c.note", $param,
"",
'', $sortfield, $sortorder);
374 if (!empty($arrayfields[
'd.bank'][
'checked']))
print_liste_field_titre($arrayfields[
'd.bank'][
'label'],
$_SERVER[
"PHP_SELF"],
"b.fk_account", $param,
"",
"", $sortfield, $sortorder);
375 if (!empty($arrayfields[
'c.dateadh'][
'checked']))
print_liste_field_titre($arrayfields[
'c.dateadh'][
'label'],
$_SERVER[
"PHP_SELF"],
"c.dateadh", $param,
"",
'', $sortfield, $sortorder,
'center nowraponall ');
376 if (!empty($arrayfields[
'c.datef'][
'checked']))
print_liste_field_titre($arrayfields[
'c.datef'][
'label'],
$_SERVER[
"PHP_SELF"],
"c.datef", $param,
"",
'', $sortfield, $sortorder,
'center nowraponall ');
377 if (!empty($arrayfields[
'd.amount'][
'checked']))
print_liste_field_titre($arrayfields[
'd.amount'][
'label'],
$_SERVER[
"PHP_SELF"],
"c.subscription", $param,
"",
'', $sortfield, $sortorder,
'right ');
380 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_title.tpl.php';
383 $parameters = array(
'arrayfields'=>$arrayfields,
'param'=>$param,
'sortfield'=>$sortfield,
'sortorder'=>$sortorder);
384 $reshook = $hookmanager->executeHooks(
'printFieldListTitle', $parameters);
385 print $hookmanager->resPrint;
386 if (!empty($arrayfields[
'c.datec'][
'checked']))
print_liste_field_titre($arrayfields[
'c.datec'][
'label'],
$_SERVER[
"PHP_SELF"],
"c.datec",
"", $param,
'align="center" class="nowrap"', $sortfield, $sortorder);
387 if (!empty($arrayfields[
'c.tms'][
'checked']))
print_liste_field_titre($arrayfields[
'c.tms'][
'label'],
$_SERVER[
"PHP_SELF"],
"c.tms",
"", $param,
'align="center" class="nowrap"', $sortfield, $sortorder);
392 $totalarray = array();
393 while ($i < min($num, $limit)) {
394 $obj = $db->fetch_object($result);
396 $subscription->ref = $obj->crowid;
397 $subscription->id = $obj->crowid;
398 $subscription->dateh = $db->jdate($obj->dateadh);
399 $subscription->datef = $db->jdate($obj->datef);
401 $adherent->lastname = $obj->lastname;
402 $adherent->firstname = $obj->firstname;
403 $adherent->ref = $obj->rowid;
404 $adherent->id = $obj->rowid;
405 $adherent->statut = $obj->statut;
406 $adherent->login = $obj->login;
407 $adherent->photo = $obj->photo;
408 $adherent->gender = $obj->gender;
409 $adherent->morphy = $obj->morphy;
410 $adherent->email = $obj->email;
411 $adherent->typeid = $obj->type;
413 $typeid = ($obj->fk_type > 0 ? $obj->fk_type : $adherent->typeid);
415 $adht->fetch($typeid);
417 print
'<tr class="oddeven">';
420 if (!empty($arrayfields[
'd.ref'][
'checked'])) {
421 print
'<td class="nowraponall">'.$subscription->getNomUrl(1).
'</td>';
422 if (!$i) $totalarray[
'nbfield']++;
425 if (!empty($arrayfields[
'd.fk_type'][
'checked'])) {
426 print
'<td class="nowraponall">';
428 print $adht->getNomUrl(1);
431 if (!$i) $totalarray[
'nbfield']++;
435 if (!empty($arrayfields[
'd.lastname'][
'checked'])) {
436 print
'<td>'.$adherent->getNomUrl(-1, 0,
'card',
'lastname').
'</td>';
437 if (!$i) $totalarray[
'nbfield']++;
440 if (!empty($arrayfields[
'd.firstname'][
'checked'])) {
441 print
'<td class="tdoverflowmax150" title="'.dol_escape_htmltag($adherent->firstname).
'">'.$adherent->firstname.
'</td>';
442 if (!$i) $totalarray[
'nbfield']++;
446 if (!empty($arrayfields[
'd.login'][
'checked'])) {
447 print
'<td class="tdoverflowmax150" title="'.dol_escape_htmltag($adherent->login).
'">'.$adherent->login.
'</td>';
448 if (!$i) $totalarray[
'nbfield']++;
452 if (!empty($arrayfields[
't.libelle'][
'checked'])) {
456 if (!$i) $totalarray[
'nbfield']++;
460 if (!empty($arrayfields[
'd.bank'][
'checked'])) {
461 print
'<td class="tdmaxoverflow150">';
462 if ($obj->fk_account > 0) {
463 $accountstatic->id = $obj->fk_account;
464 $accountstatic->fetch($obj->fk_account);
466 print $accountstatic->getNomUrl(1);
469 if (!$i) $totalarray[
'nbfield']++;
473 if (!empty($arrayfields[
'c.dateadh'][
'checked'])) {
474 print
'<td class="center">'.dol_print_date($db->jdate($obj->dateadh),
'day').
"</td>\n";
475 if (!$i) $totalarray[
'nbfield']++;
478 if (!empty($arrayfields[
'c.datef'][
'checked'])) {
479 print
'<td class="center">'.dol_print_date($db->jdate($obj->datef),
'day').
"</td>\n";
480 if (!$i) $totalarray[
'nbfield']++;
483 if (!empty($arrayfields[
'd.amount'][
'checked'])) {
484 print
'<td class="right">'.price($obj->subscription).
'</td>';
485 if (!$i) $totalarray[
'nbfield']++;
486 if (!$i) $totalarray[
'pos'][$totalarray[
'nbfield']] =
'd.amount';
487 $totalarray[
'val'][
'd.amount'] += $obj->subscription;
490 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_print_fields.tpl.php';
492 $parameters = array(
'arrayfields'=>$arrayfields,
'obj'=>$obj,
'i'=>$i,
'totalarray'=>&$totalarray);
493 $reshook = $hookmanager->executeHooks(
'printFieldListValue', $parameters);
494 print $hookmanager->resPrint;
496 if (!empty($arrayfields[
'c.datec'][
'checked'])) {
497 print
'<td class="nowrap center">';
498 print
dol_print_date($db->jdate($obj->date_creation),
'dayhour',
'tzuser');
500 if (!$i) $totalarray[
'nbfield']++;
503 if (!empty($arrayfields[
'c.tms'][
'checked'])) {
504 print
'<td class="nowrap center">';
505 print
dol_print_date($db->jdate($obj->date_update),
'dayhour',
'tzuser');
507 if (!$i) $totalarray[
'nbfield']++;
510 print
'<td class="center">';
511 if ($massactionbutton || $massaction) {
513 if (in_array($obj->rowid, $arrayofselected)) $selected = 1;
514 print
'<input id="cb'.$obj->rowid.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.
'"'.($selected ?
' checked="checked"' :
'').
'>';
517 if (!$i) $totalarray[
'nbfield']++;
524 include DOL_DOCUMENT_ROOT.
'/core/tpl/list_print_total.tpl.php';
530 foreach ($arrayfields as $key => $val) {
if (!empty($val[
'checked'])) $colspan++; }
531 print
'<tr><td colspan="'.$colspan.
'" class="opacitymedium">'.$langs->trans(
"NoRecordFound").
'</td></tr>';
536 $parameters = array(
'sql' => $sql);
537 $reshook = $hookmanager->executeHooks(
'printFieldListFooter', $parameters);
538 print $hookmanager->resPrint;
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
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.
dol_now($mode= 'auto')
Return date for now.
Class to manage bank accounts.
setEventMessages($mesg, $mesgs, $style= 'mesgs', $messagekey= '')
Set event messages in dol_events session object.
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.
print_liste_field_titre($name, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $tooltip="", $forcenowrapcolumntitle=0)
Show title line of an array.
Class to manage members of a foundation.
restrictedArea($user, $features, $objectid=0, $tableandshare= '', $feature2= '', $dbt_keyfield= 'fk_soc', $dbt_select= 'rowid', $isdraft=0)
Check permissions of a user to show a page and an object.
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...
Class to manage members type.
Class to manage subscriptions of foundation members.
print $_SERVER["PHP_SELF"]
Edit parameters.
print
Draft customers invoices.
dol_print_date($time, $format= '', $tzoutput= 'auto', $outputlangs= '', $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
if(!empty($conf->facture->enabled)&&$user->rights->facture->lire) if((!empty($conf->fournisseur->enabled)&&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)||!empty($conf->supplier_invoice->enabled))&&$user->rights->fournisseur->facture->lire) if(!empty($conf->don->enabled)&&$user->rights->don->lire) if(!empty($conf->tax->enabled)&&$user->rights->tax->charges->lire) if(!empty($conf->facture->enabled)&&!empty($conf->commande->enabled)&&$user->rights->commande->lire &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) if(!empty($conf->facture->enabled)&&$user->rights->facture->lire) if((!empty($conf->fournisseur->enabled)&&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)||!empty($conf->supplier_invoice->enabled))&&$user->rights->fournisseur->facture->lire) $resql
Social contributions to pay.
dol_print_error($db= '', $error= '', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
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.