PageRenderTime 53ms CodeModel.GetById 7ms RepoModel.GetById 1ms app.codeStats 0ms

/sys/extensions/text_ui/templates/default/invoices/quick_view.tpl

http://simpleinvoices.googlecode.com/
Smarty Template | 262 lines | 205 code | 39 blank | 18 comment | 20 complexity | 2f07bf81a09ec8b1670afe93aff95c72 MD5 | raw file
Possible License(s): GPL-3.0, LGPL-2.1, GPL-2.0, LGPL-3.0
  1. {*
  2. /*
  3. * Script: quick_view.tpl
  4. * Quick view of invoice template
  5. *
  6. * Authors:
  7. * Justin Kelly, Nicolas Ruflin, Ap.Muthu
  8. *
  9. * Last edited:
  10. * 2008-01-03
  11. *
  12. * License:
  13. * GPL v2 or above
  14. *
  15. * Website:
  16. * http://www.simpleinvoices.org
  17. */
  18. *}
  19. {literal}
  20. <script type="text/javascript">
  21. $(document).ready(function() {
  22. // hides the customer and biller details as soon as the DOM is ready (a little sooner that page load)
  23. $('.show-summary').hide();
  24. $('.biller').hide();
  25. $('.customer').hide();
  26. $('.consulting').hide();
  27. $('.itemised').hide();
  28. $('.notes').hide();
  29. });
  30. </script>
  31. {/literal}
  32. {$LANG.quick_view_of} {$preference.pref_inv_wording} {$invoice.id}
  33. <br />
  34. <!--Actions heading - start-->
  35. {$LANG.actions}:
  36. <a href="index.php?module=invoices&amp;view=details&amp;invoice={$invoice.id}&amp;action=view"> {$LANG.edit}</a>
  37. ::
  38. <a href="index.php?module=payments&amp;view=process&amp;invoice={$invoice.id}&amp;op=pay_selected_invoice"> {$LANG.process_payment} </a>
  39. ::
  40. <a href="index.php?module=invoices&amp;view=email&amp;stage=1&amp;invoice={$invoice.id}">{$LANG.email}</a>
  41. {if $defaults.delete == '1'}
  42. ::
  43. <a href="index.php?module=invoices&amp;view=delete&amp;stage=1&amp;invoice={$invoice.id}">{$LANG.delete}</a>
  44. {/if}
  45. <!--Actions heading - start-->
  46. <hr />
  47. <!-- #PDF end -->
  48. <!-- Invoice Summary section -->
  49. <b>{$preference.pref_inv_wording} {$LANG.summary}:</b><br />
  50. {$preference.pref_inv_wording} {$LANG.number_short}: {$invoice.id} :: {$preference.pref_inv_wording} {$LANG.date}: {$invoice.date}
  51. {$customField.1}
  52. {$customField.2}
  53. {$customField.3}
  54. {$customField.4}
  55. <br />
  56. <br />
  57. <!-- Biller section -->
  58. <b>{$LANG.biller}:</b> {$biller.name}<br />
  59. <b>{$LANG.customer}:</b> {$customer.name}<br />
  60. <table width="100%">
  61. {if $invoice.type_id == 1 }
  62. <tr>
  63. <td colspan="6"><b>{$LANG.description}</b></td>
  64. </tr>
  65. <tr>
  66. <td colspan="6">{$invoiceItems.0.description}</td>
  67. </tr>
  68. <tr>
  69. <td colspan="6"><br /></td>
  70. </tr>
  71. <tr>
  72. <td></td>
  73. <td></td>
  74. <td></td>
  75. <td style="text-align:right"><b>{$LANG.gross_total}</b></td>
  76. <td style="text-align:right"><b>{$LANG.tax}</b></td>
  77. <td style="text-align:right"><b>{$LANG.total_uppercase}</b></td>
  78. </tr>
  79. <tr>
  80. <td></td>
  81. <td></td>
  82. <td></td>
  83. <td style="text-align:right">{$preference.pref_currency_sign}{$invoiceItems.0.gross_total|number_format:2}</td>
  84. <td style="text-align:right">{$preference.pref_currency_sign}{$invoiceItems.0.tax_amount|number_format:2}</td>
  85. <td style="text-align:right"><u>{$preference.pref_currency_sign}{$invoiceItems.0.total|number_format:2}</u></td>
  86. </tr>
  87. <tr>
  88. <td colspan="6"><br /><br /></td>
  89. </tr>
  90. <tr>
  91. <td colspan="6"><b>{$preference.pref_inv_detail_heading}</b></td>
  92. </tr>
  93. {/if}
  94. {if $invoice.type_id == 2 || $invoice.type_id == 3 || $invoice.type_id == 4}
  95. <tr>
  96. <td colspan="6">
  97. <table width="100%">
  98. {if $invoice.type_id == 2 || $invoice.type_id == 4}
  99. <tr>
  100. <td colspan="6" class="details_screen align_right"><a href='#' class="show-itemised" onclick="javascript: $('.itemised').show();$('.show-itemised').hide();">{$LANG.show_details}</a><a href='#' class="itemised" onclick="javascript: $('.itemised').hide();$('.show-itemised').show();">{$LANG.hide_details}</a></td>
  101. </tr>
  102. <tr>
  103. <td><b>{$LANG.quantity_short}</b></td>
  104. <td colspan="3"><b>{$LANG.description}</b></td>
  105. </tr>
  106. <tr>
  107. <td><i>{$LANG.unit_price}</i></td>
  108. <td><i>{$LANG.gross_total}</i></td>
  109. <td style="text-align:right"><i>{$LANG.tax}</i></td>
  110. <td style="text-align:right"><i>{$LANG.total_uppercase}</i></td>
  111. </tr>
  112. {/if}
  113. {if $invoice.type_id == 3 }
  114. <tr>
  115. <td colspan="6" class="details_screen align_right"><a href='#' class="show-consulting" onclick="javascript: $('.consulting').show();$('.show-consulting').hide();">{$LANG.show_details}</a><a href='#' class="consulting" onclick="javascript: $('.consulting').hide();$('.show-consulting').show();">{$LANG.hide_details}</a></td>
  116. </tr>
  117. <tr>
  118. <td><b>{$LANG.quantity_short}</b></td>
  119. <td colspan="3"><b>{$LANG.item}</b></td>
  120. </tr>
  121. <tr>
  122. <td ><i>{$LANG.unit_price}</i></td>
  123. <td ><i>{$LANG.gross_total}</i></td>
  124. <td style="text-align:right"><i>{$LANG.tax}</i></td>
  125. <td style="text-align:right"><i>{$LANG.total_uppercase}</i></td>
  126. </tr>
  127. {/if}
  128. {foreach from=$invoiceItems item=invoiceItem }
  129. {if $invoice.type_id == 2 || $invoice.type_id == 4}
  130. <tr>
  131. <td>{$invoiceItem.quantity|number_format:2}</td>
  132. <td colspan="3">{$invoiceItem.product.description} {if $invoiceItem.attr1.display != "" } ::{/if} {$invoiceItem.attr1.display} {$invoiceItem.attr2.display} {$invoiceItem.attr3.display}</td>
  133. </tr>
  134. <tr>
  135. <td >{$preference.pref_currency_sign}{$invoiceItem.unit_price|number_format:2}</td>
  136. <td >{$preference.pref_currency_sign}{$invoiceItem.gross_total|number_format:2}</td>
  137. <td style="text-align:right">{$preference.pref_currency_sign}{$invoiceItem.tax_amount|number_format:2}</td>
  138. <td style="text-align:right">{$preference.pref_currency_sign}{$invoiceItem.total|number_format:2}</td>
  139. </tr>
  140. <tr class='itemised'>
  141. <td colspan="6">
  142. <table width="100%">
  143. <tr>
  144. <td width="50%" class="details_screen">{$customFieldLabels.product_cf1}: {$invoiceItem.product.custom_field1}</td>
  145. <td width="50%" class="details_screen">{$customFieldLabels.product_cf2}: {$invoiceItem.product.custom_field2}</td>
  146. </tr>
  147. <tr>
  148. <td width="50%" class="details_screen">{$customFieldLabels.product_cf3}: {$invoiceItem.product.custom_field3}</td>
  149. <td width="50%" class="details_screen">{$customFieldLabels.product_cf4}: {$invoiceItem.product.custom_field4}</td>
  150. </tr>
  151. </table>
  152. </td>
  153. </tr>
  154. {/if}
  155. {if $invoice.type_id == 3 }
  156. <tr>
  157. <td>{$invoiceItem.quantity|number_format:2}</td>
  158. <td>{$invoiceItem.product.description}</td>
  159. <td style="text-align:right">{$preference.pref_currency_sign}{$invoiceItem.unit_price|number_format:2}</td>
  160. <td style="text-align:right">{$preference.pref_currency_sign}{$invoiceItem.gross_total|number_format:2}</td>
  161. <td style="text-align:right">{$preference.pref_currency_sign}{$invoiceItem.tax_amount|number_format:2}</td>
  162. <td style="text-align:right">{$preference.pref_currency_sign}{$invoiceItem.total|number_format:2}</td>
  163. </tr>
  164. <tr class='consulting' >
  165. <td colspan="6">
  166. <table width="100%">
  167. <tr>
  168. <td width="50%" class="details_screen">{$customFieldLabels.product_cf1}: {$invoiceItem.product.custom_field1}</td>
  169. <td width="50%" class="details_screen">{$customFieldLabels.product_cf2}: {$invoiceItem.product.custom_field2}</td>
  170. </tr>
  171. <tr>
  172. <td width="50%" class="details_screen">{$customFieldLabels.product_cf3}: {$invoiceItem.product.custom_field3}</td>
  173. <td width="50%" class="details_screen">{$customFieldLabels.product_cf4}: {$invoiceItem.product.custom_field4}</td>
  174. </tr>
  175. </table>
  176. </td>
  177. <!-- <td></td><td colspan="6" class='details_screen consulting'>{$prod_custom_field_label1}: {$product.custom_field1}, {$prod_custom_field_label2}: {$product.custom_field2}, {$prod_custom_field_label3}: {$product.custom_field3}, {$prod_custom_field_label4}: {$product.custom_field4}</td> -->
  178. </tr>
  179. {if $invoiceItem.description != null}
  180. <tr class='show-consulting' >
  181. <td colspan="6" class='details_screen consulting'>{$invoiceItem.description|truncate:"..."}</td>
  182. </tr>
  183. <tr class='consulting' >
  184. <td colspan="6" class='details_screen consulting'>{$LANG.description}:<br />{$invoiceItem.description}</td>
  185. </tr>
  186. {/if}
  187. {/if}
  188. {/foreach}
  189. <!-- we are still in the itemised or consulting loop -->
  190. </table>
  191. </table>
  192. {if ($invoice.note != null) }
  193. <b>{$LANG.notes}:</b>
  194. <table>
  195. <td>
  196. <td class="details_screen align_right"><a href='#' class="show-notes" onclick="javascript: $('.notes').show();$('.show-notes').hide();">{$LANG.show_details}</a><a href='#' class="notes" onclick="javascript: $('.notes').hide();$('.show-notes').show();">{$LANG.hide_details}</a></td>
  197. </tr>
  198. <!-- if hide detail click - the stripped note will be displayed -->
  199. <tr class='show-notes details_screen'>
  200. <td colspan="6">{$invoice.note|truncate:"..."}</td>
  201. </tr>
  202. <!-- if show detail click - the full note will be displayed -->
  203. <tr class='notes details_screen'>
  204. <td colspan="6">{$invoice.note}</td>
  205. </tr>
  206. </table>
  207. {/if}
  208. <br />
  209. {$LANG.total} {$LANG.tax} {$LANG.included}: {$preference.pref_currency_sign}{$invoice.total_tax|number_format:2}<br />
  210. <b>{$preference.pref_inv_wording} {$LANG.amount}</b>: <u>{$preference.pref_currency_sign}{$invoice.total|number_format:2}</u><br />
  211. </tr>
  212. {/if}
  213. </table>
  214. </table>
  215. <hr />
  216. <b>{$LANG.account_info}</b><br />
  217. {$LANG.total}:
  218. {$preference.pref_currency_sign}{$invoice.total|number_format:2} ::
  219. <a href='index.php?module=payments&amp;view=manage&amp;id={$invoice.id}'>{$LANG.paid}:</a> {$preference.pref_currency_sign}{$invoice.paid|number_format:2} ::
  220. {$LANG.owing}: <u>{$preference.pref_currency_sign}{$invoice.owing|number_format:2}</u> ::
  221. {$LANG.age}: {$invoice_age}
  222. <br />
  223. <hr />