Bug 5917 / Bug 6085 : Fixing not being able to change language
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / basket.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha &rsaquo; Acquisitions &rsaquo; [% UNLESS ( basketno ) %]New [% END %][% IF ( delete_confirm ) %]Delete [% END %]Basket [% basketname %] ([% basketno %]) for [% name %]</title>
3 [% INCLUDE 'doc-head-close.inc' %]
4 [% UNLESS ( closedate ) %]
5 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
6 <script type="text/JavaScript">
7 //<![CDATA[
8     $(document).ready(function() {
9         $("#orders").tablesorter({
10             headers: {
11                 9: { sorter: false },
12                 10: { sorter: false }
13             }
14         });
15     });
16 //]]>
17 </script>
18 <script type="text/javascript">
19 //<![CDATA[
20             function confirm_close() {
21                 var is_confirmed = confirm(_('Are you sure you want to close this basket?'));
22                 if (is_confirmed) {
23                     window.location = "[% script_name %]?op=close&basketno=[% basketno %]";
24                 }
25             }
26 //]]>
27         </script>
28 <script type="text/javascript">
29 //<![CDATA[
30             function confirm_deletion() {
31                 var is_confirmed = confirm(_('Are you sure you want to delete this basket?'));
32                 if (is_confirmed) {
33                     window.location = "[% script_name %]?op=delete_confirm&basketno=[% basketno %]&booksellerid=[% booksellerid %]";
34                 }
35             }
36             function confirm_delete_item(ordernumber, biblionumber) {
37                 var is_confirmed = confirm(_('Are you sure you want to delete this order ?'));
38                 if (is_confirmed) {
39                     window.location = "addorder.pl?ordernumber="+ordernumber+"&basketno=[% basketno %]&quantity=0&biblionumber="+biblionumber;
40                 }
41             }
42
43 //]]>
44 </script>
45 [% ELSE %]
46 [% UNLESS ( grouped ) %]
47 <script type="text/javascript">
48 //<![CDATA[
49             function confirm_reopen() {
50                 var is_confirmed = confirm(_('Are you sure you want to reopen this basket?'));
51                 if (is_confirmed) {
52                     window.location = "[% script_name %]?op=reopen&basketno=[% basketno %]";
53                 }
54             }
55 //]]>
56 </script>
57 [% END %]
58 [% END %]
59 <style type="text/css">
60 .sortmsg {font-size: 80%;}
61 </style>
62 </head>
63 <body>
64 [% INCLUDE 'header.inc' %]
65 [% INCLUDE 'acquisitions-search.inc' %]
66
67
68 <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/supplier.pl?supplierid=[% booksellerid %]">[% name %]</a> &rsaquo; [% UNLESS ( basketno ) %]New [% END %][% IF ( delete_confirm ) %]Delete [% END %]Basket [% basketname %] ([% basketno %]) for [% name %]</div>
69
70 <div id="doc3" class="yui-t2">
71
72 <div id="bd">
73     <div id="yui-main">
74     <div class="yui-b">
75         [% UNLESS ( confirm_close ) %]
76         [% UNLESS ( selectbasketg ) %]
77             [% UNLESS ( closedate ) %]
78                 <div id="toolbar">
79                     <script type="text/javascript">
80                         //<![CDATA[
81                         // prepare DOM for YUI Toolbar
82                         $(document).ready(function() {
83                             yuiToolbar();
84                         });
85                         // YUI Toolbar Functions
86                         function yuiToolbar() {
87                             [% IF ( unclosable ) %]
88                                 new YAHOO.widget.Button("closebutton", {disabled:true});
89                             [% ELSIF ( uncertainprices ) %]
90                                 new YAHOO.widget.Button("uncertpricesbutton");
91                             [% ELSE %]
92                                 new YAHOO.widget.Button("closebutton");
93                             [% END %]
94                             new YAHOO.widget.Button("basketheadbutton");
95                             new YAHOO.widget.Button("exportbutton");
96                             new YAHOO.widget.Button("delbasketbutton");
97                         }
98                         //]]>
99                     </script>
100
101                     <ul id="toolbar-list" class="toolbar">
102                     <li><a href="basketheader.pl?basketno=[% basketno %]&amp;op=add_form" class="button" id="basketheadbutton">Edit basket header information</a></li>
103                     <li><a href="javascript:confirm_deletion();" class="button" id="delbasketbutton">Delete this basket</a></li>
104                     [% IF ( unclosable ) %]
105                         <li><button onclick="confirm_close()" class="yui-button-disabled" id="closebutton" type="button" disabled="disabled" title="You can not close this basket">Can not close basket</button></li>
106                     [% ELSIF ( uncertainprices ) %]
107                         <li><a href="/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=[% booksellerid %]&amp;owner=1" class="button" id="uncertpricesbutton">Uncertain prices</a></li>
108                     [% ELSE %]
109                         <li><a href="[% script_name %]?op=close&amp;basketno=[% basketno %]&amp;booksellerid=[% booksellerid %]" class="button" id="closebutton">Close this basket</a></li>
110                     [% END %]
111                         <li><a href="[% script_name %]?op=export&amp;basketno=[% basketno %]&amp;booksellerid=[% booksellerid %]" class="button" id="exportbutton">Export this basket as CSV</a></li>
112                     </ul>
113
114                 </div>
115             [% ELSE %]
116                 [% UNLESS ( grouped ) %]
117                 <div id="toolbar">
118                     <script type="text/javascript">
119                         //<![CDATA[
120                         // prepare DOM for YUI Toolbar
121                         $(document).ready(function() {
122                             yuiToolbar();
123                         });
124                         // YUI Toolbar Functions
125                         function yuiToolbar() {
126                             new YAHOO.widget.Button("reopenbutton");
127                         }
128                         //]]>
129                     </script>
130                         <ul id="toolbar-list" class="toolbar">
131                             <li><a href="javascript:confirm_reopen();" class="button" id="reopenbutton">Reopen this basket</a></li>
132                         </ul>
133                 </div>
134                 [% END %]
135             [% END %]
136             [% END %]
137
138     [% IF ( NO_BOOKSELLER ) %]
139     <h2>Vendor not found</h2>
140     [% ELSE %]
141         [% IF ( delete_confirmed ) %]
142             <h3>Basket deleted</h3>
143             <META HTTP-EQUIV=Refresh CONTENT="0; url=booksellers.pl">
144         [% ELSE %]
145         <h1>[% UNLESS ( basketno ) %]New [% END %][% IF ( delete_confirm ) %]Delete [% END %]Basket [% basketname %] ([% basketno %]) for <a href="supplier.pl?supplierid=[% booksellerid %]">[% name %]</a></h1>
146         [% IF ( delete_confirm ) %]
147             <h2>
148             <span class="yui-button yui-link-button">
149             <em class="first-child">
150                 <a href="[% script_name %]?op=delete_confirm&amp;basketno=[% basketno %]&amp;booksellerid=[% booksellerid %]" class="yui-link-button">Yes, delete this basket!</a>
151             </em>
152             </span>
153             <span class="yui-button yui-link-button">
154             <em class="first-child">
155                 <a href="[% script_name %]?basketno=[% basketno %]" class="yui-link-button">Cancel</a>
156             </em>
157             </span>
158             </h2>
159         [% END %]
160         [% IF ( basketno ) %]
161             <div id="acqui_basket_summary"  class="yui-g">
162                 <h2>Basket details</h2>
163                 [% IF ( basketnote ) %]<p>Internal note: [% basketnote %]</p>[% END %]
164                 [% IF ( basketbooksellernote ) %]<p>Vendor note: [% basketbooksellernote %]</p>[% END %]
165                 [% IF ( basketcontractno ) %]
166                     <p>Contract name: <a href="../admin/aqcontract.pl?op=add_form&amp;contractnumber=[% basketcontractno %]&amp;booksellerid=[% booksellerid %]">[% basketcontractname %]</a></p>
167                 [% END %]
168                 [% IF ( authorisedbyname ) %]<p>Managed by:  [% authorisedbyname %]</p>[% END %]
169                 [% IF ( creationdate ) %]<p>Opened on:  [% creationdate %]</p>[% END %]
170                 [% IF ( closedate ) %]
171                 <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="post">
172                 <p>Closed on:  [% closedate %]</p>
173                 [% IF ( basketgroups ) %]
174                     <p> Basket group: <select id="basketgroupid" name="basketgroupid">
175                         [% FOREACH basketgroup IN basketgroups %]
176                             [% IF ( basketgroup.default ) %]
177                             <option value="[% basketgroup.id %]" selected="selected">[% basketgroup.name %]</option>
178                             [% ELSE %]
179                             <option value="[% basketgroup.id %]">[% basketgroup.name %]</option>
180                             [% END %]
181                         [% END %]
182                         </select>
183                         <input type="hidden" id="basketno" value="[% basketno %]" name="basketno" />
184                         <input type="hidden" value="mod_basket" name="op" />
185                         <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
186                         <input type="submit" value="Change basket group" />
187                     </p>
188                 </form>
189                 [% ELSE %]
190                     <a href="/cgi-bin/koha/acqui/basketgroup.pl?op=add&amp;booksellerid=[% basketgroups %]&amp;basketgroupid=[% id %]">[% name %]</a>
191                 [% END %]
192                 [% END %]
193             </div>
194         [% END %]
195
196         [% UNLESS ( delete_confirm ) %]
197         <div id="acqui_basket_content">
198         <h2>Order Details</h2>
199         [% IF ( books_loop ) %]
200             <table id="orders">
201                 <thead>
202                     <tr>
203                         <th>Order</th>
204                         <th>RRP</th>
205                         <th>Est.</th>
206                         <th>Qty.</th>
207                         <th>Total</th>
208                         <th>Fund</th>
209                         [% IF ( active ) %]
210                             [% UNLESS ( closedate ) %]
211                                 <th>Modify</th>
212                                 <th>Delete</th>
213                             [% END %]
214                         [% END %]
215                     </tr>
216                 </thead>
217                 <tfoot>
218                 [% IF ( GST ) %]
219                 <tr>
220                     <th>Total Tax Exc.</th>
221                     <th>[% total_rrp_gste %]</th>
222                     <th>&nbsp;</th>
223                     <th>[% qty_total %]</th>
224                     <th>[% total_est_gste %]</th>
225                         [% IF ( active ) %]
226                             [% IF ( closedate ) %]
227                             <td colspan="1" rowspan="3">&nbsp;</td>
228                             [% ELSE %]
229                             <td colspan="3" rowspan="3">&nbsp;</td>
230                             [% END %]
231                         [% END %]
232                 </tr>
233                 <tr>
234                     <th>Tax ([% gist_rate %])</th>
235                     <th>[% gist_rrp %]</th>
236                     <th>&nbsp;</th>
237                     <th>&nbsp;</th>
238                     <th>[% gist_est %]</th>
239                 </tr>
240                 <tr>
241                     <th>Total Tax Inc. ([% currency %])</th>
242                     <th>[% total_rrp_gsti %]</th>
243                     <th>&nbsp;</th>
244                     <th>[% qty_total %]</th>
245                     <th>[% total_est_gsti %]</th>
246                 </tr>
247                 [% ELSE %]
248                 <tr>
249                     <th>Total ([% currency %])</th>
250                     <th>[% total_rrp_gsti %]</th>
251                     <th>&nbsp;</th>
252                     <th>[% qty_total %]</th>
253                     <th>[% total_est_gsti %]</th>
254                 </tr>
255                 [% END %]
256                 </tfoot>
257                 <tbody>
258                 [% FOREACH books_loo IN books_loop %]
259                     [% IF ( books_loo.order_received ) %]<tr class="disabled">[% ELSE %][% IF ( books_loo.toggle ) %]<tr class="highlight">[% ELSE %]<tr>[% END %][% END %]
260                         <td>
261                             <p>[% IF ( books_loo.order_received ) %] (rcvd)[% END %]
262                                 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% books_loo.biblionumber %]">[% books_loo.title |html %]</a> by [% books_loo.author %]
263                                     [% IF ( books_loo.notes ) %] [% books_loo.notes %][% END %]
264                                     [% IF ( books_loo.isbn ) %] - [% books_loo.isbn %][% END %]
265                                     [% IF ( books_loo.issn ) %] - [% books_loo.issn %][% END %]
266                                     [% IF ( books_loo.publishercode ) %], [% books_loo.publishercode %][% END %]
267                                     [% IF ( books_loo.publicationyear ) %], [% books_loo.publicationyear %][% END %]
268                             </p>
269                             </td>
270                         <td class="number">[% books_loo.rrp %]</td>
271                         <td class="number">[% books_loo.ecost %]</td>
272                         <td class="number">[% books_loo.quantity %]</td>
273                         <td class="number">[% books_loo.line_total %]</td>
274                         <td>[% books_loo.budget_name %]</td>
275                         [% IF ( books_loo.active ) %]
276                             [% UNLESS ( books_loo.closedate ) %]
277                             <td>
278                                 <a href="neworderempty.pl?ordernumber=[% books_loo.ordernumber %]&amp;booksellerid=[% books_loo.booksellerid %]&amp;basketno=[% books_loo.basketno %]">Modify</a>
279                             </td>
280                             <td>
281                             <a href="javascript:confirm_delete_item([% books_loo.ordernumber %],[% books_loo.biblionumber %])" class="button">Delete</a>
282                             </td>
283                             [% END %]
284                         [% END %]
285                     </tr>
286                 [% END %]
287                 </tbody>
288             </table>
289         [% ELSE %]
290             <table>
291                 <tr><td>Basket empty</td></tr>
292             </table>
293         [% END %]
294         [% IF ( listincgst ) %]<small class="highlight">** Vendor's listings already include tax.</small>
295         [% END %]
296         </div>
297         <br />
298         [% UNLESS ( closedate ) %]
299         [% INCLUDE 'acquisitions-add-to-basket.inc' %]
300         [% END %]
301         [% END %]
302 [% END %]
303 [% END %]    [% ELSE %] <!-- if we want just to select a basketgroup for a closed basket -->
304     [% END %]
305 [% IF ( confirm_close ) %]
306         <div id="closebasket_needsconfirmation" class="dialog alert">
307
308         <form action="/cgi-bin/koha/acqui/basket.pl" class="confirm">
309             <h1>Are you sure you want to close basket [% basketname %]?</h1>
310             <p>
311             <label for="createbasketgroup">create a purchase order now?</label>
312             <input type="checkbox" id="createbasketgroup" name="createbasketgroup"/>
313             </p>
314             <input type="hidden" id="basketno" value="[% basketno %]" name="basketno" />
315             <input type="hidden" value="close" name="op" />
316             <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
317             <input type="hidden" name="confirm" value="1" />
318             <input type="hidden" name="basketgroupname" value="[% basketgroupname %]" />
319             <input type="submit" class="approve" value="Yes, Close (Y)" accesskey="y" />
320             <input type="submit" class="deny" value="No, Don't Close (N)" accesskey="n" onclick="javascript:window.location='/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno %]';return false;" />
321         </form>
322         </div>
323     [% END %]
324
325
326
327 </div>
328 </div>
329 <div class="yui-b">
330 [% INCLUDE 'acquisitions-menu.inc' %]
331 </div>
332 </div>
333 [% INCLUDE 'intranet-bottom.inc' %]