diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php
index 67ebeb4d081..9b08c3542d5 100644
--- a/htdocs/core/class/conf.class.php
+++ b/htdocs/core/class/conf.class.php
@@ -1083,7 +1083,7 @@ class Conf extends stdClass
$this->global->MAIN_MAX_DECIMALS_SHOWN = 8;
}
- // Non working days
+ // Non working days by default if not set in setup
if (!isset($this->global->MAIN_NON_WORKING_DAYS_INCLUDE_SATURDAY)) {
$this->global->MAIN_NON_WORKING_DAYS_INCLUDE_SATURDAY = 1;
}
diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php
index c2f60c5cebe..ef9f2e25021 100644
--- a/htdocs/projet/class/project.class.php
+++ b/htdocs/projet/class/project.class.php
@@ -2644,11 +2644,12 @@ class Project extends CommonObject
/**
* Method for calculating weekly hours worked and generating a report
+ *
* @return int 0 if OK, <>0 if KO (this function is used also by cron so only 0 is OK)
*/
public function createWeeklyReport()
{
- global $mysoc, $user;
+ global $mysoc, $user, $langs;
$now = dol_now();
$nowDate = dol_getdate($now, true);
@@ -2689,19 +2690,32 @@ class Project extends CommonObject
} else {
$reportContent = "Weekly time report from $startDate to $endDate
";
$reportContent .= '
| Nom d\'utilisateur | Temps saisi (heures) | Temps travaillé par semaine (heures) |
|---|---|---|
| '.$langs->trans("User").' | Temps saisi (heures) | Temps travaillé par semaine (heures) |