Added an option to use page breaks on PDF reports after grouped by blocks.
[timetracker.git] / WEB-INF / templates / invoice_view.tpl
1 <script>
2   function chLocation(newLocation) { document.location = newLocation; }
3 </script>
4
5 <table cellspacing="0" cellpadding="7" border="0" width="720">
6   <tr>
7     <td>
8       <table border=0 width=100%>
9         <tr><td align="center"><b style="font-size: 15pt; font-family: Arial, Helvetica, sans-serif;">{$i18n.title.invoice} {$invoice_name|escape} </b></td></tr>
10         <tr><td align="left"><b>{$i18n.label.date}:</b> {$invoice_date}</td></tr>
11         <tr><td align="left"><b>{$i18n.label.client}:</b> {$client_name|escape}</td></tr>
12         <tr><td align="left"><b>{$i18n.label.client_address}:</b> {$client_address|escape}</td></tr>
13       </table>
14     </td>
15   </tr>
16   <tr>
17     <td valign="top">
18 {if $invoice_items}
19       <table border="0" cellpadding="3" cellspacing="1" width="100%">
20         <tr>
21           <td class="tableHeader">{$i18n.label.date}</td>
22           <td class="tableHeader">{$i18n.form.invoice.person}</td>
23   {if $show_project}
24           <td class="tableHeader">{$i18n.label.project}</td>
25   {/if}
26   {if $show_task}
27           <td class="tableHeader">{$i18n.label.task}</td>
28   {/if}
29           <td class="tableHeader">{$i18n.label.note}</td>
30           <td class="tableHeaderCentered" width="5%">{$i18n.label.duration}</td>
31           <td class="tableHeaderCentered" width="5%">{$i18n.label.cost}</td>
32   {if $user->isPluginEnabled('ps')}
33           <td class="tableHeader">{$i18n.label.paid}</td>
34   {/if}
35         </tr>
36   {foreach $invoice_items as $invoice_item}
37         <tr bgcolor="{cycle values="#f5f5f5,#ffffff"}">
38           <td valign="top">{$invoice_item.date}</td>
39           <td valign="top">{$invoice_item.user_name|escape}</td>
40     {if $show_project}
41           <td valign="top">{$invoice_item.project_name|escape}</td>
42     {/if}
43     {if $show_task}
44           <td valign="top">{$invoice_item.task_name|escape}</td>
45     {/if}
46           <td valign="top">{$invoice_item.note|escape}</td>
47           <td align="right" valign="top">{$invoice_item.duration}</td>
48           <td align="right" valign="top">{$invoice_item.cost}</td>
49     {if $user->isPluginEnabled('ps')}
50           <td align="right" valign="top">{if $invoice_item.paid}{$i18n.label.yes}{else}{$i18n.label.no}{/if}</td>
51     {/if}
52         </tr>
53   {/foreach}
54         <tr><td>&nbsp;</td></tr>
55   {if $tax}
56         <tr>
57           <td align="right" colspan="{$colspan}"><b>{$i18n.label.subtotal}:</b></td>
58           <td align="right"><nobr>{$subtotal|escape}</nobr></td>
59         </tr>
60         <tr>
61           <td align="right" colspan="{$colspan}"><b>{$i18n.label.tax}:</b></td>
62           <td align="right"><nobr>{$tax|escape}</nobr></td>
63         </tr>
64    {/if}
65         <tr>
66           <td align="right" colspan="{$colspan}"><b>{$i18n.label.total}:</b></td>
67           <td align="right"><nobr>{$total|escape}</nobr></td>
68         </tr>
69       </table>
70
71   {$forms.invoiceForm.open}
72   {if $user->isPluginEnabled('ps')}
73   <table width="720" cellspacing="0" cellpadding="0" border="0">
74   <tr>
75     <td align="right">
76       <table>
77         <tr><td>{$i18n.label.mark_paid}: {$forms.invoiceForm.mark_paid_action_options.control} {$forms.invoiceForm.btn_mark_paid.control}</td></tr>
78       </table>
79     </td>
80   </tr>
81   </table>
82   {/if}
83   {$forms.invoiceForm.close}
84 {/if}
85     </td>
86   </tr>
87   <tr><td align="center"><br><form>
88     <input type="button" onclick="chLocation('invoice_send.php?id={$invoice_id}');" value="{$i18n.button.send_by_email}">
89   </form></td></tr>
90 </table>