27 require
'../main.inc.php';
28 require_once DOL_DOCUMENT_ROOT.
'/resource/class/dolresource.class.php';
29 require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
30 require_once DOL_DOCUMENT_ROOT.
'/fichinter/class/fichinter.class.php';
31 if (!empty($conf->projet->enabled)) {
32 require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
33 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formprojet.class.php';
35 if (!empty($conf->product->enabled) || !empty($conf->service->enabled)) {
36 require_once DOL_DOCUMENT_ROOT.
'/product/class/product.class.php';
40 $langs->loadLangs(array(
'resource',
'other',
'interventions'));
48 if (!$user->rights->resource->read)
53 $hookmanager->initHooks(array(
'element_resource'));
54 $object->available_resources = array(
'dolresource');
58 $element_id =
GETPOST(
'element_id',
'int');
59 $element_ref =
GETPOST(
'ref',
'alpha');
60 $element =
GETPOST(
'element',
'alpha');
61 $action =
GETPOST(
'action',
'alpha');
62 $mode =
GETPOST(
'mode',
'alpha');
63 $lineid =
GETPOST(
'lineid',
'int');
64 $resource_id =
GETPOST(
'fk_resource',
'int');
65 $resource_type =
GETPOST(
'resource_type',
'alpha');
67 $mandatory =
GETPOST(
'mandatory',
'int');
68 $cancel =
GETPOST(
'cancel',
'alpha');
69 $confirm =
GETPOST(
'confirm',
'alpha');
70 $socid =
GETPOST(
'socid',
'int');
84 $parameters = array(
'resource_id' => $resource_id);
85 $reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
86 if ($reshook < 0)
setEventMessages($hookmanager->error, $hookmanager->errors,
'errors');
92 if ($action ==
'add_element_resource' && !$cancel)
95 if (!($resource_id > 0))
98 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Resource")), null,
'errors');
102 $objstat->element = $element;
106 if (!empty($conf->global->RESOURCE_USED_IN_EVENT_CHECK) && $objstat->element ==
'action' && $resource_type ==
'dolresource' && intval($busy) == 1) {
107 $eventDateStart = $objstat->datep;
108 $eventDateEnd = $objstat->datef;
109 $isFullDayEvent = intval($objstat->fulldayevent);
110 if (empty($eventDateEnd)) {
111 if ($isFullDayEvent) {
113 $eventDateStart =
dol_mktime(0, 0, 0, $eventDateStartArr[
'mon'], $eventDateStartArr[
'mday'], $eventDateStartArr[
'year']);
114 $eventDateEnd =
dol_mktime(23, 59, 59, $eventDateStartArr[
'mon'], $eventDateStartArr[
'mday'], $eventDateStartArr[
'year']);
118 $sql =
"SELECT er.rowid, r.ref as r_ref, ac.id as ac_id, ac.label as ac_label";
119 $sql .=
" FROM ".MAIN_DB_PREFIX.
"element_resources as er";
120 $sql .=
" INNER JOIN ".MAIN_DB_PREFIX.
"resource as r ON r.rowid = er.resource_id AND er.resource_type = '".$db->escape($resource_type).
"'";
121 $sql .=
" INNER JOIN ".MAIN_DB_PREFIX.
"actioncomm as ac ON ac.id = er.element_id AND er.element_type = '".$db->escape($objstat->element).
"'";
122 $sql .=
" WHERE er.resource_id = ".$resource_id;
123 $sql .=
" AND er.busy = 1";
127 $sql .=
" (ac.datep <= '".$db->idate($eventDateStart).
"' AND (ac.datep2 IS NULL OR ac.datep2 >= '".$db->idate($eventDateStart).
"'))";
129 if (!empty($eventDateEnd)) {
130 $sql .=
" OR (ac.datep <= '".$db->idate($eventDateEnd).
"' AND (ac.datep2 >= '".$db->idate($eventDateEnd).
"'))";
134 $sql .=
"ac.datep >= '".$db->idate($eventDateStart).
"'";
135 if (!empty($eventDateEnd)) {
136 $sql .=
" AND (ac.datep2 IS NOT NULL AND ac.datep2 <= '".$db->idate($eventDateEnd).
"')";
141 $resql = $db->query($sql);
144 $objstat->error = $db->lasterror();
145 $objstat->errors[] = $objstat->error;
147 if ($db->num_rows(
$resql) > 0) {
150 $objstat->error = $langs->trans(
'ErrorResourcesAlreadyInUse').
' : ';
151 while ($obj = $db->fetch_object(
$resql)) {
152 $objstat->error .=
'<br> - '.$langs->trans(
'ErrorResourceUseInEvent', $obj->r_ref, $obj->ac_label.
' ['.$obj->ac_id.
']');
154 $objstat->errors[] = $objstat->error;
161 $res = $objstat->add_element_resource($resource_id, $resource_type, $busy, $mandatory);
165 if (!$error && $res > 0)
167 setEventMessages($langs->trans(
'ResourceLinkedWithSuccess'), null,
'mesgs');
168 header(
"Location: ".
$_SERVER[
'PHP_SELF'].
'?element='.$element.
'&element_id='.$objstat->id);
177 if ($action ==
'update_linked_resource' && $user->rights->resource->write && !
GETPOST(
'cancel',
'alpha'))
179 $res = $object->fetch_element_resource($lineid);
182 $object->busy = $busy;
183 $object->mandatory = $mandatory;
185 if (!empty($conf->global->RESOURCE_USED_IN_EVENT_CHECK) && $object->element_type ==
'action' && $object->resource_type ==
'dolresource' && intval($object->busy) == 1) {
186 $eventDateStart = $object->objelement->datep;
187 $eventDateEnd = $object->objelement->datef;
188 $isFullDayEvent = intval($objstat->fulldayevent);
189 if (empty($eventDateEnd)) {
190 if ($isFullDayEvent) {
192 $eventDateStart =
dol_mktime(0, 0, 0, $eventDateStartArr[
'mon'], $eventDateStartArr[
'mday'], $eventDateStartArr[
'year']);
193 $eventDateEnd =
dol_mktime(23, 59, 59, $eventDateStartArr[
'mon'], $eventDateStartArr[
'mday'], $eventDateStartArr[
'year']);
197 $sql =
"SELECT er.rowid, r.ref as r_ref, ac.id as ac_id, ac.label as ac_label";
198 $sql .=
" FROM ".MAIN_DB_PREFIX.
"element_resources as er";
199 $sql .=
" INNER JOIN ".MAIN_DB_PREFIX.
"resource as r ON r.rowid = er.resource_id AND er.resource_type = '".$db->escape($object->resource_type).
"'";
200 $sql .=
" INNER JOIN ".MAIN_DB_PREFIX.
"actioncomm as ac ON ac.id = er.element_id AND er.element_type = '".$db->escape($object->element_type).
"'";
201 $sql .=
" WHERE er.resource_id = ".$object->resource_id;
202 $sql .=
" AND ac.id != ".$object->element_id;
203 $sql .=
" AND er.busy = 1";
207 $sql .=
" (ac.datep <= '".$db->idate($eventDateStart).
"' AND (ac.datep2 IS NULL OR ac.datep2 >= '".$db->idate($eventDateStart).
"'))";
209 if (!empty($eventDateEnd)) {
210 $sql .=
" OR (ac.datep <= '".$db->idate($eventDateEnd).
"' AND (ac.datep2 IS NULL OR ac.datep2 >= '".$db->idate($eventDateEnd).
"'))";
214 $sql .=
"ac.datep >= '".$db->idate($eventDateStart).
"'";
215 if (!empty($eventDateEnd)) {
216 $sql .=
" AND (ac.datep2 IS NOT NULL AND ac.datep2 <= '".$db->idate($eventDateEnd).
"')";
221 $resql = $db->query($sql);
224 $object->error = $db->lasterror();
225 $object->errors[] = $object->error;
227 if ($db->num_rows(
$resql) > 0) {
230 $object->error = $langs->trans(
'ErrorResourcesAlreadyInUse').
' : ';
231 while ($obj = $db->fetch_object(
$resql)) {
232 $object->error .=
'<br> - '.$langs->trans(
'ErrorResourceUseInEvent', $obj->r_ref, $obj->ac_label.
' ['.$obj->ac_id.
']');
234 $object->errors[] = $objstat->error;
241 $result = $object->update_element_resource($user);
242 if ($result < 0) $error++;
248 setEventMessages($langs->trans(
'RessourceLineSuccessfullyUpdated'), null,
'mesgs');
249 header(
"Location: ".
$_SERVER[
'PHP_SELF'].
"?element=".$element.
"&element_id=".$element_id);
256 if ($action ==
'confirm_delete_linked_resource' && $user->rights->resource->delete && $confirm ===
'yes')
258 $result = $object->delete_resource($lineid, $element);
262 setEventMessages($langs->trans(
'RessourceLineSuccessfullyDeleted'), null,
'mesgs');
263 header(
"Location: ".
$_SERVER[
'PHP_SELF'].
"?element=".$element.
"&element_id=".$element_id);
271 $parameters = array(
'resource_id'=>$resource_id);
272 $reshook = $hookmanager->executeHooks(
'getElementResources', $parameters, $object, $action);
273 if ($reshook < 0)
setEventMessages($hookmanager->error, $hookmanager->errors,
'errors');
281 $form =
new Form($db);
283 $pagetitle = $langs->trans(
'ResourceElementPage');
288 $ret = count($object->available_resources);
294 print '<div class="warning">'.$langs->trans(
'NoResourceInDatabase').
'</div>';
297 if ($action ==
'delete_resource')
299 print $form->formconfirm(
"element_resource.php?element=".$element.
"&element_id=".$element_id.
"&id=".$id.
"&lineid=".$lineid, $langs->trans(
"DeleteResource"), $langs->trans(
"ConfirmDeleteResourceElement"),
"confirm_delete_linked_resource",
'',
'', 1);
304 if (($element_id || $element_ref) && $element ==
'action')
306 require_once DOL_DOCUMENT_ROOT.
'/core/lib/agenda.lib.php';
315 $linkback =
img_picto($langs->trans(
"BackToList"),
'object_list',
'class="hideonsmartphone pictoactionview"');
316 $linkback .=
'<a href="'.DOL_URL_ROOT.
'/comm/action/list.php?action=show_list">'.$langs->trans(
"BackToList").
'</a>';
320 $out .=
'</li><li class="noborder litext">'.img_picto($langs->trans(
"ViewPerUser"),
'object_calendarperuser',
'class="hideonsmartphone pictoactionview"');
321 $out .=
'<a href="'.DOL_URL_ROOT.
'/comm/action/peruser.php?action=show_peruser&year='.
dol_print_date($act->datep,
'%Y').
'&month='.
dol_print_date($act->datep,
'%m').
'&day='.
dol_print_date($act->datep,
'%d').
'">'.$langs->trans(
"ViewPerUser").
'</a>';
322 $out .=
'</li><li class="noborder litext">'.img_picto($langs->trans(
"ViewCal"),
'object_calendar',
'class="hideonsmartphone pictoactionview"');
323 $out .=
'<a href="'.DOL_URL_ROOT.
'/comm/action/index.php?action=show_month&year='.
dol_print_date($act->datep,
'%Y').
'&month='.
dol_print_date($act->datep,
'%m').
'&day='.
dol_print_date($act->datep,
'%d').
'">'.$langs->trans(
"ViewCal").
'</a>';
324 $out .=
'</li><li class="noborder litext">'.img_picto($langs->trans(
"ViewWeek"),
'object_calendarweek',
'class="hideonsmartphone pictoactionview"');
325 $out .=
'<a href="'.DOL_URL_ROOT.
'/comm/action/index.php?action=show_day&year='.
dol_print_date($act->datep,
'%Y').
'&month='.
dol_print_date($act->datep,
'%m').
'&day='.
dol_print_date($act->datep,
'%d').
'">'.$langs->trans(
"ViewWeek").
'</a>';
326 $out .=
'</li><li class="noborder litext">'.img_picto($langs->trans(
"ViewDay"),
'object_calendarday',
'class="hideonsmartphone pictoactionview"');
327 $out .=
'<a href="'.DOL_URL_ROOT.
'/comm/action/index.php?action=show_day&year='.
dol_print_date($act->datep,
'%Y').
'&month='.
dol_print_date($act->datep,
'%m').
'&day='.
dol_print_date($act->datep,
'%d').
'">'.$langs->trans(
"ViewDay").
'</a>';
331 $morehtmlref =
'<div class="refidno">';
335 if (!empty($conf->projet->enabled))
337 $langs->load(
"projects");
339 $morehtmlref .= $langs->trans(
'Project').
': ';
340 if (!empty($act->fk_project)) {
342 $proj->fetch($act->fk_project);
343 $morehtmlref .=
'<a href="'.DOL_URL_ROOT.
'/projet/card.php?id='.$act->fk_project.
'" title="'.$langs->trans(
'ShowProject').
'">';
344 $morehtmlref .= $proj->ref;
345 $morehtmlref .=
'</a>';
346 if ($proj->title) $morehtmlref .=
' - '.$proj->title;
351 $morehtmlref .=
'</div>';
353 dol_banner_tab($act,
'element_id', $linkback, ($user->socid ? 0 : 1),
'id',
'ref', $morehtmlref,
'&element='.$element, 0,
'',
'');
355 print '<div class="fichecenter">';
357 print '<div class="underbanner clearboth"></div>';
359 print '<table class="border tableforfield" width="100%">';
362 if (!empty($conf->global->AGENDA_USE_EVENT_TYPE))
364 print '<tr><td class="titlefield">'.$langs->trans(
"Type").
'</td><td colspan="3">'.$act->type.
'</td></tr>';
368 print '<tr><td class="titlefield">'.$langs->trans(
"EventOnFullDay").
'</td><td colspan="3">'.
yn($act->fulldayevent, 3).
'</td></tr>';
371 print '<tr><td>'.$langs->trans(
"DateActionStart").
'</td><td colspan="3">';
374 if ($act->percentage == 0 && $act->datep && $act->datep < ($now - $delay_warning))
print img_warning($langs->trans(
"Late"));
379 print
'<tr><td>'.$langs->trans(
"DateActionEnd").
'</td><td colspan="3">';
380 if (!$act->fulldayevent) print
dol_print_date($act->datef,
'dayhour');
382 if ($act->percentage > 0 && $act->percentage < 100 && $act->datef && $act->datef < ($now - $delay_warning)) print
img_warning($langs->trans(
"Late"));
386 if (empty($conf->global->AGENDA_DISABLE_LOCATION))
388 print
'<tr><td>'.$langs->trans(
"Location").
'</td><td colspan="3">'.$act->location.
'</td></tr>';
392 print
'<tr><td class="nowrap">'.$langs->trans(
"ActionAffectedTo").
'</td><td colspan="3">';
393 $listofuserid = array();
394 if (empty($donotclearsession))
396 if ($act->userownerid > 0) $listofuserid[$act->userownerid] = array(
'id'=>$act->userownerid,
'transparency'=>$act->transparency);
397 if (!empty($act->userassigned))
400 $tmplist1 = $act->userassigned; $tmplist2 = array();
401 foreach ($tmplist1 as $key => $val)
403 if ($val[
'id'] && $val[
'id'] != $act->userownerid) $listofuserid[$val[
'id']] = $val;
406 $_SESSION[
'assignedtouser'] = json_encode($listofuserid);
408 if (!empty($_SESSION[
'assignedtouser']))
410 $listofuserid = json_decode($_SESSION[
'assignedtouser'],
true);
413 $listofcontactid = array();
414 $listofotherid = array();
415 print
'<div class="assignedtouser">';
416 print $form->select_dolusers_forevent(
'view',
'assignedtouser', 1,
'', 0,
'',
'', 0, 0, 0,
'', ($act->datep != $act->datef) ? 1 : 0, $listofuserid, $listofcontactid, $listofotherid);
435 if (($element_id || $element_ref) && $element ==
'societe')
438 if (is_object($socstatic)) {
439 $savobject = $object;
440 $object = $socstatic;
442 require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
445 print
dol_get_fiche_head($head,
'resources', $langs->trans(
"ThirdParty"), -1,
'company');
447 dol_banner_tab($socstatic,
'socid',
'', ($user->socid ? 0 : 1),
'rowid',
'nom',
'',
'&element='.$element);
449 print
'<div class="fichecenter">';
451 print
'<div class="underbanner clearboth"></div>';
452 print
'<table class="border centpercent">';
455 print
'<tr><td class="titlefield">'.$langs->trans(
'AliasNames').
'</td><td colspan="3">';
456 print $socstatic->name_alias;
465 $object = $savobject;
470 if (($element_id || $element_ref) && $element ==
'fichinter')
472 require_once DOL_DOCUMENT_ROOT.
'/core/lib/fichinter.lib.php';
475 $fichinter->fetch($element_id, $element_ref);
476 $fichinter->fetch_thirdparty();
478 if (is_object($fichinter))
481 print
dol_get_fiche_head($head,
'resource', $langs->trans(
"InterventionCard"), -1,
'intervention');
484 $linkback =
'<a href="'.DOL_URL_ROOT.
'/fichinter/list.php'.(!empty($socid) ?
'?socid='.$socid :
'').
'">'.$langs->trans(
"BackToList").
'</a>';
487 $morehtmlref =
'<div class="refidno">';
492 $morehtmlref .= $langs->trans(
'ThirdParty').
' : '.$fichinter->thirdparty->getNomUrl(1);
494 if (!empty($conf->projet->enabled))
496 $langs->load(
"projects");
497 $morehtmlref .=
'<br>'.$langs->trans(
'Project').
' ';
498 if ($user->rights->commande->creer)
500 if ($action !=
'classify')
502 $morehtmlref .=
' : ';
503 if ($action ==
'classify') {
505 $morehtmlref .=
'<form method="post" action="'.$_SERVER[
'PHP_SELF'].
'?id='.$fichinter->id.
'">';
506 $morehtmlref .=
'<input type="hidden" name="action" value="classin">';
507 $morehtmlref .=
'<input type="hidden" name="token" value="'.newToken().
'">';
508 $morehtmlref .= $formproject->select_projects($fichinter->socid, $fichinter->fk_project,
'projectid', $maxlength, 0, 1, 0, 1, 0, 0,
'', 1);
509 $morehtmlref .=
'<input type="submit" class="button valignmiddle" value="'.$langs->trans(
"Modify").
'">';
510 $morehtmlref .=
'</form>';
512 $morehtmlref .= $form->form_project(
$_SERVER[
'PHP_SELF'].
'?id='.$fichinter->id, $fichinter->socid, $fichinter->fk_project,
'none', 0, 0, 0, 1);
515 if (!empty($fichinter->fk_project)) {
517 $proj->fetch($fichinter->fk_project);
518 $morehtmlref .=
'<a href="'.DOL_URL_ROOT.
'/projet/card.php?id='.$fichinter->fk_project.
'" title="'.$langs->trans(
'ShowProject').
'">';
519 $morehtmlref .= $proj->ref;
520 $morehtmlref .=
'</a>';
526 $morehtmlref .=
'</div>';
528 dol_banner_tab($fichinter,
'ref', $linkback, 1,
'ref',
'ref', $morehtmlref,
'&element='.$element, 0,
'',
'', 1);
535 if (($element_id || $element_ref) && ($element ==
'product' || $element ==
'service'))
537 require_once DOL_DOCUMENT_ROOT.
'/core/lib/product.lib.php';
540 $product->fetch($element_id, $element_ref);
542 if (is_object($product))
545 $titre = $langs->trans(
"CardProduct".$product->type);
551 if ($user->socid && !in_array(
'product', explode(
',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav = 0;
552 dol_banner_tab($product,
'ref',
'', $shownav,
'ref',
'ref',
'',
'&element='.$element);
560 $parameters = array(
'element'=>$element,
'element_id'=>$element_id,
'element_ref'=>$element_ref);
561 $reshook = $hookmanager->executeHooks(
'printElementTab', $parameters, $object, $action);
562 if ($reshook < 0)
setEventMessages($hookmanager->error, $hookmanager->errors,
'errors');
570 foreach ($object->available_resources as $modresources => $resources)
572 $resources = (array) $resources;
573 foreach ($resources as $resource_obj)
580 if (strpos($resource_obj,
'@'))
581 $path .=
'/'.$element_prop[
'module'];
583 $linked_resources = $object->getElementResources($element, $element_id, $resource_obj);
586 $defaulttpldir =
'/core/tpl';
587 $dirtpls = array_merge($conf->modules_parts[
'tpl'], array($defaulttpldir), array($path.$defaulttpldir));
589 foreach ($dirtpls as $module => $reldir)
591 if (file_exists(
dol_buildpath($reldir.
'/resource_'.$element_prop[
'element'].
'_add.tpl.php')))
593 $tpl =
dol_buildpath($reldir.
'/resource_'.$element_prop[
'element'].
'_add.tpl.php');
595 $tpl = DOL_DOCUMENT_ROOT.$reldir.
'/resource_add.tpl.php';
597 if (empty($conf->file->strict_mode)) {
598 $res = @include $tpl;
605 if ($mode !=
'add' || $resource_obj != $resource_type)
607 foreach ($dirtpls as $module => $reldir)
609 if (file_exists(
dol_buildpath($reldir.
'/resource_'.$element_prop[
'element'].
'_view.tpl.php')))
611 $tpl =
dol_buildpath($reldir.
'/resource_'.$element_prop[
'element'].
'_view.tpl.php');
613 $tpl = DOL_DOCUMENT_ROOT.$reldir.
'/resource_view.tpl.php';
615 if (empty($conf->file->strict_mode)) {
616 $res = @include $tpl;
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
yn($yesno, $case=1, $color=0)
Return yes or no in current language.
dol_mktime($hour, $minute, $second, $month, $day, $year, $gm= 'auto', $check=1)
Return a timestamp date built from detailed informations (by default a local PHP server timestamp) Re...
Class to manage products or services.
Class to manage interventions.
const TYPE_SERVICE
Service.
fichinter_prepare_head($object)
Prepare array with list of tabs.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
actions_prepare_head($object)
Prepare array with list of tabs.
img_warning($titlealt= 'default', $moreatt= '', $morecss= 'pictowarning')
Show warning logo.
setEventMessages($mesg, $mesgs, $style= 'mesgs', $messagekey= '')
Set event messages in dol_events session object.
Class to manage projects.
img_picto($titlealt, $picto, $moreatt= '', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt= '', $morecss= '', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
dol_getdate($timestamp, $fast=false, $forcetimezone= '')
Return an array with locale date info.
accessforbidden($message= '', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
societe_prepare_head(Societe $object)
Return array of tabs to used on pages for third parties cards.
print $_SERVER["PHP_SELF"]
Edit parameters.
getElementProperties($element_type)
Get an array with properties of an element.
dol_get_fiche_head($links=array(), $active= '', $title= '', $notab=0, $picto= '', $pictoisfullpath=0, $morehtmlright= '', $morecss= '', $limittoshow=0, $moretabssuffix= '')
Show tabs of a record.
print
Draft customers invoices.
dol_print_date($time, $format= '', $tzoutput= 'auto', $outputlangs= '', $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
if(!empty($conf->facture->enabled)&&$user->rights->facture->lire) if((!empty($conf->fournisseur->enabled)&&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)||!empty($conf->supplier_invoice->enabled))&&$user->rights->fournisseur->facture->lire) if(!empty($conf->don->enabled)&&$user->rights->don->lire) if(!empty($conf->tax->enabled)&&$user->rights->tax->charges->lire) if(!empty($conf->facture->enabled)&&!empty($conf->commande->enabled)&&$user->rights->commande->lire &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) if(!empty($conf->facture->enabled)&&$user->rights->facture->lire) if((!empty($conf->fournisseur->enabled)&&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)||!empty($conf->supplier_invoice->enabled))&&$user->rights->fournisseur->facture->lire) $resql
Social contributions to pay.
dol_print_error($db= '', $error= '', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
dol_get_fiche_end($notab=0)
Return tab footer of a card.
dol_banner_tab($object, $paramid, $morehtml= '', $shownav=1, $fieldid= 'rowid', $fieldref= 'ref', $morehtmlref= '', $moreparam= '', $nodbprefix=0, $morehtmlleft= '', $morehtmlstatus= '', $onlybanner=0, $morehtmlright= '')
Show tab footer of a card.
fetchObjectByElement($element_id, $element_type, $element_ref= '')
Fetch an object from its id and element_type Inclusion of classes is automatic.
product_prepare_head($object)
Prepare array with list of tabs.