31define(
'CSRFCHECK_WITH_TOKEN', 1);
33require
'main.inc.php';
34require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
47$_GET[
'mainmenu'] =
GETPOST(
'mainmenu',
'aZ09') ?
GETPOST(
'mainmenu',
'aZ09') :
'home';
48$action =
GETPOST(
'action',
'aZ09');
50$hookmanager->initHooks(array(
'index'));
58$nbmodulesnotautoenabled = count(
$conf->modules);
59$listofmodulesautoenabled = array(
'user',
'agenda',
'fckeditor',
'export',
'import');
60foreach ($listofmodulesautoenabled as $moduleautoenable) {
61 if (in_array($moduleautoenable,
$conf->modules)) {
62 $nbmodulesnotautoenabled--;
68 header(
"Location: ".DOL_URL_ROOT.
"/admin/index.php?mainmenu=home&leftmenu=setup&mesg=setupnotcomplete");
71if ($nbmodulesnotautoenabled <
getDolGlobalInt(
'MAIN_MIN_NB_ENABLED_MODULE_FOR_WARNING', 1)) {
72 header(
"Location: ".DOL_URL_ROOT.
"/admin/index.php?mainmenu=home&leftmenu=setup&mesg=setupnotcomplete");
76 require_once DOL_DOCUMENT_ROOT.
'/core/class/infobox.class.php';
79 $boxorder =
GETPOST(
'boxorder',
'aZ09');
80 $boxorder .=
GETPOST(
'boxcombo',
'aZ09');
93if (!isset($form) || !is_object($form)) {
94 $form =
new Form($db);
97$appli = constant(
'DOL_APPLICATION_TITLE');
100 $appli = (preg_match(
'/^\+/', $applicustom) ? $appli :
'').$applicustom;
102 $appli .=
" ".DOL_VERSION;
106$title = $langs->trans(
"HomeArea").
' - '.$appli;
115 $conf->global->MAIN_MOTD = preg_replace(
'/<br(\s[\sa-zA-Z_="]*)?\/?>/i',
'<br>',
getDolGlobalString(
'MAIN_MOTD'));
117 $substitutionarray = getCommonSubstitutionArray($langs);
121 print
"\n<!-- Start of welcome text -->\n";
122 print
'<table class="centpercent notopnoleftnoright"><tr><td>';
124 print
'</td></tr></table><br>';
125 print
"\n<!-- End of welcome text -->\n";
150 $lockfile = DOL_DATA_ROOT.
'/install.lock';
151 if (!empty($lockfile) && !file_exists($lockfile) && is_dir(DOL_DOCUMENT_ROOT.
"/install")) {
152 $langs->load(
"errors");
154 $message .=
info_admin($langs->transnoentities(
"WarningLockFileDoesNotExists", DOL_DATA_ROOT).
' '.$langs->transnoentities(
"WarningUntilDirRemoved", DOL_DOCUMENT_ROOT.
"/install"), 0, 0,
'1',
'clearboth');
158 if (is_writable($conffile)) {
160 $currentPerm = fileperms($conffile);
161 $newPerm = $currentPerm & ~0222;
163 dolChmod($conffile, decoct($newPerm));
166 if (is_writable($conffile)) {
167 $langs->load(
"errors");
168 $message .=
info_admin($langs->transnoentities(
"WarningConfFileMustBeReadOnly").
' '.$langs->transnoentities(
"WarningUntilDirRemoved", DOL_DOCUMENT_ROOT.
"/install"), 0, 0,
'1',
'clearboth');
173 $parameters = array();
174 $reshook = $hookmanager->executeHooks(
'infoadmin', $parameters, $object, $action);
176 $message .= $hookmanager->resPrint;
179 print
'<!-- show security warning -->';
191print
load_fiche_titre(
' ', $resultboxes[
'selectboxlist'],
'', 0,
'',
'titleforhome');
194$langs->loadLangs(array(
'commercial',
'bills',
'orders',
'contracts'));
201 $dashboardlines = array();
204 require_once DOL_DOCUMENT_ROOT.
'/core/class/workboardresponse.class.php';
207 if (isModEnabled(
'agenda') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_AGENDA') && $user->hasRight(
'agenda',
'myactions',
'read')) {
208 include_once DOL_DOCUMENT_ROOT.
'/comm/action/class/actioncomm.class.php';
210 $dashboardlines[$board->element] = $board->load_board($user);
214 if (isModEnabled(
'project') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_PROJECT') && $user->hasRight(
'projet',
'lire')) {
215 include_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
217 $dashboardlines[$board->element] = $board->load_board($user);
222 include_once DOL_DOCUMENT_ROOT.
'/projet/class/task.class.php';
223 $board =
new Task($db);
224 $dashboardlines[$board->element] = $board->load_board($user);
228 if (isModEnabled(
'propal') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_CUSTOMER') && $user->hasRight(
'propal',
'read')) {
229 include_once DOL_DOCUMENT_ROOT.
'/comm/propal/class/propal.class.php';
231 $dashboardlines[$board->element.
'_opened'] = $board->load_board($user,
"opened");
233 $dashboardlines[$board->element.
'_signed'] = $board->load_board($user,
"signed");
237 if (isModEnabled(
'supplier_proposal') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_SUPPLIER') && $user->hasRight(
'supplier_proposal',
'lire')) {
238 $langs->load(
"supplier_proposal");
239 include_once DOL_DOCUMENT_ROOT.
'/supplier_proposal/class/supplier_proposal.class.php';
241 $dashboardlines[$board->element.
'_opened'] = $board->load_board($user,
"opened");
243 $dashboardlines[$board->element.
'_signed'] = $board->load_board($user,
"signed");
247 if (isModEnabled(
'order') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_CUSTOMER') && $user->hasRight(
'commande',
'lire')) {
248 include_once DOL_DOCUMENT_ROOT.
'/commande/class/commande.class.php';
251 $dashboardlines[$board->element.
'_toship'] = $board->load_board($user,
'toship');
254 $dashboardlines[$board->element.
'_tobill'] = $board->load_board($user,
'tobill');
257 $dashboardlines[$board->element.
'_shippedtobill'] = $board->load_board($user,
'shippedtobill');
261 if (isModEnabled(
'supplier_order') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_SUPPLIER') && $user->hasRight(
'fournisseur',
'commande',
'lire')) {
262 include_once DOL_DOCUMENT_ROOT.
'/fourn/class/fournisseur.commande.class.php';
264 $dashboardlines[$board->element.
'_opened'] = $board->load_board($user,
"opened");
265 $dashboardlines[$board->element.
'_awaiting'] = $board->load_board($user,
'awaiting');
269 if (isModEnabled(
'contract') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_CONTRACT') && $user->hasRight(
'contrat',
'lire')) {
270 include_once DOL_DOCUMENT_ROOT.
'/contrat/class/contrat.class.php';
272 $dashboardlines[$board->element.
'_inactive'] = $board->load_board($user,
"inactive");
274 $dashboardlines[$board->element.
'_active'] = $board->load_board($user,
"active");
278 if (isModEnabled(
'ticket') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_TICKET') && $user->hasRight(
'ticket',
'read')) {
279 include_once DOL_DOCUMENT_ROOT.
'/ticket/class/ticket.class.php';
281 $dashboardlines[$board->element.
'_opened'] = $board->load_board($user,
"opened");
287 if (isModEnabled(
'invoice') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_CUSTOMER') && $user->hasRight(
'facture',
'lire')) {
288 include_once DOL_DOCUMENT_ROOT.
'/compta/facture/class/facture.class.php';
290 $dashboardlines[$board->element] = $board->load_board($user);
294 if (isModEnabled(
'supplier_invoice') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_SUPPLIER') && $user->hasRight(
'fournisseur',
'facture',
'lire')) {
295 include_once DOL_DOCUMENT_ROOT.
'/fourn/class/fournisseur.facture.class.php';
297 $dashboardlines[$board->element] = $board->load_board($user);
301 if (isModEnabled(
'bank') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_BANK') && $user->hasRight(
'banque',
'lire') && !$user->socid) {
302 include_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/account.class.php';
304 $nb = $board->countAccountToReconcile();
306 $dashboardlines[$board->element] = $board->load_board($user);
312 if (isModEnabled(
'bank') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_BANK') && $user->hasRight(
'banque',
'lire') && !$user->socid) {
314 include_once DOL_DOCUMENT_ROOT .
'/compta/paiement/cheque/class/remisecheque.class.php';
316 $dashboardlines[$board->element] = $board->load_board($user);
318 if (isModEnabled(
'prelevement')) {
319 include_once DOL_DOCUMENT_ROOT.
'/compta/prelevement/class/bonprelevement.class.php';
321 $dashboardlines[$board->element .
'_direct_debit'] = $board->load_board($user,
'direct_debit');
323 if (isModEnabled(
'paymentbybanktransfer')) {
324 include_once DOL_DOCUMENT_ROOT.
'/compta/prelevement/class/bonprelevement.class.php';
326 $dashboardlines[$board->element .
'_credit_transfer'] = $board->load_board($user,
'credit_transfer');
331 if (isModEnabled(
'member') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_ADHERENT') && $user->hasRight(
'adherent',
'lire') && !$user->socid) {
332 include_once DOL_DOCUMENT_ROOT.
'/adherents/class/adherent.class.php';
334 $dashboardlines[$board->element.
'_shift'] = $board->load_board($user,
'shift');
335 $dashboardlines[$board->element.
'_expired'] = $board->load_board($user,
'expired');
339 if (isModEnabled(
'expensereport') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_EXPENSEREPORT') && $user->hasRight(
'expensereport',
'approve')) {
340 include_once DOL_DOCUMENT_ROOT.
'/expensereport/class/expensereport.class.php';
342 $dashboardlines[$board->element.
'_toapprove'] = $board->load_board($user,
'toapprove');
346 if (isModEnabled(
'expensereport') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_EXPENSEREPORT') && $user->hasRight(
'expensereport',
'to_paid')) {
347 include_once DOL_DOCUMENT_ROOT.
'/expensereport/class/expensereport.class.php';
349 $dashboardlines[$board->element.
'_topay'] = $board->load_board($user,
'topay');
353 if (isModEnabled(
'holiday') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_HOLIDAY') && $user->hasRight(
'holiday',
'approve')) {
354 include_once DOL_DOCUMENT_ROOT.
'/holiday/class/holiday.class.php';
356 $dashboardlines[$board->element] = $board->load_board($user);
359 if (isModEnabled(
'mrp')) {
360 include_once DOL_DOCUMENT_ROOT.
'/mrp/class/mo.class.php';
361 $board =
new Mo($db);
362 $dashboardlines[$board->element] = $board->load_board($user);
366 $parameters = array();
368 $reshook = $hookmanager->executeHooks(
369 'addOpenElementsDashboardLine',
375 $dashboardlines = array_merge($dashboardlines, $hookmanager->resArray);
378 $dashboardgroup = array(
381 'groupName' =>
'Agenda',
382 'stats' => array(
'action'),
386 'groupName' =>
'Projects',
387 'globalStatsKey' =>
'projects',
388 'stats' => array(
'project',
'project_task'),
392 'groupName' =>
'Proposals',
393 'globalStatsKey' =>
'proposals',
395 array(
'propal_opened',
'propal_signed'),
399 'groupName' =>
'Orders',
400 'globalStatsKey' =>
'orders',
402 array(
'commande_toship',
'commande_tobill',
'commande_shippedtobill'),
406 'groupName' =>
'Invoices',
407 'globalStatsKey' =>
'invoices',
411 'supplier_proposal' =>
413 'lang' =>
'supplier_proposal',
414 'groupName' =>
'SupplierProposals',
415 'globalStatsKey' =>
'askprice',
417 array(
'supplier_proposal_opened',
'supplier_proposal_signed'),
421 'groupName' =>
'SuppliersOrders',
422 'globalStatsKey' =>
'supplier_orders',
424 array(
'order_supplier_opened',
'order_supplier_awaiting'),
426 'invoice_supplier' =>
428 'groupName' =>
'BillsSuppliers',
429 'globalStatsKey' =>
'supplier_invoices',
431 array(
'invoice_supplier'),
435 'groupName' =>
'Contracts',
436 'globalStatsKey' =>
'Contracts',
438 array(
'contrat_inactive',
'contrat_active'),
442 'groupName' =>
'Tickets',
443 'globalStatsKey' =>
'ticket',
445 array(
'ticket_opened'),
449 'groupName' =>
'BankAccount',
451 array(
'bank_account',
'chequereceipt',
'widthdraw_direct_debit',
'widthdraw_credit_transfer'),
455 'groupName' =>
'Members',
456 'globalStatsKey' =>
'members',
458 array(
'member_shift',
'member_expired'),
462 'groupName' =>
'ExpenseReport',
463 'globalStatsKey' =>
'expensereports',
465 array(
'expensereport_toapprove',
'expensereport_topay'),
469 'groupName' =>
'Holidays',
470 'globalStatsKey' =>
'holidays',
477 'globalStatsKey' =>
'mrp',
484 'dashboardgroup' => $dashboardgroup
486 $reshook = $hookmanager->executeHooks(
'addOpenElementsDashboardGroup', $parameters, $object, $action);
488 $dashboardgroup = array_merge($dashboardgroup, $hookmanager->resArray);
493 $totallate = $totaltodo = 0;
497 $valid_dashboardlines = array();
498 foreach ($dashboardlines as $workboardid => $tmp) {
500 $tmp->id = $workboardid;
501 $valid_dashboardlines[$workboardid] = $tmp;
505 foreach ($valid_dashboardlines as $board) {
506 if (is_numeric($board->nbtodo) && is_numeric($board->nbtodolate) && $board->nbtodolate > 0) {
507 $totaltodo += $board->nbtodo;
508 $totallate += $board->nbtodolate;
512 $openedDashBoardSize =
'info-box-sm';
513 foreach ($dashboardgroup as $dashbordelement) {
514 if (is_array($dashbordelement[
'stats']) && count($dashbordelement[
'stats']) > 2) {
515 $openedDashBoardSize =
'';
520 $totalLateNumber = $totallate;
521 $totallatePercentage = ((!empty($totaltodo)) ? round($totallate / $totaltodo * 100, 2) : 0);
523 $totallate = $totallatePercentage;
528 $boxwork .=
'<div class="box">';
529 $boxwork .=
'<table summary="'.dol_escape_htmltag($langs->trans(
"WorkingBoard")).
'" class="noborder boxtable boxtablenobottom boxworkingboard centpercent">'.
"\n";
530 $boxwork .=
'<tr class="liste_titre">';
531 $boxwork .=
'<th class="liste_titre"><div class="inline-block valignmiddle">'.$langs->trans(
"DolibarrWorkBoard").
'</div>';
533 if ($totallate > 0) {
534 $text = $langs->transnoentitiesnoconv(
"WarningYouHaveAtLeastOneTaskLate").
' ('.$langs->transnoentitiesnoconv(
536 $totallate.(getDolGlobalString(
'MAIN_USE_METEO_WITH_PERCENTAGE') ?
'%' :
'')
539 $text = $langs->transnoentitiesnoconv(
"NoItemLate");
541 $text .=
'. '.$langs->transnoentitiesnoconv(
"LateDesc");
543 $options =
'height="24px" style="float: right"';
544 $boxwork .=
showWeather($totallate, $text, $options,
'inline-block valignmiddle');
547 $boxwork .=
'</tr>'.
"\n";
550 $nbworkboardempty = 0;
551 $isIntopOpenedDashBoard = $globalStatInTopOpenedDashBoard = array();
552 $openedDashBoard =
'';
553 if (!empty($valid_dashboardlines)) {
554 $boxwork .=
'<tr class="nobottom nohover"><td class="tdboxstats nohover flexcontainer centpercent"><div style="display: flex: flex-wrap: wrap">';
555 foreach ($dashboardgroup as $groupKey => $groupElement) {
560 foreach ($groupElement[
'stats'] as $infoKey) {
561 if (!empty($valid_dashboardlines[$infoKey])) {
562 $boards[] = $valid_dashboardlines[$infoKey];
563 $isIntopOpenedDashBoard[] = $infoKey;
569 if (!empty($boards)) {
570 if (!empty($groupElement[
'lang'])) {
571 $langs->load($groupElement[
'lang']);
574 $groupName = $langs->trans($groupElement[
'groupName']);
575 $groupKeyLowerCase = strtolower($groupKey);
578 $globalStatsKey =
false;
579 if (!empty($groupElement[
'globalStatsKey']) && empty($groupElement[
'globalStats'])) {
580 $globalStatsKey = $groupElement[
'globalStatsKey'];
581 $groupElement[
'globalStats'] = array();
584 $openedDashBoard .=
'<div class="box-flex-item"><div class="box-flex-item-with-margin">'.
"\n";
585 $openedDashBoard .=
' <div class="info-box '.$openedDashBoardSize.
'">'.
"\n";
586 $openedDashBoard .=
' <span class="info-box-icon bg-infobox-'.$groupKeyLowerCase.
'">'.
"\n";
587 $openedDashBoard .=
' <i class="fa fa-dol-'.$groupKeyLowerCase.
'"></i>'.
"\n";
590 if (!empty($groupElement[
'globalStats'])) {
591 $globalStatInTopOpenedDashBoard[] = $globalStatsKey;
592 $openedDashBoard .=
'<span class="info-box-icon-text" title="'.$groupElement[
'globalStats'][
'text'].
'">'.$groupElement[
'globalStats'][
'nbTotal'].
'</span>';
595 $openedDashBoard .=
'</span>'.
"\n";
596 $openedDashBoard .=
'<div class="info-box-content">'.
"\n";
598 $openedDashBoard .=
'<div class="info-box-title" title="'.dolPrintHTMLForAttribute($groupName).
'">'.$groupName.
'</div>'.
"\n";
599 $openedDashBoard .=
'<div class="info-box-lines">'.
"\n";
601 foreach ($boards as $board) {
602 $openedDashBoard .=
'<div class="info-box-line spanoverflow nowrap">';
604 if (!empty($board->labelShort)) {
605 $infoName =
'<div class="marginrightonly inline-block valignmiddle info-box-line-text" title="'.$board->label.
'">'.$board->labelShort.
'</div>';
607 $infoName =
'<div class="marginrightonly inline-block valignmiddle info-box-line-text">'.$board->label.
'</div>';
610 $textLateTitle = $langs->trans(
"NActionsLate", $board->nbtodolate);
613 if ($board->id ==
'mo') {
614 $dateOrder = $langs->trans(
"DateToday") .
" > " . $langs->trans(
"DateReference");
616 $dateOrder = $langs->trans(
"DateReference") .
" > " . $langs->trans(
"DateToday");
618 $warningDelay = ceil(empty($board->warning_delay) ? 0 : $board->warning_delay);
620 if ($warningDelay >= 0) {
624 $textLateTitle .=
" (" . $langs->trans(
"Late") .
" = $dateOrder $sign$warningDelay " . $langs->trans(
"days") .
")";
626 if ($board->id ==
'bank_account') {
627 $textLateTitle .=
'<br><span class="opacitymedium">'.$langs->trans(
"IfYouDontReconcileDisableProperty", $langs->transnoentitiesnoconv(
"Conciliable")).
'</span>';
631 if ($board->nbtodolate > 0) {
632 $textLate .=
'<span title="'.dol_escape_htmltag($textLateTitle).
'" class="classfortooltip badge badge-warning">';
633 $textLate .=
'<i class="fa fa-exclamation-triangle hideonsmartphone"></i> '.$board->nbtodolate;
634 $textLate .=
'</span>';
638 if ($board->nbtodo > 0) {
639 $nbtodClass =
'badge badge-info';
641 $nbtodClass =
'opacitymedium';
645 $labeltoshow = $board->label.
' ('.$board->nbtodo.
')';
646 if ($board->total > 0) {
647 $labeltoshow .=
' - '.price($board->total, 0, $langs, 1, -1, -1,
$conf->currency);
649 $openedDashBoard .=
'<a href="'.$board->url.
'" class="info-box-text info-box-text-a">';
650 $openedDashBoard .= $infoName;
651 $openedDashBoard .=
'</a>';
652 $openedDashBoard .=
'<div class="inline-block nowraponall">';
653 $openedDashBoard .=
'<a href="'.$board->url.
'" class="info-box-text info-box-text-a">';
654 $openedDashBoard .=
'<span class="classfortooltip'.($nbtodClass ?
' '.$nbtodClass :
'').
'" title="'.$labeltoshow.
'">';
655 $openedDashBoard .= $board->nbtodo;
657 $openedDashBoard .=
' : '.price($board->total, 0, $langs, 1, -1, -1,
$conf->currency);
659 $openedDashBoard .=
'</span>';
660 $openedDashBoard .=
'</a>';
663 if ($board->url_late) {
664 $openedDashBoard .=
'</div>';
665 $openedDashBoard .=
' <div class="inline-block"><a href="'.$board->url_late.
'" class="info-box-text info-box-text-a paddingleft">';
667 $openedDashBoard .=
' ';
669 $openedDashBoard .= $textLate;
670 if ($board->url_late) {
671 $openedDashBoard .=
'</a>';
674 $openedDashBoard .=
'</div>'.
"\n";
676 $openedDashBoard .=
'</div>'.
"\n";
681 $openedDashBoard .=
' </div><!-- /.info-box-lines --></div><!-- /.info-box-content -->'.
"\n";
682 $openedDashBoard .=
' </div><!-- /.info-box -->'.
"\n";
683 $openedDashBoard .=
'</div><!-- /.box-flex-item-with-margin -->'.
"\n";
684 $openedDashBoard .=
'</div><!-- /.box-flex-item -->'.
"\n";
685 $openedDashBoard .=
"\n";
689 if ($showweather && !empty($isIntopOpenedDashBoard)) {
690 $appendClass = (
getDolGlobalInt(
'MAIN_DISABLE_METEO') == 2 ?
' hideonsmartphone' :
'');
694 if ($totallate > 0) {
695 $text = $langs->transnoentitiesnoconv(
"WarningYouHaveAtLeastOneTaskLate").
' ('.$langs->transnoentitiesnoconv(
697 $totallate.(getDolGlobalString(
'MAIN_USE_METEO_WITH_PERCENTAGE') ?
'%' :
'')
700 $text = $langs->transnoentitiesnoconv(
"NoItemLate");
702 $text .=
'. '.$langs->transnoentitiesnoconv(
"LateDesc");
704 $weatherDashBoard =
'<div class="box-flex-item '.$appendClass.
'"><div class="box-flex-item-with-margin">'.
"\n";
705 $weatherDashBoard .=
' <div class="info-box '.$openedDashBoardSize.
' info-box-weather info-box-weather-level'.$weather->level.
'">'.
"\n";
706 $weatherDashBoard .=
' <span class="info-box-icon">';
707 $weatherDashBoard .=
img_weather(
'', $weather->level,
'', 0,
'valignmiddle width50');
708 $weatherDashBoard .=
' </span>'.
"\n";
709 $weatherDashBoard .=
' <div class="info-box-content">'.
"\n";
710 $weatherDashBoard .=
' <div class="info-box-title">'.$langs->trans(
'GlobalOpenedElemView').
'</div>'.
"\n";
712 if ($totallatePercentage > 0 &&
getDolGlobalString(
'MAIN_USE_METEO_WITH_PERCENTAGE')) {
713 $weatherDashBoard .=
' <span class="info-box-number">'.$langs->transnoentitiesnoconv(
715 price($totallatePercentage).
'%'
717 $weatherDashBoard .=
' <span class="progress-description">'.$langs->trans(
722 $weatherDashBoard .=
' <span class="info-box-number">'.$langs->transnoentitiesnoconv(
724 (
string) $totalLateNumber
726 if ($totallatePercentage > 0) {
727 $weatherDashBoard .=
' <span class="progress-description">'.$langs->trans(
729 price($totallatePercentage).
'%'
734 $weatherDashBoard .=
' </div><!-- /.info-box-content -->'.
"\n";
735 $weatherDashBoard .=
' </div><!-- /.info-box -->'.
"\n";
736 $weatherDashBoard .=
'</div><!-- /.box-flex-item-with-margin -->'.
"\n";
737 $weatherDashBoard .=
'</div><!-- /.box-flex-item -->'.
"\n";
738 $weatherDashBoard .=
"\n";
740 $openedDashBoard = $weatherDashBoard.$openedDashBoard;
743 if (!empty($isIntopOpenedDashBoard)) {
744 for ($i = 1; $i <= 10; $i++) {
745 $openedDashBoard .=
'<div class="box-flex-item filler"></div>';
749 $nbworkboardcount = 0;
750 foreach ($valid_dashboardlines as $infoKey => $board) {
751 if (in_array($infoKey, $isIntopOpenedDashBoard)) {
756 if (empty($board->nbtodo)) {
762 $textlate = $langs->trans(
"NActionsLate", $board->nbtodolate);
763 $textlate .=
' ('.$langs->trans(
"Late").
' = '.$langs->trans(
"DateReference").
' > '.$langs->trans(
"DateToday").
' '.(ceil($board->warning_delay) >= 0 ?
'+' :
'').ceil($board->warning_delay).
' '.$langs->trans(
"days").
')';
766 $boxwork .=
'<div class="boxstatsindicator thumbstat150 nobold nounderline"><div class="boxstats130 boxstatsborder">';
767 $boxwork .=
'<div class="boxstatscontent">';
768 $boxwork .=
'<span class="boxstatstext" title="'.dol_escape_htmltag($board->label).
'">'.$board->img.
' <span>'.$board->label.
'</span></span><br>';
769 $boxwork .=
'<a class="valignmiddle dashboardlineindicator" href="'.$board->url.
'"><span class="dashboardlineindicator'.(($board->nbtodo == 0) ?
' dashboardlineok' :
'').
'">'.$board->nbtodo.
'</span></a>';
771 $boxwork .=
' / <a class="valignmiddle dashboardlineindicator" href="'.$board->url.
'"><span class="dashboardlineindicator'.(($board->nbtodo == 0) ?
' dashboardlineok' :
'').
'">'.
price($board->total).
'</span></a>';
773 $boxwork .=
'</div>';
774 if ($board->nbtodolate > 0) {
775 $boxwork .=
'<div class="dashboardlinelatecoin nowrap">';
776 $boxwork .=
'<a title="'.dol_escape_htmltag($textlate).
'" class="valignmiddle dashboardlineindicatorlate'.($board->nbtodolate > 0 ?
' dashboardlineko' :
' dashboardlineok').
'" href="'.((!$board->url_late) ? $board->url : $board->url_late).
'">';
781 'class="inline-block hideonsmartphone valigntextbottom"'
783 $boxwork .=
'<span class="dashboardlineindicatorlate'.($board->nbtodolate > 0 ?
' dashboardlineko' :
' dashboardlineok').
'">';
784 $boxwork .= $board->nbtodolate;
785 $boxwork .=
'</span>';
787 $boxwork .=
'</div>';
789 $boxwork .=
'</div></div>';
793 $boxwork .=
'<div class="boxstatsindicator thumbstat150 nobold nounderline"><div class="boxstats150empty"></div></div>';
794 $boxwork .=
'<div class="boxstatsindicator thumbstat150 nobold nounderline"><div class="boxstats150empty"></div></div>';
795 $boxwork .=
'<div class="boxstatsindicator thumbstat150 nobold nounderline"><div class="boxstats150empty"></div></div>';
796 $boxwork .=
'<div class="boxstatsindicator thumbstat150 nobold nounderline"><div class="boxstats150empty"></div></div>';
798 $boxwork .=
'</div>';
799 $boxwork .=
'</td></tr>';
801 $boxwork .=
'<tr class="nohover">';
802 $boxwork .=
'<td class="nohover valignmiddle opacitymedium">';
803 $boxwork .= $langs->trans(
"NoOpenedElementToProcess");
808 $boxwork .=
'</td></tr>';
810 $boxwork .=
'</table>';
811 $boxwork .=
'</div>';
813 if (!empty($isIntopOpenedDashBoard)) {
814 print
'<div class="fichecenter">';
815 print
'<div class="opened-dash-board-wrap"><div class="box-flex-container">'.$openedDashBoard.
'</div></div>';
821print
'<div class="clearboth"></div>';
823print
'<div class="fichecenter fichecenterbis">';
830$boxlist =
'<div class="twocolumns">';
832$boxlist .=
'<div class="firstcolumn fichehalfleft boxhalfleft" id="boxhalfleft">';
833if (!empty($nbworkboardcount)) {
834 $boxlist .= $boxwork;
837$boxlist .= $resultboxes[
'boxlista'];
841$boxlist .=
'<div class="secondcolumn fichehalfright boxhalfright" id="boxhalfright">';
843$boxlist .= $resultboxes[
'boxlistb'];
877 return img_weather($text, $weather->picto, $options, 0, $morecss);
890 $weather->picto =
'';
895 $used_conf = (
getDolGlobalString(
'MAIN_USE_METEO_WITH_PERCENTAGE') ?
'MAIN_METEO_PERCENTAGE_LEVEL' :
'MAIN_METEO_LEVEL');
900 $level1 = $offset + $factor;
902 $level2 = $offset + 2 * $factor;
904 $level3 = $offset + 3 * $factor;
907 if ($totallate <= $level0) {
908 $weather->picto =
'weather-clear.png';
910 } elseif ($totallate <= $level1) {
911 $weather->picto =
'weather-few-clouds.png';
913 } elseif ($totallate <= $level2) {
914 $weather->picto =
'weather-clouds.png';
916 } elseif ($totallate <= $level3) {
917 $weather->picto =
'weather-many-clouds.png';
920 $weather->picto =
'weather-storm.png';
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
Class to manage 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, $allowothertags=array())
Show picto whatever it's its name (generic function)
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
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.
dolChmod($filepath, $newmask='')
Change mod of a file.
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...
dol_string_onlythesehtmltags($stringtoclean, $cleanalsosomestyles=1, $removeclassattribute=1, $cleanalsojavascript=0, $allowiframe=0, $allowed_tags=array(), $allowlink=0, $allowscript=0, $allowstyle=0, $allowphp=0)
Clean a string to keep only desirable HTML tags.
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'
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
Class to generate the form for creating a new ticket.