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">
10 var rowsToCollapse = 5;
12 $(document).ready(function(){
14 rowCountPending = $("#pendingt tbody.filterclass tr").length;
15 rowCountReceived = $("#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 $("#pendingt tr").show();
35 $("#pendingt tbody.filterclass tr:gt(" + (rowsToCollapse-1) + ")").hide();
36 $("#pendingt").before("<p id=\"pendingcollapserow\">" + _("Only the first ") + rowsToCollapse + _(" items are displayed.") + "<a href=\"javascript:pendingExpand();\">" + _("Click here to show all ") + rowCountPending + _(" items") + "<\/a>.<\/p>");
40 // Expend pending items table
41 function pendingExpand() {
42 $("#pendingcollapserow").remove();
43 $("#pendingt tr").show();
44 $("#pendingt tbody.filterclass tr.orderfound").remove();
45 $("#pendingt").before("<p id=\"pendingcollapserow\">" + rowCountPending + _(" items are displayed.") + "<a href=\"javascript:pendingCollapse();\">" + _("Click here to show only the first ") + rowsToCollapse + _(" items") + "<\/a>.<\/p>");
48 // Collapse already received items table
49 function receivedCollapse() {
50 $("#receivedcollapserow").remove();
51 $("#receivedt tbody.filterclass tr:gt(" + (rowsToCollapse-1) + ")").hide();
52 $("#receivedt").before("<p id=\"receivedcollapserow\">" + _("Only the first ") + rowsToCollapse + _(" items are displayed.") + "<a href=\"javascript:receivedExpand();\">" + _("Click here to show all ") + rowCountReceived + _(" items") + "<\/a>.<\/p>");
55 // Expand already received items table
56 function receivedExpand() {
57 $("#receivedcollapserow").remove();
58 $("#receivedt tr").show();
59 $("#receivedt").before("<p id=\"receivedcollapserow\">" + _("All ") + rowCountReceived + _(" items are displayed.") + "<a href=\"javascript:receivedCollapse();\">" + _("Click here to show only the first ") + rowsToCollapse + _(" items") + "<\/a>.<\/p>");
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++){
88 $('<tr class="orderfound">'
89 + '<td class="basketfilterclass"><a href="/cgi-bin/koha/acqui/basket.pl?basketno=' + order.basketno + '">' + order.basketno + '</a></td>'
90 + '<td class="orderfilterclass"> <a href="neworderempty.pl?ordernumber=' + order.ordernumber + '&booksellerid=' + order.booksellerid + '">' + order.ordernumber + ' </a></td>'
91 + '<td class="summaryfilterclass">'
92 + '<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=' + order.biblionumber + '">' + order.title + '</a>' + _(" by ") + 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.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("#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 $("#pendingt tbody.filterclass tr").show();
119 //$("#pendingt tbody.filterclass tr.orderfound").remove();
128 <!-- TMPL_INCLUDE NAME="header.inc" -->
129 <!-- TMPL_INCLUDE NAME="acquisitions-search.inc" -->
131 <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" -->
132 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>
134 Receive orders from <!-- TMPL_VAR NAME="name" -->
135 <!-- /TMPL_IF --></div>
137 <div id="doc3" class="yui-t2">
142 <!-- TMPL_IF NAME="receive_error" -->
143 <div class="dialog alert">
144 <h3>Error adding items:</h3>
146 <!-- TMPL_LOOP NAME="error_loop" -->
147 <li><!-- TMPL_VAR NAME="error_param" --><!-- TMPL_IF NAME="error_duplicate_barcode" -->Duplicate Barcode<!-- /TMPL_IF --> <!-- todo: other error conditions come here. --></li>
153 <!-- TMPL_IF name="datereceived" -->
154 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>
156 Receive orders from <!-- TMPL_VAR NAME="name" -->
160 <!-- TMPL_IF NAME="success_delorder" -->
161 <div class="dialog message">The order has been successfully canceled.</div>
163 <!-- TMPL_IF NAME="error_delitem" -->
164 <div class="dialog alert">The order has been canceled, although one or more items could not have been deleted.</div>
166 <!-- TMPL_IF NAME="error_delbiblio" -->
167 <div class="dialog alert">The order has been canceled, although the record has not been deleted.</div>
171 <div id="acqui_receive_summary">
172 <p><strong>Invoice number:</strong> <!-- TMPL_VAR NAME="invoice" --> <strong>Received by:</strong> <!-- TMPL_VAR NAME="loggedinusername" --> <strong>On:</strong> <!-- TMPL_VAR NAME="formatteddatereceived" --></p>
173 <!-- TODO: Add date picker, change rcv date. -->
175 <div id="acqui_receive_search">
176 <h3>Pending Orders</h3>
178 <!-- TMPL_IF NAME="loop_orders" --><table id="pendingt">
192 <tr><td colspan="4" class="total">TOTAL</td>
193 <td> <!-- TMPL_VAR NAME="totalPquantity" --> </td>
195 <td><!-- TMPL_VAR NAME="ordergrandtotal" --></td>
199 <tbody class="filterclass">
200 <!-- TMPL_LOOP NAME="loop_orders" -->
201 <!-- TMPL_UNLESS NAME="__odd__" -->
202 <tr class="highlight">
205 <!-- /TMPL_UNLESS -->
206 <td class="basketfilterclass"><a href="/cgi-bin/koha/acqui/basket.pl?basketno=<!-- TMPL_VAR NAME="basketno" -->"><!-- TMPL_VAR NAME="basketno" --></a></td>
207 <td class="orderfilterclass"><a href="neworderempty.pl?ordernumber=<!-- TMPL_VAR NAME="ordernumber" -->&booksellerid=<!-- TMPL_VAR NAME="supplierid" -->"><!-- TMPL_VAR NAME="ordernumber" --></a></td>
208 <td class="summaryfilterclass">
209 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR name="biblionumber" -->"><!-- TMPL_VAR NAME="title" escape="html"--></a>
210 <!-- TMPL_IF NAME="author" --> by <!-- TMPL_VAR NAME="author" --><!--/TMPL_IF-->
211 <!-- TMPL_IF NAME="isbn" --> – <!-- TMPL_VAR NAME="isbn" --><!--/TMPL_IF-->
212 <!-- TMPL_IF NAME="publishercode" --><br />Publisher :<!-- TMPL_VAR NAME="publishercode" --><!--/TMPL_IF-->
214 <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>
215 <td><!-- TMPL_VAR NAME="quantity" --></td>
216 <td><!-- TMPL_VAR NAME="ecost" --></td>
217 <td><!-- TMPL_VAR NAME="ordertotal" --></td>
219 <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> /
220 <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>
225 </table><!-- TMPL_ELSE -->There are no pending orders.<!-- /TMPL_IF -->
226 <div id="resultnumber">
227 <!-- Row of numbers corresponding to search result pages -->
228 <!-- TMPL_IF NAME="displayprev" -->
229 <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>
231 <!-- TMPL_LOOP NAME="numbers" -->
232 <!-- TMPL_IF NAME="highlight" -->
233 <span class="current"><!-- TMPL_VAR NAME="number" --></span>
235 <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>
238 <!-- TMPL_IF NAME="displaynext" -->
239 <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>
243 <div id="acqui_receive_receivelist">
244 <h3>Already Received</h3>
246 <!-- TMPL_IF NAME="loop_received" -->
247 <form action="/cgi-bin/koha/acqui/parcel.pl" method="get" name="orderform">
248 <table id="receivedt">
262 <td colspan="4" class="total">SUBTOTAL</td>
264 <td><!-- TMPL_VAR NAME="totalprice" --></td>
265 <td><!-- TMPL_VAR NAME="tototal" --></td>
267 <!-- TMPL_IF NAME="totalfreight" -->
269 <td colspan="5">
272 <td><!-- TMPL_VAR NAME="totalfreight" --></td>
273 </tr> <!-- /TMPL_IF -->
274 <!-- TMPL_IF NAME="gst" -->
279 The total at the bottom of the page should be within a few cents of the total for the invoice.
282 <td><b>Tax rate</b></td>
283 <td><!-- TMPL_VAR NAME="gst" --></td>
284 </tr> <!-- /TMPL_IF -->
286 <td colspan="4" class="total">TOTAL</td>
287 <td colspan="2"> </td>
288 <td><!-- TMPL_VAR NAME="grandtot" --></td>
291 <tbody class="filterclass">
292 <!-- TMPL_LOOP NAME="loop_received" -->
293 <!-- TMPL_UNLESS NAME="__odd__" -->
294 <tr class="highlight">
297 <!-- /TMPL_UNLESS -->
298 <td><a href="/cgi-bin/koha/acqui/basket.pl?basketno=<!-- TMPL_VAR NAME="basketno" -->"><!-- TMPL_VAR NAME="basketno" --></a></td>
299 <td><a href="neworderempty.pl?ordernumber=<!-- TMPL_VAR NAME="ordernumber" -->&booksellerid=<!-- TMPL_VAR NAME="supplierid" -->"><!-- TMPL_VAR NAME="ordernumber" --></a></td>
300 <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR name="biblionumber" -->"><!-- TMPL_VAR NAME="title" ESCAPE="html" --></a>
301 <!-- TMPL_IF NAME="author" --> / <!-- TMPL_VAR NAME="author" --><!--/TMPL_IF-->
302 <!-- TMPL_IF NAME="isbn" --> - <!-- TMPL_VAR NAME="isbn" --><!--/TMPL_IF-->
303 <!-- TMPL_IF NAME="publishercode" --><br />Publisher :<!-- TMPL_VAR NAME="publishercode" --><!--/TMPL_IF-->
305 <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>
306 <td><!-- TMPL_VAR NAME="ecost" --></td>
307 <td><!-- TMPL_VAR NAME="unitprice" --></td>
308 <td><!-- TMPL_VAR NAME="total" --></td>
314 <!-- TMPL_ELSE -->There are no received orders.<!-- /TMPL_IF -->
320 <form action="/cgi-bin/koha/acqui/parcel.pl" id="filterform" onsubmit="return filter();">
321 <fieldset class="brief">
328 <label for="summaryfilter">ISBN, author or title :</label>
329 <input type="text" name="summaryfilter" id="summaryfilter" />
333 <label for="basketfilter">Basket :</label>
334 <input type="text" name="basketfilter" id="basketfilter" />
338 <label for="orderfilter">Order Line :</label>
339 <input type="text" name="orderfilter" id="orderfilter" />
342 <fieldset class="action">
343 <input type="submit" value="Filter" />
344 <a href="#" onclick="clearFilters();">Clear</a>
350 <!-- TMPL_INCLUDE NAME="acquisitions-menu.inc" -->
353 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->