dolibarr 22.0.5
report.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3 * Copyright (C) 2004-2020 Laurent Destailleur <eldy@users.sourceforge.net>
4 * Copyright (C) 2005-2010 Regis Houssin <regis.houssin@capnetworks.com>
5 * Copyright (C) 2012 Vinícius Nogueira <viniciusvgn@gmail.com>
6 * Copyright (C) 2014 Florian Henry <florian.henry@open-cooncept.pro>
7 * Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
8 * Copyright (C) 2016 Juanjo Menent <jmenent@2byte.es>
9 * Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr>
10 * Copyright (C) 2018 Andreu Bisquerra <jove@bisquerra.com>
11 * Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
12 * Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
13 *
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 3 of the License, or
17 * (at your option) any later version.
18 *
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with this program. If not, see <https://www.gnu.org/licenses/>.
26 */
27
34if (!defined('NOREQUIREMENU')) {
35 define('NOREQUIREMENU', '1'); // If there is no need to load and show top and left menu
36}
37if (!defined('NOBROWSERNOTIF')) {
38 define('NOBROWSERNOTIF', '1'); // Disable browser notification
39}
40
41$optioncss = "print";
42
43// Load Dolibarr environment
44require '../../main.inc.php';
45require_once DOL_DOCUMENT_ROOT.'/compta/cashcontrol/class/cashcontrol.class.php';
46require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
47require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
48require_once DOL_DOCUMENT_ROOT.'/compta/cashcontrol/class/cashcontrol.class.php';
49require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
50
51
61$langs->loadLangs(array("bills", "banks"));
62
63$id = GETPOSTINT('id');
64$summaryonly = GETPOSTINT('summaryonly'); // May be used for ticket Z
65
66$object = new CashControl($db);
67$object->fetch($id);
68
69//$limit = GETPOST('limit')?GETPOST('limit', 'int'):$conf->liste_limit;
70$sortorder = 'ASC';
71$sortfield = 'b.datev,b.dateo,b.rowid';
72
73$arrayfields = array(
74 'b.rowid' => array('label' => $langs->trans("Ref"), 'checked' => 1),
75 'b.dateo' => array('label' => $langs->trans("DateOperationShort"), 'checked' => 1),
76 'b.num_chq' => array('label' => $langs->trans("Number"), 'checked' => 1),
77 'ba.ref' => array('label' => $langs->trans("BankAccount"), 'checked' => 1),
78 'cp.code' => array('label' => $langs->trans("PaymentMode"), 'checked' => 1),
79 'b.debit' => array('label' => $langs->trans("Debit"), 'checked' => 1, 'position' => 600),
80 'b.credit' => array('label' => $langs->trans("Credit"), 'checked' => 1, 'position' => 605),
81);
82
83$syear = $object->year_close;
84$smonth = $object->month_close;
85$sday = $object->day_close;
86
87$posmodule = $object->posmodule;
88$terminalid = $object->posnumber;
89
90// Security check
91if ($user->socid > 0) { // Protection if external user
92 //$socid = $user->socid;
94}
95if (!$user->hasRight('cashdesk', 'run') && !$user->hasRight('takepos', 'run')) {
97}
98
99
100/*
101 * View
102 */
103
104$title = $langs->trans("CashControl");
105$param = '';
106
107$conf->dol_hide_topmenu = 1;
108$conf->dol_hide_leftmenu = 1;
109
110llxHeader('', $title, '', '', 0, 0, array(), array(), $param);
111
112print '<!-- Begin div id-container --><div id="id-container" class="id-container center">';
113
114/*$sql = "SELECT b.rowid, b.dateo as do, b.datev as dv, b.amount, b.label, b.rappro as conciliated, b.num_releve, b.num_chq,";
115$sql.= " b.fk_account, b.fk_type,";
116$sql.= " ba.rowid as bankid, ba.ref as bankref,";
117$sql.= " bu.url_id,";
118$sql.= " f.module_source, f.ref as ref";
119$sql.= " FROM ";
120//if ($bid) $sql.= MAIN_DB_PREFIX."category_bankline as l,";
121$sql.= " ".MAIN_DB_PREFIX."bank_account as ba,";
122$sql.= " ".MAIN_DB_PREFIX."bank as b";
123$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank_url as bu ON bu.fk_bank = b.rowid AND type = 'payment'";
124$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."facture as f ON bu.url_id = f.rowid";
125$sql.= " WHERE b.fk_account = ba.rowid";
126// Define filter on invoice
127$sql.= " AND f.module_source = '".$db->escape($object->posmodule)."'";
128$sql.= " AND f.pos_source = '".$db->escape($object->posnumber)."'";
129$sql.= " AND f.entity IN (".getEntity('facture').")";
130// Define filter on data
131if ($syear && ! $smonth) $sql.= " AND dateo BETWEEN '".$db->idate(dol_get_first_day($syear, 1))."' AND '".$db->idate(dol_get_last_day($syear, 12))."'";
132elseif ($syear && $smonth && ! $sday) $sql.= " AND dateo BETWEEN '".$db->idate(dol_get_first_day($syear, $smonth))."' AND '".$db->idate(dol_get_last_day($syear, $smonth))."'";
133elseif ($syear && $smonth && $sday) $sql.= " AND dateo BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $smonth, $sday, $syear))."' AND '".$db->idate(dol_mktime(23, 59, 59, $smonth, $sday, $syear))."'";
134else dol_print_error(null, 'Year not defined');
135// Define filter on bank account
136$sql.=" AND (b.fk_account = ".((int) $conf->global->CASHDESK_ID_BANKACCOUNT_CASH);
137$sql.=" OR b.fk_account = ".((int) $conf->global->CASHDESK_ID_BANKACCOUNT_CB);
138$sql.=" OR b.fk_account = ".((int) $conf->global->CASHDESK_ID_BANKACCOUNT_CHEQUE);
139$sql.=")";
140*/
141$sql = "SELECT f.rowid as facid, f.ref, f.datef as do, pf.amount as amount, b.fk_account as bankid, cp.code";
142$sql .= " FROM ".MAIN_DB_PREFIX."paiement_facture as pf, ".MAIN_DB_PREFIX."facture as f, ".MAIN_DB_PREFIX."paiement as p, ".MAIN_DB_PREFIX."c_paiement as cp, ".MAIN_DB_PREFIX."bank as b";
143$sql .= " WHERE pf.fk_facture = f.rowid AND p.rowid = pf.fk_paiement AND cp.id = p.fk_paiement AND p.fk_bank = b.rowid";
144$sql .= " AND f.module_source = '".$db->escape($posmodule)."'";
145$sql .= " AND f.pos_source = '".$db->escape($terminalid)."'";
146//$sql .= " AND f.paye = 1";
147$sql .= " AND p.entity = ".$conf->entity; // Never share entities for features related to accountancy
148/*if ($key == 'cash') $sql.=" AND cp.code = 'LIQ'";
149elseif ($key == 'cheque') $sql.=" AND cp.code = 'CHQ'";
150elseif ($key == 'card') $sql.=" AND cp.code = 'CB'";
151else
152{
153 dol_print_error(null, 'Value for key = '.$key.' not supported');
154 exit;
155}*/
156if ($syear && !$smonth) {
157 $sql .= " AND datef BETWEEN '".$db->idate(dol_get_first_day($syear, 1))."' AND '".$db->idate(dol_get_last_day($syear, 12))."'";
158} elseif ($syear && $smonth && !$sday) {
159 $sql .= " AND datef BETWEEN '".$db->idate(dol_get_first_day($syear, $smonth))."' AND '".$db->idate(dol_get_last_day($syear, $smonth))."'";
160} elseif ($syear && $smonth && $sday) {
161 $sql .= " AND datef BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $smonth, $sday, $syear))."' AND '".$db->idate(dol_mktime(23, 59, 59, $smonth, $sday, $syear))."'";
162} else {
163 dol_print_error(null, 'Year not defined');
164}
165
166$resql = $db->query($sql);
167if ($resql) {
168 $num = $db->num_rows($resql);
169 $i = 0;
170
171 print "<!-- title of cash fence -->\n";
172 print '<center>';
173 print '<h2>';
174
175 $nameterminal = getDolGlobalString("TAKEPOS_TERMINAL_NAME_".$object->posnumber);
176 print $langs->trans("CashControl")." #".$object->id.(($nameterminal != "TAKEPOS_TERMINAL_NAME_".$object->posnumber) ? '<br>'.$nameterminal : '');
177 if ($object->status == $object::STATUS_DRAFT) {
178 print '<br><span class="opacitymedium small">('.$langs->trans("Draft").")</span>";
179 }
180 print "</h2>";
181 print $mysoc->name;
182 print '<br>'.$langs->trans("DateCreationShort").": ".dol_print_date($object->date_creation, 'dayhour');
183 $userauthor = $object->fk_user_valid;
184 if (empty($userauthor)) {
185 $userauthor = $object->fk_user_creat;
186 }
187
188 $uservalid = new User($db);
189 if ($userauthor > 0) {
190 $uservalid->fetch($userauthor);
191 print '<br>'.$langs->trans("Author").': '.$uservalid->getFullName($langs);
192 }
193 print '<br>'.$langs->trans("Period").': '.$object->year_close.($object->month_close ? '-'.$object->month_close : '').($object->day_close ? '-'.$object->day_close : '');
194 print '</center>';
195
196 $invoicetmp = new Facture($db);
197
198 if (!$summaryonly) {
199 print "<div style='text-align: right'><h2>";
200 print $langs->trans("InitialBankBalance").' - '.$langs->trans("Cash").' : <div class="inline-block amount width100">'.price($object->opening).'</div>';
201 print "</h2></div>";
202 } else {
203 print '<br>';
204 }
205
206 $param = '';
207
208 if (!$summaryonly) {
209 print '<div class="div-table-responsive">';
210 print '<table class="tagtable liste">'."\n";
211
212 // Fields title
213 print '<tr class="liste_titre">';
214 print_liste_field_titre($arrayfields['b.rowid']['label'], $_SERVER['PHP_SELF'], 'b.rowid', '', $param, '', $sortfield, $sortorder);
215 print_liste_field_titre($arrayfields['b.dateo']['label'], $_SERVER['PHP_SELF'], 'b.dateo', '', $param, '"', $sortfield, $sortorder, 'center ');
216 print_liste_field_titre($arrayfields['ba.ref']['label'], $_SERVER['PHP_SELF'], 'ba.ref', '', $param, '', $sortfield, $sortorder, 'right ');
217 print_liste_field_titre($arrayfields['cp.code']['label'], $_SERVER['PHP_SELF'], 'cp.code', '', $param, '', $sortfield, $sortorder, 'right ');
218 print_liste_field_titre($arrayfields['b.debit']['label'], $_SERVER['PHP_SELF'], 'b.amount', '', $param, '', $sortfield, $sortorder, 'right ');
219 print_liste_field_titre($arrayfields['b.credit']['label'], $_SERVER['PHP_SELF'], 'b.amount', '', $param, '', $sortfield, $sortorder, 'right ');
220 print "</tr>\n";
221 }
222
223 // Loop on each record
224 $cash = $bank = $cheque = $other = 0;
225
226 $totalqty = 0;
227 $totalvat = 0;
228 $totalvatperrate = array();
229 $totalhtperrate = array();
230 $totallocaltax1 = 0;
231 $totallocaltax2 = 0;
232 $cachebankaccount = array();
233 $cacheinvoiceid = array();
234 $transactionspertype = array();
235 $amountpertype = array();
236
237 $totalarray = array('nbfield' => 0, 'pos' => array(), 'val' => array('totaldebfield' => 0, 'totalcredfield' => 0));
238 while ($i < $num) {
239 $objp = $db->fetch_object($resql);
240
241 // Load bankaccount
242 if (empty($cachebankaccount[$objp->bankid])) {
243 $bankaccounttmp = new Account($db);
244 $bankaccounttmp->fetch($objp->bankid);
245 $cachebankaccount[$objp->bankid] = $bankaccounttmp;
246 $bankaccount = $bankaccounttmp;
247 } else {
248 $bankaccount = $cachebankaccount[$objp->bankid];
249 }
250
251 $invoicetmp->fetch($objp->facid);
252
253 if (empty($cacheinvoiceid[$objp->facid])) {
254 $cacheinvoiceid[$objp->facid] = $objp->facid; // First time this invoice is found into list of invoice x payments
255 foreach ($invoicetmp->lines as $line) {
256 $totalqty += $line->qty;
257 $totalvat += $line->total_tva;
258 if ($line->tva_tx) {
259 if (empty($totalvatperrate[$line->tva_tx])) {
260 $totalvatperrate[$line->tva_tx] = 0;
261 $totalhtperrate[$line->tva_tx] = 0;
262 }
263 $totalvatperrate[$line->tva_tx] += $line->total_tva;
264 $totalhtperrate[$line->tva_tx] += $line->total_ht;
265 }
266 $totallocaltax1 += $line->total_localtax1;
267 $totallocaltax2 += $line->total_localtax2;
268 }
269 }
270
271 if ($object->posmodule == "takepos") {
272 $var1 = 'CASHDESK_ID_BANKACCOUNT_CASH'.$object->posnumber;
273 } else {
274 $var1 = 'CASHDESK_ID_BANKACCOUNT_CASH';
275 }
276
277 if ($objp->code == 'CHQ') {
278 $cheque += $objp->amount;
279 if (empty($transactionspertype[$objp->code])) {
280 $transactionspertype[$objp->code] = 0;
281 }
282 $transactionspertype[$objp->code] += 1;
283 } elseif ($objp->code == 'CB') {
284 $bank += $objp->amount;
285 if (empty($transactionspertype[$objp->code])) {
286 $transactionspertype[$objp->code] = 0;
287 }
288 $transactionspertype[$objp->code] += 1;
289 } else {
290 if (getDolGlobalString($var1) == $bankaccount->id) {
291 $cash += $objp->amount;
292 // } elseif (getDolGlobalString($var2) == $bankaccount->id) $bank+=$objp->amount;
293 //elseif (getDolGlobalString($var3) == $bankaccount->id) $cheque+=$objp->amount;
294 if (empty($transactionspertype['CASH'])) {
295 $transactionspertype['CASH'] = 0;
296 }
297 $transactionspertype['CASH'] += 1;
298 } else {
299 $other += $objp->amount;
300 if (empty($transactionspertype['OTHER'])) {
301 $transactionspertype['OTHER'] = 0;
302 }
303 $transactionspertype['OTHER'] += 1;
304 }
305 }
306
307 if (empty($amountpertype[$objp->code])) {
308 $amountpertype[$objp->code] = 0;
309 }
310
311 if ($objp->amount < 0) {
312 $amountpertype[$objp->code] += $objp->amount;
313 }
314 if ($objp->amount > 0) {
315 $amountpertype[$objp->code] -= $objp->amount;
316 }
317
318 if (!$summaryonly) {
319 print '<tr class="oddeven">';
320
321 // Ref
322 print '<td class="nowrap left">';
323 print $invoicetmp->getNomUrl(1);
324 print '</td>';
325 if (!$i) {
326 $totalarray['nbfield']++;
327 }
328
329 // Date ope
330 print '<td class="nowrap left">';
331 print '<span id="dateoperation_'.$objp->facid.'">'.dol_print_date($db->jdate($objp->do), "day")."</span>";
332 print "</td>\n";
333 if (!$i) {
334 $totalarray['nbfield']++;
335 }
336
337 // Bank account
338 print '<td class="nowrap right">';
339 print $bankaccount->getNomUrl(1);
340 print "</td>\n";
341 if (!$i) {
342 $totalarray['nbfield']++;
343 }
344
345 // Type
346 print '<td class="right">';
347 print $objp->code;
348 print "</td>\n";
349 if (!$i) {
350 $totalarray['nbfield']++;
351 }
352
353 // Debit
354 print '<td class="right">';
355 if ($objp->amount < 0) {
356 print '<span class="amount">'.price($objp->amount * -1).'</span>';
357 $totalarray['val']['totaldebfield'] += $objp->amount;
358 }
359 print "</td>\n";
360 if (!$i) {
361 $totalarray['nbfield']++;
362 }
363 if (!$i) {
364 $totalarray['pos'][$totalarray['nbfield']] = 'totaldebfield';
365 }
366
367 // Credit
368 print '<td class="right">';
369 if ($objp->amount > 0) {
370 print '<span class="amount">'.price($objp->amount).'</span>';
371 $totalarray['val']['totalcredfield'] += $objp->amount;
372 }
373 print "</td>\n";
374 if (!$i) {
375 $totalarray['nbfield']++;
376 }
377 if (!$i) {
378 $totalarray['pos'][$totalarray['nbfield']] = 'totalcredfield';
379 }
380
381 print "</tr>";
382 }
383
384 $i++;
385 }
386
387 if (!$summaryonly) {
388 // Show total line
389 include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php';
390
391 print "</table>";
392 print "</div>";
393 }
394
395 //$cash = $amountpertype['LIQ'] + $object->opening;
396 $newcash = price2num($cash + (float) $object->opening, 'MT');
397
398 print '<div style="text-align: right">';
399 print '<h2>';
400
401 print $langs->trans("Cash").(!empty($transactionspertype['CASH']) ? ' ('.$transactionspertype['CASH'].' '.$langs->trans("Articles").')' : '').' : ';
402 if (!$summaryonly) {
403 print '<div class="inline-block amount width100">'.($cash >= 0 ? '+' : '').price($cash).'</div>';
404 print '<div class="inline-block amount width100">'.price($newcash).'</div>';
405 } else {
406 print '<div class="inline-block amount width100"></div>';
407 print '<div class="inline-block amount width100">'.price($cash).'</div>';
408 }
409 if (!$summaryonly && $object->status == $object::STATUS_VALIDATED && $newcash != $object->cash) {
410 print ' <div class="inline-block amountremaintopay fontsizeunset small"><> '.$langs->trans("Declared").': '.price($object->cash).'</div>';
411 }
412 print "<br>";
413
414 //print '<br>';
415 print $langs->trans("PaymentTypeCHQ").(!empty($transactionspertype['CHQ']) ? ' ('.$transactionspertype['CHQ'].' '.$langs->trans("Articles").')' : '').' : ';
416 print '<div class="inline-block amount width100"></div>';
417 print '<div class="inline-block amount width100">'.price($cheque).'</div>';
418 if (!$summaryonly && $object->status == $object::STATUS_VALIDATED && $cheque != $object->cheque) {
419 print ' <div class="inline-block amountremaintopay fontsizeunset small"><> '.$langs->trans("Declared").' : '.price($object->cheque).'</div>';
420 }
421 print "<br>";
422
423 //print '<br>';
424 print $langs->trans("PaymentTypeCB").(!empty($transactionspertype['CB']) ? ' ('.$transactionspertype['CB'].' '.$langs->trans("Articles").')' : '').' : ';
425 print '<div class="inline-block amount width100"></div>';
426 print '<div class="inline-block amount width100">'.price($bank).'</div>';
427 if (!$summaryonly && $object->status == $object::STATUS_VALIDATED && $bank != $object->card) {
428 print ' <div class="inline-block amountremaintopay fontsizeunset small"><> '.$langs->trans("Declared").': '.price($object->card).'</div>';
429 }
430 print "<br>";
431
432 // print '<br>';
433 if ($other) {
434 print ''.$langs->trans("Other").(!empty($transactionspertype['OTHER']) ? ' ('.$transactionspertype['OTHER'].' '.$langs->trans("Articles").')' : '').' : ';
435 print '<div class="inline-block amount width100"></div>';
436 print '<div class="inline-block amount width100">'.price($other)."</div>";
437 print '<br>';
438 }
439
440 print "<br>";
441
442 print $langs->trans("Total").' ('.$totalqty.' '.$langs->trans("Articles").') : <div class="inline-block amount width100"></div><div class="inline-block amount width100">'.price((float) $cash + (float) $cheque + (float) $bank + (float) $other).'</div>';
443
444 print '<br>'.$langs->trans("TotalVAT").' : <div class="inline-block amount width100"></div><div class="inline-block amount width100">'.price($totalvat).'</div>';
445
446 if ($mysoc->useLocalTax(1)) {
447 print '<br>'.$langs->trans("TotalLT1").' : <div class="inline-block amount width100"></div><div class="inline-block amount width100">'.price($totallocaltax1).'</div>';
448 }
449 if ($mysoc->useLocalTax(1)) {
450 print '<br>'.$langs->trans("TotalLT2").' : <div class="inline-block amount width100"></div><div class="inline-block amount width100">'.price($totallocaltax2).'</div>';
451 }
452
453 if (!empty($totalvatperrate) && is_array($totalvatperrate)) {
454 print '<br><br><div class="small inline-block width100">'.$langs->trans("TotalHT").'</div><div class="small inline-block width100">'.$langs->trans("TotalVAT").'</div>';
455 if (getDolGlobalInt('TAKEPOS_CASHCONTROL_REPORT_SHOW_TOTAL_INCLUDING_TAXES_COLUMN', 0) != 0) {
456 print '<div class="small inline-block width100">'.$langs->trans("TotalTTC").'</div>';
457 }
458 foreach ($totalvatperrate as $keyrate => $valuerate) {
459 print '<br><div class="small">'.$langs->trans("VATRate").' '.vatrate($keyrate, true).' : <div class="inline-block amount width100">'.price($totalhtperrate[$keyrate] ?? 0).'</div><div class="inline-block amount width100">'.price($valuerate).'</div>';
460 if (getDolGlobalInt('TAKEPOS_CASHCONTROL_REPORT_SHOW_TOTAL_INCLUDING_TAXES_COLUMN', 0) != 0) {
461 print '<div class="inline-block amount width100">'.price(($totalhtperrate[$keyrate] ?? 0) + $valuerate).'</div>';
462 }
463 print '</div>';
464 }
465 }
466
467 print '</h2>';
468 print '</div>';
469
470 print '</form>';
471
472 $db->free($resql);
473} else {
474 dol_print_error($db);
475}
476
477print '</div>';
478
479llxFooter();
480
481$db->close();
$id
Support class for third parties, contacts, members, users or resources.
Definition account.php:48
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Definition card.php:67
$totalarray
Definition export.php:1206
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
Definition wrapper.php:91
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
Definition wrapper.php:73
Class to manage bank accounts.
Class to manage cash fence.
Class to manage invoices.
Class to manage Dolibarr users.
dol_get_first_day($year, $month=1, $gm=false)
Return GMT time for first day of a month or year.
Definition date.lib.php:600
dol_get_last_day($year, $month=12, $gm=false)
Return GMT time for last day of a month or year.
Definition date.lib.php:619
dol_mktime($hour, $minute, $second, $month, $day, $year, $gm='auto', $check=1)
Return a timestamp date built from detailed information (by default a local PHP server timestamp) Rep...
vatrate($rate, $addpercent=false, $info_bits=0, $usestarfornpr=0, $html=0)
Return a string with VAT rate label formatted for view output Used into pdf and HTML pages.
print_liste_field_titre($name, $file="", $field="", $begin="", $param="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $tooltip="", $forcenowrapcolumntitle=0)
Show title line of an array.
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
price2num($amount, $rounding='', $option=0)
Function that return a number with universal decimal format (decimal separator is '.
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.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs=null, $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
Definition member.php:79
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.