dolibarr 25.0.0-alpha
card.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3 * Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
4 * Copyright (C) 2006-2010 Laurent Destailleur <eldy@users.sourceforge.net>
5 * Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
6 * Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
7 * Copyright (C) 2024-2026 Frédéric France <frederic.france@free.fr>
8 * Copyright (C) 2025 Vincent Maury <vmaury@timgroup.fr>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 3 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program. If not, see <https://www.gnu.org/licenses/>.
22 */
23
32// Load Dolibarr environment
33require '../../main.inc.php';
41require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
42require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php';
43require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php';
44require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
45require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php';
46
47// Load translation files required by the page
48$langs->loadLangs(array('banks', 'bills', 'companies', 'suppliers'));
49
50
51// Get Parameters
52$id = GETPOSTINT('id');
53$action = GETPOST('action', 'alpha');
54$confirm = GETPOST('confirm', 'alpha');
55
56$socid = 0;
57
58// Initialize objects
59$object = new PaiementFourn($db);
60
61// Initialize a technical object to manage hooks of page. Note that conf->hooks_modules contains an array of hook context
62$hookmanager->initHooks(array('supplierpaymentcard', 'globalcard'));
63
64// Load object
65include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be 'include', not 'include_once'.
66
67$result = restrictedArea($user, $object->element, $object->id, 'paiementfourn', ''); // This also test permission on read invoice
68
69// Security check
70if ($user->isExternalUser()) {
71 $socid = $user->isExternalUser();
72}
73// Now check also permission on thirdparty of invoices of payments. Thirdparty were loaded by the fetch_object before based on first invoice.
74// It should be enough because all payments are done on invoices of the same thirdparty.
75if ($socid && $socid != $object->thirdparty->id) {
77}
78
79$permissiontoadd = ($user->hasRight("fournisseur", "facture", "creer") || $user->hasRight("supplier_invoice", "write"));
80$permissiontovalidate = ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && ($user->hasRight("fournisseur", "facture", "creer") || $user->hasRight("supplier_invoice", "write"))) || (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight("fournisseur", "supplier_invoice_advance", "validate")));
81$permissiontodelete = ($user->hasRight("fournisseur", "facture", "supprimer") || $user->hasRight("supplier_invoice", "delete"));
82
83
84/*
85 * Actions
86 */
87
88if ($action == 'setnote' && $permissiontoadd) {
89 $db->begin();
90
91 $object->fetch($id);
92 $result = $object->update_note(GETPOST('note', 'restricthtml'));
93 if ($result > 0) {
94 $db->commit();
95 $action = '';
96 } else {
97 setEventMessages($object->error, $object->errors, 'errors');
98 $db->rollback();
99 }
100}
101
102if ($action == 'confirm_delete' && $confirm == 'yes' && $permissiontodelete) {
103 $db->begin();
104
105 $object->fetch($id);
106 $object->oldcopy = dol_clone($object, 2); // @phan-suppress-current-line PhanTypeMismatchProperty
107 $result = $object->delete($user);
108 if ($result > 0) {
109 $db->commit();
110 header('Location: '.DOL_URL_ROOT.'/fourn/paiement/list.php');
111 exit;
112 } else {
113 setEventMessages($object->error, $object->errors, 'errors');
114 $db->rollback();
115 }
116}
117
118if ($action == 'confirm_validate' && $confirm == 'yes' && $permissiontovalidate) {
119 $db->begin();
120
121 $object->fetch($id);
122 if ($object->validate() >= 0) {
123 $db->commit();
124 header('Location: '.$_SERVER['PHP_SELF'].'?id='.$object->id);
125 exit;
126 } else {
127 setEventMessages($object->error, $object->errors, 'errors');
128 $db->rollback();
129 }
130}
131
132if ($action == 'setnum_paiement' && GETPOST('num_paiement') && $permissiontoadd) {
133 $object->fetch($id);
134 $res = $object->update_num(GETPOST('num_paiement'));
135 if ($res === 0) {
136 setEventMessages($langs->trans('PaymentNumberUpdateSucceeded'), null, 'mesgs');
137 } else {
138 setEventMessages($langs->trans('PaymentNumberUpdateFailed'), null, 'errors');
139 }
140}
141
142if ($action == 'setdatep' && GETPOST('datepday') && $permissiontoadd) {
143 $object->fetch($id);
144 $datepaye = dol_mktime(GETPOSTINT('datephour'), GETPOSTINT('datepmin'), GETPOSTINT('datepsec'), GETPOSTINT('datepmonth'), GETPOSTINT('datepday'), GETPOSTINT('datepyear'));
145 $res = $object->update_date($datepaye);
146 if ($res === 0) {
147 setEventMessages($langs->trans('PaymentDateUpdateSucceeded'), null, 'mesgs');
148 } else {
149 setEventMessages($langs->trans('PaymentDateUpdateFailed'), null, 'errors');
150 }
151}
152
153// Build document
154$upload_dir = $conf->fournisseur->payment->dir_output;
155include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php';
156
157// Actions to send emails
158$triggersendname = 'PAYMENTRECEIPT_SENTBYMAIL';
159$paramname = 'id';
160$autocopy = 'MAIN_MAIL_AUTOCOPY_SUPPLIER_INVOICE_TO';
161$trackid = 'pre'.$object->id;
162include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';
163
164
165/*
166 * View
167 */
168
169llxHeader();
170
171$result = $object->fetch($id);
172
173$form = new Form($db);
174$formfile = new FormFile($db);
175
176$head = payment_supplier_prepare_head($object);
177
178// The tabs are printed before the result of the fetch is checked below, so we must not offer a drop area
179// when the object was not loaded: the upload could only fail.
180print dol_get_fiche_head($head, 'payment', $langs->trans('SupplierPayment'), -1, 'payment', 0, '', '', 0, '', ($result > 0 ? 1 : 0));
181
182if ($result > 0) {
183 /*
184 * Confirmation of payment's delete
185 */
186 if ($action == 'delete') {
187 print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete');
188 }
189
190 /*
191 * Confirmation of payment's validation
192 */
193 if ($action == 'validate') {
194 print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_validate');
195 }
196
197 $linkback = '<a href="'.DOL_URL_ROOT.'/fourn/paiement/list.php'.(!empty($socid) ? '?socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>';
198
199 $morehtmlref = '';
200
201 dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref);
202
203 print '<div class="fichecenter">';
204 print '<div class="underbanner clearboth"></div>';
205
206 print '<table class="border centpercent">';
207
208 /*print '<tr>';
209 print '<td width="20%">'.$langs->trans('Ref').'</td><td>';
210 print $form->showrefnav($object,'id','',1,'rowid','ref');
211 print '</td></tr>';*/
212
213 // Date of payment
214 print '<tr><td class="titlefield">'.$form->editfieldkey("Date", 'datep', $object->date, $object, (int) ($object->statut == 0 && ($user->hasRight("fournisseur", "facture", "creer") || $user->hasRight("supplier_invoice", "creer")))).'</td>';
215 print '<td>';
216 print $form->editfieldval("Date", 'datep', $object->date, $object, $object->statut == 0 && ($user->hasRight("fournisseur", "facture", "creer") || $user->hasRight("supplier_invoice", "creer")), 'datehourpicker', '', null, $langs->trans('PaymentDateUpdateSucceeded'));
217 print '</td></tr>';
218
219 // Payment mode
220 $labeltype = $langs->trans("PaymentType".$object->type_code) != "PaymentType".$object->type_code ? $langs->trans("PaymentType".$object->type_code) : $object->type_label;
221 print '<tr><td>'.$langs->trans('PaymentMode').'</td>';
222 print '<td>'.$labeltype;
223 print $object->num_payment ? ' - '.$object->num_payment : '';
224 print '</td></tr>';
225
226 // Payment number
227 print '<tr><td>'.$form->editfieldkey("Numero", 'num_paiement', $object->num_payment, $object, $object->statut == 0 && $user->hasRight("fournisseur", "facture", "creer")).'</td>';
228 print '<td>';
229 print $form->editfieldval("Numero", 'num_paiement', $object->num_payment, $object, $object->statut == 0 && $user->hasRight("fournisseur", "facture", "creer"), 'string', '', null, $langs->trans('PaymentNumberUpdateSucceeded'));
230 print '</td></tr>';
231
232 // Payment numero
233 /* TODO Add field num_payment into payment table and save it
234 print '<tr><td>'.$form->editfieldkey("Numero",'num_paiement',$object->num_paiement,$object,$object->statut == 0 && $user->hasRight("fournisseur", "facture", "creer")).'</td>';
235 print '<td>';
236 print $form->editfieldval("Numero",'num_paiement',$object->num_paiement,$object,$object->statut == 0 && $user->hasRight("fournisseur", "facture", "creer"),'string','',null,$langs->trans('PaymentNumberUpdateSucceeded'));
237 print '</td></tr>';
238 */
239
240 // Amount
241 print '<tr><td>'.$langs->trans('Amount').'</td>';
242 print '<td><span class="amount">'.price($object->amount, 0, $langs, 0, 0, -1, $conf->currency).'</span></td></tr>';
243
244 // Status of validation of payment
245 if (getDolGlobalString('BILL_ADD_PAYMENT_VALIDATION')) {
246 print '<tr><td>'.$langs->trans('Status').'</td>';
247 print '<td>'.$object->getLibStatut(4).'</td></tr>';
248 }
249
250 $allow_delete = 1;
251 $title_button = '';
252 // Bank account
253 if (isModEnabled("bank")) {
254 if ($object->fk_account) {
255 $bankline = new AccountLine($db);
256 $bankline->fetch($object->bank_line);
257 if ($bankline->rappro) {
258 $allow_delete = 0;
259 $title_button = dol_escape_htmltag($langs->transnoentitiesnoconv("CantRemoveConciliatedPayment"));
260 }
261
262 print '<tr>';
263 print '<td>'.$langs->trans('BankAccount').'</td>';
264 print '<td>';
265 $accountstatic = new Account($db);
266 $accountstatic->fetch($bankline->fk_account);
267 print $accountstatic->getNomUrl(1);
268 print '</td>';
269 print '</tr>';
270
271 print '<tr>';
272 print '<td>'.$langs->trans('BankTransactionLine').'</td>';
273 print '<td>';
274 print $bankline->getNomUrl(1, 0, 'showconciliatedandaccounted');
275 print '</td>';
276 print '</tr>';
277 }
278 }
279
280 // Note
281 print '<tr><td>'.$form->editfieldkey("Comments", 'note', $object->note_private, $object, (int) ($user->hasRight("fournisseur", "facture", "creer") || $user->hasRight("supplier_invoice", "creer"))).'</td>';
282 print '<td>';
283 print $form->editfieldval("Note", 'note', $object->note_private, $object, ($user->hasRight("fournisseur", "facture", "creer") || $user->hasRight("supplier_invoice", "creer")), 'textarea');
284 print '</td></tr>';
285
286 print '</table>';
287
288 print '</div>';
289
290
291 print '<br><br>';
292
293
297 $sql = 'SELECT f.rowid, f.rowid as facid, f.ref, f.ref_supplier, f.type, f.paye, f.total_ht, f.total_tva, f.total_ttc, f.datef as date, f.fk_statut as status,';
298 $sql .= ' pf.amount, s.nom as name, s.rowid as socid';
299 $sql .= ' FROM '.MAIN_DB_PREFIX.'paiementfourn_facturefourn as pf,'.MAIN_DB_PREFIX.'facture_fourn as f,'.MAIN_DB_PREFIX.'societe as s';
300 $sql .= ' WHERE pf.fk_facturefourn = f.rowid AND f.fk_soc = s.rowid';
301 $sql .= ' AND pf.fk_paiementfourn = '.((int) $object->id);
302 $resql = $db->query($sql);
303 if ($resql) {
304 $num = $db->num_rows($resql);
305
306 $i = 0;
307 $total = 0;
308
309 print '<table class="noborder centpercent">';
310 print '<tr class="liste_titre">';
311 print '<td>'.$langs->trans('Invoice').'</td>';
312 print '<td>'.$langs->trans('RefSupplier').'</td>';
313 print '<td>'.$langs->trans('Company').'</td>';
314 print '<td class="right">'.$langs->trans('ExpectedToPay').'</td>';
315 print '<td class="right">'.$langs->trans('PayedByThisPayment').'</td>';
316 print '<td class="right">'.$langs->trans('Status').'</td>';
317 print "</tr>\n";
318
319 if ($num > 0) {
320 $facturestatic = new FactureFournisseur($db);
321
322 while ($i < $num) {
323 $objp = $db->fetch_object($resql);
324
325 $facturestatic->id = $objp->facid;
326 $facturestatic->ref = ($objp->ref ? $objp->ref : $objp->rowid);
327 $facturestatic->date = $db->jdate($objp->date);
328 $facturestatic->type = $objp->type;
329 $facturestatic->total_ht = $objp->total_ht;
330 $facturestatic->total_tva = $objp->total_tva;
331 $facturestatic->total_ttc = $objp->total_ttc;
332 $facturestatic->statut = $objp->status;
333 $facturestatic->status = $objp->status;
334 $facturestatic->alreadypaid = -1; // unknown
335
336 print '<tr class="oddeven">';
337 // Ref
338 print '<td>';
339 print $facturestatic->getNomUrl(1);
340 print "</td>\n";
341 // Ref supplier
342 print '<td>'.$objp->ref_supplier."</td>\n";
343 // Third party
344 print '<td><a href="'.DOL_URL_ROOT.'/fourn/card.php?socid='.$objp->socid.'">'.img_object($langs->trans('ShowCompany'), 'company').' '.$objp->name.'</a></td>';
345 // Expected to pay
346 print '<td class="right">'.price($objp->total_ttc).'</td>';
347 // Paid
348 print '<td class="right">'.price($objp->amount).'</td>';
349 // Status
350 print '<td class="right">'.$facturestatic->LibStatut($objp->paye, $objp->status, 6, 1).'</td>';
351 print "</tr>\n";
352
353 if ($objp->paye == 1) {
354 $allow_delete = 0;
355 $title_button = dol_escape_htmltag($langs->transnoentitiesnoconv("CantRemovePaymentWithOneInvoicePaid"));
356 }
357 $total += $objp->amount;
358 $i++;
359 }
360 }
361
362
363 print "</table>\n";
364 $db->free($resql);
365 } else {
366 dol_print_error($db);
367 }
368
369 print '</div>';
370
371
372 /*
373 * Actions Buttons
374 */
375
376 print '<div class="tabsAction">';
377
378 // Send by mail
379 if ($user->socid == 0 && $action != 'presend') {
380 $usercansend = (!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') || (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight("fournisseur", "supplier_invoice_advance", "send")));
381 if ($usercansend) {
382 print dolGetButtonAction('', $langs->trans('SendMail'), 'email', dolBuildUrl($_SERVER["PHP_SELF"], ['id' => $object->id, 'action' => 'presend', 'mode' => 'init'], true).'#formmailbeforetitle', '');
383 } else {
384 print dolGetButtonAction('', $langs->trans('SendMail'), 'email', '#', '', false);
385 }
386 }
387
388 // Payment validation
389 if (getDolGlobalString('BILL_ADD_PAYMENT_VALIDATION')) {
390 if ($user->socid == 0 && $object->statut == 0 && $action == '') {
391 if ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && ($user->hasRight("fournisseur", "facture", "creer") || $user->hasRight("supplier_invoice", "creer")))
392 || (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight("fournisseur", "supplier_invoice_advance", "validate"))) {
393 print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;action=validate&token='.newToken().'">'.$langs->trans('Valid').'</a>';
394 }
395 }
396 }
397
398 // Delete payment
399 if ($user->socid == 0 && $action != 'presend') {
400 if ($user->hasRight('fournisseur', 'facture', 'supprimer')) {
401 if ($allow_delete) {
402 print dolGetButtonAction($langs->trans("Delete"), $langs->trans("Delete"), 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken(), 'delete', 1, array('attr' => array('class' => 'reposition')))."\n";
403 } else {
404 print dolGetButtonAction($title_button, $langs->trans("Delete"), 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken(), 'delete', 0);
405 }
406 }
407 }
408 print '</div>';
409
410 // Select mail models is same action as presend
411 if (GETPOST('modelselected')) {
412 $action = 'presend';
413 }
414
415 if ($action != 'presend') {
416 print '<div class="fichecenter"><div class="fichehalfleft">';
417
418 // Generated documents
419 include_once DOL_DOCUMENT_ROOT.'/core/modules/supplier_payment/modules_supplier_payment.php';
421 if (is_array($modellist)) {
422 $ref = dol_sanitizeFileName($object->ref);
423 $filedir = $conf->fournisseur->payment->dir_output.'/'.dol_sanitizeFileName($object->ref);
424 $urlsource = $_SERVER['PHP_SELF'].'?id='.$object->id;
425 $genallowed = ($user->hasRight("fournisseur", "facture", "lire") || $user->hasRight("supplier_invoice", "lire"));
426 $delallowed = ($user->hasRight("fournisseur", "facture", "creer") || $user->hasRight("supplier_invoice", "creer"));
427 $modelpdf = (!empty($object->model_pdf) ? $object->model_pdf : getDolGlobalString('SUPPLIER_PAYMENT_ADDON_PDF'));
428 if (empty($modelpdf) && !empty($modellist)) {
429 $tmpkeys = array_keys($modellist);
430 $modelpdf = (string) $tmpkeys[0];
431 }
432 if (empty($modelpdf)) {
433 $modelpdf = 'standard_supplierpayment';
434 }
435
436 print $formfile->showdocuments('supplier_payment', $ref, $filedir, $urlsource, (int) $genallowed, (int) $delallowed, $modelpdf, 1, 0, 0, 40, 0, '', '', '', $object->thirdparty->default_lang);
437 $somethingshown = $formfile->numoffiles;
438 }
439
440 print '</div><div class="fichehalfright">';
441 //print '<br>';
442
443 // List of actions on element
444 /*include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
445 $formactions=new FormActions($db);
446 $somethingshown = $formactions->showactions($object,'supplier_payment',$socid,1,'listaction'.($genallowed?'largetitle':''));
447 */
448
449 print '</div></div>';
450 }
451
452 // Ensure we have a PDF model to generate/attach the receipt on presend
453 if ($action == 'presend' && empty($object->model_pdf)) {
454 $defaultpdfmodel = getDolGlobalString('SUPPLIER_PAYMENT_ADDON_PDF');
455 if (!empty($defaultpdfmodel)) {
456 $object->model_pdf = $defaultpdfmodel;
457 } else {
458 include_once DOL_DOCUMENT_ROOT.'/core/modules/supplier_payment/modules_supplier_payment.php';
460 if (!empty($modellist)) {
461 $tmpkeys = array_keys($modellist);
462 $object->model_pdf = (string) $tmpkeys[0];
463 }
464 }
465 if (empty($object->model_pdf)) {
466 $object->model_pdf = 'standard_supplierpayment';
467 }
468 }
469
470 // Presend form
471 $modelmail = 'supplier_payment_send';
472 $defaulttopic = 'SendPaymentReceipt';
473 $diroutput = $conf->fournisseur->payment->dir_output;
474 $autocopy = 'MAIN_MAIL_AUTOCOPY_SUPPLIER_INVOICE_TO';
475 $trackid = 'pre'.$object->id;
476
477 include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php';
478} else {
479 recordNotFound('', 0);
480}
481
482print dol_get_fiche_end();
483
484// End of page
485llxFooter();
486$db->close();
$id
Support class for third parties, contacts, members, users or resources.
Definition account.php:47
if(! $sortfield) if(! $sortorder) $object
Definition account.php:100
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
Definition wrapper.php:91
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.
Definition wrapper.php:73
Class to manage bank accounts.
Class to manage bank transaction lines.
Class to manage suppliers invoices.
Class to offer components to list and upload files.
Class to manage generation of HTML components Only common components must be here.
static liste_modeles($db, $maxfilenamelength=0)
Return list of active generation modules.
Class to manage payments for supplier invoices.
if(!isModEnabled('ai')||!getDolGlobalString('AI_ASSISTANT_ENABLED')) global $conf
The main.inc.php has been included so the following variable are now defined:
recordNotFound($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Displays an error page when a record is not found.
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...
dolBuildUrl($url, $params=[], $addtoken=false, $anchor='')
Return path of url.
dol_sanitizeFileName($str, $newstr='_', $unaccent=1, $includequotes=0, $allowdash=0)
Clean a string to use it as a file name.
newToken()
Return the value of token currently saved into session with name 'newtoken'.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0, $nodefault=0)
Return value of a param into GET or POST supervariable.
GETPOSTINT($paramname, $method=0, $nodefault=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
dol_clone($srcobject, $native=2)
Create a clone of instance of object (new instance with same value for each properties) With native =...
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
isModEnabled($module)
Is Dolibarr module enabled.
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.
Definition html.lib.php:540
dol_get_fiche_end($notab=0)
Return tab footer of a card.
Definition html.lib.php:738
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0, $cleanalsojavascript=0)
Definition html.lib.php:181
restrictedArea(User $user, $features, $object=0, $tableandshare='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid', $isdraft=0, $nodie=0, $mode='')
Check permissions of a user to show a page and an object.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.