dolibarr  13.0.2
balance.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2016 Olivier Geffroy <jeff@jeffinfo.com>
3  * Copyright (C) 2016 Florian Henry <florian.henry@open-concept.pro>
4  * Copyright (C) 2016-2020 Alexandre Spangaro <aspangaro@open-dsi.fr>
5  * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <https://www.gnu.org/licenses/>.
19  */
20 
27 require '../../main.inc.php';
28 
29 // Class
30 require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
31 require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
32 require_once DOL_DOCUMENT_ROOT.'/accountancy/class/bookkeeping.class.php';
33 require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php';
34 require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountancyexport.class.php';
35 require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php';
36 require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
37 
38 // Load translation files required by the page
39 $langs->loadLangs(array("accountancy", "compta"));
40 
41 $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
42 $sortorder = GETPOST("sortorder", 'alpha');
43 $sortfield = GETPOST("sortfield", 'alpha');
44 $action = GETPOST('action', 'aZ09');
45 
46 // Load variable for pagination
47 $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
48 $sortfield = GETPOST('sortfield', 'aZ09comma');
49 $sortorder = GETPOST('sortorder', 'aZ09comma');
50 $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
51 if (empty($page) || $page == -1 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha') || (empty($toselect) && $massaction === '0')) { $page = 0; } // If $page is not defined, or '' or -1 or if we click on clear filters or if we select empty mass action
52 $offset = $limit * $page;
53 $pageprev = $page - 1;
54 $pagenext = $page + 1;
55 //if (! $sortfield) $sortfield="p.date_fin";
56 //if (! $sortorder) $sortorder="DESC";
57 
58 $show_subgroup = GETPOST('show_subgroup', 'alpha');
59 $search_date_start = dol_mktime(0, 0, 0, GETPOST('date_startmonth', 'int'), GETPOST('date_startday', 'int'), GETPOST('date_startyear', 'int'));
60 $search_date_end = dol_mktime(23, 59, 59, GETPOST('date_endmonth', 'int'), GETPOST('date_endday', 'int'), GETPOST('date_endyear', 'int'));
61 
62 $search_accountancy_code_start = GETPOST('search_accountancy_code_start', 'alpha');
63 if ($search_accountancy_code_start == - 1) {
64  $search_accountancy_code_start = '';
65 }
66 $search_accountancy_code_end = GETPOST('search_accountancy_code_end', 'alpha');
67 if ($search_accountancy_code_end == - 1) {
68  $search_accountancy_code_end = '';
69 }
70 
71 $object = new BookKeeping($db);
72 
73 $formaccounting = new FormAccounting($db);
74 $formother = new FormOther($db);
75 $form = new Form($db);
76 
77 if (empty($search_date_start) && !GETPOSTISSET('formfilteraction'))
78 {
79  $sql = "SELECT date_start, date_end from ".MAIN_DB_PREFIX."accounting_fiscalyear ";
80  $sql .= " WHERE date_start < '".$db->idate(dol_now())."' AND date_end > '".$db->idate(dol_now())."'";
81  $sql .= $db->plimit(1);
82  $res = $db->query($sql);
83  if ($res->num_rows > 0) {
84  $fiscalYear = $db->fetch_object($res);
85  $search_date_start = strtotime($fiscalYear->date_start);
86  $search_date_end = strtotime($fiscalYear->date_end);
87  } else {
88  $month_start = ($conf->global->SOCIETE_FISCAL_MONTH_START ? ($conf->global->SOCIETE_FISCAL_MONTH_START) : 1);
89  $year_start = dol_print_date(dol_now(), '%Y');
90  if (dol_print_date(dol_now(), '%m') < $month_start) $year_start--; // If current month is lower that starting fiscal month, we start last year
91  $year_end = $year_start + 1;
92  $month_end = $month_start - 1;
93  if ($month_end < 1)
94  {
95  $month_end = 12;
96  $year_end--;
97  }
98  $search_date_start = dol_mktime(0, 0, 0, $month_start, 1, $year_start);
99  $search_date_end = dol_get_last_day($year_end, $month_end);
100  }
101 }
102 if ($sortorder == "") $sortorder = "ASC";
103 if ($sortfield == "") $sortfield = "t.numero_compte";
104 
105 
106 $param = '';
107 if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage);
108 if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit);
109 
110 $filter = array();
111 if (!empty($search_date_start)) {
112  $filter['t.doc_date>='] = $search_date_start;
113  $param .= '&amp;date_startmonth='.GETPOST('date_startmonth', 'int').'&amp;date_startday='.GETPOST('date_startday', 'int').'&amp;date_startyear='.GETPOST('date_startyear', 'int');
114 }
115 if (!empty($search_date_end)) {
116  $filter['t.doc_date<='] = $search_date_end;
117  $param .= '&amp;date_endmonth='.GETPOST('date_endmonth', 'int').'&amp;date_endday='.GETPOST('date_endday', 'int').'&amp;date_endyear='.GETPOST('date_endyear', 'int');
118 }
119 if (!empty($search_accountancy_code_start)) {
120  $filter['t.numero_compte>='] = $search_accountancy_code_start;
121  $param .= '&amp;search_accountancy_code_start='.$search_accountancy_code_start;
122 }
123 if (!empty($search_accountancy_code_end)) {
124  $filter['t.numero_compte<='] = $search_accountancy_code_end;
125  $param .= '&amp;search_accountancy_code_end='.$search_accountancy_code_end;
126 }
127 
128 /*
129  * Action
130  */
131 
132 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
133 {
134  $show_subgroup = '';
135  $search_date_start = '';
136  $search_date_end = '';
137  $search_accountancy_code_start = '';
138  $search_accountancy_code_end = '';
139  $filter = array();
140 }
141 
142 
143 /*
144  * View
145  */
146 
147 if ($action == 'export_csv')
148 {
149  $sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
150 
151  $filename = 'balance';
152  $type_export = 'balance';
153  include DOL_DOCUMENT_ROOT.'/accountancy/tpl/export_journal.tpl.php';
154 
155  $result = $object->fetchAllBalance($sortorder, $sortfield, $limit, 0, $filter);
156  if ($result < 0) {
157  setEventMessages($object->error, $object->errors, 'errors');
158  }
159 
160  foreach ($object->lines as $line)
161  {
162  print length_accountg($line->numero_compte).$sep;
163  print $object->get_compte_desc($line->numero_compte).$sep;
164  print price($line->debit).$sep;
165  print price($line->credit).$sep;
166  print price($line->debit - $line->credit).$sep;
167  print "\n";
168  }
169 
170  exit;
171 }
172 
173 
174 $title_page = $langs->trans("AccountBalance");
175 
176 llxHeader('', $title_page);
177 
178 
179 if ($action != 'export_csv')
180 {
181  // List
182  $nbtotalofrecords = '';
183  if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
184  {
185  $nbtotalofrecords = $object->fetchAllBalance($sortorder, $sortfield, 0, 0, $filter);
186  if ($nbtotalofrecords < 0) {
187  setEventMessages($object->error, $object->errors, 'errors');
188  }
189  }
190 
191  $result = $object->fetchAllBalance($sortorder, $sortfield, $limit, $offset, $filter);
192  if ($result < 0) {
193  setEventMessages($object->error, $object->errors, 'errors');
194  }
195 
196  print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
197  if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
198  print '<input type="hidden" name="token" value="'.newToken().'">';
199  print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
200  print '<input type="hidden" name="action" id="action" value="list">';
201  print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
202  print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
203  print '<input type="hidden" name="page" value="'.$page.'">';
204 
205  $button = '<input type="button" id="exportcsvbutton" name="exportcsvbutton" class="butAction" value="'.$langs->trans("Export").' ('.$conf->global->ACCOUNTING_EXPORT_FORMAT.')" />';
206 
207  print '<script type="text/javascript" language="javascript">
208  jQuery(document).ready(function() {
209  jQuery("#exportcsvbutton").click(function() {
210  event.preventDefault();
211  console.log("Set action to export_csv");
212  jQuery("#action").val("export_csv");
213  jQuery("#searchFormList").submit();
214  jQuery("#action").val("list");
215  });
216  });
217  </script>';
218 
219  print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $button, $result, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit);
220 
221  $moreforfilter = '';
222 
223  $moreforfilter .= '<div class="divsearchfield">';
224  $moreforfilter .= $langs->trans('DateStart').': ';
225  $moreforfilter .= $form->selectDate($search_date_start ? $search_date_start : -1, 'date_start', 0, 0, 1, '', 1, 0);
226  $moreforfilter .= $langs->trans('DateEnd').': ';
227  $moreforfilter .= $form->selectDate($search_date_end ? $search_date_end : -1, 'date_end', 0, 0, 1, '', 1, 0);
228 
229  $moreforfilter .= ' - ';
230  $moreforfilter .= '<label for="show_subgroup">'.$langs->trans('ShowSubtotalByGroup').'</label>: ';
231  $moreforfilter .= '<input type="checkbox" name="show_subgroup" id="show_subgroup" value="show_subgroup"'.($show_subgroup == 'show_subgroup' ? ' checked' : '').'>';
232 
233 
234  $moreforfilter .= '</div>';
235 
236  if (!empty($moreforfilter)) {
237  print '<div class="liste_titre liste_titre_bydiv centpercent">';
238  print $moreforfilter;
239  $parameters = array();
240  $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook
241  print $hookmanager->resPrint;
242  print '</div>';
243  }
244 
245  $colspan = (!empty($conf->global->ACCOUNTANCY_SHOW_OPENING_BALANCE) ? 5 : 4);
246 
247  print '<table class="liste '.($moreforfilter ? "listwithfilterbefore" : "").'">';
248 
249  print '<tr class="liste_titre_filter">';
250  print '<td class="liste_titre" colspan="'.$colspan.'">';
251  print $langs->trans('From');
252  print $formaccounting->select_account($search_accountancy_code_start, 'search_accountancy_code_start', 1, array(), 1, 1, '');
253  print ' ';
254  print $langs->trans('to');
255  print $formaccounting->select_account($search_accountancy_code_end, 'search_accountancy_code_end', 1, array(), 1, 1, '');
256  print '</td>';
257  print '<td class="liste_titre center">';
258  $searchpicto = $form->showFilterButtons();
259  print $searchpicto;
260  print '</td>';
261 
262  print '</tr>';
263 
264  print '<tr class="liste_titre">';
265  print_liste_field_titre("AccountAccounting", $_SERVER['PHP_SELF'], "t.numero_compte", "", $param, "", $sortfield, $sortorder);
266  if (!empty($conf->global->ACCOUNTANCY_SHOW_OPENING_BALANCE)) print_liste_field_titre("OpeningBalance", $_SERVER['PHP_SELF'], "", $param, "", 'class="right"', $sortfield, $sortorder);
267  print_liste_field_titre("Debit", $_SERVER['PHP_SELF'], "t.debit", "", $param, 'class="right"', $sortfield, $sortorder);
268  print_liste_field_titre("Credit", $_SERVER['PHP_SELF'], "t.credit", "", $param, 'class="right"', $sortfield, $sortorder);
269  print_liste_field_titre("Balance", $_SERVER["PHP_SELF"], "", $param, "", 'class="right"', $sortfield, $sortorder);
270  print_liste_field_titre('', $_SERVER["PHP_SELF"], "", $param, "", 'width="60" class="center"', $sortfield, $sortorder);
271  print "</tr>\n";
272 
273  $total_debit = 0;
274  $total_credit = 0;
275  $sous_total_debit = 0;
276  $sous_total_credit = 0;
277  $total_opening_balance = 0;
278  $sous_total_opening_balance = 0;
279  $displayed_account = "";
280 
281  $accountingaccountstatic = new AccountingAccount($db);
282 
283  // TODO Debug - This feature is dangerous, it takes all the entries and adds all the accounts
284  // without time and class limits (Class 6 and 7 accounts ???) and does not take into account the "a-nouveau" journal.
285  if (!empty($conf->global->ACCOUNTANCY_SHOW_OPENING_BALANCE)) {
286  $sql = "SELECT t.numero_compte, (SUM(t.debit) - SUM(t.credit)) as opening_balance";
287  $sql .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as t";
288  $sql .= " WHERE t.entity = " . $conf->entity; // Never do sharing into accounting features
289  $sql .= " AND t.doc_date < '" . $db->idate($search_date_start) . "'";
290  $sql .= " GROUP BY t.numero_compte";
291 
292  $resql = $db->query($sql);
293  $nrows = $resql->num_rows;
294  $opening_balances = array();
295  for ($i = 0; $i < $nrows; $i++) {
296  $arr = $resql->fetch_array();
297  $opening_balances["'" . $arr['numero_compte'] . "'"] = $arr['opening_balance'];
298  }
299  }
300 
301  foreach ($object->lines as $line)
302  {
303  // reset before the fetch (in case of the fetch fails)
304  $accountingaccountstatic->id = 0;
305  $accountingaccountstatic->account_number = '';
306 
307  $accountingaccountstatic->fetch(null, $line->numero_compte, true);
308  if (!empty($accountingaccountstatic->account_number)) {
309  $accounting_account = $accountingaccountstatic->getNomUrl(0, 1, 0, '', 0, -1, 0, 'accountcard');
310  } else {
311  $accounting_account = length_accountg($line->numero_compte);
312  }
313 
314  $link = '';
315  $total_debit += $line->debit;
316  $total_credit += $line->credit;
317  $opening_balance = isset($opening_balances["'".$line->numero_compte."'"]) ? $opening_balances["'".$line->numero_compte."'"] : 0;
318  $total_opening_balance += $opening_balance;
319 
320  $tmparrayforrootaccount = $object->getRootAccount($line->numero_compte);
321  $root_account_description = $tmparrayforrootaccount['label'];
322  $root_account_number = $tmparrayforrootaccount['account_number'];
323 
324  //var_dump($tmparrayforrootaccount);
325  //var_dump($accounting_account);
326  //var_dump($accountingaccountstatic);
327  if (empty($accountingaccountstatic->label) && $accountingaccountstatic->id > 0) {
328  $link = '<a class="editfielda reposition" href="' . DOL_URL_ROOT . '/accountancy/admin/card.php?action=update&token=' . newToken() . '&id=' . $accountingaccountstatic->id . '">' . img_edit() . '</a>';
329  } elseif ($accounting_account == 'NotDefined') {
330  $link = '<a href="' . DOL_URL_ROOT . '/accountancy/admin/card.php?action=create&token=' . newToken() . '&accountingaccount=' . length_accountg($line->numero_compte) . '">' . img_edit_add() . '</a>';
331  } elseif (empty($tmparrayforrootaccount['label'])) {
332  // $tmparrayforrootaccount['label'] not defined = the account has not parent with a parent.
333  // This is useless, we should not create a new account when an account has no parent, we must edit it to fix its parent.
334  // BUG 1: Accounts on level root or level 1 must not have a parent 2 level higher, so shoule not show a link to create another account.
335  // BUG 2: Adding a link to create a new accounting account here is useless because it is not add as parent of the orphelin.
336  //$link = '<a href="' . DOL_URL_ROOT . '/accountancy/admin/card.php?action=create&token=' . newToken() . '&accountingaccount=' . length_accountg($line->numero_compte) . '">' . img_edit_add() . '</a>';
337  }
338 
339  if (!empty($show_subgroup))
340  {
341  // Show accounting account
342  if (empty($displayed_account) || $root_account_number != $displayed_account) {
343  // Show subtotal per accounting account
344  if ($displayed_account != "") {
345  print '<tr class="liste_total">';
346  print '<td class="right">'.$langs->trans("SubTotal").':</td>';
347  if (!empty($conf->global->ACCOUNTANCY_SHOW_OPENING_BALANCE)) print '<td class="nowrap right">'.price($sous_total_opening_balance).'</td>';
348  print '<td class="nowrap right">'.price($sous_total_debit).'</td>';
349  print '<td class="nowrap right">'.price($sous_total_credit).'</td>';
350  if (!empty($conf->global->ACCOUNTANCY_SHOW_OPENING_BALANCE)) {
351  print '<td class="nowrap right">'.price(price2num($sous_total_opening_balance + $sous_total_debit - $sous_total_credit)).'</td>';
352  } else {
353  print '<td class="nowrap right">'.price(price2num($sous_total_debit - $sous_total_credit)).'</td>';
354  }
355  print "<td></td>\n";
356  print '</tr>';
357  }
358 
359  // Show first line of a break
360  print '<tr class="trforbreak">';
361  print '<td colspan="'.($colspan+1).'" style="font-weight:bold; border-bottom: 1pt solid black;">'.$line->numero_compte.($root_account_description ? ' - '.$root_account_description : '').'</td>';
362  print '</tr>';
363 
364  $displayed_account = $root_account_number;
365  $sous_total_debit = 0;
366  $sous_total_credit = 0;
367  $sous_total_opening_balance = 0;
368  }
369  }
370 
371  print '<tr class="oddeven">';
372  print '<td>'.$accounting_account.'</td>';
373  if (!empty($conf->global->ACCOUNTANCY_SHOW_OPENING_BALANCE)) print '<td class="nowraponall right">'.price($opening_balance).'</td>';
374 
375  $urlzoom = '';
376  if ($line->numero_compte) {
377  $urlzoom = DOL_URL_ROOT.'/accountancy/bookkeeping/listbyaccount.php?search_accountancy_code_start='.urlencode($line->numero_compte).'&search_accountancy_code_end='.urlencode($line->numero_compte);
378  if (GETPOSTISSET('date_startmonth')) {
379  $urlzoom .= '&search_date_startmonth='.GETPOST('date_startmonth', 'int').'&search_date_startday='.GETPOST('date_startday', 'int').'&search_date_startyear='.GETPOST('date_startyear', 'int');
380  }
381  if (GETPOSTISSET('date_endmonth')) {
382  $urlzoom .= '&search_date_endmonth='.GETPOST('date_endmonth', 'int').'&search_date_endday='.GETPOST('date_endday', 'int').'&search_date_endyear='.GETPOST('date_endyear', 'int');
383  }
384  }
385  // Debit
386  print '<td class="nowraponall right"><a href="'.$urlzoom.'">'.price($line->debit).'</a></td>';
387  // Credit
388  print '<td class="nowraponall right"><a href="'.$urlzoom.'">'.price($line->credit).'</a></td>';
389 
390  if (!empty($conf->global->ACCOUNTANCY_SHOW_OPENING_BALANCE)) {
391  print '<td class="nowraponall right">'.price(price2num($opening_balance + $line->debit - $line->credit, 'MT')).'</td>';
392  } else {
393  print '<td class="nowraponall right">'.price(price2num($line->debit - $line->credit, 'MT')).'</td>';
394  }
395  print '<td class="center">'.$link;
396  print '</td>';
397  print "</tr>\n";
398 
399  // Records the sub-total
400  $sous_total_debit += $line->debit;
401  $sous_total_credit += $line->credit;
402  $sous_total_opening_balance += $opening_balance;
403  }
404 
405  if (!empty($show_subgroup))
406  {
407  print '<tr class="liste_total"><td class="right">'.$langs->trans("SubTotal").':</td>';
408  if (!empty($conf->global->ACCOUNTANCY_SHOW_OPENING_BALANCE)) print '<td class="nowrap right">'.price($sous_total_opening_balance).'</td>';
409  print '<td class="nowrap right">'.price($sous_total_debit).'</td>';
410  print '<td class="nowrap right">'.price($sous_total_credit).'</td>';
411  if (!empty($conf->global->ACCOUNTANCY_SHOW_OPENING_BALANCE)) {
412  print '<td class="nowrap right">' . price(price2num($sous_total_opening_balance + $sous_total_debit - $sous_total_credit, 'MT')) . '</td>';
413  } else {
414  print '<td class="nowrap right">' . price(price2num($sous_total_debit - $sous_total_credit, 'MT')) . '</td>';
415  }
416  print "<td></td>\n";
417  print '</tr>';
418  }
419 
420  print '<tr class="liste_total"><td class="right">'.$langs->trans("AccountBalance").':</td>';
421  if (!empty($conf->global->ACCOUNTANCY_SHOW_OPENING_BALANCE)) print '<td class="nowrap right">'.price($total_opening_balance).'</td>';
422  print '<td class="nowrap right">'.price($total_debit).'</td>';
423  print '<td class="nowrap right">'.price($total_credit).'</td>';
424  if (!empty($conf->global->ACCOUNTANCY_SHOW_OPENING_BALANCE)) {
425  print '<td class="nowrap right">' . price(price2num($total_opening_balance + $total_debit - $total_credit, 'MT')) . '</td>';
426  } else {
427  print '<td class="nowrap right">' . price(price2num($total_debit - $total_credit, 'MT')) . '</td>';
428  }
429  print "<td></td>\n";
430  print '</tr>';
431 
432  print "</table>";
433  print '</form>';
434 }
435 
436 // End of page
437 llxFooter();
438 $db->close();
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
img_edit($titlealt= 'default', $float=0, $other= '')
Show logo editer/modifier fiche.
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...
dol_now($mode= 'auto')
Return date for now.
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...
Class to manage Ledger (General Ledger and Subledger)
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...
print $_SERVER["PHP_SELF"]
Edit parameters.
img_edit_add($titlealt= 'default', $other= '')
Show logo +.
dol_get_last_day($year, $month=12, $gm=false)
Return GMT time for last day of a month or year.
Definition: date.lib.php:498
print
Draft customers invoices.
Definition: index.php:89
dol_print_date($time, $format= '', $tzoutput= 'auto', $outputlangs= '', $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
Class to manage generation of HTML components for accounting management.
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
newToken()
Return the value of token currently saved into session with name &#39;newtoken&#39;.
Class to manage accounting accounts.
length_accountg($account)
Return General accounting account with defined length (used for product and miscellaneous) ...
llxFooter()
Empty footer.
Definition: wrapper.php:59