Bug 5347: Follow up - Fix warnings, check/uncheck all and makes error message transla...
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / lateorders.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha &rsaquo; Acquisitions &rsaquo; Late orders</title>
3 [% INCLUDE 'doc-head-close.inc' %]
4 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
5 <script type="text/javascript">
6 //<![CDATA[
7 $(document).ready(function() {
8     $("input:checkbox[name=claim_for]").click(function(){
9         var supplierid = $(this).attr('supplierid');
10         if ( $("input:checkbox[name=claim_for]:checked").length > 0) {
11             $("input:checkbox[name=claim_for][supplierid!="+supplierid+"]").attr('disabled', true);
12         } else {
13             $("input:checkbox[name=claim_for]").attr('disabled', false);
14         }
15     });
16     $('#CheckAll').click(function(){ $("#late_orders td").checkCheckboxes();});
17     $('#CheckNone').click(function(){ $("#late_orders td").unCheckCheckboxes();});
18 });
19 //]]>
20 </script>
21 </head>
22 <body>
23 [% INCLUDE 'header.inc' %]
24 [% INCLUDE 'acquisitions-search.inc' %]
25
26 <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="lateorders.pl">Late orders</a></div>
27
28 <div id="doc3" class="yui-t2">
29    
30    <div id="bd">
31         <div id="yui-main">
32         <div class="yui-b">
33         
34 <h1>[% IF ( Supplier ) %][% Supplier %] : [% END %]Late orders</h1>
35 <div id="acqui_lateorders">
36
37 [% IF error_claim %]
38     <div class="error">[% error_claim %]</div>
39 [% END %]
40 [% IF info_claim %]
41     <div class="info">Email has been sent.</div>
42 [% END %]
43 [% IF ( lateorders ) %]
44 <form action="lateorders.pl" name="claim" method="post">
45   <input type="hidden" name="op" value="send_alert" />
46   <input type="hidden" name="delay" value="[% delay %]" />
47   <input type="hidden" name="supplierid" value="[% SupplierId %]" />
48         [% IF ( letters ) %]
49         <p><label for="letter_code">Claim using notice: </label><select name="letter_code" id="letter_code">
50           [% FOREACH letter IN letters %]
51                 <option value="[% letter.code %]">[% letter.name %]</option>
52           [% END %]
53           </select>
54         </p>
55         [% END %]
56     <table id="late_orders">
57         <tr>
58             <th>Order Date</th>
59             <th>Vendor</th>
60             <th>Information</th>
61             <th>Total cost</th>
62             <th>Basket</th>
63             <th>Claims count</th>
64             <th>Claimed date</th>
65             <!-- TMPL_IF name="Supplier" -->
66             [% IF Supplier %]
67                 <th><a id="CheckAll" href="#">Check all</a><br /><a id="CheckNone" href="#">Uncheck all</a></th>
68             [% ELSE %]
69                 <th></th>
70             [% END %]
71         </tr>
72     [% FOREACH lateorder IN lateorders %]
73         [% UNLESS ( loop.odd ) %]<tr class="highlight">
74         [% ELSE %]<tr>[% END %]
75             <td>
76                 ([% lateorder.supplierid %])
77                 [% lateorder.orderdate %]
78                 ([% lateorder.latesince %] days)
79             </td>
80             <td>
81                 [% lateorder.supplier %]
82             </td>
83             <td>
84                 <b>[% lateorder.title |html %]</b>
85                    [% IF ( lateorder.author ) %]<br/><i>Author:</i> [% lateorder.author %][% END %]
86                    [% IF ( lateorder.publisher ) %]
87                         <br/><i>Published by:</i> [% lateorder.publisher %]
88                         [% IF ( lateorder.publicationyear ) %]
89                             <i> in </i>[% lateorder.publicationyear %]
90                         [% END %]
91                    [% END %]
92             </td>
93             <td>
94                    [% lateorder.unitpricesupplier %]x[% lateorder.quantity %] = 
95                    [% lateorder.subtotal %]
96                     <p title="budget">[% lateorder.budget %]</p>
97             </td>
98             <td>
99                  <p><a href="basket.pl?basketno=[% lateorder.basketno %]" title="basket">
100                         [% lateorder.basketno %]
101                         </a>
102                  </p>
103                  <p title="branch">[% lateorder.branch %]</p>
104             </td>
105             <td>[% lateorder.claims_count %]</td>
106             <td>[% lateorder.claimed_date %]</td>
107             <td>
108                 [% UNLESS lateorder.budget_lock %]
109                     <input type="checkbox" class="checkbox" name="claim_for" value="[% lateorder.ordernumber %]"  supplierid="[% lateorder.supplierid %]"/>
110                 [% END %]
111              </td>
112             </td>
113         </tr>
114         [% END %]
115         <tr> 
116             <th>Total</th>
117             <th colspan="2">&nbsp;</th>
118             <th>[% total %]</th>
119             <th>&nbsp;</th>
120             <th>&nbsp;</th>
121             <th>&nbsp;</th>
122             <td>
123                 <input type="submit" value="Claim Order" />
124             </td>
125         </tr>
126     </table>
127      </form>
128 [% ELSE %]<p>There are no late orders.</p>
129 [% END %]
130 </div>
131 </div>
132 </div>
133 <div class="yui-b">
134 <form action="lateorders.pl" method="get">
135 <fieldset class="brief">
136 <h4>Filter Results:</h4>
137 [% FOREACH ERROR_LOO IN ERROR_LOOP %]
138 [% IF ( ERROR_LOO.delay_digits ) %]<p class="error">The number of days ([% ERROR_LOO.bad_delay %]) must be a number between 0 and 999.</p>[% END %]
139 [% END %]
140 <ol><li><label for="delay">Order date:</label><input size="3" maxlength="3" id="delay" type="text" name="delay" value="[% delay %]" /> days ago</li>
141         <li><label for="supplierid">Vendor:</label>
142                 <select id="supplierid" size="1" tabindex="" name="supplierid">
143                         <option value=""/>
144                         [% FOREACH SUPPLIER_LOO IN SUPPLIER_LOOP %]
145                 [% IF ( SUPPLIER_LOO.selected ) %]<option value="[% SUPPLIER_LOO.id %]" selected="selected">[% SUPPLIER_LOO.name %]</option>
146                 [% ELSE %]<option value="[% SUPPLIER_LOO.id %]">[% SUPPLIER_LOO.name %]</option>[% END %]
147                 [% END %]
148                 </select>
149 </ol>
150         <fieldset class="action"><input type="submit" value="filter" /></fieldset>
151 </fieldset>
152     </form>
153 [% INCLUDE 'acquisitions-menu.inc' %]
154 </div>
155 </div>
156 [% INCLUDE 'intranet-bottom.inc' %]