Koha/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tmpl
Nicole Engard f316cdc28f bug 3981 follow up change GST to 'Tax Rate' in EN-US
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-04-29 23:53:19 -04:00

351 lines
17 KiB
Cheetah

<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
<title>Koha &rsaquo; Acquisitions &rsaquo; <!-- TMPL_IF name="date" -->
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>
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
<!-- TMPL_INCLUDE NAME="greybox.inc" -->
<script type="text/javascript" src="<!-- TMPL_VAR NAME="yuipath" -->/json/json-min.js"></script>
<script type="text/JavaScript">
//<![CDATA[
var rowsToCollapse = 5;
$(document).ready(function(){
rowCountPending = $("#pendingt tbody.filterclass tr").length;
rowCountReceived = $("#receivedt tbody.filterclass tr").length;
if (rowCountPending > rowsToCollapse) { pendingCollapse(); }
if (rowCountReceived > rowsToCollapse) { receivedCollapse(); }
});
// Case-insensitive version of jquery's contains function
jQuery.extend(jQuery.expr[':'], {
icontains : "jQuery(a).text().toUpperCase().indexOf(m[3].toUpperCase())>=0"
});
// Contains exactly function
jQuery.extend(jQuery.expr[':'], {
containsExactly: "$(a).text() == m[3]"
});
// Collapse pending items table
function pendingCollapse() {
$("#pendingcollapserow").remove();
$("#pendingt tbody.filterclass tr:gt(" + (rowsToCollapse-1) + ")").hide();
$("#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>");
}
// Expend pending items table
function pendingExpand() {
$("#pendingcollapserow").remove();
$("#pendingt tr").show();
$("#pendingt").before("<p id=\"pendingcollapserow\">" + rowCountPending + _(" items are displayed.") + "<a href=\"javascript:pendingCollapse();\">" + _("Click here to show only the first ") + rowsToCollapse + _(" items") + "<\/a>.<\/p>");
}
// Collapse already received items table
function receivedCollapse() {
$("#receivedcollapserow").remove();
$("#receivedt tbody.filterclass tr:gt(" + (rowsToCollapse-1) + ")").hide();
$("#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>");
}
// Expand already received items table
function receivedExpand() {
$("#receivedcollapserow").remove();
$("#receivedt tr").show();
$("#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>");
}
// Launch filtering
function filter() {
var summaryStatus = jQuery.trim($("#summaryfilter").val());
var basketStatus = $("#basketfilter").val();
var orderStatus = $("#orderfilter").val();
if (summaryStatus == '' && basketStatus == '' && orderStatus == '') { clearFilters(); return false; }
var filtered = "table#pendingt tbody.filterclass tr";
// We hide everything
$("#nothingfoundrow").remove();
$(filtered).hide();
// Do the search
var callback = {
success: function(o) {
var jsonString = o.responseText;
var gst = "<!-- TMPL_VAR NAME="gst" -->";
try {
var orders = YAHOO.lang.JSON.parse(jsonString);
var foundCount = orders.length;
for( i = 0 ; i < orders.length ; i++){
order = orders[i];
$('<tr class="orderfound">'
+ '<td class="basketfilterclass"><a href="/cgi-bin/koha/acqui/basket.pl?basketno=' + order.basketno + '">' + order.basketno + '</a></td>'
+ '<td class="orderfilterclass"> <a href="neworderempty.pl?ordernumber=' + order.ordernumber + '&booksellerid=' + order.booksellerid + '">' + order.ordernumber + ' </a></td>'
+ '<td class="summaryfilterclass">'
+ '<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=' + order.biblionumber + '">' + order.title + '</a>' + _(" by ") + order.author + '&nbsp;&ndash;&nbsp;' + order.isbn + '</td>'
+ '<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&amp;id=' + order.biblionumber + '" title="MARC" rel="gb_page_center[600,500]">Card</a></td>'
+ '<td>' + order.quantity + '</td>'
+ '<td>' + order.ecost + '</td>'
+ '<td>' + order.ordertotal + '</td>'
+ '<td>'
+ '<a href="orderreceive.pl?ordernumber=' + order.ordernumber + '&amp;datereceived=<!-- TMPL_VAR NAME="invoicedatereceived" -->&amp;invoice=<!-- TMPL_VAR NAME="invoice" -->&amp;gst=' + gst + '&amp;freight=' + order.freight + '&amp;supplierid=<!-- TMPL_VAR NAME="supplierid" -->">Receive</a> /'
+ '<a href="parcel.pl?type=intra&amp;ordernumber=' + order.ordernumber + '&amp;biblionumber=' + order.biblionumber + '&amp;action=cancelorder&amp;supplierid=<!-- TMPL_VAR NAME="supplierid" -->&amp;datereceived=<!-- TMPL_VAR NAME="invoicedatereceived" -->&amp;invoice=<!-- TMPL_VAR NAME="invoice" -->" onclick="return confirm(\'' + _('Are you sure you want to cancel this order?') + '\');">Cancel</a>'
+ '</td></tr>').appendTo("table#pendingt");
}
// If nothing has been found, we tell the user so
if (orders.length == 0) {
$("<tr><td id=\"nothingfoundrow\" colspan=\"8\">No items match your criteria.<\/tr>").appendTo("#pendingt");
}
}catch(e){alert(e);}
}
}
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);
return false;
}
// Clear already applied filters
function clearFilters() {
$("#nothingfoundrow").remove();
$("#pendingt tbody.filterclass tr").show();
$("#pendingt tbody.filterclass tr.orderfound").remove();
pendingExpand();
}
//]]>
</script>
</head>
<body>
<!-- TMPL_INCLUDE NAME="header.inc" -->
<!-- TMPL_INCLUDE NAME="acquisitions-search.inc" -->
<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; <!-- TMPL_IF name="datereceived" -->
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>
<!-- TMPL_ELSE -->
Receive orders from <!-- TMPL_VAR NAME="name" -->
<!-- /TMPL_IF --></div>
<div id="doc3" class="yui-t2">
<div id="bd">
<div id="yui-main">
<div class="yui-b">
<!-- TMPL_IF NAME="receive_error" -->
<div class="dialog alert">
<h3>Error adding items:</h3>
<ul>
<!-- TMPL_LOOP NAME="error_loop" -->
<li><!-- TMPL_VAR NAME="error_param" --><!-- TMPL_IF NAME="error_duplicate_barcode" -->Duplicate Barcode<!-- /TMPL_IF --> <!-- todo: other error conditions come here. --></li>
<!-- /TMPL_LOOP -->
</ul>
</div>
<!-- /TMPL_IF -->
<h1>
<!-- TMPL_IF name="datereceived" -->
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>
<!-- TMPL_ELSE -->
Receive orders from <!-- TMPL_VAR NAME="name" -->
<!-- /TMPL_IF -->
</h1>
<!-- TMPL_IF NAME="success_delorder" -->
<div class="dialog message">The order has been successfully canceled.</div>
<!-- TMPL_ELSE -->
<!-- TMPL_IF NAME="error_delitem" -->
<div class="dialog alert">The order has been canceled, although one or more items could not have been deleted.</div>
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="error_delbiblio" -->
<div class="dialog alert">The order has been canceled, although the record has not been deleted.</div>
<!-- /TMPL_IF -->
<!-- /TMPL_IF -->
<div id="acqui_receive_summary">
<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>
<!-- TODO: Add date picker, change rcv date. -->
</div>
<div id="acqui_receive_search">
<h3>Pending Orders</h3>
<!-- TMPL_IF NAME="loop_orders" --><table id="pendingt">
<thead>
<tr>
<th>Basket</th>
<th>Order</th>
<th>Summary</th>
<th>View Record</th>
<th>Quantity</th>
<th>Unit cost</th>
<th>Order cost</th>
<th>&nbsp;</th>
</tr>
</thead>
<tfoot>
<tr><td colspan="4" class="total">TOTAL</td>
<td> <!-- TMPL_VAR NAME="totalPquantity" --> </td>
<td>&nbsp;</td>
<td><!-- TMPL_VAR NAME="ordergrandtotal" --></td>
<td>&nbsp;</td>
</tr>
</tfoot>
<tbody class="filterclass">
<!-- TMPL_LOOP NAME="loop_orders" -->
<!-- TMPL_UNLESS NAME="__odd__" -->
<tr class="highlight">
<!-- TMPL_ELSE -->
<tr>
<!-- /TMPL_UNLESS -->
<td class="basketfilterclass"><a href="/cgi-bin/koha/acqui/basket.pl?basketno=<!-- TMPL_VAR NAME="basketno" -->"><!-- TMPL_VAR NAME="basketno" --></a></td>
<td class="orderfilterclass"><a href="neworderempty.pl?ordernumber=<!-- TMPL_VAR NAME="ordernumber" -->&amp;booksellerid=<!-- TMPL_VAR NAME="supplierid" -->"><!-- TMPL_VAR NAME="ordernumber" --></a></td>
<td class="summaryfilterclass">
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR name="biblionumber" -->"><!-- TMPL_VAR NAME="title" escape="html"--></a>
<!-- TMPL_IF NAME="author" --> by <!-- TMPL_VAR NAME="author" --><!--/TMPL_IF-->
<!-- TMPL_IF NAME="isbn" --> &ndash; <!-- TMPL_VAR NAME="isbn" --><!--/TMPL_IF-->
<!-- TMPL_IF NAME="publishercode" --><br />Publisher :<!-- TMPL_VAR NAME="publishercode" --><!--/TMPL_IF-->
</td>
<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&amp;id=<!-- TMPL_VAR NAME="biblionumber" -->" title="MARC" rel="gb_page_center[600,500]">Card</a></td>
<td><!-- TMPL_VAR NAME="quantity" --></td>
<td><!-- TMPL_VAR NAME="ecost" --></td>
<td><!-- TMPL_VAR NAME="ordertotal" --></td>
<td>
<a href="orderreceive.pl?ordernumber=<!-- TMPL_VAR NAME="ordernumber" -->&amp;datereceived=<!-- TMPL_VAR NAME="invoicedatereceived" -->&amp;invoice=<!-- TMPL_VAR NAME="invoice" -->&amp;gst=<!-- TMPL_VAR NAME="gst" -->&amp;freight=<!-- TMPL_VAR NAME="freight" -->&amp;supplierid=<!-- TMPL_VAR NAME="supplierid" -->">Receive</a> /
<a href="parcel.pl?type=intra&amp;ordernumber=<!-- TMPL_VAR NAME="ordernumber" -->&amp;biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&amp;action=cancelorder&amp;supplierid=<!-- TMPL_VAR NAME="supplierid" -->&amp;datereceived=<!-- TMPL_VAR NAME="invoicedatereceived" -->&amp;invoice=<!-- TMPL_VAR NAME="invoice" -->" onclick="return confirm(_('Are you sure you want to cancel this order?'));">Cancel</a>
</td>
</tr>
<!-- /TMPL_LOOP -->
</tbody>
</table><!-- TMPL_ELSE -->There are no pending orders.<!-- /TMPL_IF -->
<div id="resultnumber">
<!-- Row of numbers corresponding to search result pages -->
<!-- TMPL_IF NAME="displayprev" -->
<a href="parcel.pl?type=intra&amp;supplierid=<!-- TMPL_VAR NAME="supplierid" -->&amp;startfrom=<!-- TMPL_VAR NAME="prevstartfrom" --><!--TMPL_IF Name="datereceived"-->&amp;datereceived=<!--TMPL_VAR Name="datereceived"--><!--/TMPL_IF--><!--TMPL_IF Name="invoice"-->&amp;invoice=<!--TMPL_VAR Name="invoice"--><!--/TMPL_IF--><!--TMPL_IF Name="resultsperpage"-->&amp;resultsperpage=<!--TMPL_VAR Name="resultsperpage"--><!--/TMPL_IF-->#resultnumber">&lt;&lt; Previous</a>
<!-- /TMPL_IF -->
<!-- TMPL_LOOP NAME="numbers" -->
<!-- TMPL_IF NAME="highlight" -->
<span class="current"><!-- TMPL_VAR NAME="number" --></span>
<!-- TMPL_ELSE -->
<a href="parcel.pl?type=intra&amp;supplierid=<!-- TMPL_VAR NAME="supplierid" -->&amp;startfrom=<!-- TMPL_VAR NAME="startfrom" --><!--TMPL_IF Name="datereceived"-->&amp;datereceived=<!--TMPL_VAR Name="datereceived"--><!--/TMPL_IF--><!--TMPL_IF Name="invoice"-->&amp;invoice=<!--TMPL_VAR Name="invoice"--><!--/TMPL_IF--><!--TMPL_IF Name="resultsperpage"-->&amp;resultsperpage=<!--TMPL_VAR Name="resultsperpage"--><!--/TMPL_IF-->#resultnumber"><!-- TMPL_VAR NAME="number" --></a>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
<!-- TMPL_IF NAME="displaynext" -->
<a href="parcel.pl?type=intra&amp;supplierid=<!-- TMPL_VAR NAME="supplierid" -->&amp;startfrom=<!-- TMPL_VAR NAME="nextstartfrom" --><!--TMPL_IF Name="datereceived"-->&amp;datereceived=<!--TMPL_VAR Name="datereceived"--><!--/TMPL_IF--><!--TMPL_IF Name="invoice"-->&amp;invoice=<!--TMPL_VAR Name="invoice"--><!--/TMPL_IF--><!--TMPL_IF Name="resultsperpage"-->&amp;resultsperpage=<!--TMPL_VAR Name="resultsperpage"--><!--/TMPL_IF-->#resultnumber">Next &gt;&gt;</a>
<!-- /TMPL_IF -->
</div>
</div>
<div id="acqui_receive_receivelist">
<h3>Already Received</h3>
<!-- TMPL_IF NAME="loop_received" -->
<form action="/cgi-bin/koha/acqui/parcel.pl" method="get" name="orderform">
<table id="receivedt">
<thead>
<tr>
<th>Basket</th>
<th>Order</th>
<th>Summary</th>
<th>View Record</th>
<th>Est cost</th>
<th>Actual cost</th>
<th>TOTAL</th>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="4" class="total">SUBTOTAL</td>
<td>&nbsp;</td>
<td><!-- TMPL_VAR NAME="totalprice" --></td>
<td><!-- TMPL_VAR NAME="tototal" --></td>
</tr>
<!-- TMPL_IF NAME="totalfreight" -->
<tr>
<td colspan="5">&nbsp;
</td>
<td>Shipping</td>
<td><!-- TMPL_VAR NAME="totalfreight" --></td>
</tr> <!-- /TMPL_IF -->
<!-- TMPL_IF NAME="gst" -->
<tr>
<td colspan="5">
<p class="message">
<b>HELP</b><br />
The total at the bottom of the page should be within a few cents of the total for the invoice.
</p>
</td>
<td><b>Tax rate</b></td>
<td><!-- TMPL_VAR NAME="gst" --></td>
</tr> <!-- /TMPL_IF -->
<tr>
<td colspan="4" class="total">TOTAL</td>
<td colspan="2">&nbsp;</td>
<td><!-- TMPL_VAR NAME="grandtot" --></td>
</tr>
</tfoot>
<tbody class="filterclass">
<!-- TMPL_LOOP NAME="loop_received" -->
<!-- TMPL_UNLESS NAME="__odd__" -->
<tr class="highlight">
<!-- TMPL_ELSE -->
<tr>
<!-- /TMPL_UNLESS -->
<td><a href="/cgi-bin/koha/acqui/basket.pl?basketno=<!-- TMPL_VAR NAME="basketno" -->"><!-- TMPL_VAR NAME="basketno" --></a></td>
<td><a href="neworderempty.pl?ordernumber=<!-- TMPL_VAR NAME="ordernumber" -->&amp;booksellerid=<!-- TMPL_VAR NAME="supplierid" -->"><!-- TMPL_VAR NAME="ordernumber" --></a></td>
<td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR name="biblionumber" -->"><!-- TMPL_VAR NAME="title" ESCAPE="html" --></a>
<!-- TMPL_IF NAME="author" --> / <!-- TMPL_VAR NAME="author" --><!--/TMPL_IF-->
<!-- TMPL_IF NAME="isbn" --> - <!-- TMPL_VAR NAME="isbn" --><!--/TMPL_IF-->
<!-- TMPL_IF NAME="publishercode" --><br />Publisher :<!-- TMPL_VAR NAME="publishercode" --><!--/TMPL_IF-->
</td>
<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&amp;id=<!-- TMPL_VAR NAME="biblionumber" -->" title="MARC" rel="gb_page_center[600,500]">Card</a></td>
<td><!-- TMPL_VAR NAME="ecost" --></td>
<td><!-- TMPL_VAR NAME="unitprice" --></td>
<td><!-- TMPL_VAR NAME="total" --></td>
</tr>
<!-- /TMPL_LOOP -->
</tbody>
</table>
</form>
<!-- TMPL_ELSE -->There are no received orders.<!-- /TMPL_IF -->
</div>
</div>
</div>
<div class="yui-b">
<form action="/cgi-bin/koha/acqui/parcel.pl" id="filterform" onsubmit="return filter();">
<fieldset class="brief">
<h4>Filter</h4>
<ol>
<li>
<label for="summaryfilter">ISBN, author or title :</label>
<input type="text" name="summaryfilter" id="summaryfilter" />
</li>
<li>
<label for="basketfilter">Basket :</label>
<input type="text" name="basketfilter" id="basketfilter" />
</li>
<li>
<label for="orderfilter">Order :</label>
<input type="text" name="orderfilter" id="orderfilter" />
</li>
</ol>
<fieldset class="action">
<input type="submit" value="Filter" />
<a href="#" onclick="clearFilters();">Clear</a>
</fieldset>
</fieldset>
</form>
<!-- TMPL_INCLUDE NAME="acquisitions-menu.inc" -->
</div>
</div>
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->