diff --git a/htdocs/admin/system/perf.php b/htdocs/admin/system/perf.php index 33295044a3e..ec6dc9d4a88 100644 --- a/htdocs/admin/system/perf.php +++ b/htdocs/admin/system/perf.php @@ -530,13 +530,6 @@ if (!in_array($conf->browser->name, array('chrome', 'opera', 'safari', 'firefox' } print '
'; -// Database statistics update -/* -print '
'; -print ''.$langs->trans("DatabaseStatistics").': '; -print '
'; -*/ - // End of page llxFooter(); $db->close(); diff --git a/htdocs/index.php b/htdocs/index.php index 54d76de6190..efa4de3890d 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -895,7 +895,7 @@ if (empty($user->socid) && empty($conf->global->MAIN_DISABLE_GLOBAL_BOXSTATS)) if (!empty($boxstatFromHook) || !empty($boxstatItems)) { $boxstat .= ''."\n"; $boxstat .= '
'; - $boxstat .= ''; + $boxstat .= '
'; $boxstat .= ''; $boxstat .= ''; print ''; print ''; +$total_revenue_ht = 0; + foreach ($listofreferent as $key => $value) { $name = $langs->trans($value['name']); @@ -772,7 +774,11 @@ foreach ($listofreferent as $key => $value) // Calculate margin if ($qualifiedforfinalprofit) { - if ($margin != "add") + if ($margin == 'add') { + $total_revenue_ht += $total_ht; + } + + if ($margin != "add") // Revert sign { $total_ht = -$total_ht; $total_ttc = -$total_ttc; @@ -803,11 +809,20 @@ foreach ($listofreferent as $key => $value) } // and the final balance print ''; -print ''; -print ''; -print ''; +print ''; +print ''; +print ''; print ''; +// and the margin (profit / revenues) +if ($total_revenue_ht) { + print ''; + print ''; + print ''; + print ''; + print ''; +} + print "
'; $boxstat .= '
'.$langs->trans("DolibarrStateBoard").'
'; diff --git a/htdocs/modulebuilder/template/scripts/mymodule.php b/htdocs/modulebuilder/template/scripts/mymodule.php index 684d58c1c03..0b8d7abfdfe 100644 --- a/htdocs/modulebuilder/template/scripts/mymodule.php +++ b/htdocs/modulebuilder/template/scripts/mymodule.php @@ -53,7 +53,10 @@ if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/master.i if (!$res && file_exists("../master.inc.php")) $res = @include "../master.inc.php"; if (!$res && file_exists("../../master.inc.php")) $res = @include "../../master.inc.php"; if (!$res && file_exists("../../../master.inc.php")) $res = @include "../../../master.inc.php"; -if (!$res) die("Include of master fails"); +if (!$res) { + print "Include of master fails"; + exit(-1); +} // After this $db, $mysoc, $langs, $conf and $hookmanager are defined (Opened $db handler to database will be closed at end of file). // $user is created but empty. diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index 21a03de6b40..8b7c325d742 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -535,18 +535,18 @@ if (! empty($conf->global->PROJECT_ELEMENTS_FOR_PLUS_MARGIN)) { } $newelementforplusmargin = explode(',', $conf->global->PROJECT_ELEMENTS_FOR_PLUS_MARGIN); foreach ($newelementforplusmargin as $value) { - $listofreferent[$value]['margin']='add'; + $listofreferent[trim($value)]['margin']='add'; } } if (! empty($conf->global->PROJECT_ELEMENTS_FOR_MINUS_MARGIN)) { foreach ($listofreferent as $key => $element) { - if ($listofreferent[$key]['margin'] == 'add') { + if ($listofreferent[$key]['margin'] == 'minus') { unset($listofreferent[$key]['margin']); } } - $newelementforplusmargin = explode(',', $conf->global->PROJECT_ELEMENTS_FOR_MINUS_MARGIN); - foreach ($newelementforplusmargin as $value) { - $listofreferent[$value]['margin']='minus'; + $newelementforminusmargin = explode(',', $conf->global->PROJECT_ELEMENTS_FOR_MINUS_MARGIN); + foreach ($newelementforminusmargin as $value) { + $listofreferent[trim($value)]['margin']='minus'; } } @@ -650,6 +650,8 @@ print '
'.$langs->trans("AmountHT").''.$langs->trans("AmountTTC").'
'.$langs->trans("Profit").''.price(price2num($balance_ht, 'MT')).''.price(price2num($balance_ttc, 'MT')).''.$langs->trans("Profit").''.price(price2num($balance_ht, 'MT')).''.price(price2num($balance_ttc, 'MT')).'
'.$langs->trans("Margin").''.round(100 * $balance_ht / $total_revenue_ht, 1).'%
"; diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index a524e18ae33..90b51ac89be 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -1729,7 +1729,7 @@ div.heightref { min-height: 80px; } div.divphotoref { - padding-: 20px; + padding-: 30px; } div.paginationref { padding-bottom: 10px; @@ -3116,7 +3116,7 @@ table.listwithfilterbefore { /* Pagination */ div.refidpadding { - padding-top: 3px; + /* padding-top: 3px; */ } div.refid { font-weight: bold; @@ -3158,7 +3158,7 @@ div.pagination li { display: inline-block; padding-left: 0px; padding-right: 0px; - padding-top: 10px; + /* padding-top: 10px; */ padding-bottom: 5px; font-size: 1.1em; } @@ -3633,7 +3633,7 @@ ul.noborder li:nth-child(even):not(.liste_titre) { width: 118px; } -td.tdboxstats .boxstats { +.boxtable:not(.widgetstats) td.tdboxstats .boxstats { box-shadow: 1px 1px 8px var(--colorboxstatsborder); }