Commit e8afdac0 authored by Jean-Paul Saman's avatar Jean-Paul Saman

Fix bug with mixing the same month from another year.

parent 1b0a073b
......@@ -354,7 +354,8 @@ function showproject()
if (intval($logitem['task_log_date']))
{
$taskDate = new CDate($logitem['task_log_date']);
if ($period->GetMonth() == $taskDate->GetMonth()) {
if ( ($period->GetMonth() == $taskDate->GetMonth()) &&
($period->GetYear() == $taskDate->GetYear()) ) {
$amount = $amount + $logitem['task_log_hours'];
}
// else do not account the worked hours to the project for this month
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment