32require
'../../main.inc.php';
33require_once DOL_DOCUMENT_ROOT.
'/compta/prelevement/class/bonprelevement.class.php';
34require_once DOL_DOCUMENT_ROOT.
'/compta/facture/class/facture.class.php';
35require_once DOL_DOCUMENT_ROOT.
'/salaries/class/salary.class.php';
36require_once DOL_DOCUMENT_ROOT.
'/societe/class/societe.class.php';
37require_once DOL_DOCUMENT_ROOT.
'/core/lib/bank.lib.php';
38require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
39require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
40require_once DOL_DOCUMENT_ROOT.
'/core/lib/prelevement.lib.php';
41require_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/account.class.php';
53$langs->loadLangs(array(
'banks',
'categories',
'withdrawals',
'companies',
'bills'));
56$action =
GETPOST(
'action',
'aZ09');
57$massaction =
GETPOST(
'massaction',
'alpha');
58$toselect =
GETPOST(
'toselect',
'array');
59$mode =
GETPOST(
'mode',
'alpha') ?
GETPOST(
'mode',
'alpha') :
'real';
62$sourcetype =
GETPOST(
'sourcetype',
'aZ09');
63$format =
GETPOST(
'format',
'aZ09');
69if (empty($page) || $page == -1) {
72$offset = $limit * $page;
74$hookmanager->initHooks(array(
'directdebitcreatecard',
'globalcard'));
79 $socid = $user->socid;
81if ($type ==
'bank-transfer') {
82 $result =
restrictedArea($user,
'paymentbybanktransfer',
'',
'',
'');
84 $permissiontoread = $user->hasRight(
'paymentbybanktransfer',
'read');
85 $permissiontocreate = $user->hasRight(
'paymentbybanktransfer',
'create');
89 $permissiontoread = $user->hasRight(
'prelevement',
'bons',
'lire');
90 $permissiontocreate = $user->hasRight(
'prelevement',
'bons',
'creer');
103if (
GETPOST(
'cancel',
'alpha')) {
107$parameters = array(
'mode' => $mode,
'format' => $format,
'limit' => $limit,
'page' => $page,
'offset' => $offset);
108$reshook = $hookmanager->executeHooks(
'doActions', $parameters,
$object, $action);
113if (empty($reshook)) {
114 if ($action ==
'create' && $permissiontocreate) {
115 $default_account = ($type ==
'bank-transfer' ?
'PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT' :
'PRELEVEMENT_ID_BANKACCOUNT');
121 require_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/account.class.php';
129 if (empty($bank->ics) && $type !==
'bank-transfer') {
130 $errormessage = str_replace(
'{url}', $bank->getNomUrl(1,
'',
'', -1, 1), $langs->trans(
"ErrorICSmissing",
'{url}'));
141 $result = $bprev->create(
getDolGlobalString(
'PRELEVEMENT_CODE_BANQUE'),
getDolGlobalString(
'PRELEVEMENT_CODE_GUICHET'), $mode, $format, $executiondate, 0, $type, 0, 0, $sourcetype);
145 if ($bprev->error || !empty($bprev->errors)) {
148 $langs->load(
"errors");
149 setEventMessages($langs->trans(
"ErrorsOnXLines", count($bprev->invoice_in_error)),
null,
'warnings');
152 if (!empty($bprev->invoice_in_error)) {
153 foreach ($bprev->invoice_in_error as $key => $val) {
154 $mesg .=
'<span class="warning">'.$val.
"</span><br>\n";
157 } elseif ($result == 0 || !empty($bprev->invoice_in_error)) {
161 if ($type !=
'bank-transfer') {
162 $mesg = $langs->trans(
"NoInvoiceCouldBeWithdrawed", $format);
164 if ($type ==
'bank-transfer' && $sourcetype !=
'salary') {
165 $mesg = $langs->trans(
"NoInvoiceCouldBeWithdrawedSupplier", $format);
167 if ($type ==
'bank-transfer' && $sourcetype ==
'salary') {
168 $mesg = $langs->trans(
"NoSalariesCouldBeWithdrawed", $format);
173 if (!empty($bprev->invoice_in_error)) {
174 $mesg .=
'<br>'.
"\n";
175 foreach ($bprev->invoice_in_error as $key => $val) {
176 $mesg .=
'<span class="warning">'.$val.
"</span><br>\n";
180 if ($type !=
'bank-transfer') {
181 $texttoshow = $langs->trans(
"DirectDebitOrderCreated",
'{s}');
182 $texttoshow = str_replace(
'{s}', $bprev->getNomUrl(1), $texttoshow);
185 $texttoshow = $langs->trans(
"CreditTransferOrderCreated",
'{s}');
186 $texttoshow = str_replace(
'{s}', $bprev->getNomUrl(1), $texttoshow);
190 header(
"Location: ".DOL_URL_ROOT.
'/compta/prelevement/card.php?id='.urlencode((
string) ($bprev->id)).
'&type='.urlencode((
string) ($type)));
196 $objectclass =
"BonPrelevement";
197 if ($type ==
'bank-transfer') {
198 $uploaddir =
$conf->paymentbybanktransfer->dir_output;
200 $uploaddir =
$conf->prelevement->dir_output;
202 include DOL_DOCUMENT_ROOT.
'/core/actions_massactions.inc.php';
210$form =
new Form($db);
212$thirdpartystatic =
new Societe($db);
213if ($type !=
'bank-transfer') {
214 $invoicestatic =
new Facture($db);
219$arrayofselected = is_array($toselect) ? $toselect : array();
221$arrayofmassactions = array(
223if (
GETPOSTINT(
'nomassaction') || in_array($massaction, array(
'presend',
'predelete'))) {
224 $arrayofmassactions = array();
226$massactionbutton = $form->selectMassAction(
'', $arrayofmassactions);
229 $langs->load(
"errors");
230 $modulenametoshow =
"Withdraw";
231 if ($type ==
'bank-transfer') {
232 $modulenametoshow =
"PaymentByBankTransfer";
234 setEventMessages($langs->trans(
"ErrorModuleSetupNotComplete", $langs->transnoentitiesnoconv($modulenametoshow)),
null,
'errors');
238$title = $langs->trans(
"NewStandingOrder");
239if ($type ==
'bank-transfer') {
240 $title = $langs->trans(
"NewPaymentByBankTransfer");
249 print
dol_get_fiche_head($head, (!GETPOSTISSET(
'sourcetype') ?
'invoice' :
'salary'), $langs->trans(
"Invoices"), -1, $bprev->picto);
256if ($sourcetype !=
'salary') {
257 $nb = $bprev->nbOfInvoiceToPay($type);
258 $pricetowithdraw = $bprev->SommeAPrelever($type);
260 $nb = $bprev->nbOfInvoiceToPay($type,
'salary');
261 $pricetowithdraw = $bprev->SommeAPrelever($type,
'salary');
267print
'<div class="fichecenter">';
269print
'<table class="border centpercent tableforfield">';
271$labeltoshow = $langs->trans(
"NbOfInvoiceToWithdraw");
272if ($type ==
'bank-transfer') {
273 $labeltoshow = $langs->trans(
"NbOfInvoiceToPayByBankTransfer");
275if ($sourcetype ==
'salary') {
276 $labeltoshow = $langs->trans(
"NbOfInvoiceToPayByBankTransferForSalaries");
279print
'<tr><td class="titlefield">'.$labeltoshow.
'</td>';
280print
'<td class="nowraponall">';
284print
'<tr><td>'.$langs->trans(
"AmountTotal").
'</td>';
285print
'<td class="amount nowraponall">';
286print
price($pricetowithdraw, 0, $langs, 1, -1, -1,
$conf->currency);
293print
'<div class="clearboth"></div>';
297print
'<div class="tabsAction">'.
"\n";
299print
'<form action="'.$_SERVER[
'PHP_SELF'].
'" method="POST">';
300print
'<input type="hidden" name="action" value="create">';
301print
'<input type="hidden" name="token" value="'.newToken().
'">';
302print
'<input type="hidden" name="type" value="'.$type.
'">';
303print
'<input type="hidden" name="sourcetype" value="'.$sourcetype.
'">';
306 if ($pricetowithdraw) {
307 $title = $langs->trans(
'BankToReceiveWithdraw').
': ';
308 if ($type ==
'bank-transfer') {
309 $title = $langs->trans(
'BankToPayCreditTransfer').
': ';
311 print
'<span class="hideonsmartphone">'.$title.
'</span>';
312 print
img_picto(
'',
'bank_account',
'class="pictofixedwidth"');
314 $default_account = ($type ==
'bank-transfer' ?
'PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT' :
'PRELEVEMENT_ID_BANKACCOUNT');
316 print $form->select_comptes(
getDolGlobalInt($default_account),
'id_bankaccount', 0,
"courant=1", 0,
'', 0,
'widthcentpercentminusx maxwidth300', 1);
317 print
' ';
319 if (empty($executiondate)) {
321 if ($type !=
'bank-transfer') {
330 print $langs->trans(
'ExecutionDate').
' ';
331 $datere = $executiondate;
332 print $form->selectDate($datere,
're');
335 if ($mysoc->isInEEC()) {
336 $title = $langs->trans(
"CreateForSepa");
337 if ($type ==
'bank-transfer') {
338 $title = $langs->trans(
"CreateSepaFileForPaymentByBankTransfer");
341 if ($type !=
'bank-transfer') {
342 print
'<select name="format">';
343 print
'<option value="FRST"'.($format ==
'FRST' ?
' selected="selected"' :
'').
'>'.$langs->trans(
'SEPAFRST').
'</option>';
344 print
'<option value="RCUR"'.($format ==
'RCUR' ?
' selected="selected"' :
'').
'>'.$langs->trans(
'SEPARCUR').
'</option>';
347 print
'<input type="submit" class="butAction margintoponly marginbottomonly" value="'.$title.
'"/>';
349 $title = $langs->trans(
"CreateAll");
350 if ($type ==
'bank-transfer') {
351 $title = $langs->trans(
"CreateFileForPaymentByBankTransfer");
353 print
'<input type="hidden" name="format" value="ALL">'.
"\n";
354 print
'<input type="submit" class="butAction margintoponly marginbottomonly" value="'.$title.
'">'.
"\n";
357 if ($mysoc->isInEEC()) {
358 $title = $langs->trans(
"CreateForSepaFRST");
359 if ($type ==
'bank-transfer') {
360 $title = $langs->trans(
"CreateSepaFileForPaymentByBankTransfer");
362 print
'<a class="butActionRefused classfortooltip margintoponly marginbottomonly" href="#" title="'.$langs->trans(
"AmountMustBePositive").
'">'.$title.
"</a>\n";
364 if ($type !=
'bank-transfer') {
365 $title = $langs->trans(
"CreateForSepaRCUR");
366 print
'<a class="butActionRefused classfortooltip margintoponly marginbottomonly" href="#" title="'.$langs->trans(
"AmountMustBePositive").
'">'.$title.
"</a>\n";
369 $title = $langs->trans(
"CreateAll");
370 if ($type ==
'bank-transfer') {
371 $title = $langs->trans(
"CreateFileForPaymentByBankTransfer");
373 print
'<a class="butActionRefused classfortooltip margintoponly marginbottomonly" href="#">'.$title.
"</a>\n";
377 $titlefortab = $langs->transnoentitiesnoconv(
"StandingOrders");
378 $title = $langs->trans(
"CreateAll");
379 if ($type ==
'bank-transfer') {
380 $titlefortab = $langs->transnoentitiesnoconv(
"PaymentByBankTransfers");
381 $title = $langs->trans(
"CreateFileForPaymentByBankTransfer");
383 print
'<a class="butActionRefused classfortooltip margintoponly marginbottomonly" href="#" title="'.dol_escape_htmltag($langs->transnoentitiesnoconv(
"NoInvoiceToWithdraw", $titlefortab, $titlefortab)).
'">';
404if ($sourcetype !=
'salary') {
405 $sql =
"SELECT f.ref, f.rowid, f.total_ttc, s.nom as name, s.rowid as socid,";
406 if ($type ==
'bank-transfer') {
407 $sql .=
" f.ref_supplier,";
409 $sql .=
" pd.rowid as request_row_id, pd.date_demande, pd.amount, pd.fk_societe_rib as soc_rib_id";
410 if ($type ==
'bank-transfer') {
411 $sql .=
" FROM ".MAIN_DB_PREFIX.
"facture_fourn as f,";
413 $sql .=
" FROM ".MAIN_DB_PREFIX.
"facture as f,";
415 $sql .=
" ".MAIN_DB_PREFIX.
"societe as s,";
416 $sql .=
" ".MAIN_DB_PREFIX.
"prelevement_demande as pd";
417 $sql .=
" WHERE s.rowid = f.fk_soc";
418 $sql .=
" AND f.entity IN (".getEntity(
'invoice').
")";
420 $sql .=
" AND f.fk_statut = ".Facture::STATUS_VALIDATED;
423 $sql .=
" AND f.total_ttc > 0";
424 $sql .=
" AND pd.traite = 0";
425 $sql .=
" AND pd.ext_payment_id IS NULL";
426 if ($type ==
'bank-transfer') {
427 $sql .=
" AND pd.fk_facture_fourn = f.rowid";
429 $sql .=
" AND pd.fk_facture = f.rowid";
432 $sql .=
" AND f.fk_soc = ".((int) $socid);
435 $sql =
"SELECT s.ref, s.rowid, s.amount, CONCAT(u.lastname, ' ', u.firstname) as name, u.rowid as uid,";
436 $sql .=
" pd.rowid as request_row_id, pd.date_demande, pd.amount, pd.fk_societe_rib as soc_rib_id";
437 $sql .=
" FROM ".MAIN_DB_PREFIX.
"salary as s,";
438 $sql .=
" ".MAIN_DB_PREFIX.
"user as u,";
439 $sql .=
" ".MAIN_DB_PREFIX.
"prelevement_demande as pd";
440 $sql .=
" WHERE s.fk_user = u.rowid";
441 $sql .=
" AND s.entity IN (".getEntity(
'salary').
")";
445 $sql .=
" AND s.amount > 0";
446 $sql .=
" AND pd.traite = 0";
447 $sql .=
" AND pd.ext_payment_id IS NULL";
448 $sql .=
" AND s.rowid = pd.fk_salary AND s.paye = ".Salary::STATUS_UNPAID;
449 $sql .=
" AND pd.traite = 0";
452$nbtotalofrecords =
'';
454 $result = $db->query($sql);
455 $nbtotalofrecords = $db->num_rows($result);
456 if (($page * $limit) > $nbtotalofrecords) {
463$sql .= $db->plimit($limit + 1, $offset);
465$resql = $db->query($sql);
467 $num = $db->num_rows($resql);
472 $param .=
'&type=' . urlencode((
string) $type);
474 if ($limit > 0 && $limit !=
$conf->liste_limit) {
475 $param .=
'&limit='.((int) $limit);
478 $param .=
'&socid='.urlencode((
string) ($socid));
481 $param .=
"&option=".urlencode($option);
484 print
'<form method="POST" id="searchFormList" action="'.$_SERVER[
"PHP_SELF"].
'">';
485 print
'<input type="hidden" name="token" value="'.newToken().
'">';
486 print
'<input type="hidden" name="page" value="'.$page.
'">';
487 if (!empty($limit)) {
488 print
'<input type="hidden" name="limit" value="'.$limit.
'"/>';
491 print
'<input type="hidden" name="type" value="'.$type.
'">';
493 $title = $langs->trans(
"InvoiceWaitingWithdraw");
495 if ($type ==
'bank-transfer') {
496 if ($sourcetype !=
'salary') {
497 $title = $langs->trans(
"InvoiceWaitingPaymentByBankTransfer");
499 $title = $langs->trans(
"SalaryWaitingWithdraw");
503 print_barre_liste($title, $page, $_SERVER[
'PHP_SELF'], $param,
'',
'', $massactionbutton, $num, $nbtotalofrecords, $picto, 0,
'',
'', $limit);
506 $tradinvoice =
"Invoice";
507 if ($type ==
'bank-transfer') {
508 if ($sourcetype !=
'salary') {
509 $tradinvoice =
"SupplierInvoice";
511 $tradinvoice =
"RefSalary";
515 print
'<div class="div-table-responsive-no-min">';
516 print
'<table class="noborder centpercent">';
517 print
'<tr class="liste_titre">';
520 if ($massactionbutton || $massaction) {
521 print
'<td align="center">'.$form->showCheckAddButtons(
'checkforselect', 1).
'</td>';
525 print
'<td>'.$langs->trans($tradinvoice).
'</td>';
527 if ($type ==
'bank-transfer' && $sourcetype !=
'salary') {
528 print
'<td>'.$langs->trans(
"RefSupplier").
'</td>';
531 if ($sourcetype !=
'salary') {
532 print
'<td>'.$langs->trans(
"ThirdParty").
'</td>';
534 print
'<td>'.$langs->trans(
"Employee").
'</td>';
537 print
'<td>'.$langs->trans(
"RIB").
'</td>';
539 if (empty($type) || $type ==
'direc-debit') {
540 print
'<td>'.$langs->trans(
"RUM").
'</td>';
542 print
'<td class="right">';
543 if ($sourcetype ==
'salary') {
544 print $langs->trans(
"Amount");
546 print $langs->trans(
"AmountTTC");
549 print
'<td class="right">'.$langs->trans(
"PendingSince").
'</td>';
552 if ($massactionbutton || $massaction) {
553 print
'<td align="center">'.$form->showCheckAddButtons(
'checkforselect', 1).
'</td>';
559 if ($sourcetype !=
'salary') {
560 require_once DOL_DOCUMENT_ROOT.
'/societe/class/companybankaccount.class.php';
562 require_once DOL_DOCUMENT_ROOT.
'/user/class/userbankaccount.class.php';
563 require_once DOL_DOCUMENT_ROOT.
'/salaries/class/salary.class.php';
566 while ($i < $num && $i < $limit) {
567 $obj = $db->fetch_object($resql);
568 if ($sourcetype !=
'salary') {
570 $bac->fetch($obj->soc_rib_id ?? 0,
'', $obj->socid);
572 $invoicestatic->id = $obj->rowid;
573 $invoicestatic->ref = $obj->ref;
574 if ($type ==
'bank-transfer') {
575 $invoicestatic->ref_supplier = $obj->ref_supplier;
580 $bac->fetch($obj->soc_rib_id ?? 0,
'', $obj->uid);
582 $salary =
new Salary($db);
583 $salary->fetch($obj->rowid);
585 print
'<tr class="oddeven">';
589 if ($massactionbutton || $massaction) {
590 print
'<td class="nowrap center">';
592 if (in_array($obj->request_row_id, $arrayofselected)) {
595 print
'<input id="cb'.$obj->request_row_id.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->request_row_id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
601 print
'<td class="tdoverflowmax150">';
602 if ($sourcetype !=
'salary' || $salary ===
null) {
603 print $invoicestatic->getNomUrl(1,
'withdraw');
605 print $salary->getNomUrl(1,
'withdraw');
609 if ($type ==
'bank-transfer' && $sourcetype !=
'salary') {
610 print
'<td class="tdoverflowmax100" title="'.dol_escape_htmltag($invoicestatic->ref_supplier).
'">';
616 if ($sourcetype !=
'salary') {
617 print
'<td class="tdoverflowmax100">';
618 $thirdpartystatic->fetch($obj->socid);
619 print $thirdpartystatic->getNomUrl(1,
'ban');
622 print
'<td class="tdoverflowmax100">';
623 $user->fetch($obj->uid);
624 print $user->getNomUrl(-1);
631 if (!empty($bac->iban) || !empty($bac->bic)) {
632 print $bac->iban.(($bac->iban && $bac->bic) ?
' / ' :
'').$bac->bic;
633 if ($bac->verif() <= 0) {
634 print
img_warning(
'Error on default bank number for IBAN : '.$langs->trans($bac->error));
637 print
img_warning($langs->trans(
"IBANNotDefined"));
640 $langs->load(
"banks");
641 print
img_warning($langs->trans(
"NoBankAccountDefined"));
646 if (empty($type) || $type ==
'direct-debit') {
648 if (!empty($bac->rum)) {
651 $rumToShow = $thirdpartystatic->display_rib(
'rum');
654 $format = $thirdpartystatic->display_rib(
'format');
655 if ($type !=
'bank-transfer') {
657 print
' ('.$format.
')';
661 $langs->load(
"banks");
662 print
img_warning($langs->trans(
"NoBankAccountDefined"));
669 print
'<td class="right amount">';
670 print
price($obj->amount, 0, $langs, 0, 0, -1,
$conf->currency);
673 print
'<td class="right">';
678 if ($massactionbutton || $massaction) {
679 print
'<td class="nowrap center">';
681 if (in_array($obj->request_row_id, $arrayofselected)) {
684 print
'<input id="cb'.$obj->request_row_id.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->request_row_id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
693 if ($type ==
'bank-transfer') {
696 if ($massactionbutton || $massaction) {
699 print
'<tr class="oddeven"><td colspan="'.$colspan.
'"><span class="opacitymedium">'.$langs->trans(
"None").
'</span></td></tr>';
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
dolibarr_set_const($db, $name, $value, $type='chaine', $visible=0, $note='', $entity=1)
Insert a parameter (key,value) into database (delete old key then insert it again).
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 bank accounts description of third parties.
Class to manage suppliers invoices.
Class to manage invoices.
Class to manage salary payments.
Class to manage third parties objects (customers, suppliers, prospects...)
Class to manage bank accounts description of users.
dol_time_plus_duree($time, $duration_value, $duration_unit, $ruleforendofmonth=0)
Add a delay to a date.
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...
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
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.
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0)
Show tabs of a record.
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.
dol_now($mode='auto')
Return date for now.
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).
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
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.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0, $cleanalsojavascript=0)
Returns text escaped for inclusion in HTML alt or title or value tags, or into values of HTML input f...
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
bon_prelevement_prepare_head(BonPrelevement $object, $nbOfInvoices, $nbOfSalaryInvoice)
Return array head with list of tabs to view object information.
prelevement_check_config($type='direct-debit')
Check need data to create standigns orders receipt file.
restrictedArea(User $user, $features, $object=0, $tableandshare='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid', $isdraft=0, $mode=0)
Check permissions of a user to show a page and an object.