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');
100 $conf->global->MAIN_MOTD = preg_replace(
'/<br(\s[\sa-zA-Z_="]*)?\/?>/i',
'<br>',
getDolGlobalString(
'MAIN_MOTD'));
106 print
"\n<!-- Start of welcome text -->\n";
107 print
'<table class="centpercent notopnoleftnoright"><tr><td>';
109 print
'</td></tr></table><br>';
110 print
"\n<!-- End of welcome text -->\n";
120 $langs->loadLangs(array(
"admin"));
121 print
info_admin($langs->trans(
"WarningExperimentalFeatureInvoiceSituationNeedToUpgradeToProgressiveMode",
'https://partners.dolibarr.org'));
134 $lockfile = DOL_DATA_ROOT.
'/install.lock';
135 if (!empty($lockfile) && !file_exists($lockfile) && is_dir(DOL_DOCUMENT_ROOT.
"/install")) {
136 $langs->load(
"errors");
138 $message .=
info_admin($langs->transnoentities(
"WarningLockFileDoesNotExists", DOL_DATA_ROOT).
' '.$langs->transnoentities(
"WarningUntilDirRemoved", DOL_DOCUMENT_ROOT.
"/install"), 0, 0,
'1',
'clearboth');
142 if (is_writable($conffile)) {
143 $langs->load(
"errors");
146 $message .=
info_admin($langs->transnoentities(
"WarningConfFileMustBeReadOnly").
' '.$langs->transnoentities(
"WarningUntilDirRemoved", DOL_DOCUMENT_ROOT.
"/install"), 0, 0,
'1',
'clearboth');
150 $parameters = array();
151 $reshook = $hookmanager->executeHooks(
'infoadmin', $parameters, $object, $action);
153 $message .= $hookmanager->resPrint;
156 print
'<!-- show security warning -->';
168print
load_fiche_titre(
' ', $resultboxes[
'selectboxlist'],
'', 0,
'',
'titleforhome');
171$langs->loadLangs(array(
'commercial',
'bills',
'orders',
'contracts'));
178 $dashboardlines = array();
181 require_once DOL_DOCUMENT_ROOT.
'/core/class/workboardresponse.class.php';
184 if (isModEnabled(
'agenda') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_AGENDA') && $user->hasRight(
'agenda',
'myactions',
'read')) {
185 include_once DOL_DOCUMENT_ROOT.
'/comm/action/class/actioncomm.class.php';
187 $dashboardlines[$board->element] = $board->load_board($user);
191 if (isModEnabled(
'project') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_PROJECT') && $user->hasRight(
'projet',
'lire')) {
192 include_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
194 $dashboardlines[$board->element] = $board->load_board($user);
199 include_once DOL_DOCUMENT_ROOT.
'/projet/class/task.class.php';
200 $board =
new Task($db);
201 $dashboardlines[$board->element] = $board->load_board($user);
205 if (isModEnabled(
'propal') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_CUSTOMER') && $user->hasRight(
'propal',
'read')) {
206 include_once DOL_DOCUMENT_ROOT.
'/comm/propal/class/propal.class.php';
208 $dashboardlines[$board->element.
'_opened'] = $board->load_board($user,
"opened");
210 $dashboardlines[$board->element.
'_signed'] = $board->load_board($user,
"signed");
214 if (isModEnabled(
'supplier_proposal') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_SUPPLIER') && $user->hasRight(
'supplier_proposal',
'lire')) {
215 $langs->load(
"supplier_proposal");
216 include_once DOL_DOCUMENT_ROOT.
'/supplier_proposal/class/supplier_proposal.class.php';
218 $dashboardlines[$board->element.
'_opened'] = $board->load_board($user,
"opened");
220 $dashboardlines[$board->element.
'_signed'] = $board->load_board($user,
"signed");
224 if (isModEnabled(
'order') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_CUSTOMER') && $user->hasRight(
'commande',
'lire')) {
225 include_once DOL_DOCUMENT_ROOT.
'/commande/class/commande.class.php';
228 $dashboardlines[$board->element.
'_toship'] = $board->load_board($user,
'toship');
231 $dashboardlines[$board->element.
'_tobill'] = $board->load_board($user,
'tobill');
234 $dashboardlines[$board->element.
'_shippedtobill'] = $board->load_board($user,
'shippedtobill');
238 if (isModEnabled(
'supplier_order') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_SUPPLIER') && $user->hasRight(
'fournisseur',
'commande',
'lire')) {
239 include_once DOL_DOCUMENT_ROOT.
'/fourn/class/fournisseur.commande.class.php';
241 $dashboardlines[$board->element.
'_opened'] = $board->load_board($user,
"opened");
242 $dashboardlines[$board->element.
'_awaiting'] = $board->load_board($user,
'awaiting');
246 if (isModEnabled(
'contract') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_CONTRACT') && $user->hasRight(
'contrat',
'lire')) {
247 include_once DOL_DOCUMENT_ROOT.
'/contrat/class/contrat.class.php';
249 $dashboardlines[$board->element.
'_inactive'] = $board->load_board($user,
"inactive");
251 $dashboardlines[$board->element.
'_active'] = $board->load_board($user,
"active");
255 if (isModEnabled(
'ticket') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_TICKET') && $user->hasRight(
'ticket',
'read')) {
256 include_once DOL_DOCUMENT_ROOT.
'/ticket/class/ticket.class.php';
258 $dashboardlines[$board->element.
'_opened'] = $board->load_board($user,
"opened");
264 if (isModEnabled(
'invoice') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_CUSTOMER') && $user->hasRight(
'facture',
'lire')) {
265 include_once DOL_DOCUMENT_ROOT.
'/compta/facture/class/facture.class.php';
267 $dashboardlines[$board->element] = $board->load_board($user);
271 if (isModEnabled(
'supplier_invoice') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_SUPPLIER') && $user->hasRight(
'fournisseur',
'facture',
'lire')) {
272 include_once DOL_DOCUMENT_ROOT.
'/fourn/class/fournisseur.facture.class.php';
274 $dashboardlines[$board->element] = $board->load_board($user);
278 if (isModEnabled(
'bank') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_BANK') && $user->hasRight(
'banque',
'lire') && !$user->socid) {
279 include_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/account.class.php';
281 $nb = $board->countAccountToReconcile();
283 $dashboardlines[$board->element] = $board->load_board($user);
289 if (isModEnabled(
'bank') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_BANK') && $user->hasRight(
'banque',
'lire') && !$user->socid) {
291 include_once DOL_DOCUMENT_ROOT .
'/compta/paiement/cheque/class/remisecheque.class.php';
293 $dashboardlines[$board->element] = $board->load_board($user);
295 if (isModEnabled(
'prelevement')) {
296 include_once DOL_DOCUMENT_ROOT.
'/compta/prelevement/class/bonprelevement.class.php';
298 $dashboardlines[$board->element .
'_direct_debit'] = $board->load_board($user,
'direct_debit');
300 if (isModEnabled(
'paymentbybanktransfer')) {
301 include_once DOL_DOCUMENT_ROOT.
'/compta/prelevement/class/bonprelevement.class.php';
303 $dashboardlines[$board->element .
'_credit_transfer'] = $board->load_board($user,
'credit_transfer');
308 if (isModEnabled(
'member') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_ADHERENT') && $user->hasRight(
'adherent',
'lire') && !$user->socid) {
309 include_once DOL_DOCUMENT_ROOT.
'/adherents/class/adherent.class.php';
311 $dashboardlines[$board->element.
'_shift'] = $board->load_board($user,
'shift');
312 $dashboardlines[$board->element.
'_expired'] = $board->load_board($user,
'expired');
316 if (isModEnabled(
'expensereport') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_EXPENSEREPORT') && $user->hasRight(
'expensereport',
'approve')) {
317 include_once DOL_DOCUMENT_ROOT.
'/expensereport/class/expensereport.class.php';
319 $dashboardlines[$board->element.
'_toapprove'] = $board->load_board($user,
'toapprove');
323 if (isModEnabled(
'expensereport') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_EXPENSEREPORT') && $user->hasRight(
'expensereport',
'to_paid')) {
324 include_once DOL_DOCUMENT_ROOT.
'/expensereport/class/expensereport.class.php';
326 $dashboardlines[$board->element.
'_topay'] = $board->load_board($user,
'topay');
330 if (isModEnabled(
'holiday') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_HOLIDAY') && $user->hasRight(
'holiday',
'approve')) {
331 include_once DOL_DOCUMENT_ROOT.
'/holiday/class/holiday.class.php';
333 $dashboardlines[$board->element] = $board->load_board($user);
337 $parameters = array();
339 $reshook = $hookmanager->executeHooks(
340 'addOpenElementsDashboardLine',
346 $dashboardlines = array_merge($dashboardlines, $hookmanager->resArray);
350 $dashboardgroup = array(
353 'groupName' =>
'Agenda',
354 'stats' => array(
'action'),
358 'groupName' =>
'Projects',
359 'globalStatsKey' =>
'projects',
360 'stats' => array(
'project',
'project_task'),
364 'groupName' =>
'Proposals',
365 'globalStatsKey' =>
'proposals',
367 array(
'propal_opened',
'propal_signed'),
371 'groupName' =>
'Orders',
372 'globalStatsKey' =>
'orders',
374 array(
'commande_toship',
'commande_tobill',
'commande_shippedtobill'),
378 'groupName' =>
'Invoices',
379 'globalStatsKey' =>
'invoices',
383 'supplier_proposal' =>
385 'lang' =>
'supplier_proposal',
386 'groupName' =>
'SupplierProposals',
387 'globalStatsKey' =>
'askprice',
389 array(
'supplier_proposal_opened',
'supplier_proposal_signed'),
393 'groupName' =>
'SuppliersOrders',
394 'globalStatsKey' =>
'supplier_orders',
396 array(
'order_supplier_opened',
'order_supplier_awaiting'),
398 'invoice_supplier' =>
400 'groupName' =>
'BillsSuppliers',
401 'globalStatsKey' =>
'supplier_invoices',
403 array(
'invoice_supplier'),
407 'groupName' =>
'Contracts',
408 'globalStatsKey' =>
'Contracts',
410 array(
'contrat_inactive',
'contrat_active'),
414 'groupName' =>
'Tickets',
415 'globalStatsKey' =>
'ticket',
417 array(
'ticket_opened'),
421 'groupName' =>
'BankAccount',
423 array(
'bank_account',
'chequereceipt',
'widthdraw_direct_debit',
'widthdraw_credit_transfer'),
427 'groupName' =>
'Members',
428 'globalStatsKey' =>
'members',
430 array(
'member_shift',
'member_expired'),
434 'groupName' =>
'ExpenseReport',
435 'globalStatsKey' =>
'expensereports',
437 array(
'expensereport_toapprove',
'expensereport_topay'),
441 'groupName' =>
'Holidays',
442 'globalStatsKey' =>
'holidays',
450 'dashboardgroup' => $dashboardgroup
452 $reshook = $hookmanager->executeHooks(
'addOpenElementsDashboardGroup', $parameters, $object, $action);
454 $dashboardgroup = array_merge($dashboardgroup, $hookmanager->resArray);
459 $totallate = $totaltodo = 0;
463 $valid_dashboardlines = array();
464 foreach ($dashboardlines as $workboardid => $tmp) {
466 $tmp->id = $workboardid;
467 $valid_dashboardlines[$workboardid] = $tmp;
472 foreach ($valid_dashboardlines as $board) {
473 if (is_numeric($board->nbtodo) && is_numeric($board->nbtodolate) && $board->nbtodolate > 0) {
474 $totaltodo += $board->nbtodo;
475 $totallate += $board->nbtodolate;
479 $openedDashBoardSize =
'info-box-sm';
480 foreach ($dashboardgroup as $dashbordelement) {
481 if (is_array($dashbordelement[
'stats']) && count($dashbordelement[
'stats']) > 2) {
482 $openedDashBoardSize =
'';
487 $totalLateNumber = $totallate;
488 $totallatePercentage = ((!empty($totaltodo)) ? round($totallate / $totaltodo * 100, 2) : 0);
490 $totallate = $totallatePercentage;
495 $boxwork .=
'<div class="box">';
496 $boxwork .=
'<table summary="'.dol_escape_htmltag($langs->trans(
"WorkingBoard")).
'" class="noborder boxtable boxtablenobottom boxworkingboard centpercent">'.
"\n";
497 $boxwork .=
'<tr class="liste_titre">';
498 $boxwork .=
'<th class="liste_titre"><div class="inline-block valignmiddle">'.$langs->trans(
"DolibarrWorkBoard").
'</div>';
500 if ($totallate > 0) {
501 $text = $langs->transnoentitiesnoconv(
"WarningYouHaveAtLeastOneTaskLate").
' ('.$langs->transnoentitiesnoconv(
503 $totallate.(getDolGlobalString(
'MAIN_USE_METEO_WITH_PERCENTAGE') ?
'%' :
'')
506 $text = $langs->transnoentitiesnoconv(
"NoItemLate");
508 $text .=
'. '.$langs->transnoentitiesnoconv(
"LateDesc");
510 $options =
'height="24px" style="float: right"';
511 $boxwork .=
showWeather($totallate, $text, $options,
'inline-block valignmiddle');
514 $boxwork .=
'</tr>'.
"\n";
517 $nbworkboardempty = 0;
518 $isIntopOpenedDashBoard = $globalStatInTopOpenedDashBoard = array();
519 if (!empty($valid_dashboardlines)) {
520 $openedDashBoard =
'';
522 $boxwork .=
'<tr class="nobottom nohover"><td class="tdboxstats nohover flexcontainer centpercent"><div style="display: flex: flex-wrap: wrap">';
524 foreach ($dashboardgroup as $groupKey => $groupElement) {
529 foreach ($groupElement[
'stats'] as $infoKey) {
530 if (!empty($valid_dashboardlines[$infoKey])) {
531 $boards[] = $valid_dashboardlines[$infoKey];
532 $isIntopOpenedDashBoard[] = $infoKey;
537 if (!empty($boards)) {
538 if (!empty($groupElement[
'lang'])) {
539 $langs->load($groupElement[
'lang']);
542 $groupName = $langs->trans($groupElement[
'groupName']);
543 $groupKeyLowerCase = strtolower($groupKey);
546 $globalStatsKey =
false;
547 if (!empty($groupElement[
'globalStatsKey']) && empty($groupElement[
'globalStats'])) {
548 $globalStatsKey = $groupElement[
'globalStatsKey'];
549 $groupElement[
'globalStats'] = array();
552 $openedDashBoard .=
'<div class="box-flex-item"><div class="box-flex-item-with-margin">'.
"\n";
553 $openedDashBoard .=
' <div class="info-box '.$openedDashBoardSize.
'">'.
"\n";
554 $openedDashBoard .=
' <span class="info-box-icon bg-infobox-'.$groupKeyLowerCase.
'">'.
"\n";
555 $openedDashBoard .=
' <i class="fa fa-dol-'.$groupKeyLowerCase.
'"></i>'.
"\n";
558 if (!empty($groupElement[
'globalStats'])) {
559 $globalStatInTopOpenedDashBoard[] = $globalStatsKey;
560 $openedDashBoard .=
'<span class="info-box-icon-text" title="'.$groupElement[
'globalStats'][
'text'].
'">'.$groupElement[
'globalStats'][
'nbTotal'].
'</span>';
563 $openedDashBoard .=
'</span>'.
"\n";
564 $openedDashBoard .=
'<div class="info-box-content">'.
"\n";
566 $openedDashBoard .=
'<div class="info-box-title" title="'.strip_tags($groupName).
'">'.$groupName.
'</div>'.
"\n";
567 $openedDashBoard .=
'<div class="info-box-lines">'.
"\n";
569 foreach ($boards as $board) {
570 $openedDashBoard .=
'<div class="info-box-line spanoverflow nowrap">';
572 if (!empty($board->labelShort)) {
573 $infoName =
'<div class="marginrightonly inline-block valignmiddle info-box-line-text" title="'.$board->label.
'">'.$board->labelShort.
'</div>';
575 $infoName =
'<div class="marginrightonly inline-block valignmiddle info-box-line-text">'.$board->label.
'</div>';
578 $textLateTitle = $langs->trans(
"NActionsLate", $board->nbtodolate);
579 $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").
')';
581 if ($board->id ==
'bank_account') {
582 $textLateTitle .=
'<br><span class="opacitymedium">'.$langs->trans(
"IfYouDontReconcileDisableProperty", $langs->transnoentitiesnoconv(
"Conciliable")).
'</span>';
586 if ($board->nbtodolate > 0) {
587 $textLate .=
'<span title="'.dol_escape_htmltag($textLateTitle).
'" class="classfortooltip badge badge-warning">';
588 $textLate .=
'<i class="fa fa-exclamation-triangle"></i> '.$board->nbtodolate;
589 $textLate .=
'</span>';
593 if ($board->nbtodo > 0) {
594 $nbtodClass =
'badge badge-info';
596 $nbtodClass =
'opacitymedium';
600 $labeltoshow = $board->label.
' ('.$board->nbtodo.
')';
601 if ($board->total > 0) {
602 $labeltoshow .=
' - '.price($board->total, 0, $langs, 1, -1, -1, $conf->currency);
604 $openedDashBoard .=
'<a href="'.$board->url.
'" class="info-box-text info-box-text-a">';
605 $openedDashBoard .= $infoName;
606 $openedDashBoard .=
'<div class="inline-block nowraponall">';
607 $openedDashBoard .=
'<span class="classfortooltip'.($nbtodClass ?
' '.$nbtodClass :
'').
'" title="'.$labeltoshow.
'">';
608 $openedDashBoard .= $board->nbtodo;
610 $openedDashBoard .=
' : '.price($board->total, 0, $langs, 1, -1, -1, $conf->currency);
612 $openedDashBoard .=
'</span>';
615 if ($board->url_late) {
616 $openedDashBoard .=
'</div></a>';
617 $openedDashBoard .=
' <div class="inline-block"><a href="'.$board->url_late.
'" class="info-box-text info-box-text-a paddingleft">';
619 $openedDashBoard .=
' ';
621 $openedDashBoard .= $textLate;
623 $openedDashBoard .=
'</a>'.
"\n";
624 $openedDashBoard .=
'</div>';
625 $openedDashBoard .=
'</div>'.
"\n";
630 $openedDashBoard .=
' </div><!-- /.info-box-lines --></div><!-- /.info-box-content -->'.
"\n";
631 $openedDashBoard .=
' </div><!-- /.info-box -->'.
"\n";
632 $openedDashBoard .=
'</div><!-- /.box-flex-item-with-margin -->'.
"\n";
633 $openedDashBoard .=
'</div><!-- /.box-flex-item -->'.
"\n";
634 $openedDashBoard .=
"\n";
638 if ($showweather && !empty($isIntopOpenedDashBoard)) {
639 $appendClass = (
getDolGlobalInt(
'MAIN_DISABLE_METEO') == 2 ?
' hideonsmartphone' :
'');
643 if ($totallate > 0) {
644 $text = $langs->transnoentitiesnoconv(
"WarningYouHaveAtLeastOneTaskLate").
' ('.$langs->transnoentitiesnoconv(
646 $totallate.(getDolGlobalString(
'MAIN_USE_METEO_WITH_PERCENTAGE') ?
'%' :
'')
649 $text = $langs->transnoentitiesnoconv(
"NoItemLate");
651 $text .=
'. '.$langs->transnoentitiesnoconv(
"LateDesc");
653 $weatherDashBoard =
'<div class="box-flex-item '.$appendClass.
'"><div class="box-flex-item-with-margin">'.
"\n";
654 $weatherDashBoard .=
' <div class="info-box '.$openedDashBoardSize.
' info-box-weather info-box-weather-level'.$weather->level.
'">'.
"\n";
655 $weatherDashBoard .=
' <span class="info-box-icon">';
656 $weatherDashBoard .=
img_weather(
'', $weather->level,
'', 0,
'valignmiddle width50');
657 $weatherDashBoard .=
' </span>'.
"\n";
658 $weatherDashBoard .=
' <div class="info-box-content">'.
"\n";
659 $weatherDashBoard .=
' <div class="info-box-title">'.$langs->trans(
'GlobalOpenedElemView').
'</div>'.
"\n";
661 if ($totallatePercentage > 0 &&
getDolGlobalString(
'MAIN_USE_METEO_WITH_PERCENTAGE')) {
662 $weatherDashBoard .=
' <span class="info-box-number">'.$langs->transnoentitiesnoconv(
664 price($totallatePercentage).
'%'
666 $weatherDashBoard .=
' <span class="progress-description">'.$langs->trans(
671 $weatherDashBoard .=
' <span class="info-box-number">'.$langs->transnoentitiesnoconv(
675 if ($totallatePercentage > 0) {
676 $weatherDashBoard .=
' <span class="progress-description">'.$langs->trans(
678 price($totallatePercentage).
'%'
683 $weatherDashBoard .=
' </div><!-- /.info-box-content -->'.
"\n";
684 $weatherDashBoard .=
' </div><!-- /.info-box -->'.
"\n";
685 $weatherDashBoard .=
'</div><!-- /.box-flex-item-with-margin -->'.
"\n";
686 $weatherDashBoard .=
'</div><!-- /.box-flex-item -->'.
"\n";
687 $weatherDashBoard .=
"\n";
689 $openedDashBoard = $weatherDashBoard.$openedDashBoard;
692 if (!empty($isIntopOpenedDashBoard)) {
693 for ($i = 1; $i <= 10; $i++) {
694 $openedDashBoard .=
'<div class="box-flex-item filler"></div>';
698 $nbworkboardcount = 0;
699 foreach ($valid_dashboardlines as $infoKey => $board) {
700 if (in_array($infoKey, $isIntopOpenedDashBoard)) {
705 if (empty($board->nbtodo)) {
711 $textlate = $langs->trans(
"NActionsLate", $board->nbtodolate);
712 $textlate .=
' ('.$langs->trans(
"Late").
' = '.$langs->trans(
"DateReference").
' > '.$langs->trans(
"DateToday").
' '.(ceil($board->warning_delay) >= 0 ?
'+' :
'').ceil($board->warning_delay).
' '.$langs->trans(
"days").
')';
715 $boxwork .=
'<div class="boxstatsindicator thumbstat150 nobold nounderline"><div class="boxstats130 boxstatsborder">';
716 $boxwork .=
'<div class="boxstatscontent">';
717 $boxwork .=
'<span class="boxstatstext" title="'.dol_escape_htmltag($board->label).
'">'.$board->img.
' <span>'.$board->label.
'</span></span><br>';
718 $boxwork .=
'<a class="valignmiddle dashboardlineindicator" href="'.$board->url.
'"><span class="dashboardlineindicator'.(($board->nbtodo == 0) ?
' dashboardlineok' :
'').
'">'.$board->nbtodo.
'</span></a>';
720 $boxwork .=
' / <a class="valignmiddle dashboardlineindicator" href="'.$board->url.
'"><span class="dashboardlineindicator'.(($board->nbtodo == 0) ?
' dashboardlineok' :
'').
'">'.
price($board->total).
'</span></a>';
722 $boxwork .=
'</div>';
723 if ($board->nbtodolate > 0) {
724 $boxwork .=
'<div class="dashboardlinelatecoin nowrap">';
725 $boxwork .=
'<a title="'.dol_escape_htmltag($textlate).
'" class="valignmiddle dashboardlineindicatorlate'.($board->nbtodolate > 0 ?
' dashboardlineko' :
' dashboardlineok').
'" href="'.((!$board->url_late) ? $board->url : $board->url_late).
'">';
730 'class="inline-block hideonsmartphone valigntextbottom"'
732 $boxwork .=
'<span class="dashboardlineindicatorlate'.($board->nbtodolate > 0 ?
' dashboardlineko' :
' dashboardlineok').
'">';
733 $boxwork .= $board->nbtodolate;
734 $boxwork .=
'</span>';
736 $boxwork .=
'</div>';
738 $boxwork .=
'</div></div>';
742 $boxwork .=
'<div class="boxstatsindicator thumbstat150 nobold nounderline"><div class="boxstats150empty"></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>';
747 $boxwork .=
'</div>';
748 $boxwork .=
'</td></tr>';
750 $boxwork .=
'<tr class="nohover">';
751 $boxwork .=
'<td class="nohover valignmiddle opacitymedium">';
752 $boxwork .= $langs->trans(
"NoOpenedElementToProcess");
757 $boxwork .=
'</td></tr>';
759 $boxwork .=
'</table>';
760 $boxwork .=
'</div>';
762 if (!empty($isIntopOpenedDashBoard)) {
763 print
'<div class="fichecenter">';
764 print
'<div class="opened-dash-board-wrap"><div class="box-flex-container">'.$openedDashBoard.
'</div></div>';
770print
'<div class="clearboth"></div>';
772print
'<div class="fichecenter fichecenterbis">';
779$boxlist =
'<div class="twocolumns">';
781$boxlist .=
'<div class="firstcolumn fichehalfleft boxhalfleft" id="boxhalfleft">';
782if (!empty($nbworkboardcount)) {
783 $boxlist .= $boxwork;
786$boxlist .= $resultboxes[
'boxlista'];
790$boxlist .=
'<div class="secondcolumn fichehalfright boxhalfright" id="boxhalfright">';
792$boxlist .= $resultboxes[
'boxlistb'];
826 return img_weather($text, $weather->picto, $options, 0, $morecss);
839 $weather->picto =
'';
844 $used_conf = (
getDolGlobalString(
'MAIN_USE_METEO_WITH_PERCENTAGE') ?
'MAIN_METEO_PERCENTAGE_LEVEL' :
'MAIN_METEO_LEVEL');
849 $level1 = $offset + $factor;
851 $level2 = $offset + 2 * $factor;
853 $level3 = $offset + 3 * $factor;
856 if ($totallate <= $level0) {
857 $weather->picto =
'weather-clear.png';
859 } elseif ($totallate <= $level1) {
860 $weather->picto =
'weather-few-clouds.png';
862 } elseif ($totallate <= $level2) {
863 $weather->picto =
'weather-clouds.png';
865 } elseif ($totallate <= $level3) {
866 $weather->picto =
'weather-many-clouds.png';
869 $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($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
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 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.
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)
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_string_onlythesehtmltags($stringtoclean, $cleanalsosomestyles=1, $removeclassattribute=1, $cleanalsojavascript=0, $allowiframe=0, $allowed_tags=array(), $allowlink=0, $allowscript=0)
Clean a string to keep only desirable HTML tags.
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.
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.
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 a 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.