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');
266print
'<table class="border centpercent tableforfield">';
268$labeltoshow = $langs->trans(
"NbOfInvoiceToWithdraw");
269if ($type ==
'bank-transfer') {
270 $labeltoshow = $langs->trans(
"NbOfInvoiceToPayByBankTransfer");
272if ($sourcetype ==
'salary') {
273 $labeltoshow = $langs->trans(
"NbOfInvoiceToPayByBankTransferForSalaries");
276print
'<tr><td class="titlefield">'.$labeltoshow.
'</td>';
277print
'<td class="nowraponall">';
281print
'<tr><td>'.$langs->trans(
"AmountTotal").
'</td>';
282print
'<td class="amount nowraponall">';
283print
price($pricetowithdraw, 0, $langs, 1, -1, -1,
$conf->currency);
290print
'<div class="tabsAction">'.
"\n";
292print
'<form action="'.$_SERVER[
'PHP_SELF'].
'" method="POST">';
293print
'<input type="hidden" name="action" value="create">';
294print
'<input type="hidden" name="token" value="'.newToken().
'">';
295print
'<input type="hidden" name="type" value="'.$type.
'">';
296print
'<input type="hidden" name="sourcetype" value="'.$sourcetype.
'">';
299 if ($pricetowithdraw) {
300 $title = $langs->trans(
'BankToReceiveWithdraw').
': ';
301 if ($type ==
'bank-transfer') {
302 $title = $langs->trans(
'BankToPayCreditTransfer').
': ';
304 print
'<span class="hideonsmartphone">'.$title.
'</span>';
305 print
img_picto(
'',
'bank_account',
'class="pictofixedwidth"');
307 $default_account = ($type ==
'bank-transfer' ?
'PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT' :
'PRELEVEMENT_ID_BANKACCOUNT');
309 print $form->select_comptes(
getDolGlobalInt($default_account),
'id_bankaccount', 0,
"courant=1", 0,
'', 0,
'widthcentpercentminusx maxwidth300', 1);
310 print
' ';
312 if (empty($executiondate)) {
314 if ($type !=
'bank-transfer') {
323 print $langs->trans(
'ExecutionDate').
' ';
324 $datere = $executiondate;
325 print $form->selectDate($datere,
're');
328 if ($mysoc->isInEEC()) {
329 $title = $langs->trans(
"CreateForSepa");
330 if ($type ==
'bank-transfer') {
331 $title = $langs->trans(
"CreateSepaFileForPaymentByBankTransfer");
334 if ($type !=
'bank-transfer') {
335 print
'<select name="format">';
336 print
'<option value="FRST"'.($format ==
'FRST' ?
' selected="selected"' :
'').
'>'.$langs->trans(
'SEPAFRST').
'</option>';
337 print
'<option value="RCUR"'.($format ==
'RCUR' ?
' selected="selected"' :
'').
'>'.$langs->trans(
'SEPARCUR').
'</option>';
340 print
'<input type="submit" class="butAction margintoponly marginbottomonly" value="'.$title.
'"/>';
342 $title = $langs->trans(
"CreateAll");
343 if ($type ==
'bank-transfer') {
344 $title = $langs->trans(
"CreateFileForPaymentByBankTransfer");
346 print
'<input type="hidden" name="format" value="ALL">'.
"\n";
347 print
'<input type="submit" class="butAction margintoponly marginbottomonly" value="'.$title.
'">'.
"\n";
350 if ($mysoc->isInEEC()) {
351 $title = $langs->trans(
"CreateForSepaFRST");
352 if ($type ==
'bank-transfer') {
353 $title = $langs->trans(
"CreateSepaFileForPaymentByBankTransfer");
355 print
'<a class="butActionRefused classfortooltip margintoponly marginbottomonly" href="#" title="'.$langs->trans(
"AmountMustBePositive").
'">'.$title.
"</a>\n";
357 if ($type !=
'bank-transfer') {
358 $title = $langs->trans(
"CreateForSepaRCUR");
359 print
'<a class="butActionRefused classfortooltip margintoponly marginbottomonly" href="#" title="'.$langs->trans(
"AmountMustBePositive").
'">'.$title.
"</a>\n";
362 $title = $langs->trans(
"CreateAll");
363 if ($type ==
'bank-transfer') {
364 $title = $langs->trans(
"CreateFileForPaymentByBankTransfer");
366 print
'<a class="butActionRefused classfortooltip margintoponly marginbottomonly" href="#">'.$title.
"</a>\n";
370 $titlefortab = $langs->transnoentitiesnoconv(
"StandingOrders");
371 $title = $langs->trans(
"CreateAll");
372 if ($type ==
'bank-transfer') {
373 $titlefortab = $langs->transnoentitiesnoconv(
"PaymentByBankTransfers");
374 $title = $langs->trans(
"CreateFileForPaymentByBankTransfer");
376 print
'<a class="butActionRefused classfortooltip margintoponly marginbottomonly" href="#" title="'.dol_escape_htmltag($langs->transnoentitiesnoconv(
"NoInvoiceToWithdraw", $titlefortab, $titlefortab)).
'">';
397if ($sourcetype !=
'salary') {
398 $sql =
"SELECT f.ref, f.rowid, f.total_ttc, s.nom as name, s.rowid as socid,";
399 if ($type ==
'bank-transfer') {
400 $sql .=
" f.ref_supplier,";
402 $sql .=
" pd.rowid as request_row_id, pd.date_demande, pd.amount, pd.fk_societe_rib as soc_rib_id";
403 if ($type ==
'bank-transfer') {
404 $sql .=
" FROM ".MAIN_DB_PREFIX.
"facture_fourn as f,";
406 $sql .=
" FROM ".MAIN_DB_PREFIX.
"facture as f,";
408 $sql .=
" ".MAIN_DB_PREFIX.
"societe as s,";
409 $sql .=
" ".MAIN_DB_PREFIX.
"prelevement_demande as pd";
410 $sql .=
" WHERE s.rowid = f.fk_soc";
411 $sql .=
" AND f.entity IN (".getEntity(
'invoice').
")";
413 $sql .=
" AND f.fk_statut = ".Facture::STATUS_VALIDATED;
416 $sql .=
" AND f.total_ttc > 0";
417 $sql .=
" AND pd.traite = 0";
418 $sql .=
" AND pd.ext_payment_id IS NULL";
419 if ($type ==
'bank-transfer') {
420 $sql .=
" AND pd.fk_facture_fourn = f.rowid";
422 $sql .=
" AND pd.fk_facture = f.rowid";
425 $sql .=
" AND f.fk_soc = ".((int) $socid);
428 $sql =
"SELECT s.ref, s.rowid, s.amount, CONCAT(u.lastname, ' ', u.firstname) as name, u.rowid as uid,";
429 $sql .=
" pd.rowid as request_row_id, pd.date_demande, pd.amount, pd.fk_societe_rib as soc_rib_id";
430 $sql .=
" FROM ".MAIN_DB_PREFIX.
"salary as s,";
431 $sql .=
" ".MAIN_DB_PREFIX.
"user as u,";
432 $sql .=
" ".MAIN_DB_PREFIX.
"prelevement_demande as pd";
433 $sql .=
" WHERE s.fk_user = u.rowid";
434 $sql .=
" AND s.entity IN (".getEntity(
'salary').
")";
438 $sql .=
" AND s.amount > 0";
439 $sql .=
" AND pd.traite = 0";
440 $sql .=
" AND pd.ext_payment_id IS NULL";
441 $sql .=
" AND s.rowid = pd.fk_salary AND s.paye = ".Salary::STATUS_UNPAID;
442 $sql .=
" AND pd.traite = 0";
445$nbtotalofrecords =
'';
447 $result = $db->query($sql);
448 $nbtotalofrecords = $db->num_rows($result);
449 if (($page * $limit) > $nbtotalofrecords) {
456$sql .= $db->plimit($limit + 1, $offset);
458$resql = $db->query($sql);
460 $num = $db->num_rows($resql);
465 $param .=
'&type=' . urlencode((
string) $type);
467 if ($limit > 0 && $limit !=
$conf->liste_limit) {
468 $param .=
'&limit='.((int) $limit);
471 $param .=
'&socid='.urlencode((
string) ($socid));
474 $param .=
"&option=".urlencode($option);
477 print
'<form method="POST" id="searchFormList" action="'.$_SERVER[
"PHP_SELF"].
'">';
478 print
'<input type="hidden" name="token" value="'.newToken().
'">';
479 print
'<input type="hidden" name="page" value="'.$page.
'">';
480 if (!empty($limit)) {
481 print
'<input type="hidden" name="limit" value="'.$limit.
'"/>';
484 print
'<input type="hidden" name="type" value="'.$type.
'">';
486 $title = $langs->trans(
"InvoiceWaitingWithdraw");
488 if ($type ==
'bank-transfer') {
489 if ($sourcetype !=
'salary') {
490 $title = $langs->trans(
"InvoiceWaitingPaymentByBankTransfer");
492 $title = $langs->trans(
"SalaryWaitingWithdraw");
496 print_barre_liste($title, $page, $_SERVER[
'PHP_SELF'], $param,
'',
'', $massactionbutton, $num, $nbtotalofrecords, $picto, 0,
'',
'', $limit);
499 $tradinvoice =
"Invoice";
500 if ($type ==
'bank-transfer') {
501 if ($sourcetype !=
'salary') {
502 $tradinvoice =
"SupplierInvoice";
504 $tradinvoice =
"RefSalary";
508 print
'<div class="div-table-responsive-no-min">';
509 print
'<table class="noborder centpercent">';
510 print
'<tr class="liste_titre">';
513 if ($massactionbutton || $massaction) {
514 print
'<td align="center">'.$form->showCheckAddButtons(
'checkforselect', 1).
'</td>';
518 print
'<td>'.$langs->trans($tradinvoice).
'</td>';
520 if ($type ==
'bank-transfer' && $sourcetype !=
'salary') {
521 print
'<td>'.$langs->trans(
"RefSupplier").
'</td>';
524 if ($sourcetype !=
'salary') {
525 print
'<td>'.$langs->trans(
"ThirdParty").
'</td>';
527 print
'<td>'.$langs->trans(
"Employee").
'</td>';
530 print
'<td>'.$langs->trans(
"RIB").
'</td>';
532 if (empty($type) || $type ==
'direc-debit') {
533 print
'<td>'.$langs->trans(
"RUM").
'</td>';
535 print
'<td class="right">';
536 if ($sourcetype ==
'salary') {
537 print $langs->trans(
"Amount");
539 print $langs->trans(
"AmountTTC");
542 print
'<td class="right">'.$langs->trans(
"PendingSince").
'</td>';
545 if ($massactionbutton || $massaction) {
546 print
'<td align="center">'.$form->showCheckAddButtons(
'checkforselect', 1).
'</td>';
552 if ($sourcetype !=
'salary') {
553 require_once DOL_DOCUMENT_ROOT.
'/societe/class/companybankaccount.class.php';
555 require_once DOL_DOCUMENT_ROOT.
'/user/class/userbankaccount.class.php';
556 require_once DOL_DOCUMENT_ROOT.
'/salaries/class/salary.class.php';
559 while ($i < $num && $i < $limit) {
560 $obj = $db->fetch_object($resql);
561 if ($sourcetype !=
'salary') {
563 $bac->fetch($obj->soc_rib_id ?? 0,
'', $obj->socid);
565 $invoicestatic->id = $obj->rowid;
566 $invoicestatic->ref = $obj->ref;
567 if ($type ==
'bank-transfer') {
568 $invoicestatic->ref_supplier = $obj->ref_supplier;
573 $bac->fetch($obj->soc_rib_id ?? 0,
'', $obj->uid);
575 $salary =
new Salary($db);
576 $salary->fetch($obj->rowid);
578 print
'<tr class="oddeven">';
582 if ($massactionbutton || $massaction) {
583 print
'<td class="nowrap center">';
585 if (in_array($obj->request_row_id, $arrayofselected)) {
588 print
'<input id="cb'.$obj->request_row_id.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->request_row_id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
594 print
'<td class="tdoverflowmax150">';
595 if ($sourcetype !=
'salary' || $salary ===
null) {
596 print $invoicestatic->getNomUrl(1,
'withdraw');
598 print $salary->getNomUrl(1,
'withdraw');
602 if ($type ==
'bank-transfer' && $sourcetype !=
'salary') {
603 print
'<td class="tdoverflowmax100" title="'.dol_escape_htmltag($invoicestatic->ref_supplier).
'">';
609 if ($sourcetype !=
'salary') {
610 print
'<td class="tdoverflowmax100">';
611 $thirdpartystatic->fetch($obj->socid);
612 print $thirdpartystatic->getNomUrl(1,
'ban');
615 print
'<td class="tdoverflowmax100">';
616 $user->fetch($obj->uid);
617 print $user->getNomUrl(-1);
624 if (!empty($bac->iban) || !empty($bac->bic)) {
625 print $bac->iban.(($bac->iban && $bac->bic) ?
' / ' :
'').$bac->bic;
626 if ($bac->verif() <= 0) {
627 print
img_warning(
'Error on default bank number for IBAN : '.$langs->trans($bac->error));
630 print
img_warning($langs->trans(
"IBANNotDefined"));
633 $langs->load(
"banks");
634 print
img_warning($langs->trans(
"NoBankAccountDefined"));
639 if (empty($type) || $type ==
'direct-debit') {
641 if (!empty($bac->rum)) {
644 $rumToShow = $thirdpartystatic->display_rib(
'rum');
647 $format = $thirdpartystatic->display_rib(
'format');
648 if ($type !=
'bank-transfer') {
650 print
' ('.$format.
')';
654 $langs->load(
"banks");
655 print
img_warning($langs->trans(
"NoBankAccountDefined"));
662 print
'<td class="right amount">';
663 print
price($obj->amount, 0, $langs, 0, 0, -1,
$conf->currency);
666 print
'<td class="right">';
671 if ($massactionbutton || $massaction) {
672 print
'<td class="nowrap center">';
674 if (in_array($obj->request_row_id, $arrayofselected)) {
677 print
'<input id="cb'.$obj->request_row_id.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->request_row_id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
686 if ($type ==
'bank-transfer') {
689 if ($massactionbutton || $massaction) {
692 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...
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.