<tr>
<td>
<table border=0 width=100%>
- <tr><td align="center"><b style="font-size: 15pt; font-family: Arial, Helvetica, sans-serif;">{$timesheet_name|escape} </b></td></tr>
- <tr><td align="left"><b>{$i18n.label.date}:</b> {$invoice_date}</td></tr>
- <tr><td align="left"><b>{$i18n.label.client}:</b> {$client_name|escape}</td></tr>
- <tr><td align="left"><b>{$i18n.label.client_address}:</b> {$client_address|escape}</td></tr>
+ <tr><td align="center"><b style="font-size: 15pt; font-family: Arial, Helvetica, sans-serif;">{$timesheet['name']|escape} </b></td></tr>
+ <tr><td align="left"><b>{$i18n.label.user}:</b> {$timesheet['user_name']|escape}</td></tr>
+{if $timesheet['client_id']}
+ <tr><td align="left"><b>{$i18n.label.client}:</b> {$timesheet['client_name']|escape}</td></tr>
+{/if}
+{if $not_client}
+ <tr><td align="left"><b>{$i18n.label.submitted}:</b> {if $timesheet.submit_status}{$i18n.label.yes}{else}{$i18n.label.no}{/if}</td></tr>
+ {if $timesheet['submitter_comment']}
+ <tr><td align="left"><b>{$i18n.label.comment}:</b> {$timesheet['submitter_comment']|escape}</td></tr>
+ {/if}
+ {if $timesheet['submit_status']}
+ <tr><td align="left"><b>{$i18n.label.approved}:</b> {if $timesheet.approval_status != null}{if $timesheet.approval_status}{$i18n.label.yes}{else}{$i18n.label.no}{/if}</td></tr>{/if}
+ {/if}
+ {if $timesheet['manager_comment']}
+ <tr><td align="left"><b>{$i18n.label.note}:</b> {$timesheet['manager_comment']|escape}</td></tr>
+ {/if}
+{/if}
</table>
</td>
</tr>
<tr>
<td valign="top">
-{if $invoice_items}
<table border="0" cellpadding="3" cellspacing="1" width="100%">
- <tr>
- <td class="tableHeader">{$i18n.label.date}</td>
- <td class="tableHeader">{$i18n.form.invoice.person}</td>
- {if $show_project}
- <td class="tableHeader">{$i18n.label.project}</td>
- {/if}
- {if $show_task}
- <td class="tableHeader">{$i18n.label.task}</td>
- {/if}
- <td class="tableHeader">{$i18n.label.note}</td>
- <td class="tableHeaderCentered" width="5%">{$i18n.label.duration}</td>
- <td class="tableHeaderCentered" width="5%">{$i18n.label.cost}</td>
- {if $user->isPluginEnabled('ps')}
- <td class="tableHeader">{$i18n.label.paid}</td>
- {/if}
- </tr>
- {foreach $invoice_items as $invoice_item}
- <tr bgcolor="{cycle values="#f5f5f5,#ffffff"}">
- <td valign="top">{$invoice_item.date}</td>
- <td valign="top">{$invoice_item.user_name|escape}</td>
- {if $show_project}
- <td valign="top">{$invoice_item.project_name|escape}</td>
- {/if}
- {if $show_task}
- <td valign="top">{$invoice_item.task_name|escape}</td>
- {/if}
- <td valign="top">{$invoice_item.note|escape}</td>
- <td align="right" valign="top">{$invoice_item.duration}</td>
- <td align="right" valign="top">{$invoice_item.cost}</td>
- {if $user->isPluginEnabled('ps')}
- <td align="right" valign="top">{if $invoice_item.paid}{$i18n.label.yes}{else}{$i18n.label.no}{/if}</td>
- {/if}
- </tr>
+ <tr>
+ <td class="tableHeader">{$group_by_header|escape}</td>
+ <td class="tableHeaderCentered" width="5%">{$i18n.label.duration}</td>
+ <td class="tableHeaderCentered" width="5%">{$i18n.label.cost}</td>
+ </tr>
+ {foreach $subtotals as $subtotal}
+ <tr class="rowReportSubtotal">
+ <td class="cellLeftAlignedSubtotal">{if $subtotal['name']}{$subtotal['name']|escape}{else} {/if}</td>
+ <td class="cellRightAlignedSubtotal">{$subtotal['time']}</td>
+ <td class="cellRightAlignedSubtotal">{if $user->can('manage_invoices') || $user->isClient()}{$subtotal['cost']}{else}{$subtotal['expenses']}{/if}</td>
+ </tr>
{/foreach}
- <tr><td> </td></tr>
- {if $tax}
- <tr>
- <td align="right" colspan="{$colspan}"><b>{$i18n.label.subtotal}:</b></td>
- <td align="right"><nobr>{$subtotal|escape}</nobr></td>
- </tr>
- <tr>
- <td align="right" colspan="{$colspan}"><b>{$i18n.label.tax}:</b></td>
- <td align="right"><nobr>{$tax|escape}</nobr></td>
- </tr>
- {/if}
- <tr>
- <td align="right" colspan="{$colspan}"><b>{$i18n.label.total}:</b></td>
- <td align="right"><nobr>{$total|escape}</nobr></td>
- </tr>
+ <tr><td> </td></tr>
+ <tr class="rowReportSubtotal">
+ <td class="cellLeftAlignedSubtotal">{$i18n.label.total}</td>
+ <td nowrap class="cellRightAlignedSubtotal">{$totals['time']}</td>
+ <td nowrap class="cellRightAlignedSubtotal">{$user->currency|escape} {if $user->can('manage_invoices') || $user->isClient()}{$totals['cost']}{else}{$totals['expenses']}{/if}</td>
+ </tr>
</table>
- {$forms.invoiceForm.open}
- {if $user->isPluginEnabled('ps')}
+{$forms.timesheetForm.open}
+ {if $show_submit}
<table width="720" cellspacing="0" cellpadding="0" border="0">
<tr>
- <td align="right">
+ <td align="center">
<table>
- <tr><td>{$i18n.label.mark_paid}: {$forms.invoiceForm.mark_paid_action_options.control} {$forms.invoiceForm.btn_mark_paid.control}</td></tr>
+ <tr><td>{$i18n.form.mail.to}: {$forms.timesheetForm.approver.control} {$forms.timesheetForm.btn_submit.control}</td></tr>
</table>
</td>
</tr>
</table>
{/if}
- {$forms.invoiceForm.close}
-{/if}
+ {if $show_approve}
+ <table width="720" cellspacing="0" cellpadding="0" border="0">
+ <tr>
+ <td align="center">
+ <table>
+ <tr><td align="center">{$i18n.label.comment}:</td></tr>
+ <tr><td align="center">{$forms.timesheetForm.comment.control}</td></tr>
+ <tr><td align="center">{$forms.timesheetForm.btn_approve.control} {$forms.timesheetForm.btn_disapprove.control}</td></tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ {/if}
+{$forms.timesheetForm.close}
+
</td>
</tr>
- <tr><td align="center"><br><form>
- <input type="button" onclick="chLocation('invoice_send.php?id={$invoice_id}');" value="{$i18n.button.send_by_email}">
- </form></td></tr>
</table>