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:int');
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');
104if (
GETPOST(
'cancel',
'alpha')) {
108$parameters = array(
'mode' => $mode,
'format' => $format,
'limit' => $limit,
'page' => $page,
'offset' => $offset);
109$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
114if (empty($reshook)) {
115 if ($action ==
'create' && $permissiontocreate) {
116 $default_account = ($type ==
'bank-transfer' ?
'PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT' :
'PRELEVEMENT_ID_BANKACCOUNT');
120 $res =
dolibarr_set_const($db, $default_account, $id_bankaccount,
'chaine', 0,
'', $conf->entity);
122 require_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/account.class.php';
130 if (empty($bank->ics) && $type !==
'bank-transfer') {
131 $errormessage = str_replace(
'{url}', $bank->getNomUrl(1,
'',
'', -1, 1), $langs->trans(
"ErrorICSmissing",
'{url}'));
142 $result = $bprev->create(
getDolGlobalString(
'PRELEVEMENT_CODE_BANQUE'),
getDolGlobalString(
'PRELEVEMENT_CODE_GUICHET'), $mode, $format, $executiondate, 0, $type, 0, 0, $sourcetype);
146 if ($bprev->error || !empty($bprev->errors)) {
149 $langs->load(
"errors");
150 setEventMessages($langs->trans(
"ErrorsOnXLines", count($bprev->invoice_in_error)),
null,
'warnings');
153 if (!empty($bprev->invoice_in_error)) {
154 foreach ($bprev->invoice_in_error as $key => $val) {
155 $mesg .=
'<span class="warning">'.$val.
"</span><br>\n";
158 } elseif ($result == 0 || !empty($bprev->invoice_in_error)) {
162 if ($type !=
'bank-transfer') {
163 $mesg = $langs->trans(
"NoInvoiceCouldBeWithdrawed", $format);
165 if ($type ==
'bank-transfer' && $sourcetype !=
'salary') {
166 $mesg = $langs->trans(
"NoInvoiceCouldBeWithdrawedSupplier", $format);
168 if ($type ==
'bank-transfer' && $sourcetype ==
'salary') {
169 $mesg = $langs->trans(
"NoSalariesCouldBeWithdrawed", $format);
174 if (!empty($bprev->invoice_in_error)) {
175 $mesg .=
'<br>'.
"\n";
176 foreach ($bprev->invoice_in_error as $key => $val) {
177 $mesg .=
'<span class="warning">'.$val.
"</span><br>\n";
181 if ($type !=
'bank-transfer') {
182 $texttoshow = $langs->trans(
"DirectDebitOrderCreated",
'{s}');
183 $texttoshow = str_replace(
'{s}', $bprev->getNomUrl(1), $texttoshow);
186 $texttoshow = $langs->trans(
"CreditTransferOrderCreated",
'{s}');
187 $texttoshow = str_replace(
'{s}', $bprev->getNomUrl(1), $texttoshow);
191 header(
"Location: ".DOL_URL_ROOT.
'/compta/prelevement/card.php?id='.urlencode((
string) ($bprev->id)).
'&type='.urlencode((
string) ($type)));
197 $objectclass =
"BonPrelevement";
198 if ($type ==
'bank-transfer') {
199 $uploaddir = $conf->paymentbybanktransfer->dir_output;
201 $uploaddir = $conf->prelevement->dir_output;
203 include DOL_DOCUMENT_ROOT.
'/core/actions_massactions.inc.php';
211$form =
new Form($db);
213$thirdpartystatic =
new Societe($db);
214if ($type !=
'bank-transfer') {
215 $invoicestatic =
new Facture($db);
221$arrayofselected = is_array($toselect) ? $toselect : array();
223$arrayofmassactions = array(
225if (
GETPOSTINT(
'nomassaction') || in_array($massaction, array(
'presend',
'predelete'))) {
226 $arrayofmassactions = array();
228$massactionbutton = $form->selectMassAction(
'', $arrayofmassactions);
231 $langs->load(
"errors");
232 $modulenametoshow =
"Withdraw";
233 if ($type ==
'bank-transfer') {
234 $modulenametoshow =
"PaymentByBankTransfer";
236 setEventMessages($langs->trans(
"ErrorModuleSetupNotComplete", $langs->transnoentitiesnoconv($modulenametoshow)),
null,
'errors');
240$title = $langs->trans(
"NewStandingOrder");
241if ($type ==
'bank-transfer') {
242 $title = $langs->trans(
"NewPaymentByBankTransfer");
251 print
dol_get_fiche_head($head, ((GETPOSTISSET(
'sourcetype') &&
GETPOST(
'sourcetype') !=
'') ?
'salary' :
'invoice'), $langs->trans(
"Invoices"), -1, $bprev->picto);
258if ($sourcetype !=
'salary') {
259 $nb = $bprev->nbOfInvoiceToPay($type);
260 $pricetowithdraw = $bprev->SommeAPrelever($type);
262 $nb = $bprev->nbOfInvoiceToPay($type,
'salary');
263 $pricetowithdraw = $bprev->SommeAPrelever($type,
'salary');
269print
'<div class="fichecenter">';
271print
'<table class="border centpercent tableforfield">';
273$labeltoshow = $langs->trans(
"NbOfInvoiceToWithdraw");
274if ($type ==
'bank-transfer') {
275 $labeltoshow = $langs->trans(
"NbOfInvoiceToPayByBankTransfer");
277if ($sourcetype ==
'salary') {
278 $labeltoshow = $langs->trans(
"NbOfInvoiceToPayByBankTransferForSalaries");
281print
'<tr><td class="titlefield">'.$labeltoshow.
'</td>';
282print
'<td class="nowraponall">';
286print
'<tr><td>'.$langs->trans(
"AmountTotal").
'</td>';
287print
'<td class="amount nowraponall">';
288print
price($pricetowithdraw, 0, $langs, 1, -1, -1, $conf->currency);
295print
'<div class="clearboth"></div>';
299print
'<div class="tabsAction">'.
"\n";
301print
'<form action="'.$_SERVER[
'PHP_SELF'].
'" method="POST">';
302print
'<input type="hidden" name="action" value="create">';
303print
'<input type="hidden" name="token" value="'.newToken().
'">';
304print
'<input type="hidden" name="type" value="'.$type.
'">';
305print
'<input type="hidden" name="sourcetype" value="'.$sourcetype.
'">';
308 if ($pricetowithdraw) {
309 $title = $langs->trans(
'BankToReceiveWithdraw').
': ';
310 if ($type ==
'bank-transfer') {
311 $title = $langs->trans(
'BankToPayCreditTransfer').
': ';
313 print
'<span class="hideonsmartphone">'.$title.
'</span>';
314 print
img_picto(
'',
'bank_account',
'class="pictofixedwidth"');
316 $default_account = ($type ==
'bank-transfer' ?
'PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT' :
'PRELEVEMENT_ID_BANKACCOUNT');
318 print $form->select_comptes(
getDolGlobalInt($default_account),
'id_bankaccount', 0,
"courant=1", 0,
'', 0,
'widthcentpercentminusx maxwidth300', 1);
319 print
' ';
321 if (empty($executiondate)) {
323 if ($type !=
'bank-transfer') {
332 print $langs->trans(
'ExecutionDate').
' ';
333 $datere = $executiondate;
334 print $form->selectDate($datere,
're');
338 $title = $langs->trans(
"CreateForSepa");
339 if ($type ==
'bank-transfer') {
340 $title = $langs->trans(
"CreateSepaFileForPaymentByBankTransfer");
343 if ($type !=
'bank-transfer') {
344 print
'<select name="format">';
345 print
'<option value="FRST"'.($format ==
'FRST' ?
' selected="selected"' :
'').
'>'.$langs->trans(
'SEPAFRST').
'</option>';
346 print
'<option value="RCUR"'.($format ==
'RCUR' ?
' selected="selected"' :
'').
'>'.$langs->trans(
'SEPARCUR').
'</option>';
349 print
'<input type="submit" class="butAction margintoponly marginbottomonly" value="'.$title.
'"/>';
351 $title = $langs->trans(
"CreateAll");
352 if ($type ==
'bank-transfer') {
353 $title = $langs->trans(
"CreateFileForPaymentByBankTransfer");
355 print
'<input type="hidden" name="format" value="ALL">'.
"\n";
356 print
'<input type="submit" class="butAction margintoponly marginbottomonly" value="'.$title.
'">'.
"\n";
360 $title = $langs->trans(
"CreateForSepaFRST");
361 if ($type ==
'bank-transfer') {
362 $title = $langs->trans(
"CreateSepaFileForPaymentByBankTransfer");
364 print
'<a class="butActionRefused classfortooltip margintoponly marginbottomonly" href="#" title="'.$langs->trans(
"AmountMustBePositive").
'">'.$title.
"</a>\n";
366 if ($type !=
'bank-transfer') {
367 $title = $langs->trans(
"CreateForSepaRCUR");
368 print
'<a class="butActionRefused classfortooltip margintoponly marginbottomonly" href="#" title="'.$langs->trans(
"AmountMustBePositive").
'">'.$title.
"</a>\n";
371 $title = $langs->trans(
"CreateAll");
372 if ($type ==
'bank-transfer') {
373 $title = $langs->trans(
"CreateFileForPaymentByBankTransfer");
375 print
'<a class="butActionRefused classfortooltip margintoponly marginbottomonly" href="#">'.$title.
"</a>\n";
379 $titlefortab = $langs->transnoentitiesnoconv(
"StandingOrders");
380 $title = $langs->trans(
"CreateAll");
381 if ($type ==
'bank-transfer') {
382 $titlefortab = $langs->transnoentitiesnoconv(
"PaymentByBankTransfers");
383 $title = $langs->trans(
"CreateFileForPaymentByBankTransfer");
385 print
'<a class="butActionRefused classfortooltip margintoponly marginbottomonly" href="#" title="'.dol_escape_htmltag($langs->transnoentitiesnoconv(
"NoInvoiceToWithdraw", $titlefortab, $titlefortab)).
'">';
406if ($sourcetype !=
'salary') {
407 $sql =
"SELECT f.ref, f.rowid, f.total_ttc, s.nom as name, s.rowid as socid,";
408 if ($type ==
'bank-transfer') {
409 $sql .=
" f.ref_supplier,";
411 $sql .=
" pd.rowid as request_row_id, pd.date_demande, pd.amount, pd.fk_societe_rib as soc_rib_id";
412 if ($type ==
'bank-transfer') {
413 $sql .=
" FROM ".MAIN_DB_PREFIX.
"facture_fourn as f,";
415 $sql .=
" FROM ".MAIN_DB_PREFIX.
"facture as f,";
417 $sql .=
" ".MAIN_DB_PREFIX.
"societe as s,";
418 $sql .=
" ".MAIN_DB_PREFIX.
"prelevement_demande as pd";
419 $sql .=
" WHERE s.rowid = f.fk_soc";
420 $sql .=
" AND f.entity IN (".getEntity(
'invoice').
")";
422 $sql .=
" AND f.fk_statut = ".Facture::STATUS_VALIDATED;
425 $sql .=
" AND f.total_ttc > 0";
426 $sql .=
" AND pd.traite = 0";
427 $sql .=
" AND pd.ext_payment_id IS NULL";
428 if ($type ==
'bank-transfer') {
429 $sql .=
" AND pd.fk_facture_fourn = f.rowid";
431 $sql .=
" AND pd.fk_facture = f.rowid";
434 $sql .=
" AND f.fk_soc = ".((int) $socid);
437 $sql =
"SELECT s.ref, s.rowid, s.amount, CONCAT(u.lastname, ' ', u.firstname) as name, u.rowid as uid,";
438 $sql .=
" pd.rowid as request_row_id, pd.date_demande, pd.amount, pd.fk_societe_rib as soc_rib_id";
439 $sql .=
" FROM ".MAIN_DB_PREFIX.
"salary as s,";
440 $sql .=
" ".MAIN_DB_PREFIX.
"user as u,";
441 $sql .=
" ".MAIN_DB_PREFIX.
"prelevement_demande as pd";
442 $sql .=
" WHERE s.fk_user = u.rowid";
443 $sql .=
" AND s.entity IN (".getEntity(
'salary').
")";
447 $sql .=
" AND s.amount > 0";
448 $sql .=
" AND pd.traite = 0";
449 $sql .=
" AND pd.ext_payment_id IS NULL";
450 $sql .=
" AND s.rowid = pd.fk_salary AND s.paye = ".Salary::STATUS_UNPAID;
451 $sql .=
" AND pd.traite = 0";
454$nbtotalofrecords =
'';
456 $result = $db->query($sql);
457 $nbtotalofrecords = $db->num_rows($result);
458 if (($page * $limit) > (
int) $nbtotalofrecords) {
465$sql .= $db->plimit($limit + 1, $offset);
467$resql = $db->query($sql);
469 $num = $db->num_rows($resql);
474 $param .=
'&type=' . urlencode((
string) $type);
476 if ($limit > 0 && $limit != $conf->liste_limit) {
477 $param .=
'&limit='.((int) $limit);
480 $param .=
'&socid='.urlencode((
string) ($socid));
483 $param .=
"&option=".urlencode($option);
486 print
'<form method="POST" id="searchFormList" action="'.dolBuildUrl($_SERVER[
"PHP_SELF"]).
'">';
487 print
'<input type="hidden" name="token" value="'.newToken().
'">';
488 print
'<input type="hidden" name="page" value="'.$page.
'">';
489 if (!empty($limit)) {
490 print
'<input type="hidden" name="limit" value="'.$limit.
'"/>';
493 print
'<input type="hidden" name="type" value="'.$type.
'">';
495 $title = $langs->trans(
"InvoiceWaitingWithdraw");
497 if ($type ==
'bank-transfer') {
498 if ($sourcetype !=
'salary') {
499 $title = $langs->trans(
"InvoiceWaitingPaymentByBankTransfer");
501 $title = $langs->trans(
"SalaryWaitingWithdraw");
505 print_barre_liste($title, $page, $_SERVER[
'PHP_SELF'], $param,
'',
'', $massactionbutton, $num, $nbtotalofrecords, $picto, 0,
'',
'', $limit);
508 $tradinvoice =
"Invoice";
509 if ($type ==
'bank-transfer') {
510 if ($sourcetype !=
'salary') {
511 $tradinvoice =
"SupplierInvoice";
513 $tradinvoice =
"RefSalary";
517 print
'<div class="div-table-responsive-no-min">';
518 print
'<table class="noborder centpercent">';
519 print
'<tr class="liste_titre">';
522 if ($massactionbutton || $massaction) {
523 print
'<td align="center">'.$form->showCheckAddButtons(
'checkforselect', 1).
'</td>';
527 print
'<td>'.$langs->trans($tradinvoice).
'</td>';
529 if ($type ==
'bank-transfer' && $sourcetype !=
'salary') {
530 print
'<td>'.$langs->trans(
"RefSupplier").
'</td>';
533 if ($sourcetype !=
'salary') {
534 print
'<td>'.$langs->trans(
"ThirdParty").
'</td>';
536 print
'<td>'.$langs->trans(
"Employee").
'</td>';
539 print
'<td>'.$langs->trans(
"RIB").
'</td>';
541 if (empty($type) || $type ==
'direc-debit') {
542 print
'<td>'.$langs->trans(
"RUM").
'</td>';
544 print
'<td class="right">';
545 if ($sourcetype ==
'salary') {
546 print $langs->trans(
"Amount");
548 print $langs->trans(
"AmountTTC");
551 print
'<td class="right">'.$langs->trans(
"PendingSince").
'</td>';
554 if ($massactionbutton || $massaction) {
555 print
'<td align="center">'.$form->showCheckAddButtons(
'checkforselect', 1).
'</td>';
561 if ($sourcetype !=
'salary') {
562 require_once DOL_DOCUMENT_ROOT.
'/societe/class/companybankaccount.class.php';
564 require_once DOL_DOCUMENT_ROOT.
'/user/class/userbankaccount.class.php';
565 require_once DOL_DOCUMENT_ROOT.
'/salaries/class/salary.class.php';
568 while ($i < $num && $i < $limit) {
569 $obj = $db->fetch_object($resql);
570 if ($sourcetype !=
'salary') {
572 $bac->fetch($obj->soc_rib_id ?? 0,
'', $obj->socid);
574 $invoicestatic->id = $obj->rowid;
575 $invoicestatic->ref = $obj->ref;
576 if ($type ==
'bank-transfer') {
577 $invoicestatic->ref_supplier = $obj->ref_supplier;
582 $bac->fetch($obj->soc_rib_id ?? 0,
'', $obj->uid);
584 $salary =
new Salary($db);
585 $salary->fetch($obj->rowid);
587 print
'<tr class="oddeven">';
591 if ($massactionbutton || $massaction) {
592 print
'<td class="nowrap center">';
594 if (in_array($obj->request_row_id, $arrayofselected)) {
597 print
'<input id="cb'.$obj->request_row_id.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->request_row_id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
603 print
'<td class="tdoverflowmax150">';
604 if ($sourcetype !=
'salary' || $salary ===
null) {
605 print $invoicestatic->getNomUrl(1,
'withdraw');
607 print $salary->getNomUrl(1,
'withdraw');
611 if ($type ==
'bank-transfer' && $sourcetype !=
'salary') {
612 print
'<td class="tdoverflowmax100" title="'.dol_escape_htmltag($invoicestatic->ref_supplier).
'">';
618 if ($sourcetype !=
'salary') {
619 print
'<td class="tdoverflowmax100">';
620 $thirdpartystatic->fetch($obj->socid);
621 print $thirdpartystatic->getNomUrl(1,
'ban');
624 print
'<td class="tdoverflowmax100">';
625 $user->fetch($obj->uid);
626 print $user->getNomUrl(-1);
633 if (!empty($bac->iban) || !empty($bac->bic)) {
634 print $bac->iban.(($bac->iban && $bac->bic) ?
' / ' :
'').$bac->bic;
635 if ($bac->verif() <= 0) {
636 print
img_warning(
'Error on default bank number for IBAN : '.$langs->trans($bac->error));
638 if ($obj->soc_rib_id > 0) {
639 print $form->textwithpicto(
'', $langs->trans(
"BankAccountForcedOnRequest"));
641 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');
644 print
img_warning($langs->trans(
"IBANNotDefined"));
647 $langs->load(
"banks");
648 print
img_warning($langs->trans(
"NoBankAccountDefined"));
653 if (empty($type) || $type ==
'direct-debit') {
655 if (!empty($bac->rum)) {
658 $rumToShow = $thirdpartystatic->display_rib(
'rum');
661 $format = $thirdpartystatic->display_rib(
'format');
662 if ($type !=
'bank-transfer') {
664 print
' ('.$format.
')';
668 $langs->load(
"banks");
669 print
img_warning($langs->trans(
"NoBankAccountDefined"));
676 print
'<td class="right amount">';
677 print
price($obj->amount, 0, $langs, 0, 0, -1, $conf->currency);
680 print
'<td class="right">';
685 if ($massactionbutton || $massaction) {
686 print
'<td class="nowrap center">';
688 if (in_array($obj->request_row_id, $arrayofselected)) {
691 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.