3 INSERT INTO config.upgrade_log VALUES ('0457');
5 UPDATE action_trigger.event_definition SET template = $$[% FILTER collapse %]
6 [%- SET invoice = target -%]
7 <!-- This lacks general refinement -->
8 <div class="acq-invoice-voucher">
11 <strong>No.</strong> [% invoice.inv_ident %]
12 [% IF invoice.inv_type %]
13 / <strong>Type:</strong>[% invoice.inv_type %]
18 [% BLOCK ent_with_address %]
19 <dt>[% ent_label %]: [% ent.name %] ([% ent.code %])</dt>
21 [% IF ent.addresses.0 %]
22 [% SET addr = ent.addresses.0 %]
23 [% addr.street1 %]<br />
24 [% IF addr.street2 %][% addr.street2 %]<br />[% END %]
26 [% IF addr.county %] [% addr.county %], [% END %]
27 [% IF addr.state %] [% addr.state %] [% END %]
28 [% IF addr.post_code %][% addr.post_code %][% END %]<br />
29 [% IF addr.country %] [% addr.country %] [% END %]
32 [% IF ent.phone %] Phone: [% ent.phone %]<br />[% END %]
33 [% IF ent.fax_phone %] Fax: [% ent.fax_phone %]<br />[% END %]
34 [% IF ent.url %] URL: [% ent.url %]<br />[% END %]
35 [% IF ent.email %] E-mail: [% ent.email %] [% END %]
39 [% INCLUDE ent_with_address
40 ent = invoice.provider
41 ent_label = "Provider" %]
42 [% INCLUDE ent_with_address
44 ent_label = "Shipper" %]
47 [% invoice.receiver.name %] ([% invoice.receiver.shortname %])
51 [% helpers.format_date(invoice.recv_date) %] by
52 [% invoice.recv_method %]
63 [% FOR entry IN invoice.entries %]
65 [% IF entry.lineitem %]
66 Title: [% helpers.get_li_attr(
67 "title", "", entry.lineitem.attributes
69 Author: [% helpers.get_li_attr(
70 "author", "", entry.lineitem.attributes
73 [% IF entry.purchase_order %]
74 (PO: [% entry.purchase_order.name %])
76 Invoice item count: [% entry.inv_item_count %]
77 [% IF entry.phys_item_count %]
78 / Physical item count: [% entry.phys_item_count %]
81 [% IF entry.cost_billed %]
82 Cost billed: [% entry.cost_billed %]
83 [% IF entry.billed_per_item %](per item)[% END %]
86 [% IF entry.actual_cost %]
87 Actual cost: [% entry.actual_cost %]<br />
89 [% IF entry.amount_paid %]
90 Amount paid: [% entry.amount_paid %]<br />
92 [% IF entry.note %]Note: [% entry.note %][% END %]
95 [% FOR item IN invoice.items %]
97 [% IF item.inv_item_type %]
98 Item Type: [% item.inv_item_type %]<br />
100 [% IF item.title %]Title/Description:
101 [% item.title %]<br />
103 [% IF item.author %]Author: [% item.author %]<br />[% END %]
104 [% IF item.purchase_order %]PO: [% item.purchase_order %]<br />[% END %]
105 [% IF item.note %]Note: [% item.note %]<br />[% END %]
106 [% IF item.cost_billed %]
107 Cost billed: [% item.cost_billed %]<br />
109 [% IF item.actual_cost %]
110 Actual cost: [% item.actual_cost %]<br />
112 [% IF item.amount_paid %]
113 Amount paid: [% item.amount_paid %]<br />
119 Amounts spent per fund:
121 [% FOR blob IN user_data %]
123 <th style="text-align: left;">[% blob.fund.code %] ([% blob.fund.year %]):</th>
124 <td>$[% blob.total %]</td>
130 [% END %]$$ WHERE id = 22;