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 tbody.filterclass tr:gt(" + (rowsToCollapse-1) + ")").hide();
35 $("#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>");
39 // Expend pending items table
40 function pendingExpand() {
41 $("#pendingcollapserow").remove();
42 $("#pendingt tr").show();
43 $("#pendingt").before("<p id=\"pendingcollapserow\">All " + rowCountPending + " items are displayed. <a href=\"javascript:pendingCollapse();\">Click here to show only the first " + rowsToCollapse + " items<\/a>.<\/p>");
46 // Collapse already received items table
47 function receivedCollapse() {
48 $("#receivedcollapserow").remove();
49 $("#receivedt tbody.filterclass tr:gt(" + (rowsToCollapse-1) + ")").hide();
50 $("#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>");
53 // Expand already received items table
54 function receivedExpand() {
55 $("#receivedcollapserow").remove();
56 $("#receivedt tr").show();
57 $("#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>");
63 var summaryStatus = jQuery.trim($("#summaryfilter").val());
64 var basketStatus = $("#basketfilter").val();
65 var orderStatus = $("#orderfilter").val();
67 if (summaryStatus == '' && basketStatus == '' && orderStatus == '') { clearFilters(); return false; }
69 var filtered = "table#pendingt tbody.filterclass tr";
72 $("#nothingfoundrow").remove();
77 success: function(o) {
78 var jsonString = o.responseText;
79 var gst = "<!-- TMPL_VAR NAME="gst" -->";
81 var orders = YAHOO.lang.JSON.parse(jsonString);
82 var foundCount = orders.length;
84 for( i = 0 ; i < orders.length ; i++){
87 + '<td class="basketfilterclass"><a href="/cgi-bin/koha/acqui/basket.pl?basketno=' + order.basketno + '">' + order.basketno + '</a></td>'
88 + '<td class="orderfilterclass"> ' + order.ordernumber + ' </td>'
89 + '<td class="summaryfilterclass">'
90 + '<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=' + order.biblionumber + '">' + order.title + '</a> / ' + order.author + '–' + order.isbn + '</td>'
91 + '<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>'
92 + '<td>' + order.quantrem + ' / ' + order.quantity + '</td>'
93 + '<td>' + order.ecost + '</td>'
94 + '<td>' + order.ordertotal + '</td>'
96 + '<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> /'
97 + '<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>'
98 + '</td></tr>').appendTo("table#pendingt");
101 // If nothing has been found, we tell the user so
102 if (orders.length == 0) {
103 $("<tr><td id=\"nothingfoundrow\" colspan=\"8\">No items match your criteria.<\/tr>").appendTo("#pendingt");
108 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);
113 // Clear already applied filters
114 function clearFilters() {
115 $("#nothingfoundrow").remove();
116 $("#pendingt tbody.filterclass tr").show();
125 <!-- TMPL_INCLUDE NAME="header.inc" -->
126 <!-- TMPL_INCLUDE NAME="acquisitions-search.inc" -->
128 <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" -->
129 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>
131 Receive orders from <!-- TMPL_VAR NAME="name" -->
132 <!-- /TMPL_IF --></div>
134 <div id="doc3" class="yui-t2">
139 <!-- TMPL_IF NAME="receive_error" -->
140 <div class="dialog alert">
141 <h3>Error adding items:</h3>
143 <!-- TMPL_LOOP NAME="error_loop" -->
144 <li><!-- TMPL_VAR NAME="error_param" --><!-- TMPL_IF NAME="error_duplicate_barcode" -->Duplicate Barcode<!-- /TMPL_IF --> <!-- todo: other error conditions come here. --></li>
150 <!-- TMPL_IF name="datereceived" -->
151 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>
153 Receive orders from <!-- TMPL_VAR NAME="name" -->
157 <!-- TMPL_IF NAME="success_delorder" -->
158 <div class="dialog message">The order has been successfully canceled.</div>
160 <!-- TMPL_IF NAME="error_delitem" -->
161 <div class="dialog alert">The order has been canceled, although one or more items could not have been deleted.</div>
163 <!-- TMPL_IF NAME="error_delbiblio" -->
164 <div class="dialog alert">The order has been canceled, although the record has not been deleted.</div>
168 <div id="acqui_receive_summary">
169 <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>
170 <!-- TODO: Add date picker, change rcv date. -->
172 <div id="acqui_receive_search">
173 <h3>Pending Orders</h3>
175 <!-- TMPL_IF NAME="loop_orders" --><table id="pendingt">
189 <tr><td colspan="4" class="total">TOTAL</td>
190 <td> <!-- TMPL_VAR NAME="totalPquantity" --> </td>
192 <td><!-- TMPL_VAR NAME="ordergrandtotal" --></td>
196 <tbody class="filterclass">
197 <!-- TMPL_LOOP NAME="loop_orders" -->
198 <!-- TMPL_UNLESS NAME="__odd__" -->
199 <tr class="highlight">
202 <!-- /TMPL_UNLESS -->
203 <td class="basketfilterclass"><a href="/cgi-bin/koha/acqui/basket.pl?basketno=<!-- TMPL_VAR NAME="basketno" -->"><!-- TMPL_VAR NAME="basketno" --></a></td>
204 <td class="orderfilterclass"><a href="neworderempty.pl?ordernumber=<!-- TMPL_VAR NAME="ordernumber" -->&booksellerid=<!-- TMPL_VAR NAME="supplierid" -->"><!-- TMPL_VAR NAME="ordernumber" --></a></td>
205 <td class="summaryfilterclass">
206 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR name="biblionumber" -->"><!-- TMPL_VAR NAME="title" escape="html"--></a>
207 <!-- TMPL_IF NAME="author" --> by <!-- TMPL_VAR NAME="author" --><!--/TMPL_IF-->
208 <!-- TMPL_IF NAME="isbn" --> – <!-- TMPL_VAR NAME="isbn" --><!--/TMPL_IF-->
209 <!-- TMPL_IF NAME="publishercode" --><br />Publisher :<!-- TMPL_VAR NAME="publishercode" --><!--/TMPL_IF-->
211 <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>
212 <td><!-- TMPL_VAR NAME="quantity" --></td>
213 <td><!-- TMPL_VAR NAME="ecost" --></td>
214 <td><!-- TMPL_VAR NAME="ordertotal" --></td>
216 <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> /
217 <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>
222 </table><!-- TMPL_ELSE -->There are no pending orders.<!-- /TMPL_IF -->
223 <div id="resultnumber">
224 <!-- Row of numbers corresponding to search result pages -->
225 <!-- TMPL_IF NAME="displayprev" -->
226 <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>
228 <!-- TMPL_LOOP NAME="numbers" -->
229 <!-- TMPL_IF NAME="highlight" -->
230 <span class="current"><!-- TMPL_VAR NAME="number" --></span>
232 <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>
235 <!-- TMPL_IF NAME="displaynext" -->
236 <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>
240 <div id="acqui_receive_receivelist">
241 <h3>Already Received</h3>
243 <!-- TMPL_IF NAME="loop_received" -->
244 <form action="/cgi-bin/koha/acqui/parcel.pl" method="get" name="orderform">
245 <table id="receivedt">
259 <td colspan="4" class="total">SUBTOTAL</td>
261 <td><!-- TMPL_VAR NAME="totalprice" --></td>
262 <td><!-- TMPL_VAR NAME="tototal" --></td>
264 <!-- TMPL_IF NAME="totalfreight" -->
266 <td colspan="5">
269 <td><!-- TMPL_VAR NAME="totalfreight" --></td>
270 </tr> <!-- /TMPL_IF -->
271 <!-- TMPL_IF NAME="gst" -->
276 The total at the bottom of the page should be within a few cents of the total for the invoice.
280 <td><!-- TMPL_VAR NAME="gst" --></td>
281 </tr> <!-- /TMPL_IF -->
283 <td colspan="4" class="total">TOTAL</td>
284 <td colspan="2"> </td>
285 <td><!-- TMPL_VAR NAME="grandtot" --></td>
288 <tbody class="filterclass">
289 <!-- TMPL_LOOP NAME="loop_received" -->
290 <!-- TMPL_UNLESS NAME="__odd__" -->
291 <tr class="highlight">
294 <!-- /TMPL_UNLESS -->
295 <td><a href="/cgi-bin/koha/acqui/basket.pl?basketno=<!-- TMPL_VAR NAME="basketno" -->"><!-- TMPL_VAR NAME="basketno" --></a></td>
296 <td><a href="neworderempty.pl?ordernumber=<!-- TMPL_VAR NAME="ordernumber" -->&booksellerid=<!-- TMPL_VAR NAME="supplierid" -->"><!-- TMPL_VAR NAME="ordernumber" --></a></td>
297 <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR name="biblionumber" -->"><!-- TMPL_VAR NAME="title" ESCAPE="html" --></a>
298 <!-- TMPL_IF NAME="author" --> / <!-- TMPL_VAR NAME="author" --><!--/TMPL_IF-->
299 <!-- TMPL_IF NAME="isbn" --> - <!-- TMPL_VAR NAME="isbn" --><!--/TMPL_IF-->
300 <!-- TMPL_IF NAME="publishercode" --><br />Publisher :<!-- TMPL_VAR NAME="publishercode" --><!--/TMPL_IF-->
302 <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>
303 <td><!-- TMPL_VAR NAME="ecost" --></td>
304 <td><!-- TMPL_VAR NAME="unitprice" --></td>
305 <td><!-- TMPL_VAR NAME="total" --></td>
311 <!-- TMPL_ELSE -->There are no received orders.<!-- /TMPL_IF -->
317 <form action="/cgi-bin/koha/acqui/parcel.pl" id="filterform" onsubmit="return filter();">
318 <fieldset class="brief">
325 <label for="summaryfilter">ISBN, author or title :</label>
326 <input type="text" name="summaryfilter" id="summaryfilter" />
330 <label for="basketfilter">Basket :</label>
331 <input type="text" name="basketfilter" id="basketfilter" />
335 <label for="orderfilter">Order :</label>
336 <input type="text" name="orderfilter" id="orderfilter" />
339 <fieldset class="action">
340 <input type="submit" value="Filter" />
341 <a href="#" onclick="clearFilters();">Clear</a>
347 <!-- TMPL_INCLUDE NAME="acquisitions-menu.inc" -->
350 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->