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