X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=koha-tmpl%2Fintranet-tmpl%2Fprog%2Fen%2Fmodules%2Facqui%2Fparcel.tt;h=2f3d0ed6ab7951828ee248cfcaba52988e9fa426;hb=aa864a872037957f29a8c00bcb3f6a86163a26dd;hp=2e6d9a2cdb6bba84a00088de889ac4dd39580eb5;hpb=31a0ed0a43bb4ecfde0b762eb6e654c51da6f66e;p=koha.git diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt index 2e6d9a2cdb..2f3d0ed6ab 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt @@ -13,11 +13,10 @@ dt_overwrite_html_sorting_localeCompare(); - var rowsToCollapse = 5; $(document).ready(function(){ var pendingt = $("#pendingt").dataTable($.extend(true, {}, dataTablesDefaults, { "aoColumnDefs": [ - { "aTargets": [ 3, 7, 8 ], "bSortable": false, "bSearchable": false }, + { "aTargets": [ 3, 8, 9 ], "bSortable": false, "bSearchable": false }, ], "aoColumns": [ { "sType": "num-html" }, @@ -29,12 +28,13 @@ null, null, null, + null, ], "sPaginationType": "four_button" } ) ); var receivedt = $("#receivedt").dataTable($.extend(true, {}, dataTablesDefaults, { "aoColumnDefs": [ - { "aTargets": [ 3 ], "bSortable": false, "bSearchable": false }, + { "aTargets": [ 3, -1 ], "bSortable": false, "bSearchable": false }, ], "aoColumns": [ { "sType": "num-html" }, @@ -45,14 +45,16 @@ null, null, null, + null ], "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) { pendingCollapse(); } - if (rowCountReceived > rowsToCollapse) { receivedCollapse(); } }); // Case-insensitive version of jquery's contains function @@ -65,100 +67,6 @@ containsExactly: "$(a).text() == m[3]" }); - - // Collapse pending items table - function pendingCollapse() { - $("#pendingcollapserow").remove(); - $("#pendingt tr").show(); - $("#pendingt tbody.filterclass tr:gt(" + (rowsToCollapse-1) + ")").hide(); - $("#pendingt").before("
" + _("Only the first ") + rowsToCollapse + _(" items are displayed.") + "" + _("Click here to show all ") + rowCountPending + _(" items") + "<\/a>.<\/p>");
-
- }
-
- // Expend pending items table
- function pendingExpand() {
- $("#pendingcollapserow").remove();
- $("#pendingt tr").show();
- $("#pendingt tbody.filterclass tr.orderfound").remove();
- $("#pendingt").before(" " + rowCountPending + _(" items are displayed.") + "" + _("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(" " + _("Only the first ") + rowsToCollapse + _(" items are displayed.") + "" + _("Click here to show all ") + rowCountReceived + _(" items") + "<\/a>.<\/p>");
- }
-
- // Expand already received items table
- function receivedExpand() {
- $("#receivedcollapserow").remove();
- $("#receivedt tr").show();
- $("#receivedt").before(" " + _("All ") + rowCountReceived + _(" items are displayed.") + "" + _("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();
- var eanStatus = $("#eanfilter").val() || '';
-
- if (summaryStatus == '' && basketStatus == '' && orderStatus == '' && eanStatus == '') { 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 = "[% gst %]";
- try {
- var orders = YAHOO.lang.JSON.parse(jsonString);
- var foundCount = orders.length;
-
- for( i = 0 ; i < orders.length ; i++){
- order = orders[i];
- $(' Invoice number: [% invoice %] Received by: [% loggedinusername %] On: [% formatteddatereceived %]
+ Invoice is closed, so you can't receive orders anymore.
+ Reopen it.
+ '
- + ' ').appendTo("table#pendingt");
- }
-
- // If nothing has been found, we tell the user so
- if (orders.length == 0) {
- $("' + order.basketno + ' '
- + ' ' + order.ordernumber + ' '
- + ''
- + '' + order.title + '' + _(" by ") + order.author + ' – ' + order.isbn + ' '
- + 'MARC | Card '
- + '' + order.quantity + ' '
- + '' + order.ecost + ' '
- + '' + order.ordertotal + ' '
- + ''
- + 'Receive /'
- + 'Cancel'
- + '
-
- 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?booksellerid=[% booksellerid %]&search='+summaryStatus+'&basketno='+basketStatus+'&orderno='+orderStatus+'&ean='+eanStatus+'&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();
- }
-
//]]>
-
[% INCLUDE 'header.inc' %]
[% INCLUDE 'acquisitions-search.inc' %]
-
+
+
+ Pending orders
@@ -238,23 +168,15 @@
Basket
Order line
Summary
- View record
+ View record
Quantity
Unit cost
Order cost
+ Fund
-
[% FOREACH loop_order IN loop_orders %]
TOTAL
- [% totalPquantity %]
-
- [% ordergrandtotal %]
-
-
-
@@ -281,58 +203,66 @@
+ [% IF ( loop_order.left_holds_on_order ) %]
+ [% loop_order.quantity %]
[% loop_order.ecost %]
[% loop_order.ordertotal %]
+ [% loop_order.budget_name %]
- Receive
-
+ Receive
- [% IF ( loop_order.left_holds_on_order ) %]
-
-
- [% ELSE %]
- Delete order
- [% END %]
- [% IF ( loop_order.can_del_bib ) %]
- Delete order and catalog record
- [% ELSE %]
-
- [% END %]
- [% IF ( loop_order.left_item ) %]
- [% loop_order.items %] item(s) left
- [% END %]
- [% IF ( loop_order.left_biblio ) %]
- [% loop_order.biblios %] order(s) left
- [% END %]
- [% IF ( loop_order.left_subscription ) %]
- [% loop_order.subscriptions %] subscription(s) left
- [% END %]
- [% IF ( loop_order.left_holds ) %]
- [% loop_order.holds %] hold(s) left
- [% END %]
-
+ [% ELSE %]
+ Delete order
+ [% END %]
+ [% IF ( loop_order.can_del_bib ) %]
+ Delete order and catalog record
+ [% ELSE %]
+
+ [% END %]
+ [% IF ( loop_order.left_item ) %]
+ [% loop_order.items %] item(s) left
+ [% END %]
+ [% IF ( loop_order.left_biblio ) %]
+ [% loop_order.biblios %] order(s) left
+ [% END %]
+ [% IF ( loop_order.left_subscription ) %]
+ [% loop_order.subscriptions %] subscription(s) left
+ [% END %]
+ [% IF ( loop_order.left_holds ) %]
+ [% loop_order.holds %] hold(s) left
+ [% END %]
+
+
+ [% END %]
+
+ [% ELSE %]There are no pending orders.[% END %]
+ Already received
+
[% IF ( loop_received ) %]