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