31define(
'CSRFCHECK_WITH_TOKEN', 1);
33require
'main.inc.php';
34require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
37$_GET[
'mainmenu'] =
GETPOST(
'mainmenu',
'aZ09') ?
GETPOST(
'mainmenu',
'aZ09') :
'home';
38$action =
GETPOST(
'action',
'aZ09');
40$hookmanager->initHooks(array(
'index'));
48$nbmodulesnotautoenabled = count($conf->modules);
49$listofmodulesautoenabled = array(
'agenda',
'fckeditor',
'export',
'import');
50foreach ($listofmodulesautoenabled as $moduleautoenable) {
51 if (in_array($moduleautoenable, $conf->modules)) {
52 $nbmodulesnotautoenabled--;
58 header(
"Location: ".DOL_URL_ROOT.
"/admin/index.php?mainmenu=home&leftmenu=setup&mesg=setupnotcomplete");
61if ($nbmodulesnotautoenabled <=
getDolGlobalInt(
'MAIN_MIN_NB_ENABLED_MODULE_FOR_WARNING', 1)) {
62 header(
"Location: ".DOL_URL_ROOT.
"/admin/index.php?mainmenu=home&leftmenu=setup&mesg=setupnotcomplete");
66 require_once DOL_DOCUMENT_ROOT.
'/core/class/infobox.class.php';
69 $boxorder =
GETPOST(
'boxorder',
'aZ09');
70 $boxorder .=
GETPOST(
'boxcombo',
'aZ09');
83if (!isset($form) || !is_object($form)) {
84 $form =
new Form($db);
88$title = $langs->trans(
"HomeArea").
' - Dolibarr '.DOL_VERSION;
90 $title = $langs->trans(
"HomeArea").
' - ' .
getDolGlobalString(
'MAIN_APPLICATION_TITLE');
99print
load_fiche_titre(
' ', $resultboxes[
'selectboxlist'],
'', 0,
'',
'titleforhome');
102 $conf->global->MAIN_MOTD = preg_replace(
'/<br(\s[\sa-zA-Z_="]*)?\/?>/i',
'<br>',
getDolGlobalString(
'MAIN_MOTD'));
108 print
"\n<!-- Start of welcome text -->\n";
109 print
'<table class="centpercent notopnoleftnoright"><tr><td>';
111 print
'</td></tr></table><br>';
112 print
"\n<!-- End of welcome text -->\n";
122 $langs->loadLangs(array(
"admin"));
123 print
info_admin($langs->trans(
"WarningExperimentalFeatureInvoiceSituationNeedToUpgradeToProgressiveMode",
'https://partners.dolibarr.org'));
136 $lockfile = DOL_DATA_ROOT.
'/install.lock';
137 if (!empty($lockfile) && !file_exists($lockfile) && is_dir(DOL_DOCUMENT_ROOT.
"/install")) {
138 $langs->load(
"errors");
140 $message .=
info_admin($langs->transnoentities(
"WarningLockFileDoesNotExists", DOL_DATA_ROOT).
' '.$langs->transnoentities(
"WarningUntilDirRemoved", DOL_DOCUMENT_ROOT.
"/install"), 0, 0,
'1',
'clearboth');
144 if (is_writable($conffile)) {
145 $langs->load(
"errors");
148 $message .=
info_admin($langs->transnoentities(
"WarningConfFileMustBeReadOnly").
' '.$langs->transnoentities(
"WarningUntilDirRemoved", DOL_DOCUMENT_ROOT.
"/install"), 0, 0,
'1',
'clearboth');
152 $parameters = array();
153 $reshook = $hookmanager->executeHooks(
'infoadmin', $parameters, $object, $action);
155 $message .= $hookmanager->resPrint;
169$boxstatItems = array();
170$boxstatFromHook =
'';
173$langs->loadLangs(array(
'commercial',
'bills',
'orders',
'contracts'));
180 $dashboardlines = array();
183 require_once DOL_DOCUMENT_ROOT.
'/core/class/workboardresponse.class.php';
186 if (isModEnabled(
'agenda') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_AGENDA') && $user->hasRight(
'agenda',
'myactions',
'read')) {
187 include_once DOL_DOCUMENT_ROOT.
'/comm/action/class/actioncomm.class.php';
189 $dashboardlines[$board->element] = $board->load_board($user);
193 if (isModEnabled(
'project') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_PROJECT') && $user->hasRight(
'projet',
'lire')) {
194 include_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
196 $dashboardlines[$board->element] = $board->load_board($user);
201 include_once DOL_DOCUMENT_ROOT.
'/projet/class/task.class.php';
202 $board =
new Task($db);
203 $dashboardlines[$board->element] = $board->load_board($user);
207 if (isModEnabled(
'propal') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_CUSTOMER') && $user->hasRight(
'propal',
'read')) {
208 include_once DOL_DOCUMENT_ROOT.
'/comm/propal/class/propal.class.php';
210 $dashboardlines[$board->element.
'_opened'] = $board->load_board($user,
"opened");
212 $dashboardlines[$board->element.
'_signed'] = $board->load_board($user,
"signed");
216 if (isModEnabled(
'supplier_proposal') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_SUPPLIER') && $user->hasRight(
'supplier_proposal',
'lire')) {
217 $langs->load(
"supplier_proposal");
218 include_once DOL_DOCUMENT_ROOT.
'/supplier_proposal/class/supplier_proposal.class.php';
220 $dashboardlines[$board->element.
'_opened'] = $board->load_board($user,
"opened");
222 $dashboardlines[$board->element.
'_signed'] = $board->load_board($user,
"signed");
226 if (isModEnabled(
'order') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_CUSTOMER') && $user->hasRight(
'commande',
'lire')) {
227 include_once DOL_DOCUMENT_ROOT.
'/commande/class/commande.class.php';
230 $dashboardlines[$board->element.
'_toship'] = $board->load_board($user,
'toship');
233 $dashboardlines[$board->element.
'_tobill'] = $board->load_board($user,
'tobill');
236 $dashboardlines[$board->element.
'_shippedtobill'] = $board->load_board($user,
'shippedtobill');
240 if (isModEnabled(
'supplier_order') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_SUPPLIER') && $user->hasRight(
'fournisseur',
'commande',
'lire')) {
241 include_once DOL_DOCUMENT_ROOT.
'/fourn/class/fournisseur.commande.class.php';
243 $dashboardlines[$board->element.
'_opened'] = $board->load_board($user,
"opened");
244 $dashboardlines[$board->element.
'_awaiting'] = $board->load_board($user,
'awaiting');
248 if (isModEnabled(
'contract') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_CONTRACT') && $user->hasRight(
'contrat',
'lire')) {
249 include_once DOL_DOCUMENT_ROOT.
'/contrat/class/contrat.class.php';
251 $dashboardlines[$board->element.
'_inactive'] = $board->load_board($user,
"inactive");
253 $dashboardlines[$board->element.
'_active'] = $board->load_board($user,
"active");
257 if (isModEnabled(
'ticket') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_TICKET') && $user->hasRight(
'ticket',
'read')) {
258 include_once DOL_DOCUMENT_ROOT.
'/ticket/class/ticket.class.php';
260 $dashboardlines[$board->element.
'_opened'] = $board->load_board($user,
"opened");
266 if (isModEnabled(
'invoice') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_CUSTOMER') && $user->hasRight(
'facture',
'lire')) {
267 include_once DOL_DOCUMENT_ROOT.
'/compta/facture/class/facture.class.php';
269 $dashboardlines[$board->element] = $board->load_board($user);
273 if (isModEnabled(
'supplier_invoice') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_SUPPLIER') && $user->hasRight(
'fournisseur',
'facture',
'lire')) {
274 include_once DOL_DOCUMENT_ROOT.
'/fourn/class/fournisseur.facture.class.php';
276 $dashboardlines[$board->element] = $board->load_board($user);
280 if (isModEnabled(
'bank') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_BANK') && $user->hasRight(
'banque',
'lire') && !$user->socid) {
281 include_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/account.class.php';
283 $nb = $board->countAccountToReconcile();
285 $dashboardlines[$board->element] = $board->load_board($user);
291 if (isModEnabled(
'bank') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_BANK') && $user->hasRight(
'banque',
'lire') && !$user->socid) {
293 include_once DOL_DOCUMENT_ROOT .
'/compta/paiement/cheque/class/remisecheque.class.php';
295 $dashboardlines[$board->element] = $board->load_board($user);
297 if (isModEnabled(
'prelevement')) {
298 include_once DOL_DOCUMENT_ROOT.
'/compta/prelevement/class/bonprelevement.class.php';
300 $dashboardlines[$board->element .
'_direct_debit'] = $board->load_board($user,
'direct_debit');
302 if (isModEnabled(
'paymentbybanktransfer')) {
303 include_once DOL_DOCUMENT_ROOT.
'/compta/prelevement/class/bonprelevement.class.php';
305 $dashboardlines[$board->element .
'_credit_transfer'] = $board->load_board($user,
'credit_transfer');
310 if (isModEnabled(
'member') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_ADHERENT') && $user->hasRight(
'adherent',
'lire') && !$user->socid) {
311 include_once DOL_DOCUMENT_ROOT.
'/adherents/class/adherent.class.php';
313 $dashboardlines[$board->element.
'_shift'] = $board->load_board($user,
'shift');
314 $dashboardlines[$board->element.
'_expired'] = $board->load_board($user,
'expired');
318 if (isModEnabled(
'expensereport') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_EXPENSEREPORT') && $user->hasRight(
'expensereport',
'approve')) {
319 include_once DOL_DOCUMENT_ROOT.
'/expensereport/class/expensereport.class.php';
321 $dashboardlines[$board->element.
'_toapprove'] = $board->load_board($user,
'toapprove');
325 if (isModEnabled(
'expensereport') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_EXPENSEREPORT') && $user->hasRight(
'expensereport',
'to_paid')) {
326 include_once DOL_DOCUMENT_ROOT.
'/expensereport/class/expensereport.class.php';
328 $dashboardlines[$board->element.
'_topay'] = $board->load_board($user,
'topay');
332 if (isModEnabled(
'holiday') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_HOLIDAY') && $user->hasRight(
'holiday',
'approve')) {
333 include_once DOL_DOCUMENT_ROOT.
'/holiday/class/holiday.class.php';
335 $dashboardlines[$board->element] = $board->load_board($user);
339 $parameters = array();
341 $reshook = $hookmanager->executeHooks(
342 'addOpenElementsDashboardLine',
348 $dashboardlines = array_merge($dashboardlines, $hookmanager->resArray);
352 $dashboardgroup = array(
355 'groupName' =>
'Agenda',
356 'stats' => array(
'action'),
360 'groupName' =>
'Projects',
361 'globalStatsKey' =>
'projects',
362 'stats' => array(
'project',
'project_task'),
366 'groupName' =>
'Proposals',
367 'globalStatsKey' =>
'proposals',
369 array(
'propal_opened',
'propal_signed'),
373 'groupName' =>
'Orders',
374 'globalStatsKey' =>
'orders',
376 array(
'commande_toship',
'commande_tobill',
'commande_shippedtobill'),
380 'groupName' =>
'Invoices',
381 'globalStatsKey' =>
'invoices',
385 'supplier_proposal' =>
387 'lang' =>
'supplier_proposal',
388 'groupName' =>
'SupplierProposals',
389 'globalStatsKey' =>
'askprice',
391 array(
'supplier_proposal_opened',
'supplier_proposal_signed'),
395 'groupName' =>
'SuppliersOrders',
396 'globalStatsKey' =>
'supplier_orders',
398 array(
'order_supplier_opened',
'order_supplier_awaiting'),
400 'invoice_supplier' =>
402 'groupName' =>
'BillsSuppliers',
403 'globalStatsKey' =>
'supplier_invoices',
405 array(
'invoice_supplier'),
409 'groupName' =>
'Contracts',
410 'globalStatsKey' =>
'Contracts',
412 array(
'contrat_inactive',
'contrat_active'),
416 'groupName' =>
'Tickets',
417 'globalStatsKey' =>
'ticket',
419 array(
'ticket_opened'),
423 'groupName' =>
'BankAccount',
425 array(
'bank_account',
'chequereceipt',
'widthdraw_direct_debit',
'widthdraw_credit_transfer'),
429 'groupName' =>
'Members',
430 'globalStatsKey' =>
'members',
432 array(
'member_shift',
'member_expired'),
436 'groupName' =>
'ExpenseReport',
437 'globalStatsKey' =>
'expensereports',
439 array(
'expensereport_toapprove',
'expensereport_topay'),
443 'groupName' =>
'Holidays',
444 'globalStatsKey' =>
'holidays',
452 'dashboardgroup' => $dashboardgroup
454 $reshook = $hookmanager->executeHooks(
'addOpenElementsDashboardGroup', $parameters, $object, $action);
456 $dashboardgroup = array_merge($dashboardgroup, $hookmanager->resArray);
461 $totallate = $totaltodo = 0;
465 $valid_dashboardlines = array();
466 foreach ($dashboardlines as $workboardid => $tmp) {
468 $tmp->id = $workboardid;
469 $valid_dashboardlines[$workboardid] = $tmp;
474 foreach ($valid_dashboardlines as $board) {
475 if (is_numeric($board->nbtodo) && is_numeric($board->nbtodolate) && $board->nbtodolate > 0) {
476 $totaltodo += $board->nbtodo;
477 $totallate += $board->nbtodolate;
481 $openedDashBoardSize =
'info-box-sm';
482 foreach ($dashboardgroup as $dashbordelement) {
483 if (is_array($dashbordelement[
'stats']) && count($dashbordelement[
'stats']) > 2) {
484 $openedDashBoardSize =
'';
489 $totalLateNumber = $totallate;
490 $totallatePercentage = ((!empty($totaltodo)) ? round($totallate / $totaltodo * 100, 2) : 0);
492 $totallate = $totallatePercentage;
496 $boxwork .=
'<div class="box">';
497 $boxwork .=
'<table summary="'.dol_escape_htmltag($langs->trans(
"WorkingBoard")).
'" class="noborder boxtable boxtablenobottom boxworkingboard centpercent">'.
"\n";
498 $boxwork .=
'<tr class="liste_titre">';
499 $boxwork .=
'<th class="liste_titre"><div class="inline-block valignmiddle">'.$langs->trans(
"DolibarrWorkBoard").
'</div>';
501 if ($totallate > 0) {
502 $text = $langs->transnoentitiesnoconv(
"WarningYouHaveAtLeastOneTaskLate").
' ('.$langs->transnoentitiesnoconv(
504 $totallate.(getDolGlobalString(
'MAIN_USE_METEO_WITH_PERCENTAGE') ?
'%' :
'')
507 $text = $langs->transnoentitiesnoconv(
"NoItemLate");
509 $text .=
'. '.$langs->transnoentitiesnoconv(
"LateDesc");
511 $options =
'height="24px" style="float: right"';
512 $boxwork .=
showWeather($totallate, $text, $options,
'inline-block valignmiddle');
515 $boxwork .=
'</tr>'.
"\n";
518 $nbworkboardempty = 0;
519 $isIntopOpenedDashBoard = $globalStatInTopOpenedDashBoard = array();
520 if (!empty($valid_dashboardlines)) {
521 $openedDashBoard =
'';
523 $boxwork .=
'<tr class="nobottom nohover"><td class="tdboxstats nohover flexcontainer centpercent"><div style="display: flex: flex-wrap: wrap">';
525 foreach ($dashboardgroup as $groupKey => $groupElement) {
530 foreach ($groupElement[
'stats'] as $infoKey) {
531 if (!empty($valid_dashboardlines[$infoKey])) {
532 $boards[] = $valid_dashboardlines[$infoKey];
533 $isIntopOpenedDashBoard[] = $infoKey;
538 if (!empty($boards)) {
539 if (!empty($groupElement[
'lang'])) {
540 $langs->load($groupElement[
'lang']);
543 $groupName = $langs->trans($groupElement[
'groupName']);
544 $groupKeyLowerCase = strtolower($groupKey);
547 $globalStatsKey =
false;
548 if (!empty($groupElement[
'globalStatsKey']) && empty($groupElement[
'globalStats'])) {
549 $globalStatsKey = $groupElement[
'globalStatsKey'];
550 $groupElement[
'globalStats'] = array();
553 $openedDashBoard .=
'<div class="box-flex-item"><div class="box-flex-item-with-margin">'.
"\n";
554 $openedDashBoard .=
' <div class="info-box '.$openedDashBoardSize.
'">'.
"\n";
555 $openedDashBoard .=
' <span class="info-box-icon bg-infobox-'.$groupKeyLowerCase.
'">'.
"\n";
556 $openedDashBoard .=
' <i class="fa fa-dol-'.$groupKeyLowerCase.
'"></i>'.
"\n";
559 if (!empty($groupElement[
'globalStats'])) {
560 $globalStatInTopOpenedDashBoard[] = $globalStatsKey;
561 $openedDashBoard .=
'<span class="info-box-icon-text" title="'.$groupElement[
'globalStats'][
'text'].
'">'.$groupElement[
'globalStats'][
'nbTotal'].
'</span>';
564 $openedDashBoard .=
'</span>'.
"\n";
565 $openedDashBoard .=
'<div class="info-box-content">'.
"\n";
567 $openedDashBoard .=
'<div class="info-box-title" title="'.strip_tags($groupName).
'">'.$groupName.
'</div>'.
"\n";
568 $openedDashBoard .=
'<div class="info-box-lines">'.
"\n";
570 foreach ($boards as $board) {
571 $openedDashBoard .=
'<div class="info-box-line spanoverflow nowrap">';
573 if (!empty($board->labelShort)) {
574 $infoName =
'<div class="marginrightonly inline-block valignmiddle info-box-line-text" title="'.$board->label.
'">'.$board->labelShort.
'</div>';
576 $infoName =
'<div class="marginrightonly inline-block valignmiddle info-box-line-text">'.$board->label.
'</div>';
579 $textLateTitle = $langs->trans(
"NActionsLate", $board->nbtodolate);
580 $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").
')';
582 if ($board->id ==
'bank_account') {
583 $textLateTitle .=
'<br><span class="opacitymedium">'.$langs->trans(
"IfYouDontReconcileDisableProperty", $langs->transnoentitiesnoconv(
"Conciliable")).
'</span>';
587 if ($board->nbtodolate > 0) {
588 $textLate .=
'<span title="'.dol_escape_htmltag($textLateTitle).
'" class="classfortooltip badge badge-warning">';
589 $textLate .=
'<i class="fa fa-exclamation-triangle"></i> '.$board->nbtodolate;
590 $textLate .=
'</span>';
594 if ($board->nbtodo > 0) {
595 $nbtodClass =
'badge badge-info';
597 $nbtodClass =
'opacitymedium';
601 $labeltoshow = $board->label.
' ('.$board->nbtodo.
')';
602 if ($board->total > 0) {
603 $labeltoshow .=
' - '.price($board->total, 0, $langs, 1, -1, -1, $conf->currency);
605 $openedDashBoard .=
'<a href="'.$board->url.
'" class="info-box-text info-box-text-a">';
606 $openedDashBoard .= $infoName;
607 $openedDashBoard .=
'<div class="inline-block nowraponall">';
608 $openedDashBoard .=
'<span class="classfortooltip'.($nbtodClass ?
' '.$nbtodClass :
'').
'" title="'.$labeltoshow.
'">';
609 $openedDashBoard .= $board->nbtodo;
611 $openedDashBoard .=
' : '.price($board->total, 0, $langs, 1, -1, -1, $conf->currency);
613 $openedDashBoard .=
'</span>';
616 if ($board->url_late) {
617 $openedDashBoard .=
'</div></a>';
618 $openedDashBoard .=
' <div class="inline-block"><a href="'.$board->url_late.
'" class="info-box-text info-box-text-a paddingleft">';
620 $openedDashBoard .=
' ';
622 $openedDashBoard .= $textLate;
624 $openedDashBoard .=
'</a>'.
"\n";
625 $openedDashBoard .=
'</div>';
626 $openedDashBoard .=
'</div>'.
"\n";
631 $openedDashBoard .=
' </div><!-- /.info-box-lines --></div><!-- /.info-box-content -->'.
"\n";
632 $openedDashBoard .=
' </div><!-- /.info-box -->'.
"\n";
633 $openedDashBoard .=
'</div><!-- /.box-flex-item-with-margin -->'.
"\n";
634 $openedDashBoard .=
'</div><!-- /.box-flex-item -->'.
"\n";
635 $openedDashBoard .=
"\n";
639 if ($showweather && !empty($isIntopOpenedDashBoard)) {
640 $appendClass = (
getDolGlobalInt(
'MAIN_DISABLE_METEO') == 2 ?
' hideonsmartphone' :
'');
644 if ($totallate > 0) {
645 $text = $langs->transnoentitiesnoconv(
"WarningYouHaveAtLeastOneTaskLate").
' ('.$langs->transnoentitiesnoconv(
647 $totallate.(getDolGlobalString(
'MAIN_USE_METEO_WITH_PERCENTAGE') ?
'%' :
'')
650 $text = $langs->transnoentitiesnoconv(
"NoItemLate");
652 $text .=
'. '.$langs->transnoentitiesnoconv(
"LateDesc");
654 $weatherDashBoard =
'<div class="box-flex-item '.$appendClass.
'"><div class="box-flex-item-with-margin">'.
"\n";
655 $weatherDashBoard .=
' <div class="info-box '.$openedDashBoardSize.
' info-box-weather info-box-weather-level'.$weather->level.
'">'.
"\n";
656 $weatherDashBoard .=
' <span class="info-box-icon">';
657 $weatherDashBoard .=
img_weather(
'', $weather->level,
'', 0,
'valignmiddle width50');
658 $weatherDashBoard .=
' </span>'.
"\n";
659 $weatherDashBoard .=
' <div class="info-box-content">'.
"\n";
660 $weatherDashBoard .=
' <div class="info-box-title">'.$langs->trans(
'GlobalOpenedElemView').
'</div>'.
"\n";
662 if ($totallatePercentage > 0 &&
getDolGlobalString(
'MAIN_USE_METEO_WITH_PERCENTAGE')) {
663 $weatherDashBoard .=
' <span class="info-box-number">'.$langs->transnoentitiesnoconv(
665 price($totallatePercentage).
'%'
667 $weatherDashBoard .=
' <span class="progress-description">'.$langs->trans(
672 $weatherDashBoard .=
' <span class="info-box-number">'.$langs->transnoentitiesnoconv(
676 if ($totallatePercentage > 0) {
677 $weatherDashBoard .=
' <span class="progress-description">'.$langs->trans(
679 price($totallatePercentage).
'%'
684 $weatherDashBoard .=
' </div><!-- /.info-box-content -->'.
"\n";
685 $weatherDashBoard .=
' </div><!-- /.info-box -->'.
"\n";
686 $weatherDashBoard .=
'</div><!-- /.box-flex-item-with-margin -->'.
"\n";
687 $weatherDashBoard .=
'</div><!-- /.box-flex-item -->'.
"\n";
688 $weatherDashBoard .=
"\n";
690 $openedDashBoard = $weatherDashBoard.$openedDashBoard;
693 if (!empty($isIntopOpenedDashBoard)) {
694 for ($i = 1; $i <= 10; $i++) {
695 $openedDashBoard .=
'<div class="box-flex-item filler"></div>';
699 $nbworkboardcount = 0;
700 foreach ($valid_dashboardlines as $infoKey => $board) {
701 if (in_array($infoKey, $isIntopOpenedDashBoard)) {
706 if (empty($board->nbtodo)) {
712 $textlate = $langs->trans(
"NActionsLate", $board->nbtodolate);
713 $textlate .=
' ('.$langs->trans(
"Late").
' = '.$langs->trans(
"DateReference").
' > '.$langs->trans(
"DateToday").
' '.(ceil($board->warning_delay) >= 0 ?
'+' :
'').ceil($board->warning_delay).
' '.$langs->trans(
"days").
')';
716 $boxwork .=
'<div class="boxstatsindicator thumbstat150 nobold nounderline"><div class="boxstats130 boxstatsborder">';
717 $boxwork .=
'<div class="boxstatscontent">';
718 $boxwork .=
'<span class="boxstatstext" title="'.dol_escape_htmltag($board->label).
'">'.$board->img.
' <span>'.$board->label.
'</span></span><br>';
719 $boxwork .=
'<a class="valignmiddle dashboardlineindicator" href="'.$board->url.
'"><span class="dashboardlineindicator'.(($board->nbtodo == 0) ?
' dashboardlineok' :
'').
'">'.$board->nbtodo.
'</span></a>';
721 $boxwork .=
' / <a class="valignmiddle dashboardlineindicator" href="'.$board->url.
'"><span class="dashboardlineindicator'.(($board->nbtodo == 0) ?
' dashboardlineok' :
'').
'">'.
price($board->total).
'</span></a>';
723 $boxwork .=
'</div>';
724 if ($board->nbtodolate > 0) {
725 $boxwork .=
'<div class="dashboardlinelatecoin nowrap">';
726 $boxwork .=
'<a title="'.dol_escape_htmltag($textlate).
'" class="valignmiddle dashboardlineindicatorlate'.($board->nbtodolate > 0 ?
' dashboardlineko' :
' dashboardlineok').
'" href="'.((!$board->url_late) ? $board->url : $board->url_late).
'">';
731 'class="inline-block hideonsmartphone valigntextbottom"'
733 $boxwork .=
'<span class="dashboardlineindicatorlate'.($board->nbtodolate > 0 ?
' dashboardlineko' :
' dashboardlineok').
'">';
734 $boxwork .= $board->nbtodolate;
735 $boxwork .=
'</span>';
737 $boxwork .=
'</div>';
739 $boxwork .=
'</div></div>';
743 $boxwork .=
'<div class="boxstatsindicator thumbstat150 nobold nounderline"><div class="boxstats150empty"></div></div>';
744 $boxwork .=
'<div class="boxstatsindicator thumbstat150 nobold nounderline"><div class="boxstats150empty"></div></div>';
745 $boxwork .=
'<div class="boxstatsindicator thumbstat150 nobold nounderline"><div class="boxstats150empty"></div></div>';
746 $boxwork .=
'<div class="boxstatsindicator thumbstat150 nobold nounderline"><div class="boxstats150empty"></div></div>';
748 $boxwork .=
'</div>';
749 $boxwork .=
'</td></tr>';
751 $boxwork .=
'<tr class="nohover">';
752 $boxwork .=
'<td class="nohover valignmiddle opacitymedium">';
753 $boxwork .= $langs->trans(
"NoOpenedElementToProcess");
758 $boxwork .=
'</td></tr>';
760 $boxwork .=
'</table>';
761 $boxwork .=
'</div>';
763 if (!empty($isIntopOpenedDashBoard)) {
764 print
'<div class="fichecenter">';
765 print
'<div class="opened-dash-board-wrap"><div class="box-flex-container">'.$openedDashBoard.
'</div></div>';
771print
'<div class="clearboth"></div>';
773print
'<div class="fichecenter fichecenterbis">';
780$boxlist =
'<div class="twocolumns">';
782$boxlist .=
'<div class="firstcolumn fichehalfleft boxhalfleft" id="boxhalfleft">';
783if (!empty($nbworkboardcount)) {
784 $boxlist .= $boxwork;
787$boxlist .= $resultboxes[
'boxlista'];
791$boxlist .=
'<div class="secondcolumn fichehalfright boxhalfright" id="boxhalfright">';
793$boxlist .= $resultboxes[
'boxlistb'];
827 return img_weather($text, $weather->picto, $options, 0, $morecss);
840 $weather->picto =
'';
845 $used_conf = (
getDolGlobalString(
'MAIN_USE_METEO_WITH_PERCENTAGE') ?
'MAIN_METEO_PERCENTAGE_LEVEL' :
'MAIN_METEO_LEVEL');
850 $level1 = $offset + $factor;
852 $level2 = $offset + 2 * $factor;
854 $level3 = $offset + 3 * $factor;
857 if ($totallate <= $level0) {
858 $weather->picto =
'weather-clear.png';
860 } elseif ($totallate <= $level1) {
861 $weather->picto =
'weather-few-clouds.png';
863 } elseif ($totallate <= $level2) {
864 $weather->picto =
'weather-clouds.png';
866 } elseif ($totallate <= $level3) {
867 $weather->picto =
'weather-many-clouds.png';
870 $weather->picto =
'weather-storm.png';
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
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.
img_weather($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $morecss='')
Show weather picto.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
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.
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.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
dol_string_onlythesehtmltags($stringtoclean, $cleanalsosomestyles=1, $removeclassattribute=1, $cleanalsojavascript=0, $allowiframe=0, $allowed_tags=array(), $allowlink=0)
Clean a string to keep only desirable HTML tags.
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.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0)
Set event messages in dol_events session object.
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...
getCommonSubstitutionArray($outputlangs, $onlykey=0, $exclude=null, $object=null, $include=null)
Return array of possible common substitutions.
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
info_admin($text, $infoonimgalt=0, $nodiv=0, $admin='1', $morecss='hideonsmartphone', $textfordropdown='', $picto='')
Show information in HTML for admin users or standard users.
showWeather($totallate, $text, $options, $morecss='')
Show weather logo.
getWeatherStatus($totallate)
get weather status for conf 'MAIN_METEO_LEVELx'
Class to generate the form for creating a new ticket.