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';
44$langs->loadLangs(array(
'banks',
'categories',
'withdrawals',
'companies',
'bills'));
47$action =
GETPOST(
'action',
'aZ09');
48$massaction =
GETPOST(
'massaction',
'alpha');
49$toselect =
GETPOST(
'toselect',
'array');
50$mode =
GETPOST(
'mode',
'alpha') ?
GETPOST(
'mode',
'alpha') :
'real';
53$sourcetype =
GETPOST(
'sourcetype',
'aZ09');
54$format =
GETPOST(
'format',
'aZ09');
60if (empty($page) || $page == -1) {
63$offset = $limit * $page;
65$hookmanager->initHooks(array(
'directdebitcreatecard',
'globalcard'));
70 $socid = $user->socid;
72if ($type ==
'bank-transfer') {
73 $result =
restrictedArea($user,
'paymentbybanktransfer',
'',
'',
'');
75 $permissiontoread = $user->hasRight(
'paymentbybanktransfer',
'read');
76 $permissiontocreate = $user->hasRight(
'paymentbybanktransfer',
'create');
80 $permissiontoread = $user->hasRight(
'prelevement',
'bons',
'lire');
81 $permissiontocreate = $user->hasRight(
'prelevement',
'bons',
'creer');
94if (
GETPOST(
'cancel',
'alpha')) {
98$parameters = array(
'mode' => $mode,
'format' => $format,
'limit' => $limit,
'page' => $page,
'offset' => $offset);
99$reshook = $hookmanager->executeHooks(
'doActions', $parameters,
$object, $action);
104if (empty($reshook)) {
105 if ($action ==
'create' && $permissiontocreate) {
106 $default_account = ($type ==
'bank-transfer' ?
'PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT' :
'PRELEVEMENT_ID_BANKACCOUNT');
110 $res =
dolibarr_set_const($db, $default_account, $id_bankaccount,
'chaine', 0,
'', $conf->entity);
112 require_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/account.class.php';
120 if (empty($bank->ics) && $type !==
'bank-transfer') {
121 $errormessage = str_replace(
'{url}', $bank->getNomUrl(1,
'',
'', -1, 1), $langs->trans(
"ErrorICSmissing",
'{url}'));
132 $result = $bprev->create(
getDolGlobalString(
'PRELEVEMENT_CODE_BANQUE'),
getDolGlobalString(
'PRELEVEMENT_CODE_GUICHET'), $mode, $format, $executiondate, 0, $type, 0, 0, $sourcetype);
136 if ($bprev->error || !empty($bprev->errors)) {
139 $langs->load(
"errors");
140 setEventMessages($langs->trans(
"ErrorsOnXLines", count($bprev->invoice_in_error)),
null,
'warnings');
143 if (!empty($bprev->invoice_in_error)) {
144 foreach ($bprev->invoice_in_error as $key => $val) {
145 $mesg .=
'<span class="warning">'.$val.
"</span><br>\n";
148 } elseif ($result == 0 || !empty($bprev->invoice_in_error)) {
152 if ($type !=
'bank-transfer') {
153 $mesg = $langs->trans(
"NoInvoiceCouldBeWithdrawed", $format);
155 if ($type ==
'bank-transfer' && $sourcetype !=
'salary') {
156 $mesg = $langs->trans(
"NoInvoiceCouldBeWithdrawedSupplier", $format);
158 if ($type ==
'bank-transfer' && $sourcetype ==
'salary') {
159 $mesg = $langs->trans(
"NoSalariesCouldBeWithdrawed", $format);
164 if (!empty($bprev->invoice_in_error)) {
165 $mesg .=
'<br>'.
"\n";
166 foreach ($bprev->invoice_in_error as $key => $val) {
167 $mesg .=
'<span class="warning">'.$val.
"</span><br>\n";
171 if ($type !=
'bank-transfer') {
172 $texttoshow = $langs->trans(
"DirectDebitOrderCreated",
'{s}');
173 $texttoshow = str_replace(
'{s}', $bprev->getNomUrl(1), $texttoshow);
176 $texttoshow = $langs->trans(
"CreditTransferOrderCreated",
'{s}');
177 $texttoshow = str_replace(
'{s}', $bprev->getNomUrl(1), $texttoshow);
181 header(
"Location: ".DOL_URL_ROOT.
'/compta/prelevement/card.php?id='.urlencode((
string) ($bprev->id)).
'&type='.urlencode((
string) ($type)));
187 $objectclass =
"BonPrelevement";
188 if ($type ==
'bank-transfer') {
189 $uploaddir = $conf->paymentbybanktransfer->dir_output;
191 $uploaddir = $conf->prelevement->dir_output;
193 include DOL_DOCUMENT_ROOT.
'/core/actions_massactions.inc.php';
201$form =
new Form($db);
203$thirdpartystatic =
new Societe($db);
204if ($type !=
'bank-transfer') {
205 $invoicestatic =
new Facture($db);
210$arrayofselected = is_array($toselect) ? $toselect : array();
212$arrayofmassactions = array(
214if (
GETPOSTINT(
'nomassaction') || in_array($massaction, array(
'presend',
'predelete'))) {
215 $arrayofmassactions = array();
217$massactionbutton = $form->selectMassAction(
'', $arrayofmassactions);
220 $langs->load(
"errors");
221 $modulenametoshow =
"Withdraw";
222 if ($type ==
'bank-transfer') {
223 $modulenametoshow =
"PaymentByBankTransfer";
225 setEventMessages($langs->trans(
"ErrorModuleSetupNotComplete", $langs->transnoentitiesnoconv($modulenametoshow)),
null,
'errors');
229$title = $langs->trans(
"NewStandingOrder");
230if ($type ==
'bank-transfer') {
231 $title = $langs->trans(
"NewPaymentByBankTransfer");
240 print
dol_get_fiche_head($head, (!GETPOSTISSET(
'sourcetype') ?
'invoice' :
'salary'), $langs->trans(
"Invoices"), -1, $bprev->picto);
247if ($sourcetype !=
'salary') {
248 $nb = $bprev->nbOfInvoiceToPay($type);
249 $pricetowithdraw = $bprev->SommeAPrelever($type);
251 $nb = $bprev->nbOfInvoiceToPay($type,
'salary');
252 $pricetowithdraw = $bprev->SommeAPrelever($type,
'salary');
257print
'<table class="border centpercent tableforfield">';
259$labeltoshow = $langs->trans(
"NbOfInvoiceToWithdraw");
260if ($type ==
'bank-transfer') {
261 $labeltoshow = $langs->trans(
"NbOfInvoiceToPayByBankTransfer");
263if ($sourcetype ==
'salary') {
264 $labeltoshow = $langs->trans(
"NbOfInvoiceToPayByBankTransferForSalaries");
267print
'<tr><td class="titlefield">'.$labeltoshow.
'</td>';
268print
'<td class="nowraponall">';
272print
'<tr><td>'.$langs->trans(
"AmountTotal").
'</td>';
273print
'<td class="amount nowraponall">';
274print
price($pricetowithdraw, 0, $langs, 1, -1, -1, $conf->currency);
281print
'<div class="tabsAction">'.
"\n";
283print
'<form action="'.$_SERVER[
'PHP_SELF'].
'" method="POST">';
284print
'<input type="hidden" name="action" value="create">';
285print
'<input type="hidden" name="token" value="'.newToken().
'">';
286print
'<input type="hidden" name="type" value="'.$type.
'">';
287print
'<input type="hidden" name="sourcetype" value="'.$sourcetype.
'">';
290 if ($pricetowithdraw) {
291 $title = $langs->trans(
'BankToReceiveWithdraw').
': ';
292 if ($type ==
'bank-transfer') {
293 $title = $langs->trans(
'BankToPayCreditTransfer').
': ';
295 print
'<span class="hideonsmartphone">'.$title.
'</span>';
296 print
img_picto(
'',
'bank_account',
'class="pictofixedwidth"');
298 $default_account = ($type ==
'bank-transfer' ?
'PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT' :
'PRELEVEMENT_ID_BANKACCOUNT');
300 print $form->select_comptes(
getDolGlobalInt($default_account),
'id_bankaccount', 0,
"courant=1", 0,
'', 0,
'widthcentpercentminusx maxwidth300', 1);
301 print
' ';
303 if (empty($executiondate)) {
305 if ($type !=
'bank-transfer') {
314 print $langs->trans(
'ExecutionDate').
' ';
315 $datere = $executiondate;
316 print $form->selectDate($datere,
're');
319 if ($mysoc->isInEEC()) {
320 $title = $langs->trans(
"CreateForSepa");
321 if ($type ==
'bank-transfer') {
322 $title = $langs->trans(
"CreateSepaFileForPaymentByBankTransfer");
325 if ($type !=
'bank-transfer') {
326 print
'<select name="format">';
327 print
'<option value="FRST"'.($format ==
'FRST' ?
' selected="selected"' :
'').
'>'.$langs->trans(
'SEPAFRST').
'</option>';
328 print
'<option value="RCUR"'.($format ==
'RCUR' ?
' selected="selected"' :
'').
'>'.$langs->trans(
'SEPARCUR').
'</option>';
331 print
'<input type="submit" class="butAction margintoponly marginbottomonly" value="'.$title.
'"/>';
333 $title = $langs->trans(
"CreateAll");
334 if ($type ==
'bank-transfer') {
335 $title = $langs->trans(
"CreateFileForPaymentByBankTransfer");
337 print
'<input type="hidden" name="format" value="ALL">'.
"\n";
338 print
'<input type="submit" class="butAction margintoponly marginbottomonly" value="'.$title.
'">'.
"\n";
341 if ($mysoc->isInEEC()) {
342 $title = $langs->trans(
"CreateForSepaFRST");
343 if ($type ==
'bank-transfer') {
344 $title = $langs->trans(
"CreateSepaFileForPaymentByBankTransfer");
346 print
'<a class="butActionRefused classfortooltip margintoponly marginbottomonly" href="#" title="'.$langs->trans(
"AmountMustBePositive").
'">'.$title.
"</a>\n";
348 if ($type !=
'bank-transfer') {
349 $title = $langs->trans(
"CreateForSepaRCUR");
350 print
'<a class="butActionRefused classfortooltip margintoponly marginbottomonly" href="#" title="'.$langs->trans(
"AmountMustBePositive").
'">'.$title.
"</a>\n";
353 $title = $langs->trans(
"CreateAll");
354 if ($type ==
'bank-transfer') {
355 $title = $langs->trans(
"CreateFileForPaymentByBankTransfer");
357 print
'<a class="butActionRefused classfortooltip margintoponly marginbottomonly" href="#">'.$title.
"</a>\n";
361 $titlefortab = $langs->transnoentitiesnoconv(
"StandingOrders");
362 $title = $langs->trans(
"CreateAll");
363 if ($type ==
'bank-transfer') {
364 $titlefortab = $langs->transnoentitiesnoconv(
"PaymentByBankTransfers");
365 $title = $langs->trans(
"CreateFileForPaymentByBankTransfer");
367 print
'<a class="butActionRefused classfortooltip margintoponly marginbottomonly" href="#" title="'.dol_escape_htmltag($langs->transnoentitiesnoconv(
"NoInvoiceToWithdraw", $titlefortab, $titlefortab)).
'">';
388if ($sourcetype !=
'salary') {
389 $sql =
"SELECT f.ref, f.rowid, f.total_ttc, s.nom as name, s.rowid as socid,";
390 if ($type ==
'bank-transfer') {
391 $sql .=
" f.ref_supplier,";
393 $sql .=
" pd.rowid as request_row_id, pd.date_demande, pd.amount, pd.fk_societe_rib as soc_rib_id";
394 if ($type ==
'bank-transfer') {
395 $sql .=
" FROM ".MAIN_DB_PREFIX.
"facture_fourn as f,";
397 $sql .=
" FROM ".MAIN_DB_PREFIX.
"facture as f,";
399 $sql .=
" ".MAIN_DB_PREFIX.
"societe as s,";
400 $sql .=
" ".MAIN_DB_PREFIX.
"prelevement_demande as pd";
401 $sql .=
" WHERE s.rowid = f.fk_soc";
402 $sql .=
" AND f.entity IN (".getEntity(
'invoice').
")";
404 $sql .=
" AND f.fk_statut = ".Facture::STATUS_VALIDATED;
407 $sql .=
" AND f.total_ttc > 0";
408 $sql .=
" AND pd.traite = 0";
409 $sql .=
" AND pd.ext_payment_id IS NULL";
410 if ($type ==
'bank-transfer') {
411 $sql .=
" AND pd.fk_facture_fourn = f.rowid";
413 $sql .=
" AND pd.fk_facture = f.rowid";
416 $sql .=
" AND f.fk_soc = ".((int) $socid);
419 $sql =
"SELECT s.ref, s.rowid, s.amount, CONCAT(u.lastname, ' ', u.firstname) as name, u.rowid as uid,";
420 $sql .=
" pd.rowid as request_row_id, pd.date_demande, pd.amount, pd.fk_societe_rib as soc_rib_id";
421 $sql .=
" FROM ".MAIN_DB_PREFIX.
"salary as s,";
422 $sql .=
" ".MAIN_DB_PREFIX.
"user as u,";
423 $sql .=
" ".MAIN_DB_PREFIX.
"prelevement_demande as pd";
424 $sql .=
" WHERE s.fk_user = u.rowid";
425 $sql .=
" AND s.entity IN (".getEntity(
'salary').
")";
429 $sql .=
" AND s.amount > 0";
430 $sql .=
" AND pd.traite = 0";
431 $sql .=
" AND pd.ext_payment_id IS NULL";
432 $sql .=
" AND s.rowid = pd.fk_salary AND s.paye = ".Salary::STATUS_UNPAID;
433 $sql .=
" AND pd.traite = 0";
436$nbtotalofrecords =
'';
438 $result = $db->query($sql);
439 $nbtotalofrecords = $db->num_rows($result);
440 if (($page * $limit) > $nbtotalofrecords) {
447$sql .= $db->plimit($limit + 1, $offset);
449$resql = $db->query($sql);
451 $num = $db->num_rows($resql);
456 $param .=
'&type=' . urlencode((
string) $type);
458 if ($limit > 0 && $limit != $conf->liste_limit) {
459 $param .=
'&limit='.((int) $limit);
462 $param .=
'&socid='.urlencode((
string) ($socid));
465 $param .=
"&option=".urlencode($option);
468 print
'<form method="POST" id="searchFormList" action="'.$_SERVER[
"PHP_SELF"].
'">';
469 print
'<input type="hidden" name="token" value="'.newToken().
'">';
470 print
'<input type="hidden" name="page" value="'.$page.
'">';
471 if (!empty($limit)) {
472 print
'<input type="hidden" name="limit" value="'.$limit.
'"/>';
475 print
'<input type="hidden" name="type" value="'.$type.
'">';
477 $title = $langs->trans(
"InvoiceWaitingWithdraw");
479 if ($type ==
'bank-transfer') {
480 if ($sourcetype !=
'salary') {
481 $title = $langs->trans(
"InvoiceWaitingPaymentByBankTransfer");
483 $title = $langs->trans(
"SalaryWaitingWithdraw");
487 print_barre_liste($title, $page, $_SERVER[
'PHP_SELF'], $param,
'',
'', $massactionbutton, $num, $nbtotalofrecords, $picto, 0,
'',
'', $limit);
490 $tradinvoice =
"Invoice";
491 if ($type ==
'bank-transfer') {
492 if ($sourcetype !=
'salary') {
493 $tradinvoice =
"SupplierInvoice";
495 $tradinvoice =
"RefSalary";
499 print
'<div class="div-table-responsive-no-min">';
500 print
'<table class="noborder centpercent">';
501 print
'<tr class="liste_titre">';
504 if ($massactionbutton || $massaction) {
505 print
'<td align="center">'.$form->showCheckAddButtons(
'checkforselect', 1).
'</td>';
509 print
'<td>'.$langs->trans($tradinvoice).
'</td>';
511 if ($type ==
'bank-transfer' && $sourcetype !=
'salary') {
512 print
'<td>'.$langs->trans(
"RefSupplier").
'</td>';
515 if ($sourcetype !=
'salary') {
516 print
'<td>'.$langs->trans(
"ThirdParty").
'</td>';
518 print
'<td>'.$langs->trans(
"Employee").
'</td>';
521 print
'<td>'.$langs->trans(
"RIB").
'</td>';
523 if (empty($type) || $type ==
'direc-debit') {
524 print
'<td>'.$langs->trans(
"RUM").
'</td>';
526 print
'<td class="right">';
527 if ($sourcetype ==
'salary') {
528 print $langs->trans(
"Amount");
530 print $langs->trans(
"AmountTTC");
533 print
'<td class="right">'.$langs->trans(
"DateRequest").
'</td>';
536 if ($massactionbutton || $massaction) {
537 print
'<td align="center">'.$form->showCheckAddButtons(
'checkforselect', 1).
'</td>';
543 if ($sourcetype !=
'salary') {
544 require_once DOL_DOCUMENT_ROOT.
'/societe/class/companybankaccount.class.php';
546 require_once DOL_DOCUMENT_ROOT.
'/user/class/userbankaccount.class.php';
547 require_once DOL_DOCUMENT_ROOT.
'/salaries/class/salary.class.php';
550 while ($i < $num && $i < $limit) {
551 $obj = $db->fetch_object($resql);
552 if ($sourcetype !=
'salary') {
554 $bac->fetch($obj->soc_rib_id ?? 0,
'', $obj->socid);
556 $invoicestatic->id = $obj->rowid;
557 $invoicestatic->ref = $obj->ref;
558 if ($type ==
'bank-transfer') {
559 $invoicestatic->ref_supplier = $obj->ref_supplier;
564 $bac->fetch($obj->soc_rib_id ?? 0,
'', $obj->uid);
566 $salary =
new Salary($db);
567 $salary->fetch($obj->rowid);
569 print
'<tr class="oddeven">';
573 if ($massactionbutton || $massaction) {
574 print
'<td class="nowrap center">';
576 if (in_array($obj->request_row_id, $arrayofselected)) {
579 print
'<input id="cb'.$obj->request_row_id.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->request_row_id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
585 print
'<td class="tdoverflowmax150">';
586 if ($sourcetype !=
'salary' || $salary ===
null) {
587 print $invoicestatic->getNomUrl(1,
'withdraw');
589 print $salary->getNomUrl(1,
'withdraw');
593 if ($type ==
'bank-transfer' && $sourcetype !=
'salary') {
594 print
'<td class="tdoverflowmax100" title="'.dol_escape_htmltag($invoicestatic->ref_supplier).
'">';
600 if ($sourcetype !=
'salary') {
601 print
'<td class="tdoverflowmax100">';
602 $thirdpartystatic->fetch($obj->socid);
603 print $thirdpartystatic->getNomUrl(1,
'ban');
606 print
'<td class="tdoverflowmax100">';
607 $user->fetch($obj->uid);
608 print $user->getNomUrl(-1);
615 if (!empty($bac->iban) || !empty($bac->bic)) {
616 print $bac->iban.(($bac->iban && $bac->bic) ?
' / ' :
'').$bac->bic;
617 if ($bac->verif() <= 0) {
618 print
img_warning(
'Error on default bank number for IBAN : '.$langs->trans($bac->error));
621 print
img_warning($langs->trans(
"IBANNotDefined"));
624 print
img_warning($langs->trans(
"NoBankAccountDefined"));
629 if (empty($type) || $type ==
'direct-debit') {
631 if (!empty($bac->rum)) {
634 $rumToShow = $thirdpartystatic->display_rib(
'rum');
637 $format = $thirdpartystatic->display_rib(
'format');
638 if ($type !=
'bank-transfer') {
640 print
' ('.$format.
')';
644 print
img_warning($langs->trans(
"NoBankAccountDefined"));
651 print
'<td class="right amount">';
652 print
price($obj->amount, 0, $langs, 0, 0, -1, $conf->currency);
655 print
'<td class="right">';
660 if ($massactionbutton || $massaction) {
661 print
'<td class="nowrap center">';
663 if (in_array($obj->request_row_id, $arrayofselected)) {
666 print
'<input id="cb'.$obj->request_row_id.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->request_row_id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
675 if ($type ==
'bank-transfer') {
678 if ($massactionbutton || $massaction) {
681 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).
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_warning($titlealt='default', $moreatt='', $morecss='pictowarning')
Show warning logo.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
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.
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...
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.