1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha › Acquisitions › <!-- TMPL_IF name="date" -->
3 Receipt Summary for <!-- TMPL_VAR NAME="name" --> <!--TMPL_IF Name="invoice"-->Invoice <!-- TMPL_VAR NAME="invoice" --><!--/TMPL_IF --> on <!-- TMPL_VAR NAME="formatteddatereceived" --><!-- TMPL_ELSE -->Receive Orders from <!-- TMPL_VAR NAME="name" --><!-- /TMPL_IF --></title>
4 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
5 <!-- TMPL_INCLUDE NAME="greybox.inc" -->
6 <script type="text/javascript" src="<!-- TMPL_VAR NAME="yuipath" -->/json/json-min.js"></script>
7 <script type="text/JavaScript" language="JavaScript">
10 var rowsToCollapse = 5;
12 $(document).ready(function(){
14 rowCountPending = $("table#pendingt tbody.filterclass tr").length;
15 rowCountReceived = $("table#receivedt tbody.filterclass tr").length;
16 if (rowCountPending > rowsToCollapse) { pendingCollapse(); }
17 if (rowCountReceived > rowsToCollapse) { receivedCollapse(); }
20 // Case-insensitive version of jquery's contains function
21 jQuery.extend(jQuery.expr[':'], {
22 icontains : "jQuery(a).text().toUpperCase().indexOf(m[3].toUpperCase())>=0"
25 // Contains exactly function
26 jQuery.extend(jQuery.expr[':'], {
27 containsExactly: "$(a).text() == m[3]"
31 // Collapse pending items table
32 function pendingCollapse() {
33 $("#pendingcollapserow").remove();
34 $("table#pendingt tbody.filterclass tr:gt(" + rowsToCollapse + ")").hide();
35 $("#basketfilter").focus();
36 $("<tr><td id=\"pendingcollapserow\" colspan=\"7\">Only the first " + rowsToCollapse + " items are displayed. <a href=\"javascript:pendingExpand();\">Click here to show all " + rowCountPending + " items<\/a>.<\/td><\/tr>").appendTo("table#pendingt");
40 // Expend pending items table
41 function pendingExpand() {
42 $("#pendingcollapserow").remove();
43 $("table#pendingt tr").show();
44 $("<tr><td id=\"pendingcollapserow\" colspan=\"7\">All " + rowCountPending + " items are displayed. <a href=\"javascript:pendingCollapse();\">Click here to show only the first " + rowsToCollapse + " items<\/a>.<\/td><\/tr>").appendTo("table#pendingt");
47 // Collapse already received items table
48 function receivedCollapse() {
49 $("#receivedcollapserow").remove();
50 $("table#receivedt tbody.filterclass tr:gt(" + rowsToCollapse + ")").hide();
51 $("<tr><td id=\"receivedcollapserow\" colspan=\"7\">Only the first " + rowsToCollapse + " items are displayed. <a href=\"javascript:receivedExpand();\">Click here to show all " + rowCountReceived + " items<\/a>.<\/td><\/tr>").appendTo("table#receivedt");
55 // Expand already received items table
56 function receivedExpand() {
57 $("#receivedcollapserow").remove();
58 $("table#receivedt tr").show();
59 $("<tr><td id=\"receivedcollapserow\" colspan=\"7\">All " + rowCountReceived + " items are displayed. <a href=\"javascript:receivedCollapse();\">Click here to show only the first " + rowsToCollapse + " items<\/a>.<\/td><\/tr>").appendTo("table#receivedt");
65 var summaryStatus = jQuery.trim($("#summaryfilter").val());
66 var basketStatus = $("#basketfilter").val();
67 var orderStatus = $("#orderfilter").val();
69 if (summaryStatus == '' && basketStatus == '' && orderStatus == '') { clearFilters(); return false; }
71 var filtered = "table#pendingt tbody.filterclass tr";
74 $("#nothingfoundrow").remove();
79 success: function(o) {
80 var jsonString = o.responseText;
81 var gst = "<!-- TMPL_VAR NAME="gst" -->";
83 var orders = YAHOO.lang.JSON.parse(jsonString);
84 var foundCount = orders.length;
86 for( i = 0 ; i < orders.length ; i++){
89 + '<td class="basketfilterclass"><a href="/cgi-bin/koha/acqui/basket.pl?basketno=' + order.basketno + '">' + order.basketno + '</a></td>'
90 + '<td class="orderfilterclass"> ' + order.ordernumber + ' </td>'
91 + '<td class="summaryfilterclass">'
92 + '<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=' + order.biblionumber + '">' + order.title + '</a> / ' + order.author + '–' + order.isbn + '</td>'
93 + '<td><a href="/cgi-bin/koha/catalogue/showmarc.pl?id=' + order.biblionumber + '" title="MARC" rel="gb_page_center[600,500]">MARC</a> | <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&id=' + order.biblionumber + '" title="MARC" rel="gb_page_center[600,500]">Card</a></td>'
94 + '<td>' + order.quantrem + ' / ' + order.quantity + '</td>'
95 + '<td>' + order.ecost + '</td>'
96 + '<td>' + order.ordertotal + '</td>'
98 + '<a href="orderreceive.pl?ordernumber=' + order.ordernumber + '&datereceived=<!-- TMPL_VAR NAME="invoicedatereceived" -->&invoice=<!-- TMPL_VAR NAME="invoice" -->&gst=' + gst + '&freight=' + order.freight + '&supplierid=<!-- TMPL_VAR NAME="supplierid" -->">Receive</a> /'
99 + '<a href="parcel.pl?type=intra&ordernumber=' + order.ordernumber + '&biblionumber=' + order.biblionumber + '&action=cancelorder&supplierid=<!-- TMPL_VAR NAME="supplierid" -->&datereceived=<!-- TMPL_VAR NAME="invoicedatereceived" -->&invoice=<!-- TMPL_VAR NAME="invoice" -->" onclick="return confirm(' + _('Are you sure you want to cancel this order?') + ');">Cancel</a>'
100 + '</td></tr>').appendTo("table#pendingt");
103 // If nothing has been found, we tell the user so
104 if (orders.length == 0) {
105 $("<tr><td id=\"nothingfoundrow\" colspan=\"8\">No items match your criteria.<\/tr>").appendTo("table#pendingt");
110 var transaction = YAHOO.util.Connect.asyncRequest('GET', '/cgi-bin/koha/acqui/parcel.pl?supplierid=<!-- TMPL_VAR NAME="supplierid" -->&search='+summaryStatus+'&basketno='+basketStatus+'&orderno='+orderStatus+'&format=json', callback, null);
115 // Clear already applied filters
116 function clearFilters() {
117 $("#nothingfoundrow").remove();
118 $("table#pendingt tbody.filterclass tr").show();
127 <!-- TMPL_INCLUDE NAME="header.inc" -->
128 <!-- TMPL_INCLUDE NAME="acquisitions-search.inc" -->
130 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> › <!-- TMPL_IF name="datereceived" -->
131 Receipt Summary for <i><!-- TMPL_VAR NAME="name" --></i> <!--TMPL_IF Name="invoice"--><i>[ <!-- TMPL_VAR NAME="invoice" --> ]</i><!--/TMPL_IF --> on <i><!-- TMPL_VAR NAME="formatteddatereceived" --></i>
133 Receive orders from <!-- TMPL_VAR NAME="name" -->
134 <!-- /TMPL_IF --></div>
136 <div id="doc3" class="yui-t2">
141 <!-- TMPL_IF NAME="receive_error" -->
142 <div class="dialog alert">
143 <h3>Error adding items:</h3>
145 <!-- TMPL_LOOP NAME="error_loop" -->
146 <li><!-- TMPL_VAR NAME="error_param" --><!-- TMPL_IF NAME="error_duplicate_barcode" -->Duplicate Barcode<!-- /TMPL_IF --> <!-- todo: other error conditions come here. --></li>
152 <!-- TMPL_IF name="datereceived" -->
153 Receipt Summary for <i><!-- TMPL_VAR NAME="name" --></i> <!--TMPL_IF Name="invoice"--> <i> [ <!-- TMPL_VAR NAME="invoice" --> ] </i><!--/TMPL_IF --> on <i><!-- TMPL_VAR NAME="formatteddatereceived" --></i>
155 Receive orders from <!-- TMPL_VAR NAME="name" -->
159 <!-- TMPL_IF NAME="success_delorder" -->
160 <div class="dialog message">The order has been successfully canceled.</div>
162 <!-- TMPL_IF NAME="error_delitem" -->
163 <div class="dialog alert">The order has been canceled, although one or more items could not have been deleted.</div>
165 <!-- TMPL_IF NAME="error_delbiblio" -->
166 <div class="dialog alert">The order has been canceled, although the record has not been deleted.</div>
170 <div id="acqui_receive_summary">
171 <p>Invoice number: <!-- TMPL_VAR NAME="invoice" --></p>
172 <p>Received by: <!-- TMPL_VAR NAME="loggedinusername" --></p>
173 <p>On: <!-- TMPL_VAR NAME="formatteddatereceived" --></p>
174 <!-- TODO: Add date picker, change rcv date. -->
176 <div id="acqui_receive_search">
177 <h2>Items in shipment</h2>
178 <form action="/cgi-bin/koha/acqui/parcel.pl" id="filterform" onsubmit="return filter();">
179 <fieldset class="rows">
181 <legend>Filters :</legend>
186 <label for="summaryfilter">ISBN, author or title :</label>
187 <input type="text" name="summaryfilter" id="summaryfilter" />
191 <label for="basketfilter">Basket :</label>
192 <input type="text" name="basketfilter" id="basketfilter" /><br />
196 <label for="orderfilter">Order :</label>
197 <input type="text" name="orderfilter" id="orderfilter" /><br />
201 <input type="submit" value="OK" />
202 <input type="reset" value="Clear Filters" onclick="clearFilters();" />
210 <table id="pendingt"> <caption>Pending Orders</caption>
217 <th>Still on order</th>
223 <tbody class="filterclass">
224 <!-- TMPL_LOOP NAME="loop_orders" -->
225 <!-- TMPL_UNLESS NAME="__odd__" -->
226 <tr class="highlight">
229 <!-- /TMPL_UNLESS -->
230 <td class="basketfilterclass"><a href="/cgi-bin/koha/acqui/basket.pl?basketno=<!-- TMPL_VAR NAME="basketno" -->"><!-- TMPL_VAR NAME="basketno" --></a></td>
231 <td class="orderfilterclass"><a href="neworderempty.pl?ordnum=<!-- TMPL_VAR NAME="ordernumber" -->&booksellerid=<!-- TMPL_VAR NAME="supplierid" -->"><!-- TMPL_VAR NAME="ordernumber" --></a></td>
232 <td class="summaryfilterclass">
233 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR name="biblionumber" -->"><!-- TMPL_VAR NAME="title" escape="html"--></a>
234 <!-- TMPL_IF NAME="author" --> / <!-- TMPL_VAR NAME="author" --><!--/TMPL_IF-->
235 <!-- TMPL_IF NAME="isbn" --> – <!-- TMPL_VAR NAME="isbn" --><!--/TMPL_IF-->
236 <!-- TMPL_IF NAME="publishercode" --><br />Publisher :<!-- TMPL_VAR NAME="publishercode" --><!--/TMPL_IF-->
238 <td><a href="/cgi-bin/koha/catalogue/showmarc.pl?id=<!-- TMPL_VAR NAME="biblionumber" -->" title="MARC" rel="gb_page_center[600,500]">MARC</a> | <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&id=<!-- TMPL_VAR NAME="biblionumber" -->" title="MARC" rel="gb_page_center[600,500]">Card</a></td>
239 <td><!-- TMPL_VAR NAME="quantrem" --> / <!-- TMPL_VAR NAME="quantity" --></td>
240 <td><!-- TMPL_VAR NAME="ecost" --></td>
241 <td><!-- TMPL_VAR NAME="ordertotal" --></td>
243 <a href="orderreceive.pl?ordernumber=<!-- TMPL_VAR NAME="ordernumber" -->&datereceived=<!-- TMPL_VAR NAME="invoicedatereceived" -->&invoice=<!-- TMPL_VAR NAME="invoice" -->&gst=<!-- TMPL_VAR NAME="gst" -->&freight=<!-- TMPL_VAR NAME="freight" -->&supplierid=<!-- TMPL_VAR NAME="supplierid" -->">Receive</a> /
244 <a href="parcel.pl?type=intra&ordernumber=<!-- TMPL_VAR NAME="ordernumber" -->&biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&action=cancelorder&supplierid=<!-- TMPL_VAR NAME="supplierid" -->&datereceived=<!-- TMPL_VAR NAME="invoicedatereceived" -->&invoice=<!-- TMPL_VAR NAME="invoice" -->" onclick="return confirm(_('Are you sure you want to cancel this order?'));">Cancel</a>
250 <tr><td colspan="3"> </td>
252 <th> <!-- TMPL_VAR NAME="totalPquantity" --> </th>
254 <th><!-- TMPL_VAR NAME="ordergrandtotal" --></th>
259 <div id="resultnumber">
260 <!-- Row of numbers corresponding to search result pages -->
261 <!-- TMPL_IF NAME="displayprev" -->
262 <a href="parcel.pl?type=intra&supplierid=<!-- TMPL_VAR NAME="supplierid" -->&startfrom=<!-- TMPL_VAR NAME="prevstartfrom" --><!--TMPL_IF Name="datereceived"-->&datereceived=<!--TMPL_VAR Name="datereceived"--><!--/TMPL_IF--><!--TMPL_IF Name="invoice"-->&invoice=<!--TMPL_VAR Name="invoice"--><!--/TMPL_IF--><!--TMPL_IF Name="resultsperpage"-->&resultsperpage=<!--TMPL_VAR Name="resultsperpage"--><!--/TMPL_IF-->#resultnumber"><< Previous</a>
264 <!-- TMPL_LOOP NAME="numbers" -->
265 <!-- TMPL_IF NAME="highlight" -->
266 <span class="current"><!-- TMPL_VAR NAME="number" --></span>
268 <a href="parcel.pl?type=intra&supplierid=<!-- TMPL_VAR NAME="supplierid" -->&startfrom=<!-- TMPL_VAR NAME="startfrom" --><!--TMPL_IF Name="datereceived"-->&datereceived=<!--TMPL_VAR Name="datereceived"--><!--/TMPL_IF--><!--TMPL_IF Name="invoice"-->&invoice=<!--TMPL_VAR Name="invoice"--><!--/TMPL_IF--><!--TMPL_IF Name="resultsperpage"-->&resultsperpage=<!--TMPL_VAR Name="resultsperpage"--><!--/TMPL_IF-->#resultnumber"><!-- TMPL_VAR NAME="number" --></a>
271 <!-- TMPL_IF NAME="displaynext" -->
272 <a href="parcel.pl?type=intra&supplierid=<!-- TMPL_VAR NAME="supplierid" -->&startfrom=<!-- TMPL_VAR NAME="nextstartfrom" --><!--TMPL_IF Name="datereceived"-->&datereceived=<!--TMPL_VAR Name="datereceived"--><!--/TMPL_IF--><!--TMPL_IF Name="invoice"-->&invoice=<!--TMPL_VAR Name="invoice"--><!--/TMPL_IF--><!--TMPL_IF Name="resultsperpage"-->&resultsperpage=<!--TMPL_VAR Name="resultsperpage"--><!--/TMPL_IF-->#resultnumber">Next >></a>
276 <div id="acqui_receive_receivelist">
277 <h2>Already Received</h2>
279 <form action="/cgi-bin/koha/acqui/parcel.pl" method="get" name="orderform">
280 <table id="receivedt">
292 <tbody class="filterclass">
293 <!-- TMPL_LOOP NAME="loop_received" -->
294 <!-- TMPL_UNLESS NAME="__odd__" -->
295 <tr class="highlight">
298 <!-- /TMPL_UNLESS -->
299 <td><a href="/cgi-bin/koha/acqui/basket.pl?basketno=<!-- TMPL_VAR NAME="basketno" -->"><!-- TMPL_VAR NAME="basketno" --></a></td>
300 <td><a href="neworderempty.pl?ordnum=<!-- TMPL_VAR NAME="ordernumber" -->&booksellerid=<!-- TMPL_VAR NAME="supplierid" -->"><!-- TMPL_VAR NAME="ordernumber" --></a></td>
301 <td><a href="/cgi-bin/koha/catalogue/detail.pl?amp;biblionumber=<!-- TMPL_VAR name="biblionumber" -->"><!-- TMPL_VAR NAME="title" --></a>
302 <!-- TMPL_IF NAME="author" --> / <!-- TMPL_VAR NAME="author" --><!--/TMPL_IF-->
303 <!-- TMPL_IF NAME="isbn" --> - <!-- TMPL_VAR NAME="isbn" --><!--/TMPL_IF-->
304 <!-- TMPL_IF NAME="publishercode" --><br />Publisher :<!-- TMPL_VAR NAME="publishercode" --><!--/TMPL_IF-->
306 <td><a href="/cgi-bin/koha/catalogue/showmarc.pl?id=<!-- TMPL_VAR NAME="biblionumber" -->" title="MARC" rel="gb_page_center[600,500]">MARC</a> | <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&id=<!-- TMPL_VAR NAME="biblionumber" -->" title="MARC" rel="gb_page_center[600,500]">Card</a></td>
307 <td><!-- TMPL_VAR NAME="ecost" --></td>
308 <td><!-- TMPL_VAR NAME="unitprice" --></td>
309 <td><!-- TMPL_VAR NAME="total" --></td>
315 <td colspan="3"> </td>
318 <th><!-- TMPL_VAR NAME="totalprice" --></th>
319 <th><!-- TMPL_VAR NAME="tototal" --></th>
321 <!-- TMPL_IF NAME="totalfreight" -->
326 <th colspan="1">Shipping</th>
327 <td><!-- TMPL_VAR NAME="totalfreight" --></td>
328 </tr> <!-- /TMPL_IF -->
329 <!-- TMPL_IF NAME="gst" -->
334 The total at the bottom of the page should be within a few cents of the total for the invoice.
338 <td><!-- TMPL_VAR NAME="gst" --></td>
339 </tr> <!-- /TMPL_IF -->
341 <td colspan="3"> </td>
343 <td colspan="2"> </td>
344 <th><!-- TMPL_VAR NAME="grandtot" --></th>
354 <!-- TMPL_INCLUDE NAME="acquisitions-menu.inc" -->
357 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->