Merge remote-tracking branch 'origin/new/bug_7367'
[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     [% IF ( error_claim == "no_email" ) %]
39         <div class="error">This vendor has no email</div>
40     [% ELSE %]
41         <div class="error">[% error_claim %]</div>
42     [% END %]
43 [% END %]
44 [% IF info_claim %]
45     <div class="dialog message">Email has been sent.</div>
46 [% END %]
47 [% IF ( lateorders ) %]
48 <form action="lateorders.pl" name="claim" method="post">
49   <input type="hidden" name="op" value="send_alert" />
50   <input type="hidden" name="delay" value="[% delay %]" />
51   <input type="hidden" name="supplierid" value="[% SupplierId %]" />
52         [% IF ( letters ) %]
53         <p><label for="letter_code">Claim using notice: </label><select name="letter_code" id="letter_code">
54           [% FOREACH letter IN letters %]
55                 <option value="[% letter.code %]">[% letter.name %]</option>
56           [% END %]
57           </select>
58         </p>
59         [% END %]
60     <table id="late_orders">
61         <tr>
62             <th>Order Date</th>
63             <th>Vendor</th>
64             <th>Information</th>
65             <th>Total cost</th>
66             <th>Basket</th>
67             <th>Claims count</th>
68             <th>Claimed date</th>
69             [% IF Supplier %]
70                 <th><a id="CheckAll" href="#">Check all</a><br /><a id="CheckNone" href="#">Uncheck all</a></th>
71             [% ELSE %]
72                 <th></th>
73             [% END %]
74         </tr>
75     [% FOREACH lateorder IN lateorders %]
76         [% UNLESS ( loop.odd ) %]<tr class="highlight">
77         [% ELSE %]<tr>[% END %]
78             <td>
79                 ([% lateorder.supplierid %])
80                 [% lateorder.orderdate %]
81                 ([% lateorder.latesince %] days)
82             </td>
83             <td>
84                 [% lateorder.supplier %]
85             </td>
86             <td>
87                 <b>[% lateorder.title |html %]</b>
88                    [% IF ( lateorder.author ) %]<br/><i>Author:</i> [% lateorder.author %][% END %]
89                    [% IF ( lateorder.publisher ) %]
90                         <br/><i>Published by:</i> [% lateorder.publisher %]
91                         [% IF ( lateorder.publicationyear ) %]
92                             <i> in </i>[% lateorder.publicationyear %]
93                         [% END %]
94                    [% END %]
95             </td>
96             <td>
97                    [% lateorder.unitpricesupplier %]x[% lateorder.quantity %] = 
98                    [% lateorder.subtotal %]
99                     <p title="budget">[% lateorder.budget %]</p>
100             </td>
101             <td>
102                  <p><a href="basket.pl?basketno=[% lateorder.basketno %]" title="basket">
103                         [% lateorder.basketno %]
104                         </a>
105                  </p>
106                  <p title="branch">[% lateorder.branch %]</p>
107             </td>
108             <td>[% lateorder.claims_count %]</td>
109             <td>[% lateorder.claimed_date %]</td>
110             <td>
111                 [% UNLESS lateorder.budget_lock %]
112                     <input type="checkbox" class="checkbox" name="claim_for" value="[% lateorder.ordernumber %]"  supplierid="[% lateorder.supplierid %]"/>
113                 [% END %]
114              </td>
115             </td>
116         </tr>
117         [% END %]
118         <tr> 
119             <th>Total</th>
120             <th colspan="2">&nbsp;</th>
121             <th>[% total %]</th>
122             <th>&nbsp;</th>
123             <th>&nbsp;</th>
124             <th>&nbsp;</th>
125             <td>
126                 <input type="submit" value="Claim Order" />
127             </td>
128         </tr>
129     </table>
130      </form>
131 [% ELSE %]<p>There are no late orders.</p>
132 [% END %]
133 </div>
134 </div>
135 </div>
136 <div class="yui-b">
137 <form action="lateorders.pl" method="get">
138 <fieldset class="brief">
139 <h4>Filter Results:</h4>
140 [% FOREACH ERROR_LOO IN ERROR_LOOP %]
141 [% 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 %]
142 [% END %]
143 <ol><li><label for="delay">Order date:</label><input size="3" maxlength="3" id="delay" type="text" name="delay" value="[% delay %]" /> days ago</li>
144         <li><label for="supplierid">Vendor:</label>
145                 <select id="supplierid" size="1" tabindex="" name="supplierid">
146                         <option value=""/>
147                         [% FOREACH SUPPLIER_LOO IN SUPPLIER_LOOP %]
148                 [% IF ( SUPPLIER_LOO.selected ) %]<option value="[% SUPPLIER_LOO.id %]" selected="selected">[% SUPPLIER_LOO.name %]</option>
149                 [% ELSE %]<option value="[% SUPPLIER_LOO.id %]">[% SUPPLIER_LOO.name %]</option>[% END %]
150                 [% END %]
151                 </select>
152 </ol>
153         <fieldset class="action"><input type="submit" value="filter" /></fieldset>
154 </fieldset>
155     </form>
156 [% INCLUDE 'acquisitions-menu.inc' %]
157 </div>
158 </div>
159 [% INCLUDE 'intranet-bottom.inc' %]