29 define(
'CSRFCHECK_WITH_TOKEN', 1);
31 require
'main.inc.php';
32 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
35 $_GET[
'mainmenu'] =
GETPOST(
'mainmenu',
'aZ09') ?
GETPOST(
'mainmenu',
'aZ09') :
'home';
36 $action =
GETPOST(
'action',
'aZ09');
38 $hookmanager->initHooks(array(
'index'));
46 if (!isset($conf->global->MAIN_INFO_SOCIETE_NOM) || empty($conf->global->MAIN_INFO_SOCIETE_NOM)) {
47 header(
"Location: ".DOL_URL_ROOT.
"/admin/index.php?mainmenu=home&leftmenu=setup&mesg=setupnotcomplete");
50 if (count($conf->modules) <= (empty($conf->global->MAIN_MIN_NB_ENABLED_MODULE_FOR_WARNING) ? 1 : $conf->global->MAIN_MIN_NB_ENABLED_MODULE_FOR_WARNING)) {
51 header(
"Location: ".DOL_URL_ROOT.
"/admin/index.php?mainmenu=home&leftmenu=setup&mesg=setupnotcomplete");
55 require_once DOL_DOCUMENT_ROOT.
'/core/class/infobox.class.php';
56 $zone =
GETPOST(
'areacode',
'int');
57 $userid =
GETPOST(
'userid',
'int');
58 $boxorder =
GETPOST(
'boxorder',
'aZ09');
59 $boxorder .=
GETPOST(
'boxcombo',
'aZ09');
77 $title = $langs->trans(
"HomeArea").
' - Dolibarr '.DOL_VERSION;
78 if (!empty($conf->global->MAIN_APPLICATION_TITLE)) {
79 $title = $langs->trans(
"HomeArea").
' - '.$conf->global->MAIN_APPLICATION_TITLE;
88 print
load_fiche_titre(
' ', $resultboxes[
'selectboxlist'],
'', 0,
'',
'titleforhome');
90 if (!empty($conf->global->MAIN_MOTD)) {
91 $conf->global->MAIN_MOTD = preg_replace(
'/<br(\s[\sa-zA-Z_="]*)?\/?>/i',
'<br>', $conf->global->MAIN_MOTD);
92 if (!empty($conf->global->MAIN_MOTD)) {
95 $texttoshow =
make_substitutions($conf->global->MAIN_MOTD, $substitutionarray, $langs);
97 print
"\n<!-- Start of welcome text -->\n";
98 print
'<table width="100%" class="notopnoleftnoright"><tr><td>';
100 print
'</td></tr></table><br>';
101 print
"\n<!-- End of welcome text -->\n";
110 if (empty($conf->global->MAIN_REMOVE_INSTALL_WARNING)) {
114 $lockfile = DOL_DATA_ROOT.
'/install.lock';
115 if (!empty($lockfile) && !file_exists($lockfile) && is_dir(DOL_DOCUMENT_ROOT.
"/install")) {
116 $langs->load(
"errors");
118 $message .=
info_admin($langs->trans(
"WarningLockFileDoesNotExists", DOL_DATA_ROOT).
' '.$langs->trans(
"WarningUntilDirRemoved", DOL_DOCUMENT_ROOT.
"/install"), 0, 0,
'1',
'clearboth');
122 if (is_writable($conffile)) {
123 $langs->load(
"errors");
126 $message .=
info_admin($langs->transnoentities(
"WarningConfFileMustBeReadOnly").
' '.$langs->trans(
"WarningUntilDirRemoved", DOL_DOCUMENT_ROOT.
"/install"), 0, 0,
'1',
'clearboth');
130 print $message.
'<br>';
141 $boxstatItems = array();
142 $boxstatFromHook =
'';
145 $langs->loadLangs(array(
'commercial',
'bills',
'orders',
'contracts'));
148 if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) {
149 $showweather = (empty($conf->global->MAIN_DISABLE_METEO) || $conf->global->MAIN_DISABLE_METEO == 2) ? 1 : 0;
152 $dashboardlines = array();
155 require_once DOL_DOCUMENT_ROOT.
'/core/class/workboardresponse.class.php';
158 if (
isModEnabled(
'agenda') && empty($conf->global->MAIN_DISABLE_BLOCK_AGENDA) && $user->hasRight(
'agenda',
'myactions',
'read')) {
159 include_once DOL_DOCUMENT_ROOT.
'/comm/action/class/actioncomm.class.php';
161 $dashboardlines[$board->element] = $board->load_board($user);
165 if (
isModEnabled(
'project') && empty($conf->global->MAIN_DISABLE_BLOCK_PROJECT) && $user->hasRight(
'projet',
'lire')) {
166 include_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
168 $dashboardlines[$board->element] = $board->load_board($user);
172 if (
isModEnabled(
'project') && empty($conf->global->MAIN_DISABLE_BLOCK_PROJECT) && empty($conf->global->PROJECT_HIDE_TASKS) && $user->hasRight(
'projet',
'lire')) {
173 include_once DOL_DOCUMENT_ROOT.
'/projet/class/task.class.php';
174 $board =
new Task($db);
175 $dashboardlines[$board->element] = $board->load_board($user);
179 if (
isModEnabled(
'propal') && empty($conf->global->MAIN_DISABLE_BLOCK_CUSTOMER) && $user->hasRight(
'propal',
'read')) {
180 include_once DOL_DOCUMENT_ROOT.
'/comm/propal/class/propal.class.php';
182 $dashboardlines[$board->element.
'_opened'] = $board->load_board($user,
"opened");
184 $dashboardlines[$board->element.
'_signed'] = $board->load_board($user,
"signed");
188 if (
isModEnabled(
'supplier_proposal') && empty($conf->global->MAIN_DISABLE_BLOCK_SUPPLIER) && $user->hasRight(
'supplier_proposal',
'lire')) {
189 $langs->load(
"supplier_proposal");
190 include_once DOL_DOCUMENT_ROOT.
'/supplier_proposal/class/supplier_proposal.class.php';
192 $dashboardlines[$board->element.
'_opened'] = $board->load_board($user,
"opened");
194 $dashboardlines[$board->element.
'_signed'] = $board->load_board($user,
"signed");
198 if (
isModEnabled(
'commande') && empty($conf->global->MAIN_DISABLE_BLOCK_CUSTOMER) && $user->hasRight(
'commande',
'lire')) {
199 include_once DOL_DOCUMENT_ROOT.
'/commande/class/commande.class.php';
201 $dashboardlines[$board->element] = $board->load_board($user);
205 if (
isModEnabled(
'supplier_order') && empty($conf->global->MAIN_DISABLE_BLOCK_SUPPLIER) && $user->hasRight(
'fournisseur',
'commande',
'lire')) {
206 include_once DOL_DOCUMENT_ROOT.
'/fourn/class/fournisseur.commande.class.php';
208 $dashboardlines[$board->element.
'_opened'] = $board->load_board($user,
"opened");
209 $dashboardlines[$board->element.
'_awaiting'] = $board->load_board($user,
'awaiting');
213 if (
isModEnabled(
'contrat') && empty($conf->global->MAIN_DISABLE_BLOCK_CONTRACT) && $user->hasRight(
'contrat',
'lire')) {
214 include_once DOL_DOCUMENT_ROOT.
'/contrat/class/contrat.class.php';
216 $dashboardlines[$board->element.
'_inactive'] = $board->load_board($user,
"inactive");
218 $dashboardlines[$board->element.
'_active'] = $board->load_board($user,
"active");
222 if (
isModEnabled(
'ticket') && empty($conf->global->MAIN_DISABLE_BLOCK_TICKET) && $user->hasRight(
'ticket',
'read')) {
223 include_once DOL_DOCUMENT_ROOT.
'/ticket/class/ticket.class.php';
225 $dashboardlines[$board->element.
'_opened'] = $board->load_board($user,
"opened");
231 if (
isModEnabled(
'facture') && empty($conf->global->MAIN_DISABLE_BLOCK_CUSTOMER) && $user->hasRight(
'facture',
'lire')) {
232 include_once DOL_DOCUMENT_ROOT.
'/compta/facture/class/facture.class.php';
234 $dashboardlines[$board->element] = $board->load_board($user);
238 if (
isModEnabled(
'supplier_invoice') && empty($conf->global->MAIN_DISABLE_BLOCK_SUPPLIER) && $user->hasRight(
'fournisseur',
'facture',
'lire')) {
239 include_once DOL_DOCUMENT_ROOT.
'/fourn/class/fournisseur.facture.class.php';
241 $dashboardlines[$board->element] = $board->load_board($user);
245 if (
isModEnabled(
'banque') && empty($conf->global->MAIN_DISABLE_BLOCK_BANK) && $user->hasRight(
'banque',
'lire') && !$user->socid) {
246 include_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/account.class.php';
248 $nb = $board->countAccountToReconcile();
250 $dashboardlines[$board->element] = $board->load_board($user);
256 if (
isModEnabled(
'banque') && empty($conf->global->MAIN_DISABLE_BLOCK_BANK) && $user->hasRight(
'banque',
'lire') && !$user->socid) {
257 if (empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT)) {
258 include_once DOL_DOCUMENT_ROOT .
'/compta/paiement/cheque/class/remisecheque.class.php';
260 $dashboardlines[$board->element] = $board->load_board($user);
263 include_once DOL_DOCUMENT_ROOT.
'/compta/prelevement/class/bonprelevement.class.php';
265 $dashboardlines[$board->element .
'_direct_debit'] = $board->load_board($user,
'direct_debit');
268 include_once DOL_DOCUMENT_ROOT.
'/compta/prelevement/class/bonprelevement.class.php';
270 $dashboardlines[$board->element .
'_credit_transfer'] = $board->load_board($user,
'credit_transfer');
275 if (
isModEnabled(
'adherent') && empty($conf->global->MAIN_DISABLE_BLOCK_ADHERENT) && $user->hasRight(
'adherent',
'lire') && !$user->socid) {
276 include_once DOL_DOCUMENT_ROOT.
'/adherents/class/adherent.class.php';
278 $dashboardlines[$board->element.
'_shift'] = $board->load_board($user,
'shift');
279 $dashboardlines[$board->element.
'_expired'] = $board->load_board($user,
'expired');
283 if (
isModEnabled(
'expensereport') && empty($conf->global->MAIN_DISABLE_BLOCK_EXPENSEREPORT) && $user->hasRight(
'expensereport',
'approve')) {
284 include_once DOL_DOCUMENT_ROOT.
'/expensereport/class/expensereport.class.php';
286 $dashboardlines[$board->element.
'_toapprove'] = $board->load_board($user,
'toapprove');
290 if (
isModEnabled(
'expensereport') && empty($conf->global->MAIN_DISABLE_BLOCK_EXPENSEREPORT) && $user->hasRight(
'expensereport',
'to_paid')) {
291 include_once DOL_DOCUMENT_ROOT.
'/expensereport/class/expensereport.class.php';
293 $dashboardlines[$board->element.
'_topay'] = $board->load_board($user,
'topay');
297 if (
isModEnabled(
'holiday') && empty($conf->global->MAIN_DISABLE_BLOCK_HOLIDAY) && $user->hasRight(
'holiday',
'approve')) {
298 include_once DOL_DOCUMENT_ROOT.
'/holiday/class/holiday.class.php';
300 $dashboardlines[$board->element] = $board->load_board($user);
303 $object =
new stdClass();
304 $parameters = array();
306 $reshook = $hookmanager->executeHooks(
307 'addOpenElementsDashboardLine',
313 $dashboardlines = array_merge($dashboardlines, $hookmanager->resArray);
317 $dashboardgroup = array(
320 'groupName' =>
'Agenda',
321 'stats' => array(
'action'),
325 'groupName' =>
'Projects',
326 'globalStatsKey' =>
'projects',
327 'stats' => array(
'project',
'project_task'),
331 'groupName' =>
'Proposals',
332 'globalStatsKey' =>
'proposals',
334 array(
'propal_opened',
'propal_signed'),
338 'groupName' =>
'Orders',
339 'globalStatsKey' =>
'orders',
345 'groupName' =>
'Invoices',
346 'globalStatsKey' =>
'invoices',
350 'supplier_proposal' =>
352 'lang' =>
'supplier_proposal',
353 'groupName' =>
'SupplierProposals',
354 'globalStatsKey' =>
'askprice',
356 array(
'supplier_proposal_opened',
'supplier_proposal_signed'),
360 'groupName' =>
'SuppliersOrders',
361 'globalStatsKey' =>
'supplier_orders',
363 array(
'order_supplier_opened',
'order_supplier_awaiting'),
365 'invoice_supplier' =>
367 'groupName' =>
'BillsSuppliers',
368 'globalStatsKey' =>
'supplier_invoices',
370 array(
'invoice_supplier'),
374 'groupName' =>
'Contracts',
375 'globalStatsKey' =>
'Contracts',
377 array(
'contrat_inactive',
'contrat_active'),
381 'groupName' =>
'Tickets',
382 'globalStatsKey' =>
'ticket',
384 array(
'ticket_opened'),
388 'groupName' =>
'BankAccount',
390 array(
'bank_account',
'chequereceipt',
'widthdraw_direct_debit',
'widthdraw_credit_transfer'),
394 'groupName' =>
'Members',
395 'globalStatsKey' =>
'members',
397 array(
'member_shift',
'member_expired'),
401 'groupName' =>
'ExpenseReport',
402 'globalStatsKey' =>
'expensereports',
404 array(
'expensereport_toapprove',
'expensereport_topay'),
408 'groupName' =>
'Holidays',
409 'globalStatsKey' =>
'holidays',
415 $object =
new stdClass();
417 'dashboardgroup' => $dashboardgroup
419 $reshook = $hookmanager->executeHooks(
'addOpenElementsDashboardGroup', $parameters, $object, $action);
421 $dashboardgroup = array_merge($dashboardgroup, $hookmanager->resArray);
426 $totallate = $totaltodo = 0;
430 $valid_dashboardlines = array();
431 foreach ($dashboardlines as $workboardid => $tmp) {
433 $tmp->id = $workboardid;
434 $valid_dashboardlines[$workboardid] = $tmp;
439 foreach ($valid_dashboardlines as $board) {
440 if ($board->nbtodolate > 0) {
441 $totaltodo += $board->nbtodo;
442 $totallate += $board->nbtodolate;
446 $openedDashBoardSize =
'info-box-sm';
447 foreach ($dashboardgroup as $dashbordelement) {
448 if (is_array($dashbordelement[
'stats']) && count($dashbordelement[
'stats']) > 2) {
449 $openedDashBoardSize =
'';
454 $totalLateNumber = $totallate;
455 $totallatePercentage = ((!empty($totaltodo)) ? round($totallate / $totaltodo * 100, 2) : 0);
456 if (!empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE)) {
457 $totallate = $totallatePercentage;
461 $boxwork .=
'<div class="box">';
462 $boxwork .=
'<table summary="'.dol_escape_htmltag($langs->trans(
"WorkingBoard")).
'" class="noborder boxtable boxtablenobottom boxworkingboard centpercent">'.
"\n";
463 $boxwork .=
'<tr class="liste_titre">';
464 $boxwork .=
'<th class="liste_titre"><div class="inline-block valignmiddle">'.$langs->trans(
"DolibarrWorkBoard").
'</div>';
466 if ($totallate > 0) {
467 $text = $langs->transnoentitiesnoconv(
"WarningYouHaveAtLeastOneTaskLate").
' ('.$langs->transnoentitiesnoconv(
469 $totallate.(!empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE) ?
'%' :
'')
472 $text = $langs->transnoentitiesnoconv(
"NoItemLate");
474 $text .=
'. '.$langs->transnoentitiesnoconv(
"LateDesc");
476 $options =
'height="24px" style="float: right"';
477 $boxwork .=
showWeather($totallate, $text, $options,
'inline-block valignmiddle');
480 $boxwork .=
'</tr>'.
"\n";
483 $nbworkboardempty = 0;
484 $isIntopOpenedDashBoard = $globalStatInTopOpenedDashBoard = array();
485 if (!empty($valid_dashboardlines)) {
486 $openedDashBoard =
'';
488 $boxwork .=
'<tr class="nobottom nohover"><td class="tdboxstats nohover flexcontainer centpercent"><div style="display: flex: flex-wrap: wrap">';
490 foreach ($dashboardgroup as $groupKey => $groupElement) {
494 if (empty($conf->global->MAIN_DISABLE_NEW_OPENED_DASH_BOARD)) {
495 foreach ($groupElement[
'stats'] as $infoKey) {
496 if (!empty($valid_dashboardlines[$infoKey])) {
497 $boards[] = $valid_dashboardlines[$infoKey];
498 $isIntopOpenedDashBoard[] = $infoKey;
503 if (!empty($boards)) {
504 if (!empty($groupElement[
'lang'])) {
505 $langs->load($groupElement[
'lang']);
507 $groupName = $langs->trans($groupElement[
'groupName']);
508 $groupKeyLowerCase = strtolower($groupKey);
511 $globalStatsKey =
false;
512 if (!empty($groupElement[
'globalStatsKey']) && empty($groupElement[
'globalStats'])) {
513 $globalStatsKey = $groupElement[
'globalStatsKey'];
514 $groupElement[
'globalStats'] = array();
517 $openedDashBoard .=
'<div class="box-flex-item"><div class="box-flex-item-with-margin">'.
"\n";
518 $openedDashBoard .=
' <div class="info-box '.$openedDashBoardSize.
'">'.
"\n";
519 $openedDashBoard .=
' <span class="info-box-icon bg-infobox-'.$groupKeyLowerCase.
'">'.
"\n";
520 $openedDashBoard .=
' <i class="fa fa-dol-'.$groupKeyLowerCase.
'"></i>'.
"\n";
523 if (!empty($groupElement[
'globalStats'])) {
524 $globalStatInTopOpenedDashBoard[] = $globalStatsKey;
525 $openedDashBoard .=
'<span class="info-box-icon-text" title="'.$groupElement[
'globalStats'][
'text'].
'">'.$nbTotal.
'</span>';
528 $openedDashBoard .=
'</span>'.
"\n";
529 $openedDashBoard .=
'<div class="info-box-content">'.
"\n";
531 $openedDashBoard .=
'<div class="info-box-title" title="'.strip_tags($groupName).
'">'.$groupName.
'</div>'.
"\n";
532 $openedDashBoard .=
'<div class="info-box-lines">'.
"\n";
534 foreach ($boards as $board) {
535 $openedDashBoard .=
'<div class="info-box-line">';
537 if (!empty($board->labelShort)) {
538 $infoName =
'<span class="marginrightonly" title="'.$board->label.
'">'.$board->labelShort.
'</span>';
540 $infoName =
'<span class="marginrightonly">'.$board->label.
'</span>';
543 $textLateTitle = $langs->trans(
"NActionsLate", $board->nbtodolate);
544 $textLateTitle .=
' ('.$langs->trans(
"Late").
' = '.$langs->trans(
"DateReference").
' > '.$langs->trans(
"DateToday").
' '.(ceil(empty($board->warning_delay) ? 0 : $board->warning_delay) >= 0 ?
'+' :
'').ceil(empty($board->warning_delay) ? 0 : $board->warning_delay).
' '.$langs->trans(
"days").
')';
546 if ($board->id ==
'bank_account') {
547 $textLateTitle .=
'<br><span class="opacitymedium">'.$langs->trans(
"IfYouDontReconcileDisableProperty", $langs->transnoentitiesnoconv(
"Conciliable")).
'</span>';
551 if ($board->nbtodolate > 0) {
552 $textLate .=
'<span title="'.dol_escape_htmltag($textLateTitle).
'" class="classfortooltip badge badge-warning">';
553 $textLate .=
'<i class="fa fa-exclamation-triangle"></i> '.$board->nbtodolate;
554 $textLate .=
'</span>';
558 if ($board->nbtodo > 0) {
559 $nbtodClass =
'badge badge-info';
561 $nbtodClass =
'opacitymedium';
565 $labeltoshow = $board->label.
' ('.$board->nbtodo.
')';
566 if ($board->total > 0) {
567 $labeltoshow .=
' - '.price($board->total, 0, $langs, 1, -1, -1, $conf->currency);
569 $openedDashBoard .=
'<a href="'.$board->url.
'" class="info-box-text info-box-text-a">'.$infoName.
'<span class="classfortooltip'.($nbtodClass ?
' '.$nbtodClass :
'').
'" title="'.$labeltoshow.
'" >';
570 $openedDashBoard .= $board->nbtodo;
571 if ($board->total > 0 && !empty($conf->global->MAIN_WORKBOARD_SHOW_TOTAL_WO_TAX)) {
572 $openedDashBoard .=
' : '.price($board->total, 0, $langs, 1, -1, -1, $conf->currency);
574 $openedDashBoard .=
'</span>';
576 if ($board->url_late) {
577 $openedDashBoard .=
'</a>';
578 $openedDashBoard .=
' <a href="'.$board->url_late.
'" class="info-box-text info-box-text-a paddingleft">';
580 $openedDashBoard .=
' ';
582 $openedDashBoard .= $textLate;
584 $openedDashBoard .=
'</a>'.
"\n";
585 $openedDashBoard .=
'</div>'.
"\n";
590 $openedDashBoard .=
' </div><!-- /.info-box-lines --></div><!-- /.info-box-content -->'.
"\n";
591 $openedDashBoard .=
' </div><!-- /.info-box -->'.
"\n";
592 $openedDashBoard .=
'</div><!-- /.box-flex-item-with-margin -->'.
"\n";
593 $openedDashBoard .=
'</div><!-- /.box-flex-item -->'.
"\n";
594 $openedDashBoard .=
"\n";
598 if ($showweather && !empty($isIntopOpenedDashBoard)) {
599 $appendClass = (!empty($conf->global->MAIN_DISABLE_METEO) && $conf->global->MAIN_DISABLE_METEO == 2 ?
' hideonsmartphone' :
'');
603 if ($totallate > 0) {
604 $text = $langs->transnoentitiesnoconv(
"WarningYouHaveAtLeastOneTaskLate").
' ('.$langs->transnoentitiesnoconv(
606 $totallate.(!empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE) ?
'%' :
'')
609 $text = $langs->transnoentitiesnoconv(
"NoItemLate");
611 $text .=
'. '.$langs->transnoentitiesnoconv(
"LateDesc");
613 $weatherDashBoard =
'<div class="box-flex-item '.$appendClass.
'"><div class="box-flex-item-with-margin">'.
"\n";
614 $weatherDashBoard .=
' <div class="info-box '.$openedDashBoardSize.
' info-box-weather info-box-weather-level'.$weather->level.
'">'.
"\n";
615 $weatherDashBoard .=
' <span class="info-box-icon">';
616 $weatherDashBoard .=
img_weather(
'', $weather->level,
'', 0,
'valignmiddle width50');
617 $weatherDashBoard .=
' </span>'.
"\n";
618 $weatherDashBoard .=
' <div class="info-box-content">'.
"\n";
619 $weatherDashBoard .=
' <div class="info-box-title">'.$langs->trans(
'GlobalOpenedElemView').
'</div>'.
"\n";
621 if ($totallatePercentage > 0 && !empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE)) {
622 $weatherDashBoard .=
' <span class="info-box-number">'.$langs->transnoentitiesnoconv(
624 price($totallatePercentage).
'%'
626 $weatherDashBoard .=
' <span class="progress-description">'.$langs->trans(
631 $weatherDashBoard .=
' <span class="info-box-number">'.$langs->transnoentitiesnoconv(
635 if ($totallatePercentage > 0) {
636 $weatherDashBoard .=
' <span class="progress-description">'.$langs->trans(
638 price($totallatePercentage).
'%'
643 $weatherDashBoard .=
' </div><!-- /.info-box-content -->'.
"\n";
644 $weatherDashBoard .=
' </div><!-- /.info-box -->'.
"\n";
645 $weatherDashBoard .=
'</div><!-- /.box-flex-item-with-margin -->'.
"\n";
646 $weatherDashBoard .=
'</div><!-- /.box-flex-item -->'.
"\n";
647 $weatherDashBoard .=
"\n";
649 $openedDashBoard = $weatherDashBoard.$openedDashBoard;
652 if (!empty($isIntopOpenedDashBoard)) {
653 for ($i = 1; $i <= 10; $i++) {
654 $openedDashBoard .=
'<div class="box-flex-item filler"></div>';
658 $nbworkboardcount = 0;
659 foreach ($valid_dashboardlines as $infoKey => $board) {
660 if (in_array($infoKey, $isIntopOpenedDashBoard)) {
665 if (empty($board->nbtodo)) {
671 $textlate = $langs->trans(
"NActionsLate", $board->nbtodolate);
672 $textlate .=
' ('.$langs->trans(
"Late").
' = '.$langs->trans(
"DateReference").
' > '.$langs->trans(
"DateToday").
' '.(ceil($board->warning_delay) >= 0 ?
'+' :
'').ceil($board->warning_delay).
' '.$langs->trans(
"days").
')';
675 $boxwork .=
'<div class="boxstatsindicator thumbstat150 nobold nounderline"><div class="boxstats130 boxstatsborder">';
676 $boxwork .=
'<div class="boxstatscontent">';
677 $boxwork .=
'<span class="boxstatstext" title="'.dol_escape_htmltag($board->label).
'">'.$board->img.
' <span>'.$board->label.
'</span></span><br>';
678 $boxwork .=
'<a class="valignmiddle dashboardlineindicator" href="'.$board->url.
'"><span class="dashboardlineindicator'.(($board->nbtodo == 0) ?
' dashboardlineok' :
'').
'">'.$board->nbtodo.
'</span></a>';
679 if ($board->total > 0 && !empty($conf->global->MAIN_WORKBOARD_SHOW_TOTAL_WO_TAX)) {
680 $boxwork .=
' / <a class="valignmiddle dashboardlineindicator" href="'.$board->url.
'"><span class="dashboardlineindicator'.(($board->nbtodo == 0) ?
' dashboardlineok' :
'').
'">'.
price($board->total).
'</span></a>';
682 $boxwork .=
'</div>';
683 if ($board->nbtodolate > 0) {
684 $boxwork .=
'<div class="dashboardlinelatecoin nowrap">';
685 $boxwork .=
'<a title="'.dol_escape_htmltag($textlate).
'" class="valignmiddle dashboardlineindicatorlate'.($board->nbtodolate > 0 ?
' dashboardlineko' :
' dashboardlineok').
'" href="'.((!$board->url_late) ? $board->url : $board->url_late).
'">';
690 'class="inline-block hideonsmartphone valigntextbottom"'
692 $boxwork .=
'<span class="dashboardlineindicatorlate'.($board->nbtodolate > 0 ?
' dashboardlineko' :
' dashboardlineok').
'">';
693 $boxwork .= $board->nbtodolate;
694 $boxwork .=
'</span>';
696 $boxwork .=
'</div>';
698 $boxwork .=
'</div></div>';
702 $boxwork .=
'<div class="boxstatsindicator thumbstat150 nobold nounderline"><div class="boxstats150empty"></div></div>';
703 $boxwork .=
'<div class="boxstatsindicator thumbstat150 nobold nounderline"><div class="boxstats150empty"></div></div>';
704 $boxwork .=
'<div class="boxstatsindicator thumbstat150 nobold nounderline"><div class="boxstats150empty"></div></div>';
705 $boxwork .=
'<div class="boxstatsindicator thumbstat150 nobold nounderline"><div class="boxstats150empty"></div></div>';
707 $boxwork .=
'</div>';
708 $boxwork .=
'</td></tr>';
710 $boxwork .=
'<tr class="nohover">';
711 $boxwork .=
'<td class="nohover valignmiddle opacitymedium">';
712 $boxwork .= $langs->trans(
"NoOpenedElementToProcess");
717 $boxwork .=
'</td></tr>';
719 $boxwork .=
'</table>';
720 $boxwork .=
'</div>';
722 if (!empty($isIntopOpenedDashBoard)) {
723 print
'<div class="fichecenter">';
724 print
'<div class="opened-dash-board-wrap"><div class="box-flex-container">'.$openedDashBoard.
'</div></div>';
730 print
'<div class="clearboth"></div>';
732 print
'<div class="fichecenter fichecenterbis">';
739 $boxlist =
'<div class="twocolumns">';
741 $boxlist .=
'<div class="firstcolumn fichehalfleft boxhalfleft" id="boxhalfleft">';
742 if (!empty($nbworkboardcount)) {
743 $boxlist .= $boxwork;
746 $boxlist .= $resultboxes[
'boxlista'];
748 $boxlist .=
'</div>';
750 $boxlist .=
'<div class="secondcolumn fichehalfright boxhalfright" id="boxhalfright">';
752 $boxlist .= $resultboxes[
'boxlistb'];
754 $boxlist .=
'</div>';
757 $boxlist .=
'</div>';
786 return img_weather($text, $weather->picto, $options, 0, $morecss);
801 $weather =
new stdClass();
802 $weather->picto =
'';
807 $used_conf = empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE) ?
'MAIN_METEO_LEVEL' :
'MAIN_METEO_PERCENTAGE_LEVEL';
812 $level1 = $offset + $factor;
814 $level2 = $offset + 2 * $factor;
816 $level3 = $offset + 3 * $factor;
819 if ($totallate <= $level0) {
820 $weather->picto =
'weather-clear.png';
822 } elseif ($totallate <= $level1) {
823 $weather->picto =
'weather-few-clouds.png';
825 } elseif ($totallate <= $level2) {
826 $weather->picto =
'weather-clouds.png';
828 } elseif ($totallate <= $level3) {
829 $weather->picto =
'weather-many-clouds.png';
832 $weather->picto =
'weather-storm.png';
Class to manage bank accounts.
Class to manage agenda events (actions)
Class to manage members of a foundation.
Class to manage withdrawal receipts.
Class to manage predefined suppliers products.
Class to manage customers orders.
Class to manage contracts.
Class to manage Trips and Expenses.
Class to manage suppliers invoices.
Class to manage invoices.
Class of the module paid holiday.
static saveboxorder($dbs, $zone, $boxorder, $userid=0)
Save order of boxes for area and user.
Class to manage projects.
Class to manage proposals.
Class to manage cheque delivery receipts.
Class to manage price ask supplier.
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
img_weather($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $morecss='')
Show weather picto.
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='')
Set event messages in dol_events session object.
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.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
complete_substitutions_array(&$substitutionarray, $outputlangs, $object=null, $parameters=null, $callfunc="completesubstitutionarray")
Complete the $substitutionarray with more entries coming from external module that had set the "subst...
make_substitutions($text, $substitutionarray, $outputlangs=null, $converttextinhtmlifnecessary=0)
Make substitution into a text string, replacing keys with vals from $substitutionarray (oldval=>newva...
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
info_admin($text, $infoonimgalt=0, $nodiv=0, $admin='1', $morecss='hideonsmartphone', $textfordropdown='')
Show information for admin users or standard users.
if(!function_exists('utf8_encode')) if(!function_exists('utf8_decode')) getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
getCommonSubstitutionArray($outputlangs, $onlykey=0, $exclude=null, $object=null)
Return array of possible common substitutions.
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...
isModEnabled($module)
Is Dolibarr module enabled.
showWeather($totallate, $text, $options, $morecss='')
Show weather logo.
getWeatherStatus($totallate)
get weather level $conf->global->MAIN_METEO_LEVELx
if(!defined( 'CSRFCHECK_WITH_TOKEN'))
Class to generate the form for creating a new ticket.
if(!defined('NOTOKENRENEWAL')) if(!defined('NOLOGIN')) if(!defined('NOCSRFCHECK')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) if(!defined('NOIPCHECK')) if(!defined('NOBROWSERNOTIF')) llxHeader()
Header empty.