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]; - $('' - + '' + order.basketno + '' - + ' ' + order.ordernumber + ' ' - + '' - + '' + order.title + '' + _(" by ") + order.author + ' – ' + order.isbn + '' - + 'MARC | Card' - + '' + order.quantity + '' - + '' + order.ecost + '' - + '' + order.ordertotal + '' - + '' - + 'Receive /' - + 'Cancel' - + '').appendTo("table#pendingt"); - } - - // If nothing has been found, we tell the user so - if (orders.length == 0) { - $("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' %] -

+
@@ -225,10 +137,28 @@ [% END %] [% END %] + [% IF (error_cancelling_receipt) %] +
+ Cannot cancel receipt. Possible reasons : + +
+ [% END %] +

Invoice number: [% invoice %] Received by: [% loggedinusername %] On: [% formatteddatereceived %]

-
+[% UNLESS (invoiceclosedate) %] +
+[% ELSE %] +

+ Invoice is closed, so you can't receive orders anymore. + Reopen it. +

+[% END %] +

Already received

+ [% IF ( loop_received ) %]
@@ -346,42 +276,27 @@ + - - - - - - - - [% IF ( totalfreight ) %] - - - - - - [% END %] - [% IF ( gst ) %] - - - - - - [% END %] - - - - - - + + + + + + [% FOREACH book_foot IN book_foot_loop %] + + + + + + [% END %] + + + + + [% FOREACH loop_receive IN loop_received %] @@ -403,6 +318,22 @@ + [% END %] @@ -412,17 +343,21 @@ - - -
- -
- +[% IF (invoiceclosedate) %] + View invoice +[% ELSE %] + + +
+ +
+ +[% END %]
-
+

Filter

@@ -431,28 +366,30 @@
  • - +
  • - +
  • - +
  • [% IF (UNIMARC) %]
  • - +
  • [% END %]
    - - Clear + + + + Clear
    Est cost Actual cost TOTAL
    SUBTOTAL [% totalprice %][% tototal %]
      - Shipping[% totalfreight %]
    -

    - HELP
    - The total at the bottom of the page should be within a few cents of the total for the invoice. -

    -
    Tax rate[% gst %]
    TOTAL[% totalquantity %] [% grandtot %]
    Total tax exc.[% total_gste %]
    Total (GST [% book_foot.gstrate * 100 | format ("%.1f") %]%)[% book_foot.value %]
    Total tax inc.[% total_gsti %]
    [% loop_receive.ecost %] [% loop_receive.unitprice %] [% loop_receive.total %] + [% IF (loop_receive.cannot_cancel) %] + [% span_title = BLOCK %] + Cannot cancel receipt of this order line because it + was created from a partial receipt of order line no. + [% loop_receive.parent_ordernumber %], which is + already received. Try cancelling this one first and + retry. + [% END %] + + Can't cancel receipt + + [% ELSE %] + Cancel receipt + [% END %] +