Commit 15ee5557 authored by Jean-Paul Saman's avatar Jean-Paul Saman

Added year to period column in timesheet overview page.

parent 99a941fd
......@@ -107,8 +107,9 @@ function timesheets($type)
$q->addTable('contacts');
$q->addWhere('user_contact = contact_id');
$q->addOrder('contact_last_name, contact_first_name');
if (!$q->exec())
if (!$q->exec()) {
db_error();
}
$users = array();
while ( $row = $q->fetchRow()) {
$users[$row['user_id']] = $row['contact_last_name'] . ', ' . $row['contact_first_name'];
......@@ -155,8 +156,8 @@ function timesheets($type)
}
else
$period->setDate($row["timesheet_period"],DATE_FORMAT_UNIXTIME);
/*debug >>*/echo "(". $row["timesheet_period"] . "," . $period->getMonth() . ") " ; //<< debug
echo getMonthByName($period->getMonth());
// /*debug >>*/echo "(". $row["timesheet_period"] . "," . $period->getMonth() . ") " ; //<< debug
echo getMonthByName($period->getMonth()) . " " . $period->getYear();
echo "\n</a>";
echo "</td>";
echo "<td>". $period->getYear() ."</td>";
......
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