29require
'../../main.inc.php';
37require_once DOL_DOCUMENT_ROOT.
'/core/lib/prelevement.lib.php';
38require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
39require_once DOL_DOCUMENT_ROOT.
'/compta/prelevement/class/ligneprelevement.class.php';
40require_once DOL_DOCUMENT_ROOT.
'/compta/prelevement/class/bonprelevement.class.php';
41require_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/account.class.php';
44$langs->loadLangs(array(
'banks',
'categories',
'bills',
'companies',
'withdrawals'));
47$action =
GETPOST(
'action',
'aZ09');
57$sortfield =
GETPOST(
'sortfield',
'aZ09comma');
58$sortorder =
GETPOST(
'sortorder',
'aZ09comma');
60if (empty($page) || $page == -1) {
63$offset = $limit * $page;
68 $sortfield =
'pl.rowid';
77include DOL_DOCUMENT_ROOT.
'/core/actions_fetchobject.inc.php';
79$hookmanager->initHooks(array(
'directdebitprevcard',
'globalcard',
'directdebitprevlist'));
84$salaryBonPl =
$object->checkIfSalaryBonPrelevement();
87if ($type ==
'bank-transfer') {
88 $result =
restrictedArea($user,
'paymentbybanktransfer',
'',
'',
'');
90 $permissiontoadd = $user->hasRight(
'paymentbybanktransfer',
'create');
91 $permissiontosend = $user->hasRight(
'paymentbybanktransfer',
'send');
92 $permissiontocreditdebit = $user->hasRight(
'paymentbybanktransfer',
'debit');
93 $permissiontodelete = $user->hasRight(
'paymentbybanktransfer',
'read');
97 $permissiontoadd = $user->hasRight(
'prelevement',
'bons',
'creer');
98 $permissiontosend = $user->hasRight(
'prelevement',
'bons',
'send');
99 $permissiontocreditdebit = $user->hasRight(
'prelevement',
'bons',
'credit');
100 $permissiontodelete = $user->hasRight(
'prelevement',
'bons',
'read');
108$parameters = array(
'socid' => $socid);
109$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
114if (empty($reshook)) {
115 if ($action ==
'setbankaccount' && $permissiontoadd) {
123 if ($action ==
'setdate_trans' && $permissiontosend) {
124 $result =
$object->setValueFrom(
'date_trans', $date_trans,
'',
null,
'date');
130 if ($action ==
'infotrans' && $permissiontosend) {
131 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
157 header(
"Location: card.php?id=".
$id.
"&error=$error");
163 if ($action ==
'setinfocredit' && $permissiontocreditdebit) {
166 if ((
$object->type !=
'bank-transfer' &&
$object->status == BonPrelevement::STATUS_CREDITED) || (
$object->type ==
'bank-transfer' &&
$object->statut == BonPrelevement::STATUS_DEBITED)) {
170 $error =
$object->set_infocredit($user, $dt, ($salaryBonPl ?
'salary' :
''));
178 if ($action ==
'reopen' && $permissiontocreditdebit) {
180 $res =
$object->setStatut(BonPrelevement::STATUS_TRANSFERED);
186 if ($action ==
'setcancel' && $permissiontocreditdebit) {
188 $res =
$object->setStatut(BonPrelevement::STATUS_CANCELED);
194 if ($action ==
'confirm_delete' && $permissiontodelete) {
198 if ($savtype ==
'bank-transfer') {
199 header(
"Location: ".DOL_URL_ROOT.
'/compta/paymentbybanktransfer/index.php');
201 header(
"Location: ".DOL_URL_ROOT.
'/compta/prelevement/index.php');
215llxHeader(
'', $langs->trans(
"WithdrawalsReceipts"));
217if (($id > 0 || $ref) &&
$object->id <= 0) {
221if ($id > 0 || $ref) {
224 print
dol_get_fiche_head($head,
'prelevement', $langs->trans(
"WithdrawalsReceipts"), -1,
'payment');
226 if (
GETPOST(
'error',
'alpha') !=
'') {
227 print
'<div class="error">'.$object->getErrorString(
GETPOSTINT(
'error')).
'</div>';
230 $linkback =
'<a href="'.DOL_URL_ROOT.
'/compta/prelevement/orders_list.php?restore_lastsearch_values=1'.(
$object->type !=
'bank-transfer' ?
'' :
'&type=bank-transfer').
'">'.$langs->trans(
"BackToList").
'</a>';
232 dol_banner_tab($object,
'ref', $linkback, 1,
'ref',
'ref');
234 print
'<div class="fichecenter">';
235 print
'<div class="underbanner clearboth"></div>';
236 print
'<table class="border centpercent tableforfield">';
239 print
'<tr><td class="titlefieldcreate">'.$langs->trans(
"Date").
'</td><td>'.
dol_print_date(
$object->datec,
'day').
'</td></tr>';
241 print
'<tr><td>'.$langs->trans(
"Amount").
'</td><td><span class="amount">'.
price(
$object->amount).
'</span></td></tr>';
244 if (!empty(
$object->date_trans)) {
246 $muser->fetch(
$object->user_trans);
250 print
'<table class="nobordernopadding centpercent"><tr><td>';
251 print $langs->trans(
'TransData');
253 if ($action !=
'editdate_trans' && $permissiontosend) {
254 print
'<td class="right"><a class="editfielda" href="'.$_SERVER[
"PHP_SELF"].
'?action=editdate_trans&token='.
newToken().
'&id='.
$object->id.
'">'.
img_edit($langs->trans(
'SetTransDate'), 1).
'</a></td>';
256 print
'</tr></table>';
258 if ($action ==
'editdate_trans' && $permissiontosend) {
259 print
'<form name="setdate_trans" action="'.$_SERVER[
"PHP_SELF"].
'?id='.
$object->id.
'" method="post">';
260 print
'<input type="hidden" name="token" value="'.newToken().
'">';
261 print
'<input type="hidden" name="action" value="setdate_trans">';
262 print $form->selectDate(
$object->date_trans ?
$object->date_trans : -1,
'date_trans', 0, 0, 0,
"setdate_trans");
263 print
'<input type="submit" class="button button-edit smallpaddingimp valign middle" value="'.$langs->trans(
'Modify').
'">';
267 print
' <span class="opacitymedium">'.$langs->trans(
"By").
'</span> '.$muser->getNomUrl(-1).
'</td>';
273 print
'<tr><td>'.$langs->trans(
"TransMetod").
'</td><td>';
279 if (!empty(
$object->date_credit)) {
280 print
'<tr><td>'.$langs->trans(
'CreditDate').
'</td><td>';
289 print
'<div class="underbanner clearboth"></div>';
290 print
'<table class="border centpercent tableforfield">';
294 $fk_bank_account =
$object->fk_bank_account;
295 if (empty($fk_bank_account)) {
298 if ($fk_bank_account > 0) {
299 $result = $acc->fetch($fk_bank_account);
303 $labelofbankfield =
"BankToReceiveWithdraw";
304 if (
$object->type ==
'bank-transfer') {
305 $labelofbankfield =
'BankToPayCreditTransfer';
308 $caneditbank = $permissiontoadd;
309 if (
$object->status != $object::STATUS_DRAFT) {
321 print
'<tr><td class="titlefieldcreate">';
322 print
'<table class="nobordernopadding centpercent"><tr><td class="nowrap">';
323 print $form->textwithpicto($langs->trans(
"BankAccount"), $langs->trans($labelofbankfield));
325 if (($action !=
'editbankaccount') && $caneditbank) {
326 print
'<td class="right"><a class="editfielda" href="'.$_SERVER[
"PHP_SELF"].
'?action=editfkbankaccount&token='.
newToken().
'&id='.
$object->id.
'">'.
img_edit($langs->trans(
'SetBankAccount'), 1).
'</a></td>';
328 print
'</tr></table>';
330 if ($action ==
'editfkbankaccount') {
331 $form->formSelectAccount($_SERVER[
'PHP_SELF'].
'?id='.
$object->id, (
string) $fk_bank_account,
'fk_bank_account', 0);
333 $form->formSelectAccount($_SERVER[
'PHP_SELF'].
'?id='.
$object->id, (
string) $fk_bank_account,
'none');
339 print
'<tr><td class="titlefieldcreate">';
340 $labelfororderfield =
'WithdrawalFile';
341 if (
$object->type ==
'bank-transfer') {
342 $labelfororderfield =
'CreditTransferFile';
344 print $langs->trans($labelfororderfield).
'</td><td>';
346 $modulepart =
'prelevement';
347 if (
$object->type ==
'bank-transfer') {
348 $modulepart =
'paymentbybanktransfer';
352 $labelentity =
$conf->entity;
353 $relativepath =
'receipts/'.$object->ref.
'-'.$labelentity.
'.xml';
355 if ($type !=
'bank-transfer') {
356 $dir =
$conf->prelevement->dir_output;
358 $dir =
$conf->paymentbybanktransfer->dir_output;
361 $relativepath =
'receipts/'.$object->ref.
'.xml';
364 $relativepath =
'receipts/'.$object->ref.
'.xml';
367 print
'<a data-ajax="false" href="'.DOL_URL_ROOT.
'/document.php?type=text/plain&modulepart='.$modulepart.
'&file='.urlencode($relativepath).
'">'.$relativepath;
368 print
img_picto(
'',
'download',
'class="paddingleft"');
373 $parameters = array();
374 $reshook = $hookmanager->executeHooks(
'formObjectOptions', $parameters, $object, $action);
375 print $hookmanager->resPrint;
387 if ($action ==
'delete') {
388 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.
$object->id, $langs->trans(
'Delete'), $langs->trans(
'ConfirmDeleteObject'),
'confirm_delete',
'', 0, 1);
401 if (empty(
$object->date_trans) && (($user->hasRight(
'prelevement',
'bons',
'send') &&
$object->type !=
'bank-transfer') || ($user->hasRight(
'paymentbybanktransfer',
'send') &&
$object->type ==
'bank-transfer')) && $action ==
'settransmitted') {
402 print
'<form method="post" name="userfile" action="card.php?id='.$object->id.
'" enctype="multipart/form-data">';
403 print
'<input type="hidden" name="token" value="'.newToken().
'">';
404 print
'<input type="hidden" name="action" value="infotrans">';
405 print
'<table class="noborder centpercent">';
406 print
'<tr class="liste_titre">';
407 print
'<td colspan="3">'.$langs->trans(
"NotifyTransmision").
'</td></tr>';
408 print
'<tr class="oddeven"><td>'.$langs->trans(
"TransData").
'</td><td>';
409 print $form->selectDate(
'',
'', 0, 0, 0,
"userfile", 1, 1);
411 print
'<tr class="oddeven"><td>'.$langs->trans(
"TransMetod").
'</td><td>';
412 print $form->selectarray(
"methode",
$object->methodes_trans);
415 print
'<div class="center"><input type="submit" class="button" value="'.dol_escape_htmltag($langs->trans(
"SetToStatusSent")).
'"></div>';
420 if (
$object->status == BonPrelevement::STATUS_TRANSFERED && (($user->hasRight(
'prelevement',
'bons',
'credit') &&
$object->type !=
'bank-transfer') || ($user->hasRight(
'paymentbybanktransfer',
'debit') &&
$object->type ==
'bank-transfer')) && $action ==
'setcredited') {
423 $btnLabel = (
$object->type ==
'bank-transfer') ? $langs->trans(
"ClassDebited") : $langs->trans(
"ClassCredited");
424 print
'<form name="infocredit" method="post" action="card.php?id='.$object->id.
'">';
425 print
'<input type="hidden" name="token" value="'.newToken().
'">';
426 print
'<input type="hidden" name="action" value="setinfocredit">';
427 print
'<table class="noborder centpercent">';
428 print
'<tr class="liste_titre">';
429 print
'<td colspan="3">'.$langs->trans(
"NotifyCredit").
'</td></tr>';
430 print
'<tr class="oddeven"><td>'.$langs->trans(
'CreditDate').
'</td><td>';
431 print $form->selectDate(-1,
'', 0, 0, 0,
"infocredit", 1, 1, 0,
'',
'', array(array(
'adddateof' =>
$object->date_trans,
'labeladddateof' => $langs->transnoentitiesnoconv(
'TransData'))));
434 print
'<br><div class="center"><span class="opacitymedium">'.$langs->trans(
"ThisWillAlsoAddPaymentOnInvoice").
'</span></div>';
435 print
'<div class="center"><input type="submit" class="button" value="'.dol_escape_htmltag($btnLabel).
'"></div>';
441 if ($action !=
'settransmitted' && $action !=
'setcredited') {
442 print
"\n".
'<div class="tabsAction">'.
"\n";
443 $parameters = array();
444 $reshook = $hookmanager->executeHooks(
'addMoreActionsButtons', $parameters, $object, $action);
445 if (empty($reshook)) {
446 if (empty(
$object->date_trans)) {
447 if (
$object->type ==
'bank-transfer') {
448 print
dolGetButtonAction($langs->trans(
"SetToStatusSent"),
'',
'default',
'card.php?action=settransmitted&token='.newToken().
'&id='.
$object->id,
'', $user->hasRight(
'paymentbybanktransfer',
'send'));
450 print
dolGetButtonAction($langs->trans(
"SetToStatusSent"),
'',
'default',
'card.php?action=settransmitted&token='.newToken().
'&id='.
$object->id,
'', $user->hasRight(
'prelevement',
'bons',
'send'));
455 if (
$object->status == BonPrelevement::STATUS_DEBITED ||
$object->status == BonPrelevement::STATUS_CREDITED) {
456 if (
$object->type ==
'bank-transfer') {
457 print
dolGetButtonAction($langs->trans(
"ReOpen"),
'',
'default',
'card.php?action=reopen&token='.newToken().
'&id='.
$object->id,
'', $user->hasRight(
'paymentbybanktransfer',
'debit'));
459 print
dolGetButtonAction($langs->trans(
"ReOpen"),
'',
'default',
'card.php?action=reopen&token='.newToken().
'&id='.
$object->id,
'', $user->hasRight(
'prelevement',
'bons',
'credit'));
464 if (
$object->status == BonPrelevement::STATUS_TRANSFERED) {
465 if (
$object->type ==
'bank-transfer') {
466 print
dolGetButtonAction($langs->trans(
"ClassDebited"),
'',
'default',
'card.php?action=setcredited&token='.newToken().
'&id='.
$object->id,
'', $user->hasRight(
'paymentbybanktransfer',
'debit'));
468 print
dolGetButtonAction($langs->trans(
"ClassCredited"),
'',
'default',
'card.php?action=setcredited&token='.newToken().
'&id='.
$object->id,
'', $user->hasRight(
'prelevement',
'bons',
'credit'));
473 if (
$object->status == BonPrelevement::STATUS_TRANSFERED) {
474 if (
$object->type ==
'bank-transfer') {
475 print
dolGetButtonAction($langs->trans(
"Cancel"),
'',
'cancel',
'card.php?action=setcancel&token='.newToken().
'&id='.
$object->id,
'', $user->hasRight(
'paymentbybanktransfer',
'debit'));
477 print
dolGetButtonAction($langs->trans(
"Cancel"),
'',
'cancel',
'card.php?action=setcancel&token='.newToken().
'&id='.
$object->id,
'', $user->hasRight(
'prelevement',
'bons',
'credit'));
481 if (
$object->type ==
'bank-transfer') {
482 print
dolGetButtonAction($langs->trans(
"Delete"),
'',
'delete',
'card.php?action=delete&token='.newToken().
'&id='.
$object->id,
'', $user->hasRight(
'paymentbybanktransfer',
'create'));
484 print
dolGetButtonAction($langs->trans(
"Delete"),
'',
'delete',
'card.php?action=delete&token='.newToken().
'&id='.
$object->id,
'', $user->hasRight(
'prelevement',
'bons',
'creer'));
495 $sql =
"SELECT pl.rowid, pl.statut as status, pl.amount,";
496 $sql .=
" u.rowid as parentid, u.login as name";
497 $sql .=
" FROM ".MAIN_DB_PREFIX.
"prelevement_lignes as pl";
498 $sql .=
", ".MAIN_DB_PREFIX.
"prelevement_bons as pb";
499 $sql .=
", ".MAIN_DB_PREFIX.
"user as u";
500 $sql .=
" WHERE pl.fk_prelevement_bons = ".((int) $id);
501 $sql .=
" AND pl.fk_prelevement_bons = pb.rowid";
502 $sql .=
" AND pb.entity = ".((int)
$conf->entity);
503 $sql .=
" AND pl.fk_user = u.rowid";
505 $sql .=
" AND u.rowid = ".((int) $socid);
507 $sql .=
$db->order($sortfield, $sortorder);
509 $sql =
"SELECT pl.rowid, pl.statut as status, pl.amount,";
510 $sql .=
" s.rowid as parentid, s.nom as name";
511 $sql .=
" FROM ".MAIN_DB_PREFIX.
"prelevement_lignes as pl";
512 $sql .=
", ".MAIN_DB_PREFIX.
"prelevement_bons as pb";
513 $sql .=
", ".MAIN_DB_PREFIX.
"societe as s";
514 $sql .=
" WHERE pl.fk_prelevement_bons = ".((int) $id);
515 $sql .=
" AND pl.fk_prelevement_bons = pb.rowid";
516 $sql .=
" AND pb.entity = ".((int)
$conf->entity);
517 $sql .=
" AND pl.fk_soc = s.rowid";
519 $sql .=
" AND s.rowid = ".((int) $socid);
521 $sql .=
$db->order($sortfield, $sortorder);
524 $nbtotalofrecords =
'';
526 $result =
$db->query($sql);
527 $nbtotalofrecords =
$db->num_rows($result);
528 if (($page * $limit) > (int) $nbtotalofrecords) {
535 $sql .=
$db->plimit($limit + 1, $offset);
537 $result =
$db->query($sql);
540 $num =
$db->num_rows($result);
543 $urladd =
"&id=".urlencode((
string) (
$id));
544 if ($limit > 0 && $limit !=
$conf->liste_limit) {
545 $urladd .=
'&limit='.((int) $limit);
548 print
'<form method="POST" action="'.$_SERVER [
'PHP_SELF'].
'" name="search_form">'.
"\n";
549 print
'<input type="hidden" name="token" value="'.newToken().
'"/>';
550 print
'<input type="hidden" name="id" value="'.$id.
'"/>';
551 print
'<input type="hidden" name="socid" value="'.$socid.
'"/>';
553 print
'<input type="hidden" name="page" value="'.$page.
'"/>';
555 if (!empty($limit)) {
556 print
'<input type="hidden" name="limit" value="'.$limit.
'"/>';
558 if (!empty($sortfield)) {
559 print
'<input type="hidden" name="sortfield" value="'.$sortfield.
'"/>';
561 if (!empty($sortorder)) {
562 print
'<input type="hidden" name="sortorder" value="'.$sortorder.
'"/>';
565 print_barre_liste($langs->trans(
"Lines"), $page, $_SERVER[
"PHP_SELF"], $urladd, $sortfield, $sortorder,
'', $num, $nbtotalofrecords,
'', 0,
'',
'', $limit);
567 print
'<div class="div-table-responsive-no-min">';
568 print
'<table class="noborder liste centpercent">';
569 print
'<tr class="liste_titre">';
571 print_liste_field_titre((!$salaryBonPl ?
"ThirdParty" :
"Employee"), $_SERVER[
"PHP_SELF"],
"s.nom",
'', $urladd,
'', $sortfield, $sortorder);
572 print_liste_field_titre(
"Amount", $_SERVER[
"PHP_SELF"],
"pl.amount",
"", $urladd,
'class="right"', $sortfield, $sortorder);
578 while ($i < min($num, $limit)) {
579 $obj =
$db->fetch_object($result);
581 print
'<tr class="oddeven">';
585 print
'<a class="valignmiddle" href="'.DOL_URL_ROOT.
'/compta/prelevement/line.php?id='.$obj->rowid.
'&type='.
$object->type.
'&token='.
newToken().
'">';
586 print $ligne->LibStatut($obj->status, 2);
587 print
'<span class="paddingleft">'.$obj->rowid.
'</span>';
591 $thirdparty->fetch($obj->parentid);
592 $name = $thirdparty->getNomUrl(1);
595 $userSalary->fetch($obj->parentid);
596 $name = $userSalary->getNomUrl(-1);
598 print
'<td class="tdoverflowmax150">';
602 print
'<td class="right"><span class="amount">'.price($obj->amount).
"</span></td>\n";
604 print
'<td class="right">';
606 if ($obj->status == 3) {
607 print
'<span class="error">'.$langs->trans(
"StatusRefused").
'</span>';
609 if (
$object->status == BonPrelevement::STATUS_CREDITED) {
610 if ($obj->status == LignePrelevement::STATUS_CREDITED) {
611 if ($user->hasRight(
'prelevement',
'bons',
'credit')) {
613 print
'<a href="line.php?action=rejet&type='.$object->type.
'&id='.$obj->rowid.
'&token='.
newToken().
'">'.$langs->trans(
"StandingOrderReject").
'</a>';
625 $total += $obj->amount;
633 print
'<tr class="liste_total">';
634 print
'<td>'.$langs->trans(
"Total").
'</td>';
635 print
'<td> </td>';
636 print
'<td class="right">';
637 if (empty($offset) && $num <= $limit) {
639 if ($total !=
$object->amount) {
640 print
img_warning($langs->trans(
"TotalAmountOfdirectDebitOrderDiffersFromSumOfLines"));
645 print
'<td> </td>';
$id
Support class for third parties, contacts, members, users or resources.
if(! $sortfield) if(! $sortorder) $object
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
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.
Class to manage bank accounts.
Class to manage withdrawal receipts.
Class to manage withdrawals.
Class to manage third parties objects (customers, suppliers, prospects...)
Class to manage Dolibarr users.
dol_is_file($pathoffile)
Return if path is a file.
recordNotFound($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Displays an error page when a record is not found.
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...
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
print_liste_field_titre($name, $file="", $field="", $begin="", $param="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $tooltip="", $forcenowrapcolumntitle=0)
Show title line of an array.
print_barre_liste($title, $page, $file, $options='', $sortfield='', $sortorder='', $morehtmlcenter='', $num=-1, $totalnboflines='', $picto='generic', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limit=-1, $selectlimitsuffix=0, $hidenavigation=0, $pagenavastextinput=0, $morehtmlrightbeforearrow='')
Print a title with navigation controls for pagination.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2, $allowothertags=array())
Show picto whatever it's its name (generic function)
img_warning($titlealt='default', $moreatt='', $morecss='pictowarning')
Show warning logo.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0, $morecssdiv='')
Show tabs of a record.
price2num($amount, $rounding='', $option=0)
Function that return a number with universal decimal format (decimal separator is '.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
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.
newToken()
Return the value of token currently saved into session with name 'newtoken'.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0, $nodefault=0)
Return value of a param into GET or POST supervariable.
dolGetButtonAction($label, $text='', $actionType='default', $url='', $id='', $userRight=1, $params=array())
Function dolGetButtonAction.
GETPOSTINT($paramname, $method=0, $nodefault=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
dol_clone($srcobject, $native=2)
Create a clone of instance of object (new instance with same value for each properties) With native =...
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs=null, $encodetooutput=false, $decorate=0)
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...
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname from a POST of a form.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
isModEnabled($module)
Is Dolibarr module enabled.
img_edit($titlealt='default', $float=0, $other='')
Show logo edit/modify fiche.
prelevement_prepare_head(BonPrelevement $object)
Prepare array with list of tabs.
restrictedArea(User $user, $features, $object=0, $tableandshare='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid', $isdraft=0, $nodie=0, $mode='')
Check permissions of a user to show a page and an object.