2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>Koha › Acquisitions › Late orders</title>
4 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
5 [% INCLUDE 'doc-head-close.inc' %]
6 [% INCLUDE 'datatables.inc' %]
7 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
8 [% INCLUDE 'calendar.inc' %]
9 <script type="text/javascript">
11 [% IF (dateformat == 'metric') %]
12 dt_add_type_uk_date();
16 function check_uncheck() {
17 var all_nodes = $(late_orderst.fnGetNodes());
18 if ( $(all_nodes).find("input:checkbox[name=ordernumber]:checked").length > 0) {
19 var booksellerid = $(all_nodes).find("input:checkbox[name=ordernumber]:checked:first").attr("data-booksellerid");
20 $(all_nodes).find("input:checkbox[name=ordernumber][data-booksellerid!="+booksellerid+"]").attr('disabled', 'disabled');
22 $("input:checkbox[name=ordernumber]").removeAttr('disabled');
26 $(document).ready(function() {
28 late_orderst = $("#late_orders").dataTable($.extend(true, {}, dataTablesDefaults, {
30 { "aTargets": [ 0 ], "bSortable": false, "bSearchable": false },
32 "sPaginationType": "four_button",
34 "fnDrawCallback": function() {
35 if ( typeof late_orderst != 'undefined' ) {
37 $('input:checkbox[name=ordernumber]').bind('click', check_uncheck);
41 $('input:checkbox[name=ordernumber]').bind('click', check_uncheck);
42 $('#CheckAll').click(function(){ $(late_orderst.fnGetNodes()).find("td").checkCheckboxes();});
43 $('#CheckNone').click(function(){ $(late_orderst.fnGetNodes()).find("td").unCheckCheckboxes();});
45 // Generates a dynamic link for exporting the selection's data as CSV
46 $("#ExportSelected").click(function() {
47 var all_nodes = $(late_orderst.fnGetNodes());
48 var selected = $(all_nodes).find("input[name='ordernumber']:checked");
50 if (selected.length == 0) {
51 alert(_("Please select at least one item to export."));
55 // Building the url from currently checked boxes
56 var url = '/cgi-bin/koha/acqui/lateorders-export.pl?op=export';
57 for (var i = 0; i < selected.length; i++) {
58 url += '&ordernumber=' + selected[i].value;
60 // And redirecting to the CSV page
68 <body id="acq_lateorders" class="acq">
69 [% INCLUDE 'header.inc' %]
70 [% INCLUDE 'acquisitions-search.inc' %]
72 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> › <a href="lateorders.pl">Late orders</a></div>
74 <div id="doc3" class="yui-t2">
80 <h1>[% IF ( Supplier ) %][% Supplier %] : [% END %]Late orders</h1>
81 <div id="acqui_lateorders">
84 [% IF ( error_claim == "no_email" ) %]
85 <div class="error">This vendor has no email</div>
87 <div class="error">[% error_claim %]</div>
91 <div class="dialog message">Email has been sent.</div>
93 [% IF ( lateorders ) %]
94 <form action="lateorders.pl" name="claim" method="post">
95 <input type="hidden" name="op" value="send_alert" />
96 <input type="hidden" name="delay" value="[% delay %]" />
97 <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
99 <p><label for="letter_code">Claim using notice: </label><select name="letter_code" id="letter_code">
100 [% FOREACH letter IN letters %]
101 <option value="[% letter.code %]">[% letter.name %]</option>
106 <table id="late_orders">
110 <th><a id="CheckAll" href="#">Check all</a><br /><a id="CheckNone" href="#">Uncheck all</a></th>
115 <th>Estimated delivery date</th>
120 <th>Claims count</th>
121 <th>Claimed date</th>
125 [% FOREACH lateorder IN lateorders %]
126 [% UNLESS ( loop.odd ) %]<tr class="highlight">
127 [% ELSE %]<tr>[% END %]
129 <input type="checkbox" value="[% lateorder.ordernumber %]" data-booksellerid="[% lateorder.supplierid %]" name="ordernumber">
132 [% lateorder.orderdate %]
133 ([% lateorder.latesince %] days)
136 [% IF ( lateorder.estimateddeliverydate ) %]
137 [% lateorder.estimateddeliverydate | $KohaDates %]
141 [% lateorder.supplier %]
142 ([% lateorder.supplierid %])
145 <b>[% lateorder.title |html %]</b>
146 [% IF ( lateorder.author ) %]<br/><i>Author:</i> [% lateorder.author %][% END %]
147 [% IF ( lateorder.publisher ) %]
148 <br/><i>Published by:</i> [% lateorder.publisher %]
149 [% IF ( lateorder.publicationyear ) %]
150 <i> in </i>[% lateorder.publicationyear %]
155 [% lateorder.unitpricesupplier %]x[% lateorder.quantity %] =
156 [% lateorder.subtotal %]
157 <p title="budget">[% lateorder.budget %]</p>
160 <p><a href="basket.pl?basketno=[% lateorder.basketno %]" title="basket">
161 [% lateorder.basketno %]
164 <p title="branch">[% lateorder.branch %]</p>
166 <td>[% lateorder.claims_count %]</td>
167 <td>[% lateorder.claimed_date %]</td>
173 <th colspan="5">Total</th>
175 <th colspan="3"> </th>
179 <div class="spacer"></div>
181 <p style="display:block;">
182 <input type="button" value="Export as CSV" id="ExportSelected" />
183 [% UNLESS lateorder.budget_lock %]
184 <input type="submit" value="Claim order" />
188 [% ELSE %]<p>There are no late orders.</p>
194 <form action="lateorders.pl" method="get">
195 <fieldset class="brief">
196 <h4>Filter results:</h4>
197 [% FOREACH ERROR_LOO IN ERROR_LOOP %]
198 [% 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 %]
201 <li><label for="delay">Order date:</label><input size="3" maxlength="3" id="delay" type="text" name="delay" value="[% delay %]" /> days ago</li>
202 <li><label for="from">Estimated delivery date from: </label>
203 <input type="text" size="10" id="from" name="estimateddeliverydatefrom" value="[% estimateddeliverydatefrom %]" class="datepickerfrom" />
204 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
206 <li><label for="to">To: </label>
207 <input type="text" size="10" id="to" name="estimateddeliverydateto" value="[% estimateddeliverydateto %]" class="datepickerto" />
208 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
211 <li><label for="booksellerid">Vendor:</label>
212 <select id="booksellerid" size="1" tabindex="" name="booksellerid">
214 [% FOREACH SUPPLIER_LOO IN SUPPLIER_LOOP %]
215 [% IF ( SUPPLIER_LOO.selected ) %]<option value="[% SUPPLIER_LOO.id %]" selected="selected">[% SUPPLIER_LOO.name %]</option>
216 [% ELSE %]<option value="[% SUPPLIER_LOO.id %]">[% SUPPLIER_LOO.name %]</option>[% END %]
220 <fieldset class="action"><input type="submit" value="Filter" /></fieldset>
223 [% INCLUDE 'acquisitions-menu.inc' %]
226 [% INCLUDE 'intranet-bottom.inc' %]