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) {
191 $result =
$object->delete($user);
195 if (!empty($backtopage)) {
196 header(
"Location: ".$backtopage);
198 header(
"Location: ".DOL_URL_ROOT.
'/expedition/list.php?restore_lastsearch_values=1');
206if ($action ==
'setdate_delivery' && $permissiontoadd) {
208 $result =
$object->setDeliveryDate($user, $datedelivery);
210 $mesg =
'<div class="error">'.$object->error.
'</div>';
212} elseif ($action ==
'set_incoterms' &&
isModEnabled(
'incoterm') && $permissiontoadd) {
218if ($action ==
'update_extras' && $permissiontoeditextra) {
221 $attribute_name =
GETPOST(
'attribute',
'aZ09');
224 $ret = $extrafields->setOptionalsFromPost(
null, $object, $attribute_name);
230 $result =
$object->updateExtraField($attribute_name,
'DELIVERY_MODIFY');
238 $action =
'edit_extras';
243if ($action ==
'update_extras_line' && $permissiontoeditextraline) {
244 $array_options = array();
247 for ($i = 0; $i < $num; $i++) {
249 $extralabelsline = $extrafields->fetch_name_optionals_label(
$object->table_element_line);
250 $array_options[$i] = $extrafields->getOptionalsFromPost($extralabelsline, (
string) $i);
252 if (is_array($extralabelsline)) {
254 foreach ($extralabelsline as $key => $value) {
255 unset($_POST[
"options_".$key]);
259 $ret =
$object->update_line(
$object->lines[$i]->id, $array_options[$i]);
261 $mesg =
'<div class="error">'.$object->error.
'</div>';
269$upload_dir =
$conf->expedition->dir_output.
'/receipt';
270include DOL_DOCUMENT_ROOT.
'/core/actions_builddoc.inc.php';
273@phan-var-force int<0,1> $hidedetails
274@phan-var-force int<0,1> $hidedesc
275@phan-var-force int<0,1> $hideref
278include DOL_DOCUMENT_ROOT.
'/core/actions_printing.inc.php';
282$triggersendname =
'DELIVERY_SENTBYMAIL';
284$autocopy =
'MAIN_MAIL_AUTOCOPY_DELIVERY_TO';
285$mode =
'emailfromdelivery';
287include DOL_DOCUMENT_ROOT .
'/core/actions_sendmails.inc.php';
294$title = $langs->trans(
'Delivery');
296llxHeader(
'', $title,
'Livraison',
'', 0, 0,
'',
'',
'',
'mod-delivery page-card');
302if ($action ==
'create') {
310 $result = $expedition->fetch(
$object->origin_id);
312 $typeobject = $expedition->origin;
323 print
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="post">';
324 print
'<input type="hidden" name="token" value="'.newToken().
'">';
325 print
'<input type="hidden" name="action" value="update_extras_line">';
326 print
'<input type="hidden" name="origin" value="'.$object->origin.
'">';
327 print
'<input type="hidden" name="id" value="'.$object->id.
'">';
328 print
'<input type="hidden" name="ref" value="'.$object->ref.
'">';
336 if ($action ==
'delete') {
337 $expedition_id =
GETPOST(
"expid");
338 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);
344 if ($action ==
'valid') {
345 print $form->formconfirm($_SERVER[
'PHP_SELF'].
'?id='.
$object->id, $langs->trans(
"ValidateDeliveryReceipt"), $langs->trans(
"ValidateDeliveryReceiptConfirm",
$object->ref),
'confirm_valid',
'',
'', 1);
353 if ($typeobject ==
'commande' && $expedition->origin_id > 0 &&
isModEnabled(
'order')) {
355 $objectsrc->fetch($expedition->origin_id);
357 if ($typeobject ==
'propal' && $expedition->origin_id > 0 &&
isModEnabled(
"propal")) {
359 $objectsrc->fetch($expedition->origin_id);
363 $linkback =
'<a href="'.DOL_URL_ROOT.
'/expedition/list.php?restore_lastsearch_values=1'.(!empty($socid) ?
'&socid='.$socid :
'').
'">'.$langs->trans(
"BackToList").
'</a>';
365 $morehtmlref =
'<div class="refidno">';
367 $morehtmlref .= $form->editfieldkey(
"RefCustomer",
'', $expedition->ref_customer, $expedition, $user->hasRight(
'expedition',
'creer'),
'string',
'', 0, 1);
368 $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);
369 $morehtmlref .=
'<br>'.$langs->trans(
"RefDeliveryReceipt").
' : '.
$object->ref;
371 $morehtmlref .=
'<br>'.$expedition->thirdparty->getNomUrl(1);
374 $langs->load(
"projects");
375 $morehtmlref .=
'<br>';
377 $morehtmlref .=
img_picto($langs->trans(
"Project"),
'project',
'class="pictofixedwidth"');
378 if ($action !=
'classify') {
379 $morehtmlref .=
'<a class="editfielda" href="'.dolBuildUrl($_SERVER[
'PHP_SELF'], [
'action' =>
'classify',
'id' =>
$object->id],
true).
'">'.
img_edit($langs->transnoentitiesnoconv(
'SetProject')).
'</a> ';
381 $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');
383 if (!empty($objectsrc->fk_project)) {
385 $proj->fetch($objectsrc->fk_project);
386 $morehtmlref .= $proj->getNomUrl(1);
388 $morehtmlref .=
'<span class="opacitymedium"> - '.dol_escape_htmltag($proj->title).
'</span>';
393 $morehtmlref .=
'</div>';
395 $morehtmlstatus = $langs->trans(
"StatusReceipt").
' : '.
$object->getLibStatut(6).
'<br><br class="small">';
397 dol_banner_tab($expedition,
'ref', $linkback, 1,
'ref',
'ref', $morehtmlref,
'', 0,
'', $morehtmlstatus);
400 print
'<div class="fichecenter">';
401 print
'<div class="underbanner clearboth"></div>';
403 print
'<table class="border tableforfield" width="100%">';
433 if ($typeobject ==
'commande' && $expedition->origin_id &&
isModEnabled(
'order')) {
434 print
'<tr><td class="titlefield">'.$langs->trans(
"RefOrder").
'</td>';
436 $order->fetch($expedition->origin_id);
437 print
'<td colspan="3">';
438 print $order->getNomUrl(1,
'commande');
442 if ($typeobject ==
'propal' && $expedition->origin_id &&
isModEnabled(
"propal")) {
444 $propal->fetch($expedition->origin_id);
445 print
'<tr><td class="titlefield">'.$langs->trans(
"RefProposal").
'</td>';
446 print
'<td colspan="3">';
447 print $propal->getNomUrl(1,
'expedition');
453 print
'<tr><td class="titlefield">'.$langs->trans(
"DateCreation").
'</td>';
454 print
'<td colspan="3">'.dol_print_date(
$object->date_creation,
'dayhour').
"</td>\n";
458 print
'<tr><td height="10">';
459 print
'<table class="nobordernopadding" width="100%"><tr><td>';
460 print $langs->trans(
'DateReceived');
463 if ($action !=
'editdate_delivery') {
464 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>';
466 print
'</tr></table>';
467 print
'</td><td colspan="2">';
468 if ($action ==
'editdate_delivery') {
469 print
'<form name="setdate_delivery" action="'.$_SERVER[
"PHP_SELF"].
'?id='.
$object->id.
'" method="post">';
470 print
'<input type="hidden" name="token" value="'.newToken().
'">';
471 print
'<input type="hidden" name="action" value="setdate_delivery">';
472 print $form->selectDate(
$object->date_delivery ?
$object->date_delivery : -1,
'liv_', 1, 1, 0,
"setdate_delivery", 1, 1);
473 print
'<input type="submit" class="button smallpaddingimp button-edit" value="'.$langs->trans(
'Modify').
'">';
484 print
'<table class="centpercent nobordernopadding"><tr><td>';
485 print $langs->trans(
'IncotermLabel');
486 print
'<td><td class="right">';
487 if ($user->hasRight(
'expedition',
'delivery',
'creer')) {
488 print
'<a class="editfielda" href="'.DOL_URL_ROOT.
'/delivery/card.php?id='.
$object->id.
'&action=editincoterm&token='.newToken().
'">'.
img_edit().
'</a>';
492 print
'</td></tr></table>';
494 print
'<td colspan="3">';
495 if ($action !=
'editincoterm') {
496 print $form->textwithpicto(
$object->display_incoterms(),
$object->label_incoterms, 1);
498 print $form->select_incoterms((!empty(
$object->fk_incoterms) ?
$object->fk_incoterms :
''), (!empty(
$object->location_incoterms) ?
$object->location_incoterms :
''), $_SERVER[
'PHP_SELF'].
'?id='.
$object->id);
526 $entrepot->fetch($expedition->entrepot_id);
527 print
'<tr><td width="20%">'.$langs->trans(
"Warehouse").
'</td>';
528 print
'<td colspan="3"><a href="'.DOL_URL_ROOT.
'/product/stock/card.php?id='.$entrepot->id.
'">'.$entrepot->label.
'</a></td>';
533 if ($action ==
'create_delivery') {
535 $extrafields->fetch_name_optionals_label($expedition->table_element);
536 if ($expedition->fetch_optionals() > 0) {
537 $object->array_options = array_merge(
$object->array_options, $expedition->array_options);
541 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_view.tpl.php';
543 print
"</table><br>\n";
551 $num_prod = count(
$object->lines);
555 print
'<table class="noborder centpercent">';
560 print
'<tr class="liste_titre">';
561 print
'<td>'.$langs->trans(
"Products").
'</td>';
562 print
'<td class="center">'.$langs->trans(
"QtyOrdered").
'</td>';
563 print
'<td class="center">'.$langs->trans(
"QtyReceived").
'</td>';
566 while ($i < $num_prod) {
567 $parameters = array(
'i' => $i,
'line' =>
$object->lines[$i],
'num' => $num_prod);
568 $reshook = $hookmanager->executeHooks(
'printObjectLine', $parameters, $object, $action);
573 if (empty($reshook)) {
574 print
'<tr class="oddeven">';
575 if (
$object->lines[$i]->fk_product > 0) {
577 $product->fetch(
$object->lines[$i]->fk_product);
581 $outputlangs = $langs;
583 if (
GETPOST(
'lang_id',
'aZ09')) {
584 $newlang =
GETPOST(
'lang_id',
'aZ09');
586 if (empty($newlang)) {
587 $newlang =
$object->thirdparty->default_lang;
589 if (!empty($newlang)) {
591 $outputlangs->setDefaultLang($newlang);
594 $label = (!empty($product->multilangs[$outputlangs->defaultlang][
"label"])) ? $product->multilangs[$outputlangs->defaultlang][
"label"] :
$object->lines[$i]->product_label;
596 $label = (!empty(
$object->lines[$i]->label) ?
$object->lines[$i]->label :
$object->lines[$i]->product_label);
602 $text =
'<a href="'.DOL_URL_ROOT.
'/product/card.php?id='.
$object->lines[$i]->fk_product.
'">';
603 if (
$object->lines[$i]->fk_product_type == 1) {
604 $text .=
img_object($langs->trans(
'ShowService'),
'service');
606 $text .=
img_object($langs->trans(
'ShowProduct'),
'product');
608 $text .=
' '.$object->lines[$i]->product_ref.
'</a>';
609 $text .=
' - '.$label;
612 print $form->textwithtooltip($text, $description, 3, 0,
'', (
string) $i);
615 print (!empty(
$object->lines[$i]->description) &&
$object->lines[$i]->description !=
$object->lines[$i]->product_label) ?
'<br>'.dol_htmlentitiesbr(
$object->lines[$i]->description) :
'';
619 if (
$object->lines[$i]->fk_product_type == 1) {
620 $text =
img_object($langs->trans(
'Service'),
'service');
622 $text =
img_object($langs->trans(
'Product'),
'product');
625 if (!empty(
$object->lines[$i]->label)) {
626 $text .=
' <strong>'.$object->lines[$i]->label.
'</strong>';
627 print $form->textwithtooltip($text,
$object->lines[$i]->description, 3, 0,
'', (
string) $i);
629 print $text.
' '.nl2br(
$object->lines[$i]->description);
636 print
'<td class="center">'.$object->lines[$i]->qty_asked.
'</td>';
637 print
'<td class="center">'.$object->lines[$i]->qty_shipped.
'</td>';
644 $mode = (
$object->statut == 0) ?
'edit' :
'view';
646 $object->lines[$i]->fetch_optionals();
648 if ($action ==
'create_delivery') {
651 $extrafields->fetch_name_optionals_label($srcLine->table_element);
652 $srcLine->id = $expedition->lines[$i]->id;
653 $srcLine->fetch_optionals();
655 $object->lines[$i]->array_options = array_merge(
$object->lines[$i]->array_options, $srcLine->array_options);
658 $extrafields->fetch_name_optionals_label($srcLine->table_element);
660 print
$object->lines[$i]->showOptionals($extrafields, $mode, array(
'style' =>
'class="oddeven"',
'colspan' => $colspan),
'');
681 if ($user->socid == 0) {
682 print
'<div class="tabsAction">';
684 if (
$object->statut == 0 && $num_prod > 0) {
685 if ((!
getDolGlobalString(
'MAIN_USE_ADVANCED_PERMS') && $user->hasRight(
'expedition',
'delivery',
'creer'))
686 || (
getDolGlobalString(
'MAIN_USE_ADVANCED_PERMS') && $user->hasRight(
'expedition',
'delivery_advance',
'validate'))) {
687 print dolGetButtonAction(
'', $langs->trans(
'Validate'),
'default', $_SERVER[
"PHP_SELF"].
'?action=valid&token='.newToken().
'&id='.
$object->id,
'');
690 if ($user->hasRight(
'expedition',
'delivery',
'supprimer') && $action !=
'presend') {
692 print dolGetButtonAction(
'', $langs->trans(
'SendMail'),
'email', $_SERVER[
"PHP_SELF"].
'?action=presend&token='.newToken().
'&id='.
$object->id.
'&mode=init#formmailbeforetitle',
'');
695 print dolGetButtonAction(
'', $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),
'');
697 print dolGetButtonAction(
'', $langs->trans(
'Delete'),
'delete', $_SERVER[
"PHP_SELF"].
'?action=delete&token='.newToken().
'&id='.
$object->id,
'');
705 print
'<div class="fichecenter"><div class="fichehalfleft">';
710 if ($action !=
'presend') {
712 $filedir =
$conf->expedition->dir_output.
"/receipt/".$objectref;
713 $urlsource = $_SERVER[
"PHP_SELF"].
"?id=".
$object->id;
715 $genallowed = $user->hasRight(
'expedition',
'delivery',
'lire');
716 $delallowed = $user->hasRight(
'expedition',
'delivery',
'creer');
718 print $formfile->showdocuments(
'delivery', $objectref, $filedir, $urlsource, $genallowed, $delallowed,
$object->model_pdf, 1, 0, 0, 28, 0,
'',
'',
'', $soc->default_lang);
725 print
'</div><div class="fichehalfright">';
728 include_once DOL_DOCUMENT_ROOT.
'/core/class/html.formactions.class.php';
731 $somethingshown = $form->showLinkedObjectBlock($object,
'');
735 print
'</div><div class="fichehalfright">';
739 print
'</div></div>';
742 print
"Expedition inexistante ou access refuse";
746 print
"Expedition inexistante ou access refuse";
753 if (
GETPOST(
'modelselected')) {
758 $modelmail =
'delivery_send';
759 $defaulttopic =
'SendDeliveryRef';
760 $diroutput =
$conf->expedition->dir_output .
'/receipt';
761 $trackid =
'del' .
$object->id;
763 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...
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
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)
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.
price2num($amount, $rounding='', $option=0)
Function that return a number with universal decimal format (decimal separator is '.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
dol_eval($s, $returnvalue=1, $hideerrors=1, $onlysimplestring='1')
Replace eval function to add more security.
img_object($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $allowothertags=array())
Show a picto called object_picto (generic function)
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.
GETPOSTFLOAT($paramname, $rounding='', $option=2)
Return the value of a $_GET or $_POST supervariable, converted into float.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
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_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
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.
img_edit($titlealt='default', $float=0, $other='')
Show logo edit/modify fiche.
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.
delivery_prepare_head($object)
Prepare array with list of tabs.