Merge remote-tracking branch 'origin/new/bug_6720'
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / lateorders.tt
1 [% USE KohaDates %]
2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>Koha &rsaquo; Acquisitions &rsaquo; Late orders</title>
4 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
5 [% INCLUDE 'doc-head-close.inc' %]
6 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
7 [% INCLUDE 'datatables-strings.inc' %]
8 <script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>
9 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
10 [% INCLUDE 'calendar.inc' %]
11 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
12 <script type="text/javascript">
13 //<![CDATA[
14 $(document).ready(function() {
15     var late_orderst = $("#late_orders").dataTable($.extend(true, {}, dataTablesDefaults, {
16         "aoColumnDefs": [
17             { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
18         ],
19         "sPaginationType": "four_button"
20     } ) );
21
22     $("input:checkbox[name=claim_for]").click(function(){
23         var booksellerid = $(this).attr('booksellerid');
24         if ( $("input:checkbox[name=claim_for]:checked").length > 0) {
25             $("input:checkbox[name=claim_for][booksellerid!="+booksellerid+"]").attr('disabled', true);
26         } else {
27             $("input:checkbox[name=claim_for]").attr('disabled', false);
28         }
29     });
30     $('#CheckAll').click(function(){ $("#late_orders td").checkCheckboxes();});
31     $('#CheckNone').click(function(){ $("#late_orders td").unCheckCheckboxes();});
32 });
33 //]]>
34 </script>
35 </head>
36 <body id="acq_lateorders" class="acq">
37 [% INCLUDE 'header.inc' %]
38 [% INCLUDE 'acquisitions-search.inc' %]
39
40 <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>
41
42 <div id="doc3" class="yui-t2">
43    
44    <div id="bd">
45         <div id="yui-main">
46         <div class="yui-b">
47         
48 <h1>[% IF ( Supplier ) %][% Supplier %] : [% END %]Late orders</h1>
49 <div id="acqui_lateorders">
50
51 [% IF error_claim %]
52     [% IF ( error_claim == "no_email" ) %]
53         <div class="error">This vendor has no email</div>
54     [% ELSE %]
55         <div class="error">[% error_claim %]</div>
56     [% END %]
57 [% END %]
58 [% IF info_claim %]
59     <div class="dialog message">Email has been sent.</div>
60 [% END %]
61 [% IF ( lateorders ) %]
62 <form action="lateorders.pl" name="claim" method="post">
63   <input type="hidden" name="op" value="send_alert" />
64   <input type="hidden" name="delay" value="[% delay %]" />
65   <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
66         [% IF ( letters ) %]
67         <p><label for="letter_code">Claim using notice: </label><select name="letter_code" id="letter_code">
68           [% FOREACH letter IN letters %]
69                 <option value="[% letter.code %]">[% letter.name %]</option>
70           [% END %]
71           </select>
72         </p>
73         [% END %]
74     <table id="late_orders">
75         <thead>
76         <tr>
77             <th>Order date</th>
78             <th>Estimated delivery date</th>
79             <th>Vendor</th>
80             <th>Information</th>
81             <th>Total cost</th>
82             <th>Basket</th>
83             <th>Claims count</th>
84             <th>Claimed date</th>
85             [% IF Supplier %]
86                 <th><a id="CheckAll" href="#">Check all</a><br /><a id="CheckNone" href="#">Uncheck all</a></th>
87             [% ELSE %]
88                 <th></th>
89             [% END %]
90         </tr>
91         </thead>
92         <tbody>
93     [% FOREACH lateorder IN lateorders %]
94         [% UNLESS ( loop.odd ) %]<tr class="highlight">
95         [% ELSE %]<tr>[% END %]
96             <td>
97                 ([% lateorder.supplierid %])
98                 [% lateorder.orderdate %]
99                 ([% lateorder.latesince %] days)
100             </td>
101             <td>
102                 [% IF ( lateorder.estimateddeliverydate ) %]
103                     [% lateorder.estimateddeliverydate | $KohaDates  %]
104                 [% END %]
105             </td>
106             <td>
107                 [% lateorder.supplier %]
108             </td>
109             <td>
110                 <b>[% lateorder.title |html %]</b>
111                    [% IF ( lateorder.author ) %]<br/><i>Author:</i> [% lateorder.author %][% END %]
112                    [% IF ( lateorder.publisher ) %]
113                         <br/><i>Published by:</i> [% lateorder.publisher %]
114                         [% IF ( lateorder.publicationyear ) %]
115                             <i> in </i>[% lateorder.publicationyear %]
116                         [% END %]
117                    [% END %]
118             </td>
119             <td>
120                    [% lateorder.unitpricesupplier %]x[% lateorder.quantity %] = 
121                    [% lateorder.subtotal %]
122                     <p title="budget">[% lateorder.budget %]</p>
123             </td>
124             <td>
125                  <p><a href="basket.pl?basketno=[% lateorder.basketno %]" title="basket">
126                         [% lateorder.basketno %]
127                         </a>
128                  </p>
129                  <p title="branch">[% lateorder.branch %]</p>
130             </td>
131             <td>[% lateorder.claims_count %]</td>
132             <td>[% lateorder.claimed_date %]</td>
133             <td>
134                 [% UNLESS lateorder.budget_lock %]
135                     <input type="checkbox" class="checkbox" name="claim_for" value="[% lateorder.ordernumber %]"  booksellerid="[% lateorder.supplierid %]"/>
136                 [% END %]
137              </td>
138             </td>
139         </tr>
140         [% END %]
141     </tbody>
142     <tfoot>
143         <tr> 
144             <th>Total</th>
145             <th>&nbsp;</th>
146             <th>&nbsp;</th>
147             <th>&nbsp;</th>
148             <th>[% total %]</th>
149             <th>&nbsp;</th>
150             <th>&nbsp;</th>
151             <th>&nbsp;</th>
152             <td>
153                 <input type="submit" value="Claim Order" />
154             </td>
155         </tr>
156     </tfoot>
157     </table>
158 </form>
159 [% ELSE %]<p>There are no late orders.</p>
160 [% END %]
161 </div>
162 </div>
163 </div>
164 <div class="yui-b">
165 <form action="lateorders.pl" method="get">
166 <fieldset class="brief">
167 <h4>Filter Results:</h4>
168 [% FOREACH ERROR_LOO IN ERROR_LOOP %]
169 [% 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 %]
170 [% END %]
171 <ol>
172     <li><label for="delay">Order date:</label><input size="3" maxlength="3" id="delay" type="text" name="delay" value="[% delay %]" /> days ago</li>
173     <li><label for="from">Estimated delivery date from: </label>
174         <input type="text" size="10" id="from" name="estimateddeliverydatefrom" value="[% estimateddeliverydatefrom %]" class="datepickerfrom" />
175         <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
176     </li>
177     <li><label for="to">To: </label>
178         <input type="text" size="10" id="to" name="estimateddeliverydateto" value="[% estimateddeliverydateto %]" class="datepickerto" />
179         <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
180     </li>
181
182         <li><label for="booksellerid">Vendor:</label>
183                 <select id="booksellerid" size="1" tabindex="" name="booksellerid">
184                         <option value=""/>
185                         [% FOREACH SUPPLIER_LOO IN SUPPLIER_LOOP %]
186                 [% IF ( SUPPLIER_LOO.selected ) %]<option value="[% SUPPLIER_LOO.id %]" selected="selected">[% SUPPLIER_LOO.name %]</option>
187                 [% ELSE %]<option value="[% SUPPLIER_LOO.id %]">[% SUPPLIER_LOO.name %]</option>[% END %]
188                 [% END %]
189                 </select>
190 </ol>
191         <fieldset class="action"><input type="submit" value="filter" /></fieldset>
192 </fieldset>
193     </form>
194 [% INCLUDE 'acquisitions-menu.inc' %]
195 </div>
196 </div>
197 [% INCLUDE 'intranet-bottom.inc' %]