32require
'../../main.inc.php';
41require_once DOL_DOCUMENT_ROOT.
'/compta/prelevement/class/bonprelevement.class.php';
42require_once DOL_DOCUMENT_ROOT.
'/compta/facture/class/facture.class.php';
43require_once DOL_DOCUMENT_ROOT.
'/salaries/class/salary.class.php';
44require_once DOL_DOCUMENT_ROOT.
'/societe/class/societe.class.php';
45require_once DOL_DOCUMENT_ROOT.
'/core/lib/bank.lib.php';
46require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
47require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
48require_once DOL_DOCUMENT_ROOT.
'/core/lib/prelevement.lib.php';
49require_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/account.class.php';
52$langs->loadLangs(array(
'banks',
'categories',
'withdrawals',
'companies',
'bills'));
55$action =
GETPOST(
'action',
'aZ09');
56$massaction =
GETPOST(
'massaction',
'alpha');
57$toselect =
GETPOST(
'toselect',
'array:int');
58$mode =
GETPOST(
'mode',
'alpha') ?
GETPOST(
'mode',
'alpha') :
'real';
61$sourcetype =
GETPOST(
'sourcetype',
'aZ09');
62$format =
GETPOST(
'format',
'aZ09');
68if (empty($page) || $page == -1) {
71$offset = $limit * $page;
73$hookmanager->initHooks(array(
'directdebitcreatecard',
'globalcard'));
78 $socid = $user->socid;
80if ($type ==
'bank-transfer') {
81 $result =
restrictedArea($user,
'paymentbybanktransfer',
'',
'',
'');
83 $permissiontoread = $user->hasRight(
'paymentbybanktransfer',
'read');
84 $permissiontocreate = $user->hasRight(
'paymentbybanktransfer',
'create');
88 $permissiontoread = $user->hasRight(
'prelevement',
'bons',
'lire');
89 $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 && GETPOSTISSET(
'createtransferrequest')) {
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}'));
135 if (empty($toselect)) {
136 $errormessage = $langs->trans(
'ErrorBankTransferNoPaymentRequestSelected');
146 $result = $bprev->create(
getDolGlobalString(
'PRELEVEMENT_CODE_BANQUE'),
getDolGlobalString(
'PRELEVEMENT_CODE_GUICHET'), $mode, $format, $executiondate, 0, $type, $toselect, 0, $sourcetype);
151 if ($bprev->error || !empty($bprev->errors)) {
154 $langs->load(
"errors");
155 setEventMessages($langs->trans(
"ErrorsOnXLines", count($bprev->invoice_in_error)),
null,
'warnings');
158 if (!empty($bprev->invoice_in_error)) {
159 foreach ($bprev->invoice_in_error as $key => $val) {
160 $mesg .=
'<span class="warning">'.$val.
"</span><br>\n";
163 } elseif ($result == 0 || !empty($bprev->invoice_in_error)) {
167 if ($type !=
'bank-transfer') {
168 $mesg = $langs->trans(
"NoInvoiceCouldBeWithdrawed", $format);
170 if ($type ==
'bank-transfer' && $sourcetype !=
'salary') {
171 $mesg = $langs->trans(
"NoInvoiceCouldBeWithdrawedSupplier", $format);
173 if ($type ==
'bank-transfer' && $sourcetype ==
'salary') {
174 $mesg = $langs->trans(
"NoSalariesCouldBeWithdrawed", $format);
179 if (!empty($bprev->invoice_in_error)) {
180 $mesg .=
'<br>'.
"\n";
181 foreach ($bprev->invoice_in_error as $key => $val) {
182 $mesg .=
'<span class="warning">'.$val.
"</span><br>\n";
186 if ($type !=
'bank-transfer') {
187 $texttoshow = $langs->trans(
"DirectDebitOrderCreated",
'{s}');
188 $texttoshow = str_replace(
'{s}', $bprev->getNomUrl(1), $texttoshow);
191 $texttoshow = $langs->trans(
"CreditTransferOrderCreated",
'{s}');
192 $texttoshow = str_replace(
'{s}', $bprev->getNomUrl(1), $texttoshow);
196 header(
"Location: ".DOL_URL_ROOT.
'/compta/prelevement/card.php?id='.urlencode((
string) ($bprev->id)).
'&type='.urlencode((
string) ($type)));
202 $objectclass =
"BonPrelevement";
203 if ($type ==
'bank-transfer') {
204 $uploaddir =
$conf->paymentbybanktransfer->dir_output;
206 $uploaddir =
$conf->prelevement->dir_output;
208 include DOL_DOCUMENT_ROOT.
'/core/actions_massactions.inc.php';
219if ($type !=
'bank-transfer') {
226$arrayofselected = is_array($toselect) ? $toselect : array();
228$arrayofmassactions = array();
229if (
GETPOSTINT(
'nomassaction') || in_array($massaction, array(
'presend',
'predelete'))) {
230 $arrayofmassactions = array();
232$massactionbutton = $form->selectMassAction(
'', $arrayofmassactions);
235 $langs->load(
"errors");
236 $modulenametoshow =
"Withdraw";
237 if ($type ==
'bank-transfer') {
238 $modulenametoshow =
"PaymentByBankTransfer";
240 setEventMessages($langs->trans(
"ErrorModuleSetupNotComplete", $langs->transnoentitiesnoconv($modulenametoshow)),
null,
'errors');
244$title = $langs->trans(
"NewStandingOrder");
245if ($type ==
'bank-transfer') {
246 $title = $langs->trans(
"NewPaymentByBankTransfer");
255 print
dol_get_fiche_head($head, ((GETPOSTISSET(
'sourcetype') &&
GETPOST(
'sourcetype') !=
'') ?
'salary' :
'invoice'), $langs->trans(
"Invoices"), -1, $bprev->picto);
262if ($sourcetype !=
'salary') {
263 $nb = $bprev->nbOfInvoiceToPay($type);
264 $pricetowithdraw = $bprev->SommeAPrelever($type);
266 $nb = $bprev->nbOfInvoiceToPay($type,
'salary');
267 $pricetowithdraw = $bprev->SommeAPrelever($type,
'salary');
273print
'<div class="fichecenter">';
275print
'<table class="border centpercent tableforfield">';
277$labeltoshow = $langs->trans(
"NbOfInvoiceToWithdraw");
278if ($type ==
'bank-transfer') {
279 $labeltoshow = $langs->trans(
"NbOfInvoiceToPayByBankTransfer");
281if ($sourcetype ==
'salary') {
282 $labeltoshow = $langs->trans(
"NbOfInvoiceToPayByBankTransferForSalaries");
285print
'<tr><td class="titlefield">'.$labeltoshow.
'</td>';
286print
'<td class="nowraponall">';
290print
'<tr><td>'.$langs->trans(
"AmountTotal").
'</td>';
291print
'<td class="amount nowraponall">';
292print
price($pricetowithdraw, 0, $langs, 1, -1, -1,
$conf->currency);
299print
'<div class="clearboth"></div>';
304print
'<form id="createBankTransfer" action="'.$_SERVER[
'PHP_SELF'].
'" method="POST">';
305print
'<input type="hidden" name="action" value="create">';
306print
'<input type="hidden" name="token" value="'.newToken().
'">';
307print
'<input type="hidden" name="type" value="'.$type.
'">';
308print
'<input type="hidden" name="sourcetype" value="'.$sourcetype.
'">';
311print
'<div class="tabsAction">'.
"\n";
314 if ($pricetowithdraw) {
315 $title = $langs->trans(
'BankToReceiveWithdraw').
': ';
316 if ($type ==
'bank-transfer') {
317 $title = $langs->trans(
'BankToPayCreditTransfer').
': ';
319 print
'<span class="hideonsmartphone">'.$title.
'</span>';
320 print
img_picto(
'',
'bank_account',
'class="pictofixedwidth"');
322 $default_account = ($type ==
'bank-transfer' ?
'PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT' :
'PRELEVEMENT_ID_BANKACCOUNT');
324 print $form->select_comptes(
getDolGlobalInt($default_account),
'id_bankaccount', 0,
"(courant:=:1)", 0,
'', 0,
'widthcentpercentminusx maxwidth300', 1);
325 print
' ';
327 if (empty($executiondate)) {
329 if ($type !=
'bank-transfer') {
338 print $langs->trans(
'ExecutionDate').
' ';
339 $datere = $executiondate;
340 print $form->selectDate($datere,
're');
344 $title = $langs->trans(
"CreateForSepa");
345 if ($type ==
'bank-transfer') {
346 $title = $langs->trans(
"CreateSepaFileForPaymentByBankTransfer");
349 if ($type !=
'bank-transfer') {
350 print
'<select name="format">';
351 print
'<option value="FRST"'.($format ==
'FRST' ?
' selected="selected"' :
'').
'>'.$langs->trans(
'SEPAFRST').
'</option>';
352 print
'<option value="RCUR"'.($format ==
'RCUR' ?
' selected="selected"' :
'').
'>'.$langs->trans(
'SEPARCUR').
'</option>';
355 print
'<input type="submit" class="butAction margintoponly marginbottomonly" name="createtransferrequest" value="'.$title.
'"/>';
357 $title = $langs->trans(
"CreateAll");
358 if ($type ==
'bank-transfer') {
359 $title = $langs->trans(
"CreateFileForPaymentByBankTransfer");
361 print
'<input type="hidden" name="format" value="ALL">'.
"\n";
362 print
'<input type="submit" class="butAction margintoponly marginbottomonly" name="createtransferrequest" value="'.$title.
'">'.
"\n";
366 $title = $langs->trans(
"CreateForSepaFRST");
367 if ($type ==
'bank-transfer') {
368 $title = $langs->trans(
"CreateSepaFileForPaymentByBankTransfer");
370 print
'<a class="butActionRefused classfortooltip margintoponly marginbottomonly" href="#" title="'.$langs->trans(
"AmountMustBePositive").
'">'.$title.
"</a>\n";
372 if ($type !=
'bank-transfer') {
373 $title = $langs->trans(
"CreateForSepaRCUR");
374 print
'<a class="butActionRefused classfortooltip margintoponly marginbottomonly" href="#" title="'.$langs->trans(
"AmountMustBePositive").
'">'.$title.
"</a>\n";
377 $title = $langs->trans(
"CreateAll");
378 if ($type ==
'bank-transfer') {
379 $title = $langs->trans(
"CreateFileForPaymentByBankTransfer");
381 print
'<a class="butActionRefused classfortooltip margintoponly marginbottomonly" href="#">'.$title.
"</a>\n";
385 $titlefortab = $langs->transnoentitiesnoconv(
"StandingOrders");
386 $title = $langs->trans(
"CreateAll");
387 if ($type ==
'bank-transfer') {
388 $titlefortab = $langs->transnoentitiesnoconv(
"PaymentByBankTransfers");
389 $title = $langs->trans(
"CreateFileForPaymentByBankTransfer");
391 print
'<a class="butActionRefused classfortooltip margintoponly marginbottomonly" href="#" title="'.dol_escape_htmltag($langs->transnoentitiesnoconv(
"NoInvoiceToWithdraw", $titlefortab, $titlefortab)).
'">';
400 print
'<div class="resultofprocess">'.
"\n";
412if ($sourcetype !=
'salary') {
413 $sql =
"SELECT f.ref, f.rowid, f.total_ttc, s.nom as name, s.rowid as socid,";
414 if ($type ==
'bank-transfer') {
415 $sql .=
" f.ref_supplier,";
417 $sql .=
" pd.rowid as request_row_id, pd.date_demande, pd.amount, pd.fk_societe_rib as soc_rib_id";
418 if ($type ==
'bank-transfer') {
419 $sql .=
" FROM ".MAIN_DB_PREFIX.
"facture_fourn as f,";
421 $sql .=
" FROM ".MAIN_DB_PREFIX.
"facture as f,";
423 $sql .=
" ".MAIN_DB_PREFIX.
"societe as s,";
424 $sql .=
" ".MAIN_DB_PREFIX.
"prelevement_demande as pd";
425 $sql .=
" WHERE s.rowid = f.fk_soc";
426 $sql .=
" AND f.entity IN (".getEntity(
'invoice').
")";
428 $sql .=
" AND f.fk_statut = ".Facture::STATUS_VALIDATED;
431 $sql .=
" AND f.total_ttc > 0";
432 $sql .=
" AND pd.traite = 0";
433 $sql .=
" AND pd.ext_payment_id IS NULL";
434 if ($type ==
'bank-transfer') {
435 $sql .=
" AND pd.fk_facture_fourn = f.rowid";
437 $sql .=
" AND pd.fk_facture = f.rowid";
440 $sql .=
" AND f.fk_soc = ".((int) $socid);
443 $sql =
"SELECT s.ref, s.rowid, s.amount, CONCAT(u.lastname, ' ', u.firstname) as name, u.rowid as uid,";
444 $sql .=
" pd.rowid as request_row_id, pd.date_demande, pd.amount, pd.fk_societe_rib as soc_rib_id";
445 $sql .=
" FROM ".MAIN_DB_PREFIX.
"salary as s,";
446 $sql .=
" ".MAIN_DB_PREFIX.
"user as u,";
447 $sql .=
" ".MAIN_DB_PREFIX.
"prelevement_demande as pd";
448 $sql .=
" WHERE s.fk_user = u.rowid";
449 $sql .=
" AND s.entity IN (".getEntity(
'salary').
")";
453 $sql .=
" AND s.amount > 0";
454 $sql .=
" AND pd.traite = 0";
455 $sql .=
" AND pd.ext_payment_id IS NULL";
456 $sql .=
" AND s.rowid = pd.fk_salary AND s.paye = ".Salary::STATUS_UNPAID;
457 $sql .=
" AND pd.traite = 0";
460$nbtotalofrecords =
'';
462 $result =
$db->query($sql);
463 $nbtotalofrecords =
$db->num_rows($result);
464 if (($page * $limit) > (
int) $nbtotalofrecords) {
471$sql .=
$db->plimit($limit + 1, $offset);
473$resql =
$db->query($sql);
475 $num =
$db->num_rows($resql);
480 $param .=
'&type=' . urlencode((
string) $type);
482 if ($limit > 0 && $limit !=
$conf->liste_limit) {
483 $param .=
'&limit='.((int) $limit);
486 $param .=
'&socid='.urlencode((
string) ($socid));
489 $param .=
"&option=".urlencode($option);
494 print
'<input type="hidden" name="page" value="'.$page.
'">';
495 if (!empty($limit)) {
496 print
'<input type="hidden" name="limit" value="'.$limit.
'"/>';
499 print
'<input type="hidden" name="type" value="'.$type.
'">';
501 $title = $langs->trans(
"InvoiceWaitingWithdraw");
503 if ($type ==
'bank-transfer') {
504 if ($sourcetype !=
'salary') {
505 $title = $langs->trans(
"InvoiceWaitingPaymentByBankTransfer");
507 $title = $langs->trans(
"SalaryWaitingWithdraw");
511 print_barre_liste($title, $page, $_SERVER[
'PHP_SELF'], $param,
'',
'', $massactionbutton, $num, $nbtotalofrecords, $picto, 0,
'',
'', $limit);
514 $tradinvoice =
"Invoice";
515 if ($type ==
'bank-transfer') {
516 if ($sourcetype !=
'salary') {
517 $tradinvoice =
"SupplierInvoice";
519 $tradinvoice =
"RefSalary";
523 print
'<div class="div-table-responsive-no-min">';
524 print
'<table class="noborder centpercent">';
525 print
'<tr class="liste_titre">';
527 if (
$conf->main_checkbox_left_column) {
529 print
'<td align="center">'.$form->showCheckAddButtons(
'checkforselect', 1).
'</td>';
533 print
'<td>'.$langs->trans($tradinvoice).
'</td>';
535 if ($type ==
'bank-transfer' && $sourcetype !=
'salary') {
536 print
'<td>'.$langs->trans(
"RefSupplier").
'</td>';
539 if ($sourcetype !=
'salary') {
540 print
'<td>'.$langs->trans(
"ThirdParty").
'</td>';
542 print
'<td>'.$langs->trans(
"Employee").
'</td>';
545 print
'<td>'.$langs->trans(
"RIB").
'</td>';
547 if (empty($type) || $type ==
'direc-debit') {
548 print
'<td>'.$langs->trans(
"RUM").
'</td>';
550 print
'<td class="right">';
551 if ($sourcetype ==
'salary') {
552 print $langs->trans(
"Amount");
554 print $langs->trans(
"AmountTTC");
557 print
'<td class="right">'.$langs->trans(
"PendingSince").
'</td>';
559 if (!
$conf->main_checkbox_left_column) {
560 print
'<td align="center">'.$form->showCheckAddButtons(
'checkforselect', 1).
'</td>';
565 if ($sourcetype !=
'salary') {
566 require_once DOL_DOCUMENT_ROOT.
'/societe/class/companybankaccount.class.php';
568 require_once DOL_DOCUMENT_ROOT.
'/user/class/userbankaccount.class.php';
569 require_once DOL_DOCUMENT_ROOT.
'/salaries/class/salary.class.php';
572 while ($i < $num && $i < $limit) {
573 $obj =
$db->fetch_object($resql);
574 if ($sourcetype !=
'salary') {
576 $bac->fetch($obj->soc_rib_id ?? 0,
'', $obj->socid);
578 $invoicestatic->id = $obj->rowid;
579 $invoicestatic->ref = $obj->ref;
580 if ($type ==
'bank-transfer') {
581 $invoicestatic->ref_supplier = $obj->ref_supplier;
586 $bac->fetch($obj->soc_rib_id ?? 0,
'', $obj->uid);
589 $salary->fetch($obj->rowid);
591 print
'<tr class="oddeven">';
594 if (
$conf->main_checkbox_left_column) {
595 print
'<td class="nowrap center">';
597 if (in_array($obj->request_row_id, $arrayofselected)) {
600 print
'<input id="cb'.$obj->request_row_id.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->request_row_id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
605 print
'<td class="tdoverflowmax150">';
606 if ($sourcetype !=
'salary' || $salary ===
null) {
607 print $invoicestatic->getNomUrl(1,
'withdraw');
609 print $salary->getNomUrl(1,
'withdraw');
613 if ($type ==
'bank-transfer' && $sourcetype !=
'salary') {
614 print
'<td class="tdoverflowmax100" title="'.dol_escape_htmltag($invoicestatic->ref_supplier).
'">';
620 if ($sourcetype !=
'salary') {
621 print
'<td class="tdoverflowmax100">';
622 $thirdpartystatic->fetch($obj->socid);
623 print $thirdpartystatic->getNomUrl(1,
'ban');
626 print
'<td class="tdoverflowmax100">';
627 $user->fetch($obj->uid);
628 print $user->getNomUrl(-1);
635 if (!empty($bac->iban) || !empty($bac->bic)) {
636 print $bac->iban.(($bac->iban && $bac->bic) ?
' / ' :
'').$bac->bic;
637 if ($bac->verif() <= 0) {
638 print
img_warning(
'Error on default bank number for IBAN : '.$langs->trans($bac->error));
640 if ($obj->soc_rib_id > 0) {
641 print $form->textwithpicto(
'', $langs->trans(
"BankAccountForcedOnRequest"));
643 print $form->textwithpicto(
'', $langs->trans(
"BankAccountUsedByDefault").
'<br><b>'.$langs->trans(
"Label").
'</b> : '.$bac->label.
'<br><b>'.$langs->trans(
"BankName").
'</b> : '.$bac->bank, 1,
'help',
'valigmiddle warning');
646 print
img_warning($langs->trans(
"IBANNotDefined"));
649 $langs->load(
"banks");
650 print
img_warning($langs->trans(
"NoBankAccountDefined"));
655 if (empty($type) || $type ==
'direct-debit') {
657 if (!empty($bac->rum)) {
660 $rumToShow = $thirdpartystatic->display_rib(
'rum');
663 $format = $thirdpartystatic->display_rib(
'format');
664 if ($type !=
'bank-transfer') {
666 print
' ('.$format.
')';
670 $langs->load(
"banks");
671 print
img_warning($langs->trans(
"NoBankAccountDefined"));
678 print
'<td class="right amount">';
679 print
price($obj->amount, 0, $langs, 0, 0, -1,
$conf->currency);
682 print
'<td class="right">';
686 if (!
$conf->main_checkbox_left_column) {
687 print
'<td class="nowrap center">';
689 if (in_array($obj->request_row_id, $arrayofselected)) {
692 print
'<input id="cb'.$obj->request_row_id.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->request_row_id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
700 if ($type ==
'bank-transfer') {
703 if ($massactionbutton || $massaction) {
706 print
'<tr class="oddeven"><td colspan="'.$colspan.
'"><span class="opacitymedium">'.$langs->trans(
"None").
'</span></td></tr>';
if(! $sortfield) if(! $sortorder) $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_now($mode='gmt')
Return date for now.
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_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, $morecssdiv='')
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.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
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...
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='', $morecssonpicto='widthpictotitle')
Load a title with picto.
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.