dolibarr  13.0.2
list.php
1 <?php
2 /* Copyright (C) 2003-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3  * Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
4  * Copyright (C) 2004-2020 Laurent Destailleur <eldy@users.sourceforge.net>
5  * Copyright (C) 2004 Christophe Combelles <ccomb@free.fr>
6  * Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
7  * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
8  * Copyright (C) 2014 Teddy Andreotti <125155@supinfo.com>
9  * Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
10  * Copyright (C) 2015 Juanjo Menent <jmenent@2byte.es>
11  * Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr>
12  * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
13  * Copyright (C) 2020 Tobias Sekan <tobias.sekan@startmail.com>
14  *
15  * This program is free software; you can redistribute it and/or modify
16  * it under the terms of the GNU General Public License as published by
17  * the Free Software Foundation; either version 3 of the License, or
18  * (at your option) any later version.
19  *
20  * This program is distributed in the hope that it will be useful,
21  * but WITHOUT ANY WARRANTY; without even the implied warranty of
22  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23  * GNU General Public License for more details.
24  *
25  * You should have received a copy of the GNU General Public License
26  * along with this program. If not, see <https://www.gnu.org/licenses/>.
27  */
28 
35 require '../../main.inc.php';
36 
37 // Security check
38 if ($user->socid) $socid = $user->socid;
39 
40 // doesn't work :-(
41 // restrictedArea($user, 'fournisseur');
42 
43 // doesn't work :-(
44 // require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php';
45 // $object = new PaiementFourn($db);
46 // restrictedArea($user, $object->element);
47 
48 if (!$user->rights->fournisseur->facture->lire) {
50 }
51 
52 require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php';
53 require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
54 
55 
56 // Load translation files required by the page
57 $langs->loadLangs(array('companies', 'bills', 'banks', 'compta'));
58 
59 $action = GETPOST('action', 'alpha');
60 $massaction = GETPOST('massaction', 'alpha');
61 $optioncss = GETPOST('optioncss', 'alpha');
62 $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'vendorpaymentlist';
63 
64 $socid = GETPOST('socid', 'int');
65 
66 $search_ref = GETPOST('search_ref', 'alpha');
67 $search_day = GETPOST('search_day', 'int');
68 $search_month = GETPOST('search_month', 'int');
69 $search_year = GETPOST('search_year', 'int');
70 $search_company = GETPOST('search_company', 'alpha');
71 $search_payment_type = GETPOST('search_payment_type');
72 $search_cheque_num = GETPOST('search_cheque_num', 'alpha');
73 $search_bank_account = GETPOST('search_bank_account', 'int');
74 $search_amount = GETPOST('search_amount', 'alpha'); // alpha because we must be able to search on '< x'
75 
76 $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
77 $sortfield = GETPOST('sortfield', 'alpha');
78 $sortorder = GETPOST('sortorder', 'alpha');
79 $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST('page', 'int');
80 
81 if (empty($page) || $page == -1) $page = 0; // If $page is not defined, or '' or -1
82 $offset = $limit * $page;
83 $pageprev = $page - 1;
84 $pagenext = $page + 1;
85 
86 if (!$sortorder) $sortorder = "DESC";
87 if (!$sortfield) $sortfield = "p.datep";
88 
89 $search_all = trim(GETPOSTISSET("search_all") ? GETPOST("search_all", 'alpha') : GETPOST('sall'));
90 
91 // List of fields to search into when doing a "search in all"
92 $fieldstosearchall = array(
93  'p.ref'=>"RefPayment",
94  's.nom'=>"ThirdParty",
95  'p.num_paiement'=>"Numero",
96  'p.amount'=>"Amount",
97 );
98 
99 $arrayfields = array(
100  'p.ref' =>array('label'=>"RefPayment", 'checked'=>1, 'position'=>10),
101  'p.datep' =>array('label'=>"Date", 'checked'=>1, 'position'=>20),
102  's.nom' =>array('label'=>"ThirdParty", 'checked'=>1, 'position'=>30),
103  'c.libelle' =>array('label'=>"Type", 'checked'=>1, 'position'=>40),
104  'p.num_paiement' =>array('label'=>"Numero", 'checked'=>1, 'position'=>50, 'tooltip'=>"ChequeOrTransferNumber"),
105  'ba.label' =>array('label'=>"Account", 'checked'=>1, 'position'=>60, 'enable'=>(!empty($conf->banque->enabled))),
106  'p.amount' =>array('label'=>"Amount", 'checked'=>1, 'position'=>70),
107 );
108 $arrayfields = dol_sort_array($arrayfields, 'position');
109 
110 // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
111 $hookmanager->initHooks(array('paymentsupplierlist'));
112 $object = new PaiementFourn($db);
113 
114 /*
115 * Actions
116 */
117 
118 $parameters = array('socid'=>$socid);
119 $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
120 if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
121 
122 if (empty($reshook)) {
123  include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
124 
125  if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // All tests are required to be compatible with all browsers
126  $search_ref = '';
127  $search_day = '';
128  $search_month = '';
129  $search_year = '';
130  $search_company = '';
131  $search_payment_type = '';
132  $search_cheque_num = '';
133  $search_bank_account = '';
134  $search_amount = '';
135  }
136 }
137 
138 /*
139  * View
140  */
141 
142 llxHeader('', $langs->trans('ListPayment'));
143 
144 $form = new Form($db);
145 $formother = new FormOther($db);
146 $companystatic = new Societe($db);
147 $paymentfournstatic = new PaiementFourn($db);
148 
149 $sql = 'SELECT p.rowid, p.ref, p.datep, p.amount as pamount, p.num_paiement';
150 $sql .= ', s.rowid as socid, s.nom as name, s.email';
151 $sql .= ', c.code as paiement_type, c.libelle as paiement_libelle';
152 $sql .= ', ba.rowid as bid, ba.label';
153 if (!$user->rights->societe->client->voir) $sql .= ', sc.fk_soc, sc.fk_user';
154 $sql .= ', SUM(pf.amount)';
155 
156 $sql .= ' FROM '.MAIN_DB_PREFIX.'paiementfourn AS p';
157 $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'paiementfourn_facturefourn AS pf ON p.rowid=pf.fk_paiementfourn';
158 $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'facture_fourn AS f ON f.rowid=pf.fk_facturefourn';
159 $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_paiement AS c ON p.fk_paiement = c.id';
160 $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe AS s ON s.rowid = f.fk_soc';
161 $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'bank as b ON p.fk_bank = b.rowid';
162 $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'bank_account as ba ON b.fk_account = ba.rowid';
163 if (!$user->rights->societe->client->voir) $sql .= ', '.MAIN_DB_PREFIX.'societe_commerciaux as sc';
164 
165 $sql .= ' WHERE f.entity = '.$conf->entity;
166 if (!$user->rights->societe->client->voir) $sql .= ' AND s.rowid = sc.fk_soc AND sc.fk_user = '.$user->id;
167 if ($socid > 0) $sql .= ' AND f.fk_soc = '.$socid;
168 if ($search_ref) $sql .= natural_search('p.ref', $search_ref);
169 $sql .= dolSqlDateFilter('p.datep', $search_day, $search_month, $search_year);
170 if ($search_company) $sql .= natural_search('s.nom', $search_company);
171 if ($search_payment_type != '') $sql .= " AND c.code='".$db->escape($search_payment_type)."'";
172 if ($search_cheque_num != '') $sql .= natural_search('p.num_paiement', $search_cheque_num);
173 if ($search_amount) $sql .= natural_search('p.amount', $search_amount, 1);
174 if ($search_bank_account > 0) $sql .= ' AND b.fk_account='.$search_bank_account."'";
175 
176 if ($search_all) $sql .= natural_search(array_keys($fieldstosearchall), $search_all);
177 
178 // Add where from extra fields
179 include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php';
180 
181 $sql .= ' GROUP BY p.rowid, p.ref, p.datep, p.amount, p.num_paiement, s.rowid, s.nom, s.email, c.code, c.libelle, ba.rowid, ba.label';
182 if (!$user->rights->societe->client->voir) $sql .= ', sc.fk_soc, sc.fk_user';
183 
184 $sql .= $db->order($sortfield, $sortorder);
185 
186 $nbtotalofrecords = '';
187 if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
188  $result = $db->query($sql);
189  $nbtotalofrecords = $db->num_rows($result);
190  if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0
191  $page = 0;
192  $offset = 0;
193  }
194 }
195 
196 $sql .= $db->plimit($limit + 1, $offset);
197 
198 $resql = $db->query($sql);
199 if (!$resql) {
200  dol_print_error($db);
201  llxFooter();
202  $db->close();
203  exit;
204 }
205 
206 $num = $db->num_rows($resql);
207 $i = 0;
208 
209 $param = '';
210 if (!empty($contextpage) && $contextpage != $_SERVER['PHP_SELF']) $param .= '&contextpage='.urlencode($contextpage);
211 if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit);
212 if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss);
213 
214 if ($search_ref) $param .= '&search_ref='.urlencode($search_ref);
215 if ($saerch_day) $param .= '&search_day='.urlencode($search_day);
216 if ($saerch_month) $param .= '&search_month='.urlencode($search_month);
217 if ($search_year) $param .= '&search_year='.urlencode($search_year);
218 if ($search_company) $param .= '&search_company='.urlencode($search_company);
219 if ($search_payment_type) $param .= '&search_company='.urlencode($search_payment_type);
220 if ($search_cheque_num) $param .= '&search_cheque_num='.urlencode($search_cheque_num);
221 if ($search_amount) $param .= '&search_amount='.urlencode($search_amount);
222 
223 // Add $param from extra fields
224 include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
225 
226 print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
227 if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
228 print '<input type="hidden" name="token" value="'.newToken().'">';
229 print '<input type="hidden" name="action" value="list">';
230 print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
231 print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
232 print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
233 print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
234 
235 print_barre_liste($langs->trans('SupplierPayments'), $page, $_SERVER['PHP_SELF'], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'supplier_invoice', 0, '', '', $limit, 0, 0, 1);
236 
237 if ($search_all)
238 {
239  foreach ($fieldstosearchall as $key => $val) $fieldstosearchall[$key] = $langs->trans($val);
240  print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $search_all).join(', ', $fieldstosearchall).'</div>';
241 }
242 
243 $moreforfilter = '';
244 
245 $parameters = array();
246 $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook
247 if (empty($reshook)) $moreforfilter .= $hookmanager->resPrint;
248 else $moreforfilter = $hookmanager->resPrint;
249 
250 if ($moreforfilter) {
251  print '<div class="liste_titre liste_titre_bydiv centpercent">';
252  print $moreforfilter;
253  print '</div>';
254 }
255 
256 $varpage = empty($contextpage) ? $_SERVER['PHP_SELF'] : $contextpage;
257 $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
258 if ($massactionbutton) $selectedfields .= $form->showCheckAddButtons('checkforselect', 1);
259 
260 print '<div class="div-table-responsive">';
261 print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwithfilterbefore" : '').'">';
262 
263 print '<tr class="liste_titre_filter">';
264 
265 // Filter: Ref
266 if (!empty($arrayfields['p.ref']['checked'])) {
267  print '<td class="liste_titre left">';
268  print '<input class="flat" type="text" size="4" name="search_ref" value="'.dol_escape_htmltag($search_ref).'">';
269  print '</td>';
270 }
271 
272 // Filter: Date
273 if (!empty($arrayfields['p.datep']['checked'])) {
274  print '<td class="liste_titre center">';
275  if (!empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat width25 valignmiddle" type="text" maxlength="2" name="search_day" value="'.dol_escape_htmltag($search_day).'">';
276  print '<input class="flat width25 valignmiddle" type="text" maxlength="2" name="search_month" value="'.dol_escape_htmltag($search_month).'">';
277  $formother->select_year($search_year ? $search_year : -1, 'search_year', 1, 20, 5);
278  print '</td>';
279 }
280 
281 // Filter: Thirdparty
282 if (!empty($arrayfields['s.nom']['checked'])) {
283  print '<td class="liste_titre">';
284  print '<input class="flat" type="text" size="6" name="search_company" value="'.dol_escape_htmltag($search_company).'">';
285  print '</td>';
286 }
287 
288 // Filter: Payment type
289 if (!empty($arrayfields['c.libelle']['checked'])) {
290  print '<td class="liste_titre">';
291  $form->select_types_paiements($search_payment_type, 'search_payment_type', '', 2, 1, 1);
292  print '</td>';
293 }
294 
295 // Filter: Cheque number (fund transfer)
296 if (!empty($arrayfields['p.num_paiement']['checked'])) {
297  print '<td class="liste_titre">';
298  print '<input class="flat" type="text" size="4" name="search_cheque_num" value="'.dol_escape_htmltag($search_cheque_num).'">';
299  print '</td>';
300 }
301 
302 // Filter: Bank account
303 if (!empty($arrayfields['ba.label']['checked'])) {
304  print '<td class="liste_titre">';
305  $form->select_comptes($search_bank_account, 'search_bank_account', 0, '', 1);
306  print '</td>';
307 }
308 
309 // Filter: Amount
310 if (!empty($arrayfields['p.amount']['checked'])) {
311  print '<td class="liste_titre right">';
312  print '<input class="flat" type="text" size="4" name="search_amount" value="'.dol_escape_htmltag($search_amount).'">';
313  print '</td>';
314 }
315 
316 // Fields from hook
317 $parameters = array('arrayfields'=>$arrayfields);
318 $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters); // Note that $action and $object may have been modified by hook
319 print $hookmanager->resPrint;
320 
321 // Buttons
322 print '<td class="liste_titre maxwidthsearch">';
323 print $form->showFilterAndCheckAddButtons(0);
324 print '</td>';
325 
326 print '</tr>';
327 
328 print '<tr class="liste_titre">';
329 if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER_IN_LIST)) print_liste_field_titre('#', $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder);
330 if (!empty($arrayfields['p.ref']['checked'])) print_liste_field_titre($arrayfields['p.ref']['label'], $_SERVER["PHP_SELF"], 'p.rowid', '', $param, '', $sortfield, $sortorder);
331 if (!empty($arrayfields['p.datep']['checked'])) print_liste_field_titre($arrayfields['p.datep']['label'], $_SERVER["PHP_SELF"], 'p.datep', '', $param, '', $sortfield, $sortorder, 'center ');
332 if (!empty($arrayfields['s.nom']['checked'])) print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"], 's.nom', '', $param, '', $sortfield, $sortorder);
333 if (!empty($arrayfields['c.libelle']['checked'])) print_liste_field_titre($arrayfields['c.libelle']['label'], $_SERVER["PHP_SELF"], 'c.libelle', '', $param, '', $sortfield, $sortorder);
334 if (!empty($arrayfields['p.num_paiement']['checked'])) print_liste_field_titre($arrayfields['p.num_paiement']['label'], $_SERVER["PHP_SELF"], "p.num_paiement", '', $param, '', $sortfield, $sortorder, '', $arrayfields['p.num_paiement']['tooltip']);
335 if (!empty($arrayfields['ba.label']['checked'])) print_liste_field_titre($arrayfields['ba.label']['label'], $_SERVER["PHP_SELF"], 'ba.label', '', $param, '', $sortfield, $sortorder);
336 if (!empty($arrayfields['p.amount']['checked'])) print_liste_field_titre($arrayfields['p.amount']['label'], $_SERVER["PHP_SELF"], 'p.amount', '', $param, '', $sortfield, $sortorder, 'right ');
337 
338 // Hook fields
339 $parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder);
340 $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
341 print $hookmanager->resPrint;
342 
343 print_liste_field_titre($selectedfields, $_SERVER['PHP_SELF'], '', '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ');
344 print '</tr>';
345 
346 $checkedCount = 0;
347 foreach ($arrayfields as $column) {
348  if ($column['checked']) {
349  $checkedCount++;
350  }
351 }
352 
353 $i = 0;
354 $totalarray = array();
355 while ($i < min($num, $limit)) {
356  $objp = $db->fetch_object($resql);
357 
358  $paymentfournstatic->id = $objp->rowid;
359  $paymentfournstatic->ref = $objp->ref;
360  $paymentfournstatic->datepaye = $objp->datep;
361 
362  $companystatic->id = $objp->socid;
363  $companystatic->name = $objp->name;
364  $companystatic->email = $objp->email;
365 
366  print '<tr class="oddeven">';
367 
368  // No
369  if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER_IN_LIST)) {
370  print '<td>'.(($offset * $limit) + $i).'</td>';
371  if (!$i) $totalarray['nbfield']++;
372  }
373 
374  // Ref
375  if (!empty($arrayfields['p.ref']['checked'])) {
376  print '<td class="nowrap">'.$paymentfournstatic->getNomUrl(1).'</td>';
377  if (!$i) $totalarray['nbfield']++;
378  }
379 
380  // Date
381  if (!empty($arrayfields['p.datep']['checked'])) {
382  $dateformatforpayment = 'day';
383  if (!empty($conf->global->INVOICE_USE_HOURS_FOR_PAYMENT)) $dateformatforpayment = 'dayhour';
384  print '<td class="nowrap center">'.dol_print_date($db->jdate($objp->datep), $dateformatforpayment).'</td>';
385  if (!$i) $totalarray['nbfield']++;
386  }
387 
388  // Thirdparty
389  if (!empty($arrayfields['s.nom']['checked'])) {
390  print '<td>';
391  if ($objp->socid > 0) {
392  print $companystatic->getNomUrl(1, '', 24);
393  }
394  print '</td>';
395  if (!$i) $totalarray['nbfield']++;
396  }
397 
398  // Pyament type
399  if (!empty($arrayfields['c.libelle']['checked'])) {
400  $payment_type = $langs->trans("PaymentType".$objp->paiement_type) != ("PaymentType".$objp->paiement_type) ? $langs->trans("PaymentType".$objp->paiement_type) : $objp->paiement_libelle;
401  print '<td>'.$payment_type.' '.dol_trunc($objp->num_paiement, 32).'</td>';
402  if (!$i) $totalarray['nbfield']++;
403  }
404 
405  // Cheque number (fund transfer)
406  if (!empty($arrayfields['p.num_paiement']['checked'])) {
407  print '<td>'.$objp->num_paiement.'</td>';
408  if (!$i) $totalarray['nbfield']++;
409  }
410 
411  // Account
412  if (!empty($arrayfields['ba.label']['checked']))
413  {
414  print '<td>';
415  if ($objp->bid) print '<a href="'.DOL_URL_ROOT.'/compta/bank/bankentries_list.php?account='.$objp->bid.'">'.img_object($langs->trans("ShowAccount"), 'account').' '.dol_trunc($objp->label, 24).'</a>';
416  else print '&nbsp;';
417  print '</td>';
418  if (!$i) $totalarray['nbfield']++;
419  }
420 
421  // Amount
422  if (!empty($arrayfields['p.amount']['checked'])) {
423  print '<td class="right">'.price($objp->pamount).'</td>';
424  if (!$i) $totalarray['nbfield']++;
425  $totalarray['pos'][$checkedCount] = 'amount';
426  $totalarray['val']['amount'] += $objp->pamount;
427  }
428 
429  // Buttons
430  print '<td></td>';
431  if (!$i) $totalarray['nbfield']++;
432 
433  print '</tr>';
434  $i++;
435 }
436 
437 // Show total line
438 include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php';
439 
440 print '</table>';
441 print '</div>';
442 print '</form>';
443 
444 // End of page
445 llxFooter();
446 $db->close();
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
llxHeader()
Empty header.
Definition: wrapper.php:45
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.
Class to manage generation of HTML components Only common components must be here.
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname.
Class to manage third parties objects (customers, suppliers, prospects...)
print_liste_field_titre($name, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $tooltip="", $forcenowrapcolumntitle=0)
Show title line of an array.
Classe permettant la generation de composants html autre Only common components are here...
img_object($titlealt, $picto, $moreatt= '', $pictoisfullpath=false, $srconly=0, $notitle=0)
Show a picto called object_picto (generic function)
accessforbidden($message= '', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
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...
dolSqlDateFilter($datefield, $day_date, $month_date, $year_date, $excludefirstand=0)
Generate a SQL string to make a filter into a range (for second of date until last second of date) ...
Definition: date.lib.php:281
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.
Definition: index.php:89
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.
Definition: index.php:1232
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 &#39;...&#39; if string larger than length.
Class to manage payments for supplier invoices.
llxFooter()
Empty footer.
Definition: wrapper.php:59