View | Details | Raw Unified | Return to bug 11141
Collapse All | Expand All

(-)a/acqui/finishreceive.pl (-1 / +1 lines)
Lines 141-147 if ($quantityrec > $origquantityrec ) { Link Here
141
141
142
update_item( $_ ) foreach GetItemnumbersFromOrder( $ordernumber );
142
update_item( $_ ) foreach GetItemnumbersFromOrder( $ordernumber );
143
143
144
print $input->redirect("/cgi-bin/koha/acqui/parcel.pl?invoiceid=$invoiceid");
144
print $input->redirect("/cgi-bin/koha/acqui/parcel.pl?invoiceid=$invoiceid&sticky_filters=1");
145
145
146
################################ End of script ################################
146
################################ End of script ################################
147
147
(-)a/acqui/parcel.pl (-6 / +17 lines)
Lines 70-75 use C4::Suggestions; Link Here
70
use JSON;
70
use JSON;
71
71
72
my $input=new CGI;
72
my $input=new CGI;
73
my $sticky_filters = $input->param('sticky_filters') || 0;
73
74
74
sub get_value_with_gst_params {
75
sub get_value_with_gst_params {
75
    my $value = shift;
76
    my $value = shift;
Lines 203-214 push @book_foot_loop, map { $_ } values %foot; Link Here
203
my @loop_orders = ();
204
my @loop_orders = ();
204
if(!defined $invoice->{closedate}) {
205
if(!defined $invoice->{closedate}) {
205
    my $pendingorders;
206
    my $pendingorders;
206
    if($input->param('op') eq "search"){
207
    if ( $op eq "search" or $sticky_filters ) {
207
        my $search   = $input->param('summaryfilter') || '';
208
        my ( $search, $ean, $basketname, $orderno, $basketgroupname );
208
        my $ean      = $input->param('eanfilter') || '';
209
        if ( $sticky_filters ) {
209
        my $basketname = $input->param('basketfilter') || '';
210
            $search = $input->cookie("filter_parcel_summary");
210
        my $orderno  = $input->param('orderfilter') || '';
211
            $ean = $input->cookie("filter_parcel_ean");
211
        my $basketgroupname = $input->param('basketgroupnamefilter') || '';
212
            $basketname = $input->cookie("filter_parcel_basketname");
213
            $orderno = $input->cookie("filter_parcel_orderno");
214
            $basketgroupname = $input->cookie("filter_parcel_basketgroupname");
215
        } else {
216
            $search   = $input->param('summaryfilter') || '';
217
            $ean      = $input->param('eanfilter') || '';
218
            $basketname = $input->param('basketfilter') || '';
219
            $orderno  = $input->param('orderfilter') || '';
220
            $basketgroupname = $input->param('basketgroupnamefilter') || '';
221
        }
212
        $pendingorders = SearchOrders({
222
        $pendingorders = SearchOrders({
213
            booksellerid => $booksellerid,
223
            booksellerid => $booksellerid,
214
            basketname => $basketname,
224
            basketname => $basketname,
Lines 313-317 $template->param( Link Here
313
    total_quantity       => $total_quantity,
323
    total_quantity       => $total_quantity,
314
    total_gste           => sprintf( "%.2f", $total_gste ),
324
    total_gste           => sprintf( "%.2f", $total_gste ),
315
    total_gsti           => sprintf( "%.2f", $total_gsti ),
325
    total_gsti           => sprintf( "%.2f", $total_gsti ),
326
    sticky_filters       => $sticky_filters,
316
);
327
);
317
output_html_with_http_headers $input, $cookie, $template->output;
328
output_html_with_http_headers $input, $cookie, $template->output;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt (-1 / +18 lines)
Lines 4-15 Link Here
4
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
4
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
5
[% INCLUDE 'doc-head-close.inc' %]
5
[% INCLUDE 'doc-head-close.inc' %]
6
[% INCLUDE 'datatables.inc' %]
6
[% INCLUDE 'datatables.inc' %]
7
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.cookie.min.js"></script>
7
[% INCLUDE 'greybox.inc' %]
8
[% INCLUDE 'greybox.inc' %]
8
<script type="text/javascript">
9
<script type="text/javascript">
9
//<![CDATA[
10
//<![CDATA[
10
11
11
    dt_overwrite_html_sorting_localeCompare();
12
    dt_overwrite_html_sorting_localeCompare();
12
13
14
    var sticky_filters = [% sticky_filters %];
15
13
    $(document).ready(function(){
16
    $(document).ready(function(){
14
      if ( $("#pendingt").length ) {
17
      if ( $("#pendingt").length ) {
15
        var pendingt = $("#pendingt").dataTable($.extend(true, {}, dataTablesDefaults, {
18
        var pendingt = $("#pendingt").dataTable($.extend(true, {}, dataTablesDefaults, {
Lines 57-62 Link Here
57
        } ) );
60
        } ) );
58
      }
61
      }
59
62
63
      // Keep filters from finishreceive.pl to parcel.pl
64
      $.cookie("filter_parcel_summary", $("#summaryfilter").val());
65
      $.cookie("filter_parcel_basketname", $("#basketfilter").val());
66
      $.cookie("filter_parcel_orderno", $("#orderfilter").val());
67
      $.cookie("filter_parcel_basketgroupname", $("#basketgroupnamefilter").val());
68
      $.cookie("filter_parcel_ean", $("#eanfilter").val());
69
70
      $("#filterform").on('submit', function(){
71
        $.cookie("filter_parcel_summary", $("#summaryfilter").val());
72
        $.cookie("filter_parcel_basketname", $("#basketfilter").val());
73
        $.cookie("filter_parcel_orderno", $("#orderfilter").val());
74
        $.cookie("filter_parcel_basketgroupname", $("#basketgroupnamefilter").val());
75
        $.cookie("filter_parcel_ean", $("#eanfilter").val());
76
      });
77
60
    });
78
    });
61
79
62
     // Case-insensitive version of jquery's contains function
80
     // Case-insensitive version of jquery's contains function
63
- 

Return to bug 11141