New SITUATION_DISPLAY_DIFF_ON_PDF feature

allow to display or 
the progress situation percent value
the diférential situation percent value
This commit is contained in:
BENKE Charlie 2017-04-20 10:27:44 +02:00 committed by GitHub
parent a19627956b
commit b7f1e74f6f

View File

@ -1808,8 +1808,17 @@ function pdf_getlineprogress($object, $i, $outputlangs, $hidedetails = 0, $hookm
}
if (empty($reshook))
{
if ($object->lines[$i]->special_code == 3) return '';
if (empty($hidedetails) || $hidedetails > 1) $result.=$object->lines[$i]->situation_percent . '%';
if ($object->lines[$i]->special_code == 3) return '';
if (empty($hidedetails) || $hidedetails > 1)
{
if($conf->global->SITUATION_DISPLAY_DIFF_ON_PDF)
{
$prev_progress = $object->lines[$i]->get_prev_progress($object->id);
$result = ($prev_progress - $object->lines[$i]->situation_percent) . '%';
}
else
$result = $object->lines[$i]->situation_percent . '%';
}
}
return $result;
}