dolibarr  13.0.2
list.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3  * Copyright (C) 2004-2020 Laurent Destailleur <eldy@users.sourceforge.net>
4  * Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
5  * Copyright (C) 2011-2019 Alexandre Spangaro <aspangaro@open-dsi.fr>
6  * Copyright (C) 2020 Tobias Sekan <tobias.sekan@startmail.com>
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <https://www.gnu.org/licenses/>.
20  */
21 
28 require '../../main.inc.php';
29 
30 // Security check
31 $socid = GETPOST('socid', 'int');
32 if ($user->socid) $socid = $user->socid;
33 $result = restrictedArea($user, 'tax', '', '', 'charges');
34 
35 require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php';
36 require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
37 require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
38 require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
39 require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingjournal.class.php';
40 
41 // Load translation files required by the page
42 $langs->loadLangs(array('compta', 'bills'));
43 
44 $action = GETPOST('action', 'alpha');
45 $massaction = GETPOST('massaction', 'alpha');
46 $confirm = GETPOST('confirm', 'alpha');
47 $optioncss = GETPOST('optioncss', 'alpha');
48 $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'salestaxeslist';
49 
50 $search_ref = GETPOST('search_ref', 'alpha');
51 $search_label = GETPOST('search_label', 'alpha');
52 $search_dateend_start = dol_mktime(0, 0, 0, GETPOST('search_dateend_startmonth', 'int'), GETPOST('search_dateend_startday', 'int'), GETPOST('search_dateend_startyear', 'int'));
53 $search_dateend_end = dol_mktime(23, 59, 59, GETPOST('search_dateend_endmonth', 'int'), GETPOST('search_dateend_endday', 'int'), GETPOST('search_dateend_endyear', 'int'));
54 $search_datepayment_start = dol_mktime(0, 0, 0, GETPOST('search_datepayment_startmonth', 'int'), GETPOST('search_datepayment_startday', 'int'), GETPOST('search_datepayment_startyear', 'int'));
55 $search_datepayment_end = dol_mktime(23, 59, 59, GETPOST('search_datepayment_endmonth', 'int'), GETPOST('search_datepayment_endday', 'int'), GETPOST('search_datepayment_endyear', 'int'));
56 $search_type = GETPOST('search_type', 'int');
57 $search_cheque = GETPOST('search_cheque', 'alpha');
58 $search_account = GETPOST('search_account', 'int');
59 $search_amount = GETPOST('search_amount', 'alpha');
60 
61 $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
62 $sortfield = GETPOST('sortfield', 'alpha');
63 $sortorder = GETPOST('sortorder', 'alpha');
64 $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST('page', 'int');
65 
66 if (empty($page) || $page == -1) $page = 0; // If $page is not defined, or '' or -1
67 $offset = $limit * $page;
68 $pageprev = $page - 1;
69 $pagenext = $page + 1;
70 
71 if (!$sortfield) $sortfield = 't.datev';
72 if (!$sortorder) $sortorder = 'DESC';
73 
74 $arrayfields = array(
75  't.rowid' =>array('checked'=>1, 'position'=>10, 'label'=>"Ref",),
76  't.label' =>array('checked'=>1, 'position'=>20, 'label'=>"Label"),
77  't.datev' =>array('checked'=>1, 'position'=>30, 'label'=>"PeriodEndDate"),
78  't.datep' =>array('checked'=>1, 'position'=>40, 'label'=>"DatePayment"),
79  't.fk_typepayment' =>array('checked'=>1, 'position'=>50, 'label'=>"Type"),
80  't.num_payment' =>array('checked'=>1, 'position'=>60, 'label'=>"Numero", 'tooltip'=>"ChequeOrTransferNumber"),
81  'transaction' =>array('checked'=>1, 'position'=>70, 'label'=>"BankTransactionLine", 'enabled'=>(!empty($conf->banque->enabled))),
82  'ba.label' =>array('checked'=>1, 'position'=>80, 'label'=>"Account", 'enable'=>(!empty($conf->banque->enabled))),
83  't.amount' =>array('checked'=>1, 'position'=>90, 'label'=>"PayedByThisPayment"),
84 );
85 $arrayfields = dol_sort_array($arrayfields, 'position');
86 
87 // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
88 $hookmanager->initHooks(array('salestaxeslist'));
89 $object = new Tva($db);
90 
91 
92 /*
93  * Actions
94  */
95 
96 $parameters = array('socid'=>$socid);
97 $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
98 if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
99 
100 
101 if (empty($reshook)) {
102  include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
103 
104  if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) // Both test are required to be compatible with all browsers
105  {
106  $search_ref = '';
107  $search_label = '';
108  $search_dateend_start = '';
109  $search_dateend_end = '';
110  $search_datepayment_start = '';
111  $search_datepayment_end = '';
112  $search_type = '';
113  $search_cheque = '';
114  $search_account = '';
115  $search_amount = '';
116  }
117 }
118 
119 
120 /*
121  * View
122  */
123 
124 $form = new Form($db);
125 $formother = new FormOther($db);
126 $tva_static = new Tva($db);
127 $bankstatic = new Account($db);
128 $accountingjournal = new AccountingJournal($db);
129 $bankline = new AccountLine($db);
130 
131 llxHeader('', $langs->trans("VATPayments"));
132 
133 $sql = 'SELECT t.rowid, t.amount, t.label, t.datev, t.datep, t.fk_typepayment as type, t.num_payment, t.fk_bank';
134 $sql .= ', ba.rowid as bid, ba.ref as bref, ba.number as bnumber, ba.account_number, ba.fk_accountancy_journal, ba.label as blabel';
135 $sql .= ', pst.code as payment_code';
136 $sql .= ' FROM '.MAIN_DB_PREFIX.'tva as t';
137 $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_paiement as pst ON t.fk_typepayment = pst.id';
138 $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'bank as b ON t.fk_bank = b.rowid';
139 $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'bank_account as ba ON b.fk_account = ba.rowid';
140 $sql .= ' WHERE t.entity IN ('.getEntity($object->element).')';
141 
142 if (!empty($search_ref)) $sql .= natural_search('t.rowid', $search_ref);
143 if (!empty($search_label)) $sql .= natural_search('t.label', $search_label);
144 if (!empty($search_dateend_start)) $sql .= ' AND t.datev >= "'.$db->idate($search_dateend_start).'"';
145 if (!empty($search_dateend_end)) $sql .= ' AND t.datev <= "'.$db->idate($search_dateend_end).'"';
146 if (!empty($search_datepayment_start)) $sql .= ' AND t.datep >= "'.$db->idate($search_datepayment_start).'"';
147 if (!empty($search_datepayment_end)) $sql .= ' AND t.datep <= "'.$db->idate($search_datepayment_end).'"';
148 if (!empty($search_type) && $search_type > 0) $sql .= ' AND t.fk_typepayment='.$search_type;
149 if (!empty($search_cheque)) $sql .= natural_search('t.num_payment', $search_cheque);
150 if (!empty($search_account) && $search_account > 0) $sql .= ' AND b.fk_account='.$search_account;
151 if (!empty($search_amount)) $sql .= natural_search('t.amount', price2num(trim($search_amount)), 1);
152 
153 $sql .= $db->order($sortfield, $sortorder);
154 
155 $nbtotalofrecords = '';
156 if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
157  $result = $db->query($sql);
158  $nbtotalofrecords = $db->num_rows($result);
159 
160  // if total resultset is smaller then paging size (filtering), goto and load page 0
161  if (($page * $limit) > $nbtotalofrecords) {
162  $page = 0;
163  $offset = 0;
164  }
165 }
166 
167 $sql .= $db->plimit($limit + 1, $offset);
168 
169 $result = $db->query($sql);
170 if (!$result)
171 {
172  dol_print_error($db);
173  llxFooter();
174  $db->close();
175  exit;
176 }
177 
178 $num = $db->num_rows($result);
179 
180 $param = '';
181 if (!empty($contextpage) && $contextpage != $_SERVER['PHP_SELF']) $param .= '&contextpage='.$contextpage;
182 if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.$limit;
183 if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss);
184 
185 if (!empty($search_ref)) $param .= '&search_ref="'.$search_ref.'"';
186 if (!empty($search_label)) $param .= '&search_label="'.$search_label.'"';
187 if (!empty($search_dateend_start)) $param .= '&search_dateend_startyear='.GETPOST('search_dateend_startyear', 'int');
188 if (!empty($search_dateend_start)) $param .= '&search_dateend_startmonth='.GETPOST('search_dateend_startmonth', 'int');
189 if (!empty($search_dateend_start)) $param .= '&search_dateend_startday='.GETPOST('search_dateend_startday', 'int');
190 if (!empty($search_dateend_end)) $param .= '&search_dateend_endyear='.GETPOST('search_dateend_endyear', 'int');
191 if (!empty($search_dateend_end)) $param .= '&search_dateend_endmonth='.GETPOST('search_dateend_endmonth', 'int');
192 if (!empty($search_dateend_end)) $param .= '&search_dateend_endday='.GETPOST('search_dateend_endday', 'int');
193 if (!empty($search_datepayment_start)) $param .= '&search_datepayment_startyear='.GETPOST('search_datepayment_startyear', 'int');
194 if (!empty($search_datepayment_start)) $param .= '&search_datepayment_startmonth='.GETPOST('search_datepayment_startmonth', 'int');
195 if (!empty($search_datepayment_start)) $param .= '&search_datepayment_startday='.GETPOST('search_datepayment_startday', 'int');
196 if (!empty($search_datepayment_end)) $param .= '&search_datepayment_endyear='.GETPOST('search_datepayment_endyear', 'int');
197 if (!empty($search_datepayment_end)) $param .= '&search_datepayment_endmonth='.GETPOST('search_datepayment_endmonth', 'int');
198 if (!empty($search_datepayment_end)) $param .= '&search_datepayment_endday='.GETPOST('search_datepayment_endday', 'int');
199 if (!empty($search_type) && $search_type > 0) $param .= '&search_type='.$search_type;
200 if (!empty($search_cheque)) $param .= '&search_cheque="'.$search_cheque.'"';
201 if (!empty($search_account) && $search_account > 0) $param .= '&search_account='.$search_account;
202 if (!empty($search_amount)) $param .= '&search_amount="'.$search_amount.'"';
203 
204 print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
205 if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
206 print '<input type="hidden" name="token" value="'.newToken().'">';
207 print '<input type="hidden" name="action" value="list">';
208 print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
209 print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
210 print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
211 print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
212 
213 $url = DOL_URL_ROOT.'/compta/tva/card.php?action=create';
214 if (!empty($socid)) $url .= '&socid='.$socid;
215 $newcardbutton = dolGetButtonTitle($langs->trans('NewVATPayment', ($ltt + 1)), '', 'fa fa-plus-circle', $url, '', $user->rights->tax->charges->creer);
216 print_barre_liste($langs->trans("VATPayments"), $page, $_SERVER['PHP_SELF'], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy', 0, $newcardbutton, '', $limit, 0, 0, 1);
217 
218 $varpage = empty($contextpage) ? $_SERVER['PHP_SELF'] : $contextpage;
219 $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
220 if ($massactionbutton) $selectedfields .= $form->showCheckAddButtons('checkforselect', 1);
221 
222 print '<div class="div-table-responsive">';
223 print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : '').'">';
224 
225 print '<tr class="liste_titre_filter">';
226 
227 // Filters: Lines (placeholder)
228 if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER_IN_LIST)) {
229  print '<td class="liste_titre">';
230  print '</td>';
231 }
232 
233 // Filter: Ref
234 if (!empty($arrayfields['t.rowid']['checked'])) {
235  print '<td class="liste_titre">';
236  print '<input type="text" class="flat" size="4" name="search_ref" value="'.dol_escape_htmltag($search_ref).'">';
237  print '</td>';
238 }
239 
240 // Filter: Label
241 if (!empty($arrayfields['t.label']['checked'])) {
242  print '<td class="liste_titre">';
243  print '<input type="text" class="flat" size="10" name="search_label" value="'.dol_escape_htmltag($search_label).'">';
244  print '</td>';
245 }
246 
247 // Filter: Date end period
248 if (!empty($arrayfields['t.datev']['checked'])) {
249  print '<td class="liste_titre center">';
250  print '<div class="nowrap">';
251  print $form->selectDate($search_dateend_start ? $search_dateend_start : -1, 'search_dateend_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("From"));
252  print '</div>';
253  print '<div class="nowrap">';
254  print $form->selectDate($search_dateend_end ? $search_dateend_end : -1, 'search_dateend_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("to"));
255  print '</div>';
256  print '</td>';
257 }
258 
259 // Filter: Date payment
260 if (!empty($arrayfields['t.datep']['checked'])) {
261  print '<td class="liste_titre center">';
262  print '<div class="nowrap">';
263  print $form->selectDate($search_datepayment_start ? $search_datepayment_start : -1, 'search_datepayment_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("From"));
264  print '</div>';
265  print '<div class="nowrap">';
266  print $form->selectDate($search_datepayment_end ? $search_datepayment_end : -1, 'search_datepayment_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("to"));
267  print '</div>';
268  print '</td>';
269 }
270 
271 // Filter: Type
272 if (!empty($arrayfields['t.fk_typepayment']['checked'])) {
273  print '<td class="liste_titre left">';
274  $form->select_types_paiements($search_type, 'search_type', '', 0, 1, 1, 16);
275  print '</td>';
276 }
277 
278 // Filter: Cheque number
279 if (!empty($arrayfields['t.num_payment']['checked'])) {
280  print '<td class="liste_titre left">';
281  print '<input name="search_cheque" class="flat" type="text" size="8" value="'.$search_cheque.'">';
282  print '</td>';
283 }
284 
285 // Filter: Bank transaction number (placeholder)
286 if (!empty($arrayfields['transaction']['checked'])) {
287  print '<td class="liste_titre">';
288  print '</td>';
289 }
290 
291 // Filter: Bank account
292 if (!empty($arrayfields['ba.label']['checked'])) {
293  print '<td class="liste_titre">';
294  $form->select_comptes($search_account, 'search_account', 0, '', 1);
295  print '</td>';
296 }
297 
298 // Filter: Amount
299 if (!empty($arrayfields['t.amount']['checked'])) {
300  print '<td class="liste_titre right">';
301  print '<input name="search_amount" class="flat" type="text" size="8" value="'.$search_amount.'">';
302  print '</td>';
303 }
304 
305 // Fields from hook
306 $parameters = array('arrayfields'=>$arrayfields);
307 $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters); // Note that $action and $object may have been modified by hook
308 print $hookmanager->resPrint;
309 
310 // Filter: Buttons
311 print '<td class="liste_titre maxwidthsearch">';
312 print $form->showFilterAndCheckAddButtons(0);
313 print '</td>';
314 
315 print '</tr>';
316 
317 print '<tr class="liste_titre">';
318 if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER_IN_LIST)) print_liste_field_titre('#', $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder);
319 if (!empty($arrayfields['t.rowid']['checked'])) print_liste_field_titre($arrayfields['t.rowid']['label'], $_SERVER['PHP_SELF'], 't.rowid', '', $param, '', $sortfield, $sortorder);
320 if (!empty($arrayfields['t.label']['checked'])) print_liste_field_titre($arrayfields['t.label']['label'], $_SERVER['PHP_SELF'], 't.label', '', $param, 'align="left"', $sortfield, $sortorder);
321 if (!empty($arrayfields['t.datev']['checked'])) print_liste_field_titre($arrayfields['t.datev']['label'], $_SERVER['PHP_SELF'], 't.datev', '', $param, 'align="center"', $sortfield, $sortorder);
322 if (!empty($arrayfields['t.datep']['checked'])) print_liste_field_titre($arrayfields['t.datep']['label'], $_SERVER['PHP_SELF'], 't.datep', '', $param, 'align="center"', $sortfield, $sortorder);
323 if (!empty($arrayfields['t.fk_typepayment']['checked'])) print_liste_field_titre($arrayfields['t.fk_typepayment']['label'], $_SERVER['PHP_SELF'], 't.fk_typepayment', '', $param, '', $sortfield, $sortorder, 'left ');
324 if (!empty($arrayfields['t.num_payment']['checked'])) print_liste_field_titre($arrayfields['t.num_payment']['label'], $_SERVER['PHP_SELF'], 't.num_payment', '', $param, '', $sortfield, $sortorder, '', $arrayfields['t.num_payment']['tooltip']);
325 if (!empty($arrayfields['transaction']['checked'])) print_liste_field_titre($arrayfields['transaction']['label'], $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder);
326 if (!empty($arrayfields['ba.label']['checked'])) print_liste_field_titre($arrayfields['ba.label']['label'], $_SERVER['PHP_SELF'], 'ba.label', '', $param, '', $sortfield, $sortorder, 'left ');
327 if (!empty($arrayfields['t.amount']['checked'])) print_liste_field_titre($arrayfields['t.amount']['label'], $_SERVER['PHP_SELF'], 't.amount', '', $param, '', $sortfield, $sortorder, 'right ');
328 
329 // Hook fields
330 $parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder);
331 $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
332 print $hookmanager->resPrint;
333 
334 print_liste_field_titre($selectedfields, $_SERVER['PHP_SELF'], '', '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ');
335 print '</tr>';
336 
337 $i = 0;
338 $totalarray = array();
339 while ($i < min($num, $limit)) {
340  $obj = $db->fetch_object($result);
341 
342  $tva_static->id = $obj->rowid;
343  $tva_static->ref = $obj->rowid;
344 
345  print '<tr class="oddeven">';
346 
347  // No
348  if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER_IN_LIST)) {
349  print '<td>'.(($offset * $limit) + $i).'</td>';
350  if (!$i) $totalarray['nbfield']++;
351  }
352 
353  // Ref
354  if (!empty($arrayfields['t.rowid']['checked'])) {
355  print '<td>'.$tva_static->getNomUrl(1).'</td>';
356  if (!$i) $totalarray['nbfield']++;
357  }
358 
359  // Label
360  if (!empty($arrayfields['t.label']['checked'])) {
361  print '<td>'.dol_trunc($obj->label, 40).'</td>';
362  if (!$i) $totalarray['nbfield']++;
363  }
364 
365  // Date end period
366  if (!empty($arrayfields['t.datev']['checked'])) {
367  print '<td class="center">'.dol_print_date($db->jdate($obj->datev), 'day').'</td>';
368  if (!$i) $totalarray['nbfield']++;
369  }
370 
371  // Date payment
372  if (!empty($arrayfields['t.datep']['checked'])) {
373  print '<td class="center">'.dol_print_date($db->jdate($obj->datep), 'day').'</td>';
374  if (!$i) $totalarray['nbfield']++;
375  }
376 
377  // Type
378  if (!empty($arrayfields['t.fk_typepayment']['checked']))
379  {
380  print '<td>'.$langs->trans("PaymentTypeShort".$obj->payment_code).'</td>';
381  if (!$i) $totalarray['nbfield']++;
382  }
383 
384  // Cheque number
385  if (!empty($arrayfields['t.num_payment']['checked'])) {
386  print '<td>'.$obj->num_payment.'</td>';
387  if (!$i) $totalarray['nbfield']++;
388  }
389 
390  // Bank transaction
391  if (!empty($arrayfields['transaction']['checked'])) {
392  $bankline->fetch($obj->fk_bank);
393  print '<td>'.$bankline->getNomUrl(1, 0).'</td>';
394  if (!$i) $totalarray['nbfield']++;
395  }
396 
397  // Account
398  if (!empty($arrayfields['ba.label']['checked'])) {
399  print '<td>';
400  if ($obj->fk_bank > 0) {
401  $bankstatic->id = $obj->bid;
402  $bankstatic->ref = $obj->bref;
403  $bankstatic->number = $obj->bnumber;
404  $bankstatic->account_number = $obj->account_number;
405 
406  $accountingjournal->fetch($obj->fk_accountancy_journal);
407  $bankstatic->accountancy_journal = $accountingjournal->getNomUrl(0, 1, 1, '', 1);
408 
409  $bankstatic->label = $obj->blabel;
410  print $bankstatic->getNomUrl(1);
411  }
412  print '</td>';
413  if (!$i) $totalarray['nbfield']++;
414  }
415 
416  // Amount
417  $total = $total + $obj->amount;
418  print '<td class="nowrap right">'.price($obj->amount).'</td>';
419  if (!$i) $totalarray['nbfield']++;
420  $totalarray['pos'][$totalarray['nbfield']] = 'amount';
421  $totalarray['val']['amount'] += $objp->amount;
422 
423  // Buttons
424  print '<td></td>';
425 
426  print '</tr>';
427 
428  $i++;
429 }
430 
431 // Add a buttons placeholder for the total line
432 $totalarray['nbfield']++;
433 
434 // Show total line
435 include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php';
436 
437 print '</table>';
438 print '</div>';
439 print '</form>';
440 
441 $db->free($result);
442 
443 // End of page
444 llxFooter();
445 $db->close();
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_mktime($hour, $minute, $second, $month, $day, $year, $gm= 'auto', $check=1)
Return a timestamp date built from detailed informations (by default a local PHP server timestamp) Re...
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.
Class to manage bank transaction lines.
Class to manage bank accounts.
Put here description of your class.
Definition: tva.class.php:34
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.
print_liste_field_titre($name, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $tooltip="", $forcenowrapcolumntitle=0)
Show title line of an array.
price2num($amount, $rounding= '', $option=0)
Function that return a number with universal decimal format (decimal separator is &#39;...
Classe permettant la generation de composants html autre Only common components are here...
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.
Definition: index.php:89
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.
llxFooter()
Empty footer.
Definition: wrapper.php:59