Merge pull request #16771 from frederic34/projet_task_stats
fix php8 warnings
This commit is contained in:
commit
b66173a111
@ -826,23 +826,29 @@ class Conf
|
|||||||
unset($this->global->MAIN_NO_CONCAT_DESCRIPTION);
|
unset($this->global->MAIN_NO_CONCAT_DESCRIPTION);
|
||||||
}
|
}
|
||||||
|
|
||||||
// For backward compatibility
|
// product is new use
|
||||||
if (isset($this->product)) {
|
if (isset($this->product)) {
|
||||||
|
// For backward compatibility
|
||||||
$this->produit = $this->product;
|
$this->produit = $this->product;
|
||||||
}
|
}
|
||||||
|
// invoice is new use, facture is old use still initialised
|
||||||
if (isset($this->facture)) {
|
if (isset($this->facture)) {
|
||||||
$this->invoice = $this->facture;
|
$this->invoice = $this->facture;
|
||||||
}
|
}
|
||||||
|
// order is new use, commande is old use still initialised
|
||||||
if (isset($this->commande)) {
|
if (isset($this->commande)) {
|
||||||
$this->order = $this->commande;
|
$this->order = $this->commande;
|
||||||
}
|
}
|
||||||
|
// contract is new use, contrat is old use still initialised
|
||||||
if (isset($this->contrat)) {
|
if (isset($this->contrat)) {
|
||||||
$this->contract = $this->contrat;
|
$this->contract = $this->contrat;
|
||||||
}
|
}
|
||||||
|
// category is new use, categorie is old use still initialised
|
||||||
if (isset($this->categorie)) {
|
if (isset($this->categorie)) {
|
||||||
$this->category = $this->categorie;
|
$this->category = $this->categorie;
|
||||||
}
|
}
|
||||||
if (isset($this->project)) {
|
// project is new use, projet is old use still initialised
|
||||||
|
if (isset($this->projet) && !isset($this->project)) {
|
||||||
$this->project = $this->projet;
|
$this->project = $this->projet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -65,7 +65,7 @@ $includeuserlist = array();
|
|||||||
llxHeader('', $langs->trans('Projects'));
|
llxHeader('', $langs->trans('Projects'));
|
||||||
|
|
||||||
$title = $langs->trans("ProjectsStatistics");
|
$title = $langs->trans("ProjectsStatistics");
|
||||||
$dir = $conf->projet->dir_output.'/temp';
|
$dir = $conf->project->dir_output.'/temp';
|
||||||
|
|
||||||
print load_fiche_titre($title, '', 'project');
|
print load_fiche_titre($title, '', 'project');
|
||||||
|
|
||||||
@ -224,7 +224,8 @@ if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) {
|
|||||||
$mesg = $px3->isGraphKo();
|
$mesg = $px3->isGraphKo();
|
||||||
if (!$mesg) {
|
if (!$mesg) {
|
||||||
$px3->SetData($data);
|
$px3->SetData($data);
|
||||||
$i = $startyear; $legend = array();
|
$i = $startyear;
|
||||||
|
$legend = array();
|
||||||
while ($i <= $endyear) {
|
while ($i <= $endyear) {
|
||||||
$legend[] = $i;
|
$legend[] = $i;
|
||||||
$i++;
|
$i++;
|
||||||
@ -268,7 +269,7 @@ $head[$h][1] = $langs->trans("ByMonthYear");
|
|||||||
$head[$h][2] = 'byyear';
|
$head[$h][2] = 'byyear';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
complete_head_from_modules($conf, $langs, null, $head, $h, $type);
|
complete_head_from_modules($conf, $langs, null, $head, $h, 'project_stats');
|
||||||
|
|
||||||
print dol_get_fiche_head($head, 'byyear', $langs->trans("Statistics"), -1, '');
|
print dol_get_fiche_head($head, 'byyear', $langs->trans("Statistics"), -1, '');
|
||||||
|
|
||||||
@ -337,9 +338,9 @@ foreach ($data_all_year as $val) {
|
|||||||
print '<td class="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$year.($socid > 0 ? '&socid='.$socid : '').($userid > 0 ? '&userid='.$userid : '').'">'.$year.'</a></td>';
|
print '<td class="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$year.($socid > 0 ? '&socid='.$socid : '').($userid > 0 ? '&userid='.$userid : '').'">'.$year.'</a></td>';
|
||||||
print '<td class="right">'.$val['nb'].'</td>';
|
print '<td class="right">'.$val['nb'].'</td>';
|
||||||
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) {
|
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) {
|
||||||
print '<td class="right">'.($val['total'] ?price(price2num($val['total'], 'MT'), 1) : '0').'</td>';
|
print '<td class="right">'.($val['total'] ? price(price2num($val['total'], 'MT'), 1) : '0').'</td>';
|
||||||
print '<td class="right">'.($val['avg'] ?price(price2num($val['avg'], 'MT'), 1) : '0').'</td>';
|
print '<td class="right">'.($val['avg'] ? price(price2num($val['avg'], 'MT'), 1) : '0').'</td>';
|
||||||
print '<td class="right">'.($val['weighted'] ?price(price2num($val['weighted'], 'MT'), 1) : '0').'</td>';
|
print '<td class="right">'.(isset($val['weighted']) ? price(price2num($val['weighted'], 'MT'), 1) : '0').'</td>';
|
||||||
}
|
}
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
$oldyear = $year;
|
$oldyear = $year;
|
||||||
@ -350,7 +351,7 @@ print '</div>';
|
|||||||
|
|
||||||
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
||||||
|
|
||||||
$stringtoshow .= '<table class="border centpercent"><tr class="pair nohover"><td class="center">';
|
$stringtoshow = '<table class="border centpercent"><tr class="pair nohover"><td class="center">';
|
||||||
if ($mesg) {
|
if ($mesg) {
|
||||||
print $mesg;
|
print $mesg;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -65,7 +65,7 @@ $includeuserlist = array();
|
|||||||
llxHeader('', $langs->trans('Tasks'));
|
llxHeader('', $langs->trans('Tasks'));
|
||||||
|
|
||||||
$title = $langs->trans("TasksStatistics");
|
$title = $langs->trans("TasksStatistics");
|
||||||
$dir = $conf->projet->dir_output.'/temp';
|
$dir = $conf->project->dir_output.'/temp';
|
||||||
|
|
||||||
print load_fiche_titre($title, '', 'projecttask');
|
print load_fiche_titre($title, '', 'projecttask');
|
||||||
|
|
||||||
@ -134,12 +134,12 @@ if (!count($arrayyears)) {
|
|||||||
|
|
||||||
$h = 0;
|
$h = 0;
|
||||||
$head = array();
|
$head = array();
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/projet/tasks/stats/index.php?mode='.$mode;
|
$head[$h][0] = DOL_URL_ROOT.'/projet/tasks/stats/index.php';
|
||||||
$head[$h][1] = $langs->trans("ByMonthYear");
|
$head[$h][1] = $langs->trans("ByMonthYear");
|
||||||
$head[$h][2] = 'byyear';
|
$head[$h][2] = 'byyear';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
complete_head_from_modules($conf, $langs, null, $head, $h, $type);
|
complete_head_from_modules($conf, $langs, null, $head, $h, 'project_tasks_stats');
|
||||||
|
|
||||||
print dol_get_fiche_head($head, 'byyear', $langs->trans("Statistics"), -1, '');
|
print dol_get_fiche_head($head, 'byyear', $langs->trans("Statistics"), -1, '');
|
||||||
|
|
||||||
@ -191,13 +191,13 @@ foreach ($data_all_year as $val) {
|
|||||||
$oldyear--;
|
$oldyear--;
|
||||||
|
|
||||||
print '<tr class="oddeven" height="24">';
|
print '<tr class="oddeven" height="24">';
|
||||||
print '<td><a href="'.$_SERVER["PHP_SELF"].'?year='.$oldyear.'&mode='.$mode.($socid > 0 ? '&socid='.$socid : '').($userid > 0 ? '&userid='.$userid : '').'">'.$oldyear.'</a></td>';
|
print '<td><a href="'.$_SERVER["PHP_SELF"].'?year='.$oldyear.($socid > 0 ? '&socid='.$socid : '').($userid > 0 ? '&userid='.$userid : '').'">'.$oldyear.'</a></td>';
|
||||||
print '<td class="right">0</td>';
|
print '<td class="right">0</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<tr class="oddeven" height="24">';
|
print '<tr class="oddeven" height="24">';
|
||||||
print '<td><a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&mode='.$mode.($socid > 0 ? '&socid='.$socid : '').($userid > 0 ? '&userid='.$userid : '').'">'.$year.'</a></td>';
|
print '<td><a href="'.$_SERVER["PHP_SELF"].'?year='.$year.($socid > 0 ? '&socid='.$socid : '').($userid > 0 ? '&userid='.$userid : '').'">'.$year.'</a></td>';
|
||||||
print '<td class="right">'.$val['nb'].'</td>';
|
print '<td class="right">'.$val['nb'].'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
$oldyear = $year;
|
$oldyear = $year;
|
||||||
@ -208,7 +208,7 @@ print '</div>';
|
|||||||
|
|
||||||
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
||||||
|
|
||||||
$stringtoshow .= '<table class="border centpercent"><tr class="pair nohover"><td class="center">';
|
$stringtoshow = '<table class="border centpercent"><tr class="pair nohover"><td class="center">';
|
||||||
if ($mesg) {
|
if ($mesg) {
|
||||||
print $mesg;
|
print $mesg;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user