if ($user->isPluginEnabled('ts')) {
$timesheet_option = $options['timesheet'];
if ($timesheet_option == TIMESHEET_PENDING)
if ($user->isPluginEnabled('ts')) {
$timesheet_option = $options['timesheet'];
if ($timesheet_option == TIMESHEET_PENDING)
else if ($options['show_timesheet'])
$inner_joins .= " left join tt_timesheets ts on (l.timesheet_id = ts.id)"; // Left join for timesheet nme.
}
else if ($options['show_timesheet'])
$inner_joins .= " left join tt_timesheets ts on (l.timesheet_id = ts.id)"; // Left join for timesheet nme.
}
if ($user->isPluginEnabled('ts')) {
$timesheet_option = $options['timesheet'];
if ($timesheet_option == TIMESHEET_PENDING)
if ($user->isPluginEnabled('ts')) {
$timesheet_option = $options['timesheet'];
if ($timesheet_option == TIMESHEET_PENDING)
else if ($options['show_timesheet'])
$inner_joins .= " left join tt_timesheets ts on (ei.timesheet_id = ts.id)"; // Left join for timesheet name.
}
else if ($options['show_timesheet'])
$inner_joins .= " left join tt_timesheets ts on (ei.timesheet_id = ts.id)"; // Left join for timesheet name.
}
if ($user->isPluginEnabled('ts') && $options['timesheet']) {
$timesheet_option = $options['timesheet'];
if ($timesheet_option == TIMESHEET_PENDING)
if ($user->isPluginEnabled('ts') && $options['timesheet']) {
$timesheet_option = $options['timesheet'];
if ($timesheet_option == TIMESHEET_PENDING)
}
// Prepare a query for time items.
$sql = "select $time_part $units_part $cost_part from tt_log l $left_joins $inner_joins $where";
}
// Prepare a query for time items.
$sql = "select $time_part $units_part $cost_part from tt_log l $left_joins $inner_joins $where";
if ($user->isPluginEnabled('ts') && $options['timesheet']) {
$timesheet_option = $options['timesheet'];
if ($timesheet_option == TIMESHEET_PENDING)
if ($user->isPluginEnabled('ts') && $options['timesheet']) {
$timesheet_option = $options['timesheet'];
if ($timesheet_option == TIMESHEET_PENDING)
$body .= '<td style="'.$tableHeader.'">'.$i18n->get('label.note').'</td>';
if ($options['show_cost'])
$body .= '<td style="'.$tableHeaderCentered.'" width="5%">'.$i18n->get('label.cost').'</td>';
$body .= '<td style="'.$tableHeader.'">'.$i18n->get('label.note').'</td>';
if ($options['show_cost'])
$body .= '<td style="'.$tableHeaderCentered.'" width="5%">'.$i18n->get('label.cost').'</td>';
if ($options['show_paid'])
$body .= '<td style="'.$tableHeaderCentered.'" width="5%">'.$i18n->get('label.paid').'</td>';
if ($options['show_ip'])
$body .= '<td style="'.$tableHeaderCentered.'" width="5%">'.$i18n->get('label.ip').'</td>';
if ($options['show_invoice'])
$body .= '<td style="'.$tableHeader.'">'.$i18n->get('label.invoice').'</td>';
if ($options['show_paid'])
$body .= '<td style="'.$tableHeaderCentered.'" width="5%">'.$i18n->get('label.paid').'</td>';
if ($options['show_ip'])
$body .= '<td style="'.$tableHeaderCentered.'" width="5%">'.$i18n->get('label.ip').'</td>';
if ($options['show_invoice'])
$body .= '<td style="'.$tableHeader.'">'.$i18n->get('label.invoice').'</td>';
if ($options['show_paid']) $body .= '<td></td>';
if ($options['show_ip']) $body .= '<td></td>';
if ($options['show_invoice']) $body .= '<td></td>';
if ($options['show_paid']) $body .= '<td></td>';
if ($options['show_ip']) $body .= '<td></td>';
if ($options['show_invoice']) $body .= '<td></td>';
$body .= '<td style="'.$cellLeftAligned.'">'.htmlspecialchars($record['note']).'</td>';
if ($options['show_cost'])
$body .= '<td style="'.$cellRightAligned.'">'.$record['cost'].'</td>';
$body .= '<td style="'.$cellLeftAligned.'">'.htmlspecialchars($record['note']).'</td>';
if ($options['show_cost'])
$body .= '<td style="'.$cellRightAligned.'">'.$record['cost'].'</td>';
if ($options['show_paid']) {
$body .= '<td style="'.$cellRightAligned.'">';
$body .= $record['paid'] == 1 ? $i18n->get('label.yes') : $i18n->get('label.no');
if ($options['show_paid']) {
$body .= '<td style="'.$cellRightAligned.'">';
$body .= $record['paid'] == 1 ? $i18n->get('label.yes') : $i18n->get('label.no');
}
if ($options['show_invoice'])
$body .= '<td style="'.$cellRightAligned.'">'.htmlspecialchars($record['invoice']).'</td>';
}
if ($options['show_invoice'])
$body .= '<td style="'.$cellRightAligned.'">'.htmlspecialchars($record['invoice']).'</td>';
if ($options['show_paid']) $body .= '<td></td>';
if ($options['show_ip']) $body .= '<td></td>';
if ($options['show_invoice']) $body .= '<td></td>';
if ($options['show_paid']) $body .= '<td></td>';
if ($options['show_ip']) $body .= '<td></td>';
if ($options['show_invoice']) $body .= '<td></td>';
if ($options['show_paid']) $body .= '<td></td>';
if ($options['show_ip']) $body .= '<td></td>';
if ($options['show_invoice']) $body .= '<td></td>';
if ($options['show_paid']) $body .= '<td></td>';
if ($options['show_ip']) $body .= '<td></td>';
if ($options['show_invoice']) $body .= '<td></td>';
$options['invoice'] = $bean->getAttribute('invoice');
$options['paid_status'] = $bean->getAttribute('paid_status');
$options['approved'] = $bean->getAttribute('approved');
$options['invoice'] = $bean->getAttribute('invoice');
$options['paid_status'] = $bean->getAttribute('paid_status');
$options['approved'] = $bean->getAttribute('approved');
if (is_array($bean->getAttribute('users'))) $options['users'] = join(',', $bean->getAttribute('users'));
$options['period'] = $bean->getAttribute('period');
$options['period_start'] = $bean->getAttribute('start_date');
if (is_array($bean->getAttribute('users'))) $options['users'] = join(',', $bean->getAttribute('users'));
$options['period'] = $bean->getAttribute('period');
$options['period_start'] = $bean->getAttribute('start_date');
if ($user->isPluginEnabled('ts') && $options['timesheet']) {
$timesheet_option = $options['timesheet'];
if ($timesheet_option == TIMESHEET_PENDING)
if ($user->isPluginEnabled('ts') && $options['timesheet']) {
$timesheet_option = $options['timesheet'];
if ($timesheet_option == TIMESHEET_PENDING)
if ($user->isPluginEnabled('ts') && $options['timesheet']) {
$timesheet_option = $options['timesheet'];
if ($timesheet_option == TIMESHEET_PENDING)
if ($user->isPluginEnabled('ts') && $options['timesheet']) {
$timesheet_option = $options['timesheet'];
if ($timesheet_option == TIMESHEET_PENDING)