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