29 require
'../../main.inc.php';
30 require_once DOL_DOCUMENT_ROOT.
'/core/lib/bank.lib.php';
31 require_once DOL_DOCUMENT_ROOT.
'/compta/tva/class/tva.class.php';
32 require_once DOL_DOCUMENT_ROOT.
'/compta/sociales/class/chargesociales.class.php';
33 require_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/account.class.php';
34 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formcategory.class.php';
35 if (!empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT.
'/accountancy/class/accountingaccount.class.php';
36 if (!empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT.
'/accountancy/class/accountingjournal.class.php';
37 if (!empty($conf->categorie->enabled)) require_once DOL_DOCUMENT_ROOT.
'/categories/class/categorie.class.php';
40 $langs->loadLangs(array(
'banks',
'categories',
'accountancy',
'compta'));
42 $action =
GETPOST(
'action',
'aZ09');
43 $massaction =
GETPOST(
'massaction',
'alpha');
44 $show_files =
GETPOST(
'show_files',
'int');
45 $confirm =
GETPOST(
'confirm',
'alpha');
46 $toselect =
GETPOST(
'toselect',
'array');
47 $contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'bankaccountlist';
49 $search_ref =
GETPOST(
'search_ref',
'alpha');
50 $search_label =
GETPOST(
'search_label',
'alpha');
51 $search_number =
GETPOST(
'search_number',
'alpha');
52 $search_status =
GETPOST(
'search_status') ?
GETPOST(
'search_status',
'alpha') :
'opened';
53 $optioncss =
GETPOST(
'optioncss',
'alpha');
55 if (!empty($conf->categorie->enabled))
57 $search_category_list =
GETPOST(
"search_category_".Categorie::TYPE_ACCOUNT.
"_list",
"array");
61 if ($user->socid) $socid = $user->socid;
62 if (!empty($user->rights->accounting->chartofaccount)) $allowed = 1;
65 $diroutputmassaction = $conf->bank->dir_output.
'/temp/massgeneration/'.$user->id;
67 $limit =
GETPOST(
'limit',
'int') ?
GETPOST(
'limit',
'int') : $conf->liste_limit;
68 $sortfield =
GETPOST(
"sortfield",
'alpha');
69 $sortorder =
GETPOST(
"sortorder",
'alpha');
71 if (empty($page) || $page == -1) { $page = 0; }
72 $offset = $limit * $page;
73 $pageprev = $page - 1;
74 $pagenext = $page + 1;
75 if (!$sortfield) $sortfield =
'b.label';
76 if (!$sortorder) $sortorder =
'ASC';
80 $hookmanager->initHooks(array(
'bankaccountlist'));
84 $extrafields->fetch_name_optionals_label($object->table_element);
85 $search_array_options = $extrafields->getOptionalsFromPost($object->table_element,
'',
'search_');
88 $fieldstosearchall = array(
93 $checkedtypetiers = 0;
95 'b.ref'=>array(
'label'=>$langs->trans(
"BankAccounts"),
'checked'=>1,
'position'=>10),
96 'b.label'=>array(
'label'=>$langs->trans(
"Label"),
'checked'=>1,
'position'=>12),
97 'accountype'=>array(
'label'=>$langs->trans(
"Type"),
'checked'=>1,
'position'=>14),
98 'b.number'=>array(
'label'=>$langs->trans(
"AccountIdShort"),
'checked'=>1,
'position'=>16),
99 'b.account_number'=>array(
'label'=>$langs->trans(
"AccountAccounting"),
'checked'=>(!empty($conf->accounting->enabled) || !empty($conf->accounting->enabled)),
'position'=>18),
100 'b.fk_accountancy_journal'=>array(
'label'=>$langs->trans(
"AccountancyJournal"),
'checked'=>(!empty($conf->accounting->enabled) || !empty($conf->accounting->enabled)),
'position'=>20),
101 'toreconcile'=>array(
'label'=>$langs->trans(
"TransactionsToConciliate"),
'checked'=>1,
'position'=>50),
102 'b.currency_code'=>array(
'label'=>$langs->trans(
"Currency"),
'checked'=>0,
'position'=>22),
103 'b.datec'=>array(
'label'=>$langs->trans(
"DateCreation"),
'checked'=>0,
'position'=>500),
104 'b.tms'=>array(
'label'=>$langs->trans(
"DateModificationShort"),
'checked'=>0,
'position'=>500),
105 'b.clos'=>array(
'label'=>$langs->trans(
"Status"),
'checked'=>1,
'position'=>1000),
106 'balance'=>array(
'label'=>$langs->trans(
"Balance"),
'checked'=>1,
'position'=>1010),
109 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_array_fields.tpl.php';
119 if (
GETPOST(
'cancel',
'alpha')) { $action =
'list'; $massaction =
''; }
120 if (!
GETPOST(
'confirmmassaction',
'alpha') && $massaction !=
'presend' && $massaction !=
'confirm_presend') { $massaction =
''; }
122 $parameters = array(
'socid'=>$socid);
123 $reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
124 if ($reshook < 0)
setEventMessages($hookmanager->error, $hookmanager->errors,
'errors');
126 include DOL_DOCUMENT_ROOT.
'/core/actions_changeselectedfields.inc.php';
129 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha'))
144 $title = $langs->trans(
'BankAccounts');
149 $sql =
"SELECT b.rowid, b.label, b.courant, b.rappro, b.account_number, b.fk_accountancy_journal, b.currency_code, b.datec as date_creation, b.tms as date_update";
151 if (!empty($extrafields->attributes[$object->table_element][
'label'])) {
152 foreach ($extrafields->attributes[$object->table_element][
'label'] as $key => $val) $sql .= ($extrafields->attributes[$object->table_element][
'type'][$key] !=
'separate' ?
", ef.".$key.
' as options_'.$key :
'');
155 $parameters = array();
156 $reshook = $hookmanager->executeHooks(
'printFieldListSelect', $parameters);
157 $sql .= $hookmanager->resPrint;
158 $sql .=
" FROM ".MAIN_DB_PREFIX.
"bank_account as b";
159 if (is_array($extrafields->attributes[$object->table_element][
'label']) && count($extrafields->attributes[$object->table_element][
'label'])) $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element.
"_extrafields as ef on (b.rowid = ef.fk_object)";
161 if (!empty($conf->categorie->enabled))
166 $sql .=
" WHERE b.entity IN (".getEntity(
'bank_account').
")";
167 if ($search_status ==
'opened') $sql .=
" AND clos = 0";
168 if ($search_status ==
'closed') $sql .=
" AND clos = 1";
170 if (!empty($conf->categorie->enabled))
175 if ($search_ref !=
'') $sql .=
natural_search(
'b.ref', $search_ref);
176 if ($search_label !=
'') $sql .=
natural_search(
'b.label', $search_label);
177 if ($search_number !=
'') $sql .=
natural_search(
'b.number', $search_number);
179 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_sql.tpl.php';
181 $parameters = array();
182 $reshook = $hookmanager->executeHooks(
'printFieldListWhere', $parameters);
183 $sql .= $hookmanager->resPrint;
185 $sql .= $db->order($sortfield, $sortorder);
188 $nbtotalofrecords =
'';
189 if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
191 $result = $db->query($sql);
192 $nbtotalofrecords = $db->num_rows($result);
195 $sql .= $db->plimit($limit + 1, $offset);
197 $resql = $db->query($sql);
200 $num = $db->num_rows(
$resql);
204 $objp = $db->fetch_object(
$resql);
205 $accounts[$objp->rowid] = $objp->courant;
213 $help_url =
'EN:Module_Banks_and_Cash|FR:Module_Banques_et_Caisses|ES:Módulo_Bancos_y_Cajas';
218 $arrayofselected = is_array($toselect) ? $toselect : array();
221 if (!empty($contextpage) && $contextpage !=
$_SERVER[
"PHP_SELF"]) $param .=
'&contextpage='.urlencode($contextpage);
222 if ($limit > 0 && $limit != $conf->liste_limit) $param .=
'&limit='.urlencode($limit);
223 if ($search_ref !=
'') $param .=
'&search_ref='.urlencode($search_ref);
224 if ($search_label !=
'') $param .=
'&search_label='.urlencode($search_label);
225 if ($search_number !=
'') $param .=
'&search_number='.urlencode($search_number);
226 if ($search_status !=
'') $param .=
'&search_status='.urlencode($search_status);
227 if ($show_files) $param .=
'&show_files='.urlencode($show_files);
228 if ($optioncss !=
'') $param .=
'&optioncss='.urlencode($optioncss);
230 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_param.tpl.php';
233 $arrayofmassactions = array(
237 if ($user->rights->banque->supprimer) $arrayofmassactions[
'predelete'] =
'<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans(
"Delete");
238 if (in_array($massaction, array(
'presend',
'predelete'))) $arrayofmassactions = array();
239 $massactionbutton = $form->selectMassAction(
'', $arrayofmassactions);
241 $newcardbutton =
dolGetButtonTitle($langs->trans(
'NewFinancialAccount'),
'',
'fa fa-plus-circle',
'card.php?action=create',
'', $user->rights->banque->configurer);
244 print '<form method="POST" id="searchFormList" action="'.$_SERVER[
"PHP_SELF"].
'">';
245 if ($optioncss !=
'')
print '<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
246 print '<input type="hidden" name="token" value="'.newToken().
'">';
247 print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
248 print '<input type="hidden" name="action" value="list">';
249 print '<input type="hidden" name="sortfield" value="'.$sortfield.
'">';
250 print '<input type="hidden" name="sortorder" value="'.$sortorder.
'">';
251 print '<input type="hidden" name="page" value="'.$page.
'">';
252 print '<input type="hidden" name="search_status" value="'.$search_status.
'">';
254 print_barre_liste($title, $page,
$_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder,
'', $num, $nbtotalofrecords,
'bank_account', 0, $newcardbutton,
'', $limit, 1);
256 $topicmail =
"Information";
259 $trackid =
'bank'.$object->id;
260 include DOL_DOCUMENT_ROOT.
'/core/tpl/massactions_pre.tpl.php';
264 foreach ($fieldstosearchall as $key => $val) $fieldstosearchall[$key] = $langs->trans($val);
265 print '<div class="divsearchfieldfilter">'.$langs->trans(
"FilterOnInto", $sall).join(
', ', $fieldstosearchall).
'</div>';
270 if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire)
272 $moreforfilter .= $form->getFilterBox(Categorie::TYPE_ACCOUNT, $search_category_list);
276 $parameters = array();
277 $reshook = $hookmanager->executeHooks(
'printFieldPreListTitle', $parameters);
278 if (empty($reshook)) $moreforfilter .= $hookmanager->resPrint;
279 else $moreforfilter = $hookmanager->resPrint;
281 if (!empty($moreforfilter))
283 print '<div class="liste_titre liste_titre_bydiv centpercent">';
284 print $moreforfilter;
288 $varpage = empty($contextpage) ?
$_SERVER[
"PHP_SELF"] : $contextpage;
289 $selectedfields = $form->multiSelectArrayWithCheckbox(
'selectedfields', $arrayfields, $varpage);
291 print '<div class="div-table-responsive">';
292 print '<table class="tagtable liste'.($moreforfilter ?
" listwithfilterbefore" :
"").
'">'.
"\n";
294 print '<tr class="liste_titre_filter">';
297 if (!empty($arrayfields[
'b.ref'][
'checked']))
299 print
'<td class="liste_titre">';
300 print
'<input class="flat" size="6" type="text" name="search_ref" value="'.dol_escape_htmltag($search_ref).
'">';
304 if (!empty($arrayfields[
'b.label'][
'checked']))
306 print
'<td class="liste_titre">';
307 print
'<input class="flat" size="6" type="text" name="search_label" value="'.dol_escape_htmltag($search_label).
'">';
311 if (!empty($arrayfields[
'accountype'][
'checked']))
313 print
'<td class="liste_titre">';
317 if (!empty($arrayfields[
'b.number'][
'checked']))
319 print
'<td class="liste_titre">';
320 print
'<input class="flat" size="6" type="text" name="search_number" value="'.dol_escape_htmltag($search_number).
'">';
324 if (!empty($arrayfields[
'b.account_number'][
'checked']))
326 print
'<td class="liste_titre">';
330 if (!empty($arrayfields[
'b.fk_accountancy_journal'][
'checked']))
332 print
'<td class="liste_titre">';
336 if (!empty($arrayfields[
'toreconcile'][
'checked']))
338 print
'<td class="liste_titre">';
342 if (!empty($arrayfields[
'b.currency_code'][
'checked']))
344 print
'<td class="liste_titre">';
348 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_input.tpl.php';
351 $parameters = array(
'arrayfields'=>$arrayfields);
352 $reshook = $hookmanager->executeHooks(
'printFieldListOption', $parameters);
353 print $hookmanager->resPrint;
355 if (!empty($arrayfields[
'b.datec'][
'checked']))
357 print
'<td class="liste_titre">';
361 if (!empty($arrayfields[
'b.tms'][
'checked']))
363 print
'<td class="liste_titre">';
367 if (!empty($arrayfields[
'b.clos'][
'checked']))
369 print
'<td class="liste_titre center">';
371 'opened'=>$langs->trans(
"Opened"),
372 'closed'=>$langs->trans(
"Closed")
374 print $form->selectarray(
"search_status", $array, $search_status, 1, 0, 0,
'', 0, 0, 0,
'',
'', 1);
378 if (!empty($arrayfields[
'balance'][
'checked']))
380 print
'<td class="liste_titre"></td>';
383 print
'<td class="liste_titre valignmiddle">';
384 $searchpicto = $form->showFilterAndCheckAddButtons($massactionbutton ? 1 : 0,
'checkforselect', 1);
390 print
'<tr class="liste_titre">';
391 if (!empty($arrayfields[
'b.ref'][
'checked']))
print_liste_field_titre($arrayfields[
'b.ref'][
'label'],
$_SERVER[
"PHP_SELF"],
'b.ref',
'', $param,
'', $sortfield, $sortorder);
392 if (!empty($arrayfields[
'b.label'][
'checked']))
print_liste_field_titre($arrayfields[
'b.label'][
'label'],
$_SERVER[
"PHP_SELF"],
'b.label',
'', $param,
'', $sortfield, $sortorder);
393 if (!empty($arrayfields[
'accountype'][
'checked']))
print_liste_field_titre($arrayfields[
'accountype'][
'label'],
$_SERVER[
"PHP_SELF"],
'',
'', $param,
'', $sortfield, $sortorder);
394 if (!empty($arrayfields[
'b.number'][
'checked']))
print_liste_field_titre($arrayfields[
'b.number'][
'label'],
$_SERVER[
"PHP_SELF"],
'b.number',
'', $param,
'', $sortfield, $sortorder);
395 if (!empty($arrayfields[
'b.account_number'][
'checked']))
print_liste_field_titre($arrayfields[
'b.account_number'][
'label'],
$_SERVER[
"PHP_SELF"],
'b.account_number',
'', $param,
'', $sortfield, $sortorder);
396 if (!empty($arrayfields[
'b.fk_accountancy_journal'][
'checked']))
print_liste_field_titre($arrayfields[
'b.fk_accountancy_journal'][
'label'],
$_SERVER[
"PHP_SELF"],
'b.fk_accountancy_journal',
'', $param,
'', $sortfield, $sortorder);
397 if (!empty($arrayfields[
'b.currency_code'][
'checked']))
print_liste_field_titre($arrayfields[
'b.currency_code'][
'label'],
$_SERVER[
"PHP_SELF"],
'b.currency_code',
'', $param,
'', $sortfield, $sortorder,
'center ');
398 if (!empty($arrayfields[
'toreconcile'][
'checked']))
print_liste_field_titre($arrayfields[
'toreconcile'][
'label'],
$_SERVER[
"PHP_SELF"],
'',
'', $param,
'', $sortfield, $sortorder,
'center ');
400 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_title.tpl.php';
402 $parameters = array(
'arrayfields'=>$arrayfields,
'param'=>$param,
'sortfield'=>$sortfield,
'sortorder'=>$sortorder);
403 $reshook = $hookmanager->executeHooks(
'printFieldListTitle', $parameters);
404 print $hookmanager->resPrint;
405 if (!empty($arrayfields[
'b.datec'][
'checked']))
print_liste_field_titre($arrayfields[
'b.datec'][
'label'],
$_SERVER[
"PHP_SELF"],
"b.datec",
"", $param,
'', $sortfield, $sortorder,
'center nowrap ');
406 if (!empty($arrayfields[
'b.tms'][
'checked']))
print_liste_field_titre($arrayfields[
'b.tms'][
'label'],
$_SERVER[
"PHP_SELF"],
"b.tms",
"", $param,
'', $sortfield, $sortorder,
'center nowrap ');
407 if (!empty($arrayfields[
'b.clos'][
'checked']))
print_liste_field_titre($arrayfields[
'b.clos'][
'label'],
$_SERVER[
"PHP_SELF"],
'b.clos',
'', $param,
'', $sortfield, $sortorder,
'center ');
408 if (!empty($arrayfields[
'balance'][
'checked']))
print_liste_field_titre($arrayfields[
'balance'][
'label'],
$_SERVER[
"PHP_SELF"],
'',
'', $param,
'', $sortfield, $sortorder,
'right ');
413 $totalarray = array(); $found = 0; $i = 0; $lastcurrencycode =
'';
415 foreach ($accounts as $key=>$type)
417 if ($i >= $limit)
break;
421 $result = $objecttmp->fetch($key);
423 $solde = $objecttmp->solde(1);
425 if (!empty($lastcurrencycode) && $lastcurrencycode != $objecttmp->currency_code)
427 $lastcurrencycode =
'various';
429 if ($lastcurrencycode !=
'various')
431 $lastcurrencycode = $objecttmp->currency_code;
434 print
'<tr class="oddeven">';
437 if (!empty($arrayfields[
'b.ref'][
'checked']))
439 print
'<td class="nowrap">'.$objecttmp->getNomUrl(1).
'</td>';
440 if (!$i) $totalarray[
'nbfield']++;
444 if (!empty($arrayfields[
'b.label'][
'checked']))
446 print
'<td>'.$objecttmp->label.
'</td>';
447 if (!$i) $totalarray[
'nbfield']++;
451 if (!empty($arrayfields[
'accountype'][
'checked']))
454 print $objecttmp->type_lib[$objecttmp->type];
456 if (!$i) $totalarray[
'nbfield']++;
460 if (!empty($arrayfields[
'b.number'][
'checked']))
462 print
'<td>'.$objecttmp->number.
'</td>';
463 if (!$i) $totalarray[
'nbfield']++;
467 if (!empty($arrayfields[
'b.account_number'][
'checked']))
470 if (!empty($conf->accounting->enabled) && !empty($objecttmp->account_number))
473 $accountingaccount->fetch(
'', $objecttmp->account_number, 1);
474 print $accountingaccount->getNomUrl(0, 1, 1,
'', 1);
476 print $objecttmp->account_number;
479 if (!$i) $totalarray[
'nbfield']++;
483 if (!empty($arrayfields[
'b.fk_accountancy_journal'][
'checked']))
486 if (!empty($conf->accounting->enabled) && !empty($objecttmp->fk_accountancy_journal))
489 $accountingjournal->fetch($objecttmp->fk_accountancy_journal);
490 print $accountingjournal->getNomUrl(0, 1, 1,
'', 1);
495 if (!$i) $totalarray[
'nbfield']++;
499 if (!empty($arrayfields[
'b.currency_code'][
'checked']))
501 print
'<td class="center">';
502 print $objecttmp->currency_code;
504 if (!$i) $totalarray[
'nbfield']++;
508 if (!empty($arrayfields[
'toreconcile'][
'checked']))
510 print
'<td class="center">';
512 $conciliate = $objecttmp->canBeConciliated();
513 if ($conciliate == -2) print
'<span class="opacitymedium">'.$langs->trans(
"CashAccount").
'</span>';
514 elseif ($conciliate == -3) print '<span class="opacitymedium">'.$langs->trans("Closed").'</span>';
515 elseif (empty($objecttmp->rappro)) {
516 print
'<span class="opacitymedium">'.$langs->trans(
"ConciliationDisabled").
'</span>';
518 $result = $objecttmp->load_board($user, $objecttmp->id);
522 print
'<a href="'.DOL_URL_ROOT.
'/compta/bank/bankentries_list.php?action=reconcile&sortfield=b.datev,b.dateo,b.rowid&sortorder=asc,asc,asc&id='.$objecttmp->id.
'&search_account='.$objecttmp->id.
'&search_conciliated=0&contextpage=banktransactionlist">';
523 print
'<span class="badge badge-info classfortooltip" title="'.dol_htmlentities($langs->trans(
"TransactionsToConciliate")).
'">';
524 print $result->nbtodo;
527 if ($result->nbtodolate) {
528 print
'<span title="'.dol_htmlentities($langs->trans(
"Late")).
'" class="classfortooltip badge badge-danger marginleftonlyshort">';
529 print
'<i class="fa fa-exclamation-triangle"></i> '.$result->nbtodolate;
536 if (!$i) $totalarray[
'nbfield']++;
540 if (is_array($objecttmp->array_options)) {
541 $obj =
new stdClass();
542 foreach ($objecttmp->array_options as $k => $v) {
546 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_print_fields.tpl.php';
548 $parameters = array(
'arrayfields'=>$arrayfields,
'obj'=>$obj,
'i'=>$i,
'totalarray'=>&$totalarray);
549 $reshook = $hookmanager->executeHooks(
'printFieldListValue', $parameters, $objecttmp);
550 print $hookmanager->resPrint;
552 if (!empty($arrayfields[
'b.datec'][
'checked']))
554 print
'<td class="center">';
557 if (!$i) $totalarray[
'nbfield']++;
560 if (!empty($arrayfields[
'b.tms'][
'checked']))
562 print
'<td class="center">';
565 if (!$i) $totalarray[
'nbfield']++;
569 if (!empty($arrayfields[
'b.clos'][
'checked']))
571 print
'<td class="center">'.$objecttmp->getLibStatut(5).
'</td>';
572 if (!$i) $totalarray[
'nbfield']++;
576 if (!empty($arrayfields[
'balance'][
'checked']))
578 print
'<td class="nowraponall right">';
579 print
'<a href="'.DOL_URL_ROOT.
'/compta/bank/bankentries_list.php?id='.$objecttmp->id.
'">'.
price($solde, 0, $langs, 1, -1, -1, $objecttmp->currency_code).
'</a>';
581 if (!$i) $totalarray[
'nbfield']++;
582 if (!$i) $totalarray[
'pos'][$totalarray[
'nbfield']] =
'balance';
583 $totalarray[
'val'][
'balance'] += $solde;
587 print
'<td class="nowrap center">';
588 if ($massactionbutton || $massaction)
591 if (in_array($objecttmp->id, $arrayofselected)) $selected = 1;
592 print
'<input id="cb'.$objecttmp->id.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$objecttmp->id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
595 if (!$i) $totalarray[
'nbfield']++;
599 $total[$objecttmp->currency_code] += $solde;
608 foreach ($arrayfields as $key => $val) {
if (!empty($val[
'checked'])) $colspan++; }
609 print
'<tr><td colspan="'.$colspan.
'" class="opacitymedium">'.$langs->trans(
"NoRecordFound").
'</td></tr>';
613 if ($lastcurrencycode !=
'various')
616 include DOL_DOCUMENT_ROOT.
'/core/tpl/list_print_total.tpl.php';
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.
static getFilterSelectQuery($type, $rowIdName, $searchList)
Return the addtional SQL SELECT query for filtering a list by a category.
static getFilterJoinQuery($type, $rowIdName)
Return the addtional SQL JOIN query for filtering a list by a category.
Class to manage bank accounts.
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...
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.
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...
print $_SERVER["PHP_SELF"]
Edit parameters.
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
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...
Class to manage accounting accounts.
Class to manage accounting accounts.