Bug 16241 - Move staff client CSS out of language directory
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / invoice.tt
1 [% USE Koha %]
2 [% USE KohaDates %]
3 [% USE Price %]
4
5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>Koha &rsaquo; Acquisitions &rsaquo; Invoice</title>
7 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
8 [% INCLUDE 'doc-head-close.inc' %]
9 [% INCLUDE 'calendar.inc' %]
10 [% INCLUDE 'datatables.inc' %]
11 <script type="text/javascript">
12 //<![CDATA[
13     function updateColumnsVisibility(visible) {
14         if ( visible ) {
15             $("table .gste, .gsti").show();
16         } else {
17             [% IF ( invoiceincgst ) %]
18                 $("table .gste").hide();
19             [% ELSE %]
20                 $("table .gsti").hide();
21             [% END %]
22         }
23     }
24
25     $(document).ready(function() {
26         $("#orderst").dataTable($.extend(true, {}, dataTablesDefaults, {
27             bInfo: false,
28             bPaginate: false,
29             bFilter: false,
30             sDom: "t",
31             "aoColumnDefs": [
32                 { "sType": "anti-the", "aTargets": [ "anti-the" ] }
33             ]
34         }));
35 [% IF ( (Koha.Preference('AcqEnableFiles')) && files ) %]
36         $("#invoice_files_table").dataTable($.extend(true, {}, dataTablesDefaults, {
37             "aoColumnDefs": [
38                 { "aTargets": [ "title-string" ], "sType": "title-string" }
39             ],
40             bInfo: false,
41             bPaginate: false,
42             bFilter: false,
43             sDom: "t"
44         }));
45 [% END %]
46         $("#show_all_details").click(function(){
47             updateColumnsVisibility( $(this).is(":checked") );
48         });
49
50         $("#show_all_details").attr('checked', false);
51         updateColumnsVisibility(false);
52     });
53 //]]>
54 </script>
55 </head>
56
57 <body id="acq_invoice" class="acq">
58 [% INCLUDE 'header.inc' %]
59 [% INCLUDE 'acquisitions-search.inc' %]
60
61 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo; <a href="/cgi-bin/koha/acqui/invoices.pl">Invoices</a> &rsaquo; <a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% invoiceid %]">[% invoicenumber %]</a></div>
62
63 <div id="doc3" class="yui-t2">
64
65 <div id="bd">
66   <div id="yui-main">
67     <div class="yui-b">
68       [% IF ( modified ) %]
69         <div class="dialog message">
70           <p>Invoice has been modified</p>
71         </div>
72       [% END %]
73       <h1>Invoice: [% invoicenumber %]</h1>
74
75       <p>Vendor: <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% suppliername %]</a></p>
76         <form action="/cgi-bin/koha/acqui/invoice.pl" method="post">
77         <fieldset class="rows">
78             <ol>
79             <li><label for="shipmentdate">Shipment date:</label>
80                     <input type="text" size="10" id="shipmentdate" name="shipmentdate" value="[% shipmentdate | $KohaDates %]" readonly="readonly" class="datepicker" /></li>
81
82             <li><label for="billingdate">Billing date:</label>
83                     <input type="text" size="10" id="billingdate" name="billingdate" value="[% billingdate | $KohaDates %]" readonly="readonly" class="datepicker" /></li>
84
85             <li><label for="shipmentcost">Shipping cost:</label>
86                     <input type="text" size="10" id="shipmentcost" name="shipmentcost" value="[% shipmentcost %]" /></li>
87             <li><label for="shipment_budget_id">Shipping fund:</label>
88                     <select id="shipment_budget_id" name="shipment_budget_id">
89                         <option value="">No fund</option>
90                       [% FOREACH budget IN budgets_loop %]
91                         [% IF ( budget.selected ) %]
92                           <option selected="selected" value="[% budget.budget_id %]">
93                         [% ELSE %]
94                           <option value="[% budget.budget_id %]">
95                         [% END %]
96                           [% budget.budget_name %]
97                         </option>
98                       [% END %]
99                     </select></li>
100
101             [% IF ( invoiceclosedate ) %]
102             <li><span class="label">Status:</span>
103                 Closed on [% invoiceclosedate | $KohaDates %].</li>
104
105             <li><label for="reopen">Reopen: </label> <input type="checkbox" name="reopen" id="reopen" /></li>
106             [% ELSE %]
107             <li><span class="label">Status:</span>
108                 Open.</li>
109
110             <li><label for="close">Close: </label> <input type="checkbox" name="close" id="close" />
111                 </li>
112             [% END %]
113             </ol>
114           <input type="hidden" name="op" value="mod" />
115           <input type="hidden" name="invoiceid" value="[% invoiceid %]" />
116         </fieldset>
117         <fieldset class="action">
118             <input type="submit" value="Save" />
119             [% UNLESS orders_loop.size %]
120             <a href="invoice.pl?op=delete&invoiceid=[% invoiceid %]">Delete</a>
121             [% END %]
122         </fieldset>
123       </form>
124       <p>
125           <a href="/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% invoiceid %]">Go to receipt page</a>
126           [% IF Koha.Preference('AcqEnableFiles') %]| <a href="/cgi-bin/koha/acqui/invoice-files.pl?invoiceid=[% invoiceid %]">Manage invoice files</a>[% END %]
127       </p>
128       <h2>Invoice details</h2>
129       [% IF orders_loop.size %]
130           <label for="show_all_details">
131             <input type="checkbox" style="vertical-align: middle;" id="show_all_details" />
132             Show all details
133           </label>
134           <table id="orderst">
135             <thead>
136               <tr>
137                 <th class="anti-the">Summary</th>
138                 <th>Library</th>
139                 <th class="gste">Actual cost tax exc.</th>
140                 <th class="gsti">Actual cost tax inc.</th>
141                 <th>Qty.</th>
142                 <th class="gste">Total tax exc. ([% currency.symbol %])</th>
143                 <th class="gsti">Total tax inc. ([% currency.symbol %])</th>
144                 <th>GST %</th>
145                 <th>GST</th>
146                 <th>Fund</th>
147               </tr>
148             </thead>
149             <tbody>
150               [% FOREACH order IN orders_loop %]
151                 <tr>
152                   <td>
153                     [% IF order.biblionumber %]
154                       <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% order.biblionumber %]">[% order.title %]</a>
155                       [% IF ( order.author ) %]
156                         <br /><em>by</em> [% order.author %]
157                       [% END %]
158                     [% ELSE %]
159                       <em>Deleted bibliographic record, can't find title</em>
160                     [% END %]
161                     [% IF ( order.publishercode ) %]
162                       <br/>[% order.publishercode %]
163                         [% IF order.publicationyear > 0 %]
164                           - [% order.publicationyear %]
165                         [% ELSIF ( order.copyrightdate > 0) %]
166                           - [% order.copyrightdate %]
167                         [% END %]
168                     [% END %]
169                   </td>
170                   <td><p>[% order.branchcode %]</p></td>
171                   <td class="number gste">[% order.unitpricegste | $Price %]</td>
172                   <td class="number gsti">[% order.unitpricegsti | $Price %]</td>
173                   <td class="number">[% order.quantity %]</td>
174                   <td class="number gste">[% order.totalgste | $Price %]</td>
175                   <td class="number gsti">[% order.totalgsti | $Price %]</td>
176                   <td class="number">[% order.gstrate * 100 | $Price %]</td>
177                   <td class="number">[% order.gstvalue | $Price %]</td>
178                   <td>[% order.budget_name %]</td>
179                 </tr>
180               [% END %]
181             </tbody>
182             <tfoot>
183               [% FOR tf IN foot_loop %]
184                 <tr>
185                     <th colspan='2'>Total (GST [% tf.gstrate * 100 | $Price %] %)</th>
186                     <th class="gste"/><th class="gsti"/>
187                     <th>[% tf.quantity %]</th>
188                     <th class="gste">[% tf.totalgste | $Price %]</th>
189                     <th class="gsti">[% tf.totalgsti | $Price %]</th>
190                     <th>&nbsp;</th>
191                     <th>[% tf.gstvalue | $Price %]</th>
192                     <th>&nbsp;</th>
193                 </tr>
194               [% END %]
195               <tr>
196                 <th colspan='2'>Total ([% currency.symbol %])</th>
197                 <th class="gste"/><th class="gsti"/>
198                 <th>[% total_quantity %]</th>
199                 <th class="gste">[% total_gste | $Price %]</th>
200                 <th class="gsti">[% total_gsti | $Price %]</th>
201                 <th>&nbsp;</th>
202                 <th>[% total_gstvalue | $Price %]</th>
203                 <th>&nbsp;</th>
204               </tr>
205               <tr>
206                 <th colspan="2">Total + Shipment cost ([% currency.symbol %])</th>
207                 <th class="gste"></th>
208                 <th class="gsti"></th>
209                 <th>[% total_quantity %]</th>
210                 <th class="gste">[% total_gste_shipment | $Price %]</th>
211                 <th class="gsti">[% total_gsti_shipment | $Price %]</th>
212                 <th>&nbsp;</th>
213                 <th>[% total_gstvalue | $Price %]</th>
214                 <th>&nbsp;</th>
215               </tr>
216             </tfoot>
217           </table>
218         [% ELSE %]
219             <div class="dialog message"><p>No orders yet</p></div>
220         [% END %]
221         [% IF ( (Koha.Preference('AcqEnableFiles')) && files ) %]
222             <br />
223             <h2>Files attached to invoice</h2>
224             <table id="invoice_files_table">
225                 <thead>
226                     <tr>
227                         <th>Name</th>
228                         <th>Type</th>
229                         <th>Description</th>
230                         <th>Uploaded</th>
231                     </tr>
232                 </thead>
233                 <tbody>
234                 [% FOREACH f IN files %]
235                     <tr>
236                          <td><a href="/cgi-bin/koha/acqui/invoice-files.pl?invoiceid=[% invoiceid %]&amp;op=download&amp;view=1&amp;file_id=[% f.file_id %]">[% f.file_name | html %]</a></td>
237                          <td>[% f.file_type | html %]</td>
238                          <td>[% f.file_description | html %]</td>
239                          <td class="title-string">
240                            <span title="[% f.date_uploaded %]">[% f.date_uploaded | $KohaDates %]</span>
241                          </td>
242                     </tr>
243                 [% END %]
244                 </tbody>
245             </table>
246         [% END %]
247     </div>
248   </div>
249   <div class="yui-b">
250     [% INCLUDE 'acquisitions-menu.inc' %]
251   </div>
252 </div>
253 [% INCLUDE 'intranet-bottom.inc' %]