Commit 4abafdd1 authored by Jean-Paul Saman's avatar Jean-Paul Saman

Show Customer in timesheet details.

parent 05bf8f64
......@@ -320,6 +320,7 @@ function showproject()
$q = new DBQuery();
$q->addQuery('project_id');
$q->addQuery('project_name');
$q->addQuery('project_company');
$q->addQuery('project_status');
$q->addTable('projects');
$q->addOrder('project_name ASC');
......@@ -339,6 +340,18 @@ function showproject()
$tasks = $t->LoadList();
$t->Clear();
// show company in details
$company = "unknown";
$t->addQuery('company_id');
$t->addQuery('company_name');
$t->addTable('companies');
$t->addWhere('company_id = '. $row["project_company"]);
$companies = $t->LoadList();
foreach ($companies as $list) {
$company = $list['company_name'];
}
$t->Clear();
$amount = 0;
foreach ($tasks as $item) {
// Query the task_log table for actual start dates.
......@@ -370,7 +383,7 @@ function showproject()
echo '<tr>';
echo '<td>&nbsp;</td>';
echo '<td><a href="?m=projects&a=view&project_id=' . $row["project_id"] . '">' . $row["project_name"] . '</a></td>';
echo '<td>&nbsp;</td>';
echo '<td>'. $company .'</td>';
echo '<td>' . $amount . '</td>';
$timesheet_worked = $timesheet_worked + $amount;
echo '<td>' . $project_types[$row['project_status']] . '</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