33require
'../main.inc.php';
42require_once DOL_DOCUMENT_ROOT.
'/delivery/class/delivery.class.php';
43require_once DOL_DOCUMENT_ROOT.
'/core/modules/delivery/modules_delivery.php';
44require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
45require_once DOL_DOCUMENT_ROOT.
'/core/lib/sendings.lib.php';
46require_once DOL_DOCUMENT_ROOT.
'/core/class/doleditor.class.php';
48 require_once DOL_DOCUMENT_ROOT.
'/product/class/product.class.php';
51 require_once DOL_DOCUMENT_ROOT.
'/expedition/class/expedition.class.php';
54 require_once DOL_DOCUMENT_ROOT.
'/product/stock/class/entrepot.class.php';
57 require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
58 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formprojet.class.php';
62$langs->loadLangs(array(
'bills',
'orders',
'sendings'));
65 $langs->load(
'incoterm');
68$action =
GETPOST(
'action',
'aZ09');
69$confirm =
GETPOST(
'confirm',
'alpha');
70$backtopage =
GETPOST(
'backtopage',
'alpha');
75$hookmanager->initHooks(array(
'deliverycard',
'globalcard'));
80$extrafields->fetch_name_optionals_label(
$object->table_element);
83$extrafields->fetch_name_optionals_label(
$object->table_element_line);
86include DOL_DOCUMENT_ROOT.
'/core/actions_fetchobject.inc.php';
92 $socid = $user->socid;
94$result =
restrictedArea($user,
'expedition', $id,
'delivery',
'delivery');
96$permissiontoread = $user->hasRight(
'expedition',
'delivery',
'read');
97$permissiontoadd = $user->hasRight(
'expedition',
'delivery',
'creer');
98$permissiontodelete = $user->hasRight(
'expedition',
'delivery',
'supprimer') || ($permissiontoadd && isset(
$object->status) &&
$object->status == $object::STATUS_DRAFT);
99$permissiontovalidate = ((!
getDolGlobalString(
'MAIN_USE_ADVANCED_PERMS') && $user->hasRight(
'expedition',
'delivery',
'creer')) || (
getDolGlobalString(
'MAIN_USE_ADVANCED_PERMS') && $user->hasRight(
'expedition',
'delivery_advance',
'validate')));
100$permissionnote = $user->hasRight(
'expedition',
'delivery',
'creer');
101$permissiondellink = $user->hasRight(
'expedition',
'delivery',
'creer');
102$permissiontoeditextra = $permissiontoadd;
103if (
GETPOST(
'attribute',
'aZ09') && isset($extrafields->attributes[
$object->table_element][
'perms'][
GETPOST(
'attribute',
'aZ09')])) {
105 $permissiontoeditextra =
dol_eval((
string) $extrafields->attributes[
$object->table_element][
'perms'][
GETPOST(
'attribute',
'aZ09')]);
107$permissiontoeditextraline = $permissiontoadd;
108if (
GETPOST(
'attribute',
'aZ09') && isset($extrafields->attributes[
$object->table_element_line][
'perms'][
GETPOST(
'attribute',
'aZ09')])) {
110 $permissiontoeditextraline =
dol_eval((
string) $extrafields->attributes[
$object->table_element_line][
'perms'][
GETPOST(
'attribute',
'aZ09')]);
118$parameters = array();
119$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
121$permissiondellink = $user->hasRight(
'expedition',
'delivery',
'supprimer');
122include DOL_DOCUMENT_ROOT.
'/core/actions_dellink.inc.php';
124if ($action ==
'add' && $permissiontoadd) {
125 $array_options = array();
137 $commande->fetch(
$object->commande_id);
138 $commande->fetch_lines();
140 $num = count($commande->lines);
141 for ($i = 0; $i < $num; $i++) {
153 header(
"Location: ".$_SERVER[
'PHP_SELF'].
"?id=".
$object->id);
161} elseif ($action ==
'confirm_valid' && $confirm ==
'yes' && $permissiontovalidate) {
162 $result =
$object->valid($user);
166 $outputlangs = $langs;
169 $newlang =
GETPOST(
'lang_id',
'aZ09');
172 $newlang =
$object->thirdparty->default_lang;
174 if (!empty($newlang)) {
176 $outputlangs->setDefaultLang($newlang);
182 $result =
$object->generateDocument($model, $outputlangs, 0, 0, 0);
189if ($action ==
'confirm_delete' && $confirm ==
'yes' && $permissiontodelete) {
192 $result =
$object->delete($user);
196 if (!empty($backtopage)) {
197 header(
"Location: ".$backtopage);
199 header(
"Location: ".DOL_URL_ROOT.
'/expedition/list.php?restore_lastsearch_values=1');
208if ($action ==
'setdate_delivery' && $permissiontoadd) {
210 $result =
$object->setDeliveryDate($user, $datedelivery);
212 $mesg =
'<div class="error">'.$object->error.
'</div>';
214} elseif ($action ==
'set_incoterms' &&
isModEnabled(
'incoterm') && $permissiontoadd) {
220if ($action ==
'update_extras' && $permissiontoeditextra) {
223 $attribute_name =
GETPOST(
'attribute',
'aZ09');
226 $ret = $extrafields->setOptionalsFromPost(
null, $object, $attribute_name);
232 $result =
$object->updateExtraField($attribute_name,
'DELIVERY_MODIFY');
240 $action =
'edit_extras';
245if ($action ==
'update_extras_line' && $permissiontoeditextraline) {
246 $array_options = array();
249 for ($i = 0; $i < $num; $i++) {
251 $extralabelsline = $extrafields->fetch_name_optionals_label(
$object->table_element_line);
252 $array_options[$i] = $extrafields->getOptionalsFromPost($extralabelsline, (
string) $i);
254 if (is_array($extralabelsline)) {
256 foreach ($extralabelsline as $key => $value) {
257 unset($_POST[
"options_".$key]);
261 $ret =
$object->update_line(
$object->lines[$i]->id, $array_options[$i]);
263 $mesg =
'<div class="error">'.$object->error.
'</div>';
271$upload_dir =
$conf->expedition->dir_output.
'/receipt';
272include DOL_DOCUMENT_ROOT.
'/core/actions_builddoc.inc.php';
275@phan-var-force int<0,1> $hidedetails
276@phan-var-force int<0,1> $hidedesc
277@phan-var-force int<0,1> $hideref
280include DOL_DOCUMENT_ROOT.
'/core/actions_printing.inc.php';
284$triggersendname =
'DELIVERY_SENTBYMAIL';
286$autocopy =
'MAIN_MAIL_AUTOCOPY_DELIVERY_TO';
287$mode =
'emailfromdelivery';
289include DOL_DOCUMENT_ROOT .
'/core/actions_sendmails.inc.php';
296$title = $langs->trans(
'Delivery');
298llxHeader(
'', $title,
'Livraison',
'', 0, 0,
'',
'',
'',
'mod-delivery page-card');
300$form =
new Form($db);
304if ($action ==
'create') {
312 $result = $expedition->fetch(
$object->origin_id);
314 $typeobject = $expedition->origin;
325 print
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="post">';
326 print
'<input type="hidden" name="token" value="'.newToken().
'">';
327 print
'<input type="hidden" name="action" value="update_extras_line">';
328 print
'<input type="hidden" name="origin" value="'.$object->origin.
'">';
329 print
'<input type="hidden" name="id" value="'.$object->id.
'">';
330 print
'<input type="hidden" name="ref" value="'.$object->ref.
'">';
338 if ($action ==
'delete') {
339 $expedition_id =
GETPOST(
"expid");
340 print $form->formconfirm($_SERVER[
'PHP_SELF'].
'?id='.
$object->id.
'&expid='.$expedition_id.
'&backtopage='.urlencode($backtopage), $langs->trans(
"DeleteDeliveryReceipt"), $langs->trans(
"DeleteDeliveryReceiptConfirm",
$object->ref),
'confirm_delete',
'',
'', 1);
346 if ($action ==
'valid') {
347 print $form->formconfirm($_SERVER[
'PHP_SELF'].
'?id='.
$object->id, $langs->trans(
"ValidateDeliveryReceipt"), $langs->trans(
"ValidateDeliveryReceiptConfirm",
$object->ref),
'confirm_valid',
'',
'', 1);
355 if ($typeobject ==
'commande' && $expedition->origin_id > 0 &&
isModEnabled(
'order')) {
357 $objectsrc->fetch($expedition->origin_id);
359 if ($typeobject ==
'propal' && $expedition->origin_id > 0 &&
isModEnabled(
"propal")) {
360 $objectsrc =
new Propal($db);
361 $objectsrc->fetch($expedition->origin_id);
365 $linkback =
'<a href="'.DOL_URL_ROOT.
'/expedition/list.php?restore_lastsearch_values=1'.(!empty($socid) ?
'&socid='.$socid :
'').
'">'.$langs->trans(
"BackToList").
'</a>';
367 $morehtmlref =
'<div class="refidno">';
369 $morehtmlref .= $form->editfieldkey(
"RefCustomer",
'', $expedition->ref_customer, $expedition, $user->hasRight(
'expedition',
'creer'),
'string',
'', 0, 1);
370 $morehtmlref .= $form->editfieldval(
"RefCustomer",
'', $expedition->ref_customer, $expedition, $user->hasRight(
'expedition',
'creer'),
'string'.(getDolGlobalString(
'THIRDPARTY_REF_INPUT_SIZE') ?
':' .
getDolGlobalString(
'THIRDPARTY_REF_INPUT_SIZE') :
''),
'', null, null,
'', 1);
371 $morehtmlref .=
'<br>'.$langs->trans(
"RefDeliveryReceipt").
' : '.
$object->ref;
373 $morehtmlref .=
'<br>'.$expedition->thirdparty->getNomUrl(1);
376 $langs->load(
"projects");
377 $morehtmlref .=
'<br>';
379 $morehtmlref .= img_picto($langs->trans(
"Project"),
'project',
'class="pictofixedwidth"');
380 if ($action !=
'classify') {
381 $morehtmlref .=
'<a class="editfielda" href="'.dolBuildUrl($_SERVER[
'PHP_SELF'], [
'action' =>
'classify',
'id' =>
$object->id],
true).
'">'.img_edit($langs->transnoentitiesnoconv(
'SetProject')).
'</a> ';
383 $morehtmlref .= $form->form_project($_SERVER[
'PHP_SELF'].
'?id='.
$object->id, $objectsrc->socid, (
string) $objectsrc->fk_project, ($action ==
'classify' ?
'projectid' :
'none'), 0, 0, 0, 1,
'',
'maxwidth300');
385 if (!empty($objectsrc->fk_project)) {
387 $proj->fetch($objectsrc->fk_project);
388 $morehtmlref .= $proj->getNomUrl(1);
390 $morehtmlref .=
'<span class="opacitymedium"> - '.dol_escape_htmltag($proj->title).
'</span>';
395 $morehtmlref .=
'</div>';
397 $morehtmlstatus = $langs->trans(
"StatusReceipt").
' : '.
$object->getLibStatut(6).
'<br><br class="small">';
399 dol_banner_tab($expedition,
'ref', $linkback, 1,
'ref',
'ref', $morehtmlref,
'', 0,
'', $morehtmlstatus);
402 print
'<div class="fichecenter">';
403 print
'<div class="underbanner clearboth"></div>';
405 print
'<table class="border tableforfield" width="100%">';
435 if ($typeobject ==
'commande' && $expedition->origin_id &&
isModEnabled(
'order')) {
436 print
'<tr><td class="titlefield">'.$langs->trans(
"RefOrder").
'</td>';
438 $order->fetch($expedition->origin_id);
439 print
'<td colspan="3">';
440 print $order->getNomUrl(1,
'commande');
444 if ($typeobject ==
'propal' && $expedition->origin_id &&
isModEnabled(
"propal")) {
445 $propal =
new Propal($db);
446 $propal->fetch($expedition->origin_id);
447 print
'<tr><td class="titlefield">'.$langs->trans(
"RefProposal").
'</td>';
448 print
'<td colspan="3">';
449 print $propal->getNomUrl(1,
'expedition');
455 print
'<tr><td class="titlefield">'.$langs->trans(
"DateCreation").
'</td>';
456 print
'<td colspan="3">'.dol_print_date(
$object->date_creation,
'dayhour').
"</td>\n";
460 print
'<tr><td height="10">';
461 print
'<table class="nobordernopadding" width="100%"><tr><td>';
462 print $langs->trans(
'DateReceived');
465 if ($action !=
'editdate_delivery') {
466 print
'<td class="right"><a class="editfielda" href="'.$_SERVER[
"PHP_SELF"].
'?action=editdate_delivery&token='.
newToken().
'&id='.
$object->id.
'">'.img_edit($langs->trans(
'SetDeliveryDate'), 1).
'</a></td>';
468 print
'</tr></table>';
469 print
'</td><td colspan="2">';
470 if ($action ==
'editdate_delivery') {
471 print
'<form name="setdate_delivery" action="'.$_SERVER[
"PHP_SELF"].
'?id='.
$object->id.
'" method="post">';
472 print
'<input type="hidden" name="token" value="'.newToken().
'">';
473 print
'<input type="hidden" name="action" value="setdate_delivery">';
474 print $form->selectDate(
$object->date_delivery ?
$object->date_delivery : -1,
'liv_', 1, 1, 0,
"setdate_delivery", 1, 1);
475 print
'<input type="submit" class="button smallpaddingimp button-edit" value="'.$langs->trans(
'Modify').
'">';
486 print
'<table class="centpercent nobordernopadding"><tr><td>';
487 print $langs->trans(
'IncotermLabel');
488 print
'<td><td class="right">';
489 if ($user->hasRight(
'expedition',
'delivery',
'creer')) {
490 print
'<a class="editfielda" href="'.DOL_URL_ROOT.
'/delivery/card.php?id='.
$object->id.
'&action=editincoterm&token='.
newToken().
'">'.img_edit().
'</a>';
494 print
'</td></tr></table>';
496 print
'<td colspan="3">';
497 if ($action !=
'editincoterm') {
498 print $form->textwithpicto(
$object->display_incoterms(),
$object->label_incoterms, 1);
500 print $form->select_incoterms((!empty(
$object->fk_incoterms) ?
$object->fk_incoterms :
''), (!empty(
$object->location_incoterms) ?
$object->location_incoterms :
''), $_SERVER[
'PHP_SELF'].
'?id='.
$object->id);
528 $entrepot->fetch($expedition->entrepot_id);
529 print
'<tr><td width="20%">'.$langs->trans(
"Warehouse").
'</td>';
530 print
'<td colspan="3"><a href="'.DOL_URL_ROOT.
'/product/stock/card.php?id='.$entrepot->id.
'">'.$entrepot->label.
'</a></td>';
535 if ($action ==
'create_delivery') {
537 $extrafields->fetch_name_optionals_label($expedition->table_element);
538 if ($expedition->fetch_optionals() > 0) {
539 $object->array_options = array_merge(
$object->array_options, $expedition->array_options);
543 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_view.tpl.php';
545 print
"</table><br>\n";
553 $num_prod = count(
$object->lines);
557 print
'<table class="noborder centpercent">';
562 print
'<tr class="liste_titre">';
563 print
'<td>'.$langs->trans(
"Products").
'</td>';
564 print
'<td class="center">'.$langs->trans(
"QtyOrdered").
'</td>';
565 print
'<td class="center">'.$langs->trans(
"QtyReceived").
'</td>';
568 while ($i < $num_prod) {
569 $parameters = array(
'i' => $i,
'line' =>
$object->lines[$i],
'num' => $num_prod);
570 $reshook = $hookmanager->executeHooks(
'printObjectLine', $parameters, $object, $action);
572 setEventMessages($hookmanager->error, $hookmanager->errors,
'errors');
575 if (empty($reshook)) {
576 print
'<tr class="oddeven">';
577 if (
$object->lines[$i]->fk_product > 0) {
579 $product->fetch(
$object->lines[$i]->fk_product);
583 $outputlangs = $langs;
585 if (
GETPOST(
'lang_id',
'aZ09')) {
586 $newlang =
GETPOST(
'lang_id',
'aZ09');
588 if (empty($newlang)) {
589 $newlang =
$object->thirdparty->default_lang;
591 if (!empty($newlang)) {
593 $outputlangs->setDefaultLang($newlang);
596 $label = (!empty($product->multilangs[$outputlangs->defaultlang][
"label"])) ? $product->multilangs[$outputlangs->defaultlang][
"label"] :
$object->lines[$i]->product_label;
598 $label = (!empty(
$object->lines[$i]->label) ?
$object->lines[$i]->label :
$object->lines[$i]->product_label);
604 $text =
'<a href="'.DOL_URL_ROOT.
'/product/card.php?id='.
$object->lines[$i]->fk_product.
'">';
605 if (
$object->lines[$i]->fk_product_type == 1) {
606 $text .= img_object($langs->trans(
'ShowService'),
'service');
608 $text .= img_object($langs->trans(
'ShowProduct'),
'product');
610 $text .=
' '.$object->lines[$i]->product_ref.
'</a>';
611 $text .=
' - '.$label;
614 print $form->textwithtooltip($text, $description, 3, 0,
'', (
string) $i);
617 print (!empty(
$object->lines[$i]->description) &&
$object->lines[$i]->description !=
$object->lines[$i]->product_label) ?
'<br>'.dol_htmlentitiesbr(
$object->lines[$i]->description) :
'';
621 if (
$object->lines[$i]->fk_product_type == 1) {
622 $text = img_object($langs->trans(
'Service'),
'service');
624 $text = img_object($langs->trans(
'Product'),
'product');
627 if (!empty(
$object->lines[$i]->label)) {
628 $text .=
' <strong>'.$object->lines[$i]->label.
'</strong>';
629 print $form->textwithtooltip($text,
$object->lines[$i]->description, 3, 0,
'', (
string) $i);
631 print $text.
' '.nl2br(
$object->lines[$i]->description);
638 print
'<td class="center">'.$object->lines[$i]->qty_asked.
'</td>';
639 print
'<td class="center">'.$object->lines[$i]->qty_shipped.
'</td>';
646 $mode = (
$object->statut == 0) ?
'edit' :
'view';
648 $object->lines[$i]->fetch_optionals();
650 if ($action ==
'create_delivery') {
653 $extrafields->fetch_name_optionals_label($srcLine->table_element);
654 $srcLine->id = $expedition->lines[$i]->id;
655 $srcLine->fetch_optionals();
657 $object->lines[$i]->array_options = array_merge(
$object->lines[$i]->array_options, $srcLine->array_options);
660 $extrafields->fetch_name_optionals_label($srcLine->table_element);
662 print
$object->lines[$i]->showOptionals($extrafields, $mode, array(
'style' =>
'class="oddeven"',
'colspan' => $colspan),
'');
683 if ($user->socid == 0) {
684 print
'<div class="tabsAction">';
686 if (
$object->statut == 0 && $num_prod > 0) {
687 if ((!
getDolGlobalString(
'MAIN_USE_ADVANCED_PERMS') && $user->hasRight(
'expedition',
'delivery',
'creer'))
688 || (
getDolGlobalString(
'MAIN_USE_ADVANCED_PERMS') && $user->hasRight(
'expedition',
'delivery_advance',
'validate'))) {
689 print dolGetButtonAction(
'', $langs->trans(
'Validate'),
'default', $_SERVER[
"PHP_SELF"].
'?action=valid&token='.
newToken().
'&id='.
$object->id,
'');
692 if ($user->hasRight(
'expedition',
'delivery',
'supprimer') && $action !=
'presend') {
694 print dolGetButtonAction(
'', $langs->trans(
'SendMail'),
'email', $_SERVER[
"PHP_SELF"].
'?action=presend&token='.
newToken().
'&id='.
$object->id.
'&mode=init#formmailbeforetitle',
'');
697 print dolGetButtonAction($langs->trans(
'Delete'), $langs->trans(
'Delete'),
'delete', $_SERVER[
"PHP_SELF"].
'?id='.
$object->id.
'&expid='.
$object->origin_id.
'&action=delete&token='.
newToken().
'&backtopage='.urlencode(DOL_URL_ROOT.
'/expedition/card.php?id='.
$object->origin_id),
'',
true, array(
'attr' => array(
'class' =>
'reposition'))).
"\n";
699 print dolGetButtonAction($langs->trans(
'Delete'), $langs->trans(
'Delete'),
'delete', $_SERVER[
"PHP_SELF"].
'?action=delete&token='.
newToken().
'&id='.
$object->id,
'',
true, array(
'attr' => array(
'class' =>
'reposition'))).
"\n";
707 print
'<div class="fichecenter"><div class="fichehalfleft">';
712 if ($action !=
'presend') {
714 $filedir =
$conf->expedition->dir_output.
"/receipt/".$objectref;
715 $urlsource = $_SERVER[
"PHP_SELF"].
"?id=".
$object->id;
717 $genallowed = $user->hasRight(
'expedition',
'delivery',
'lire');
718 $delallowed = $user->hasRight(
'expedition',
'delivery',
'creer');
720 print $formfile->showdocuments(
'delivery', $objectref, $filedir, $urlsource, $genallowed, $delallowed,
$object->model_pdf, 1, 0, 0, 28, 0,
'',
'',
'', $soc->default_lang);
727 print
'</div><div class="fichehalfright">';
730 include_once DOL_DOCUMENT_ROOT.
'/core/class/html.formactions.class.php';
733 $somethingshown = $form->showLinkedObjectBlock($object,
'');
737 print
'</div><div class="fichehalfright">';
741 print
'</div></div>';
744 print
"Expedition inexistante ou access refuse";
748 print
"Expedition inexistante ou access refuse";
755 if (
GETPOST(
'modelselected')) {
760 $modelmail =
'delivery_send';
761 $defaulttopic =
'SendDeliveryRef';
762 $diroutput =
$conf->expedition->dir_output .
'/receipt';
763 $trackid =
'del' .
$object->id;
765 include DOL_DOCUMENT_ROOT.
'/core/tpl/card_presend.tpl.php';
$id
Support class for third parties, contacts, members, users or resources.
if(! $sortfield) if(! $sortorder) $object
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 customers orders.
Class to manage receptions.
Management class of delivery note lines.
Class to manage warehouses.
const STATUS_VALIDATED
Validated status -> parcel is ready to be sent prev status : draft next status : closed or shipment_i...
Class to manage lines of shipment.
Class to manage products or services.
Class to manage projects.
Class to manage proposals.
Class to manage third parties objects (customers, suppliers, prospects...)
Class to manage translations.
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...
price2num($amount, $rounding='', $option=0)
Function that return a number with universal decimal format (decimal separator is '.
dol_eval($s, $returnvalue=1, $hideerrors=1, $onlysimplestring='1')
Replace eval function to add more security.
dol_sanitizeFileName($str, $newstr='_', $unaccent=1, $includequotes=0, $allowdash=0)
Clean a string to use it as a file name.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
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.
GETPOSTFLOAT($paramname, $rounding='', $option=2)
Return the value of a $_GET or $_POST supervariable, converted into float.
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 =...
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_htmlentitiesbr($stringtoencode, $nl2brmode=0, $pagecodefrom='UTF-8', $removelasteolbr=1)
This function is called to encode a string into a HTML string but differs from htmlentities because a...
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.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
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.
delivery_prepare_head($object)
Prepare array with list of tabs.