dt_overwrite_html_sorting_localeCompare();
- var rowsToCollapse = 5;
$(document).ready(function(){
var pendingt = $("#pendingt").dataTable($.extend(true, {}, dataTablesDefaults, {
+ "bStateSave": true,
+ "iCookieDuration": 60*60*24*1000, // 1000 days
+ "aLengthMenu": [[10, 25, 50, 100, -1], [10, 25, 50, 100, "All"]],
"aoColumnDefs": [
- { "aTargets": [ 3, 7, 8 ], "bSortable": false, "bSearchable": false },
+ { "aTargets": [ 3, 8, 9 ], "bSortable": false, "bSearchable": false },
],
"aoColumns": [
{ "sType": "num-html" },
null,
null,
null,
+ null,
],
"sPaginationType": "four_button"
} ) );
var receivedt = $("#receivedt").dataTable($.extend(true, {}, dataTablesDefaults, {
+ "bStateSave": true,
+ "iCookieDuration": 60*60*24*1000, // 1000 days
+ "aLengthMenu": [[10, 25, 50, 100, -1], [10, 25, 50, 100, "All"]],
"aoColumnDefs": [
- { "aTargets": [ 3 ], "bSortable": false, "bSearchable": false },
+ { "aTargets": [ 3, -1 ], "bSortable": false, "bSearchable": false },
],
"aoColumns": [
{ "sType": "num-html" },
],
"sPaginationType": "four_button"
} ) );
+/*
+ $("#pendingt").tablesorter({
+ headers: { 2: { sorter: 'articles' },3: { sorter: false },8:{sorter:false}}
+ });
+*/
- rowCountPending = $("#pendingt tbody.filterclass tr").length;
- rowCountReceived = $("#receivedt tbody.filterclass tr").length;
- if (rowCountPending > rowsToCollapse ) { if ( $.cookie("pendingKeepExpanded") != 1 ) { pendingCollapse(); } else { pendingExpand(); } }
- if (rowCountReceived > rowsToCollapse ) { if ( $.cookie("receivedKeepExpanded") != 1 ) { receivedCollapse(); } else { receivedExpand(); } }
});
// Case-insensitive version of jquery's contains function
containsExactly: "$(a).text() == m[3]"
});
-
- // Collapse pending items table
- function pendingCollapse() {
- $.cookie("pendingKeepExpanded", 0, { path: "/", expires: 9999 });
- $("#pendingcollapserow").remove();
- $("#pendingt tr").show();
- $("#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() {
- $.cookie("pendingKeepExpanded", 1, { path: "/", expires: 9999 });
- $("#pendingcollapserow").remove();
- $("#pendingt tr").show();
- $("#pendingt tbody.filterclass tr.orderfound").remove();
- $("#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() {
- $.cookie("receivedKeepExpanded", 0, { path: "/", expires: 9999 });
- $("#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() {
- $.cookie("receivedKeepExpanded", 1, { path: "/", expires: 9999 });
- $("#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>");
- }
-
//]]>
</script>
<script type="text/javascript">
<div id="acqui_receive_summary">
<p><strong>Invoice number:</strong> [% invoice %] <strong>Received by:</strong> [% loggedinusername %] <strong>On:</strong> [% formatteddatereceived %]</p>
-<p><a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% invoiceid %]">Go to invoice details</a></p>
</div>
[% UNLESS (invoiceclosedate) %]
<div id="acqui_receive_search">
<th>Quantity</th>
<th>Unit cost</th>
<th>Order cost</th>
+ <th>Fund</th>
<th> </th>
<th> </th>
</tr>
</thead>
- <tfoot>
- <tr><td colspan="4" class="total">TOTAL</td>
- <td> [% totalPquantity %] </td>
- <td> </td>
- <td>[% ordergrandtotal %]</td>
- <td> </td>
- <td> </td>
- </tr>
- </tfoot>
<tbody class="filterclass">
[% FOREACH loop_order IN loop_orders %]
<tr>
<td>[% loop_order.quantity %]</td>
<td>[% loop_order.ecost %]</td>
<td>[% loop_order.ordertotal %]</td>
+ <td>[% loop_order.budget_name %]</td>
<td>
<a href="orderreceive.pl?ordernumber=[% loop_order.ordernumber %]&invoiceid=[% invoiceid %]">Receive</a>
-
</td>
<td>
[% IF ( loop_order.left_holds_on_order ) %]
</div>
[% ELSE %]
<p>
- Invoice is close, so you can't receive orders.
+ Invoice is closed, so you can't receive orders anymore.
<a href="/cgi-bin/koha/acqui/invoice.pl?op=reopen&invoiceid=[% invoiceid %]&referer=/cgi-bin/koha/acqui/parcel.pl%3Finvoiceid=[% invoiceid %]">Reopen it</a>.
</p>
[% END %]
</tr>
</thead>
<tfoot>
- <tr>
- <td colspan="4" class="total">SUBTOTAL</td>
- <td colspan="2"> </td>
- <td>[% totalprice %]</td>
- <td>[% tototal %]</td>
- <td></td>
- </tr>
-
- [% IF ( totalfreight ) %]
- <tr>
- <td colspan="6">
- </td>
- <td>Shipping</td>
- <td>[% totalfreight %]</td>
- </tr>
- [% END %]
- [% IF ( gst ) %]
- <tr>
- <td colspan="6">
- <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>[% gst %]</td>
- </tr>
- [% END %]
- <tr>
- <td colspan="4" class="total">TOTAL</td>
- <td>[% totalquantity %]</td>
- <td colspan="2"> </td>
- <td>[% grandtot %]</td>
- <td></td>
- </tr>
+ <tr>
+ <th colspan="7" class="total">Total tax exc.</th>
+ <th>[% total_gste %]</th>
+ <th></th>
+ </tr>
+ [% FOREACH book_foot IN book_foot_loop %]
+ <tr>
+ <th colspan="7">Total (GST [% book_foot.gstrate * 100 | format ("%.1f") %]%)</th>
+ <th>[% book_foot.value %]</th>
+ <th></th>
+ </tr>
+ [% END %]
+ <tr>
+ <th colspan="7" class="total">Total tax inc.</th>
+ <th>[% total_gsti %]</th>
+ <th></th>
+ </tr>
</tfoot>
<tbody class="filterclass">
[% FOREACH loop_receive IN loop_received %]
</div>
<!--<form action="/cgi-bin/koha/acqui/parcels.pl?booksellerid=[% booksellerid %]" method="post">-->
-<form action="parcels.pl?booksellerid=[% booksellerid %]" method="post">
- <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
- <fieldset class="action">
- <input type="submit" value="Finish receiving" />
- </fieldset>
-</form>
+[% IF (invoiceclosedate) %]
+ <a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% invoiceid %]">View invoice</a>
+[% ELSE %]
+ <form action="/cgi-bin/koha/acqui/invoice.pl" method="get">
+ <input type="hidden" name="invoiceid" value="[% invoiceid %]" />
+ <fieldset class="action">
+ <input type="submit" value="Finish receiving" />
+ </fieldset>
+ </form>
+[% END %]
</div>
</div>
</ol>
<fieldset class="action">
<input type="hidden" value="search" name="op" />
- <input type="hidden" value="[% booksellerid %]" name="booksellerid" />
- <input type="hidden" value="[% invoice %]" name="invoice" />
- <input type="hidden" value="[% invoicedatereceived %]" name="datereceived" />
+ <input type="hidden" value="[% invoiceid %]" name="invoiceid" />
<input type="submit" value="Filter" />
- <a href="/cgi-bin/koha/acqui/parcel.pl?booksellerid=[% booksellerid %]&invoice=[% invoice %]&op=new&datereceived=[% formatteddatereceived %]">Clear</a>
+ <a href="/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% invoiceid %]">Clear</a>
</fieldset>