// Check if user has the right.
if (in_array($required_right, $user->rights)) {
+ import('ttUserHelper');
ttUserHelper::updateLastAccess();
return true;
}
// Add paid status.
if ($canViewReports && $bean->getAttribute('chpaid'))
array_push($fields, 'l.paid as paid');
+ // Add IP address.
+ if ($canViewReports && $bean->getAttribute('chip')) {
+ array_push($fields, 'l.created as created');
+ array_push($fields, 'l.created_ip as created_ip');
+ array_push($fields, 'l.modified as modified');
+ array_push($fields, 'l.modified_ip as modified_ip');
+ }
// Add invoice name if it is selected.
if (($canViewReports || $isClient) && $bean->getAttribute('chinvoice'))
// Add paid status.
if ($canViewReports && $bean->getAttribute('chpaid'))
array_push($fields, 'ei.paid as paid');
+ // Add IP address. NULL for now for expenses.
+ if ($canViewReports && $bean->getAttribute('chip')) {
+ array_push($fields, 'null as created');
+ array_push($fields, 'null as created_ip');
+ array_push($fields, 'null as modified');
+ array_push($fields, 'null as modified_ip');
+ }
+
// Add invoice name if it is selected.
if (($canViewReports || $isClient) && $bean->getAttribute('chinvoice'))
array_push($fields, 'i.name as invoice');
'label.notes' => 'Notes',
'label.item' => 'Item',
'label.cost' => 'Cost',
+'label.ip' => 'IP',
'label.day_total' => 'Day total',
'label.week_total' => 'Week total',
'label.month_total' => 'Month total',
<br>
<table cellspacing="0" cellpadding="4" width="100%" border="0">
<tr>
- <td align="center"> Anuko Time Tracker 1.17.57.4105 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+ <td align="center"> Anuko Time Tracker 1.17.58.4106 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
<a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
<a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
<a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>
{if $bean->getAttribute('chnote')}<td class="tableHeader">{$i18n.label.note}</td>{/if}
{if $bean->getAttribute('chcost')}<td class="tableHeaderCentered" width="5%">{$i18n.label.cost}</td>{/if}
{if $bean->getAttribute('chpaid')}<td class="tableHeader">{$i18n.label.paid}</td>{/if}
+ {if $bean->getAttribute('chip')}<td class="tableHeader">{$i18n.label.ip}</td>{/if}
{if $bean->getAttribute('chinvoice')}<td class="tableHeader">{$i18n.label.invoice}</td>{/if}
</tr>
{foreach $report_items as $item}
{if $bean->getAttribute('chnote')}<td></td>{/if}
{if $bean->getAttribute('chcost')}<td class="cellRightAlignedSubtotal">{if $user->canManageTeam() || $user->isClient()}{$subtotals[$prev_grouped_by]['cost']}{else}{$subtotals[$prev_grouped_by]['expenses']}{/if}</td>{/if}
{if $bean->getAttribute('chpaid')}<td></td>{/if}
+ {if $bean->getAttribute('chip')}<td></td>{/if}
{if $bean->getAttribute('chinvoice')}<td></td>{/if}
{if $use_checkboxes}<td></td>{/if}
</tr>
{if $bean->getAttribute('chnote')}<td class="cellLeftAligned">{$item.note|escape}</td>{/if}
{if $bean->getAttribute('chcost')}<td class="cellRightAligned">{if $user->canManageTeam() || $user->isClient()}{$item.cost}{else}{$item.expense}{/if}</td>{/if}
{if $bean->getAttribute('chpaid')}<td class="cellRightAligned">{if $item.paid == 1}{$i18n.label.yes}{else}{$i18n.label.no}{/if}{/if}
+ {if $bean->getAttribute('chip')}<td class="cellRightAligned">{if $item.modified}{$item.modified_ip} {$item.modified}{else}{$item.created_ip} {$item.created}{/if}{/if}
{if $bean->getAttribute('chinvoice')}<td class="cellRightAligned">{$item.invoice|escape}</td>{/if}
{if $use_checkboxes}
{if 1 == $item.type}<td bgcolor="white"><input type="checkbox" name="log_id_{$item.id}"></td>{/if}
{if $bean->getAttribute('chnote')}<td></td>{/if}
{if $bean->getAttribute('chcost')}<td class="cellRightAlignedSubtotal">{if $user->canManageTeam() || $user->isClient()}{$subtotals[$cur_grouped_by]['cost']}{else}{$subtotals[$cur_grouped_by]['expenses']}{/if}</td>{/if}
{if $bean->getAttribute('chpaid')}<td></td>{/if}
+ {if $bean->getAttribute('chip')}<td></td>{/if}
{if $bean->getAttribute('chinvoice')}<td></td>{/if}
{if $use_checkboxes}<td></td>{/if}
</tr>
{if $bean->getAttribute('chnote')}<td></td>{/if}
{if $bean->getAttribute('chcost')}<td nowrap class="cellRightAlignedSubtotal">{$user->currency|escape} {if $user->canManageTeam() || $user->isClient()}{$totals['cost']}{else}{$totals['expenses']}{/if}</td>{/if}
{if $bean->getAttribute('chpaid')}<td></td>{/if}
+ {if $bean->getAttribute('chip')}<td></td>{/if}
{if $bean->getAttribute('chinvoice')}<td></td>{/if}
{if $use_checkboxes}<td></td>{/if}
</tr>
{/if}
{if ($user->canManageTeam() && $user->isPluginEnabled('ps'))}
<td width="25%"><label>{$forms.reportForm.chpaid.control} {$i18n.label.paid}</label></td>
+ {/if}
+ {if ($user->canManageTeam())}
+ <td width="25%"><label>{$forms.reportForm.chip.control} {$i18n.label.ip}</label></td>
{/if}
</tr>
{/if}
$form->addInput(array('type'=>'checkbox','name'=>'chclient'));
if (($user->canManageTeam() || $user->isClient()) && $user->isPluginEnabled('iv'))
$form->addInput(array('type'=>'checkbox','name'=>'chinvoice'));
+if ($user->canManageTeam() && $user->isPluginEnabled('ps'))
+ $form->addInput(array('type'=>'checkbox','name'=>'chpaid'));
+if ($user->canManageTeam())
+ $form->addInput(array('type'=>'checkbox','name'=>'chip'));
if (MODE_PROJECTS == $user->tracking_mode || MODE_PROJECTS_AND_TASKS == $user->tracking_mode)
$form->addInput(array('type'=>'checkbox','name'=>'chproject'));
if (MODE_PROJECTS_AND_TASKS == $user->tracking_mode)
// If we have a custom field - add a checkbox for it.
if ($custom_fields && $custom_fields->fields[0])
$form->addInput(array('type'=>'checkbox','name'=>'chcf_1'));
-if ($user->canManageTeam() && $user->isPluginEnabled('ps'))
- $form->addInput(array('type'=>'checkbox','name'=>'chpaid'));
// Add group by control.
$group_by_options['no_grouping'] = $i18n->getKey('form.reports.group_by_no');
$group_by_options['date'] = $i18n->getKey('form.reports.group_by_date');
$form->setValueByElement('end_date', $period->getEndDate());
$form->setValueByElement('chclient', '1');
$form->setValueByElement('chinvoice', '0');
+ $form->setValueByElement('chpaid', '0');
+ $form->setValueByElement('chip', '0');
$form->setValueByElement('chproject', '1');
$form->setValueByElement('chstart', '1');
$form->setValueByElement('chduration', '1');
$form->setValueByElement('chfinish', '1');
$form->setValueByElement('chnote', '1');
$form->setValueByElement('chcf_1', '0');
- $form->setValueByElement('chpaid', '0');
$form->setValueByElement('chtotalsonly', '0');
}