@@ -, +, @@ search - Create some baskets with at least one order, some 'standing' and others not - In the top toolbar choose tab Orders search > Advanced search - Make some searches with and without the new 'Standing order' option - Verify the right orders are found - In the search results standing orders will now show with the status + (standing order). --- C4/Acquisition.pm | 9 +++++++++ acqui/histsearch.pl | 1 + koha-tmpl/intranet-tmpl/prog/en/includes/filter-orders.inc | 6 ++++++ koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt | 1 + 4 files changed, 17 insertions(+) --- a/C4/Acquisition.pm +++ a/C4/Acquisition.pm @@ -2093,6 +2093,7 @@ params: budget orderstatus (note that orderstatus '' will retrieve orders of any status except cancelled) + is_standing managing_library biblionumber get_canceled_order (if set to a true value, cancelled orders will @@ -2116,6 +2117,7 @@ returns: 'quantityreceived' => undef, 'title' => 'The Adventures of Huckleberry Finn', 'managing_library' => 'CPL' + 'is_standing' => '1' } =cut @@ -2136,6 +2138,7 @@ sub GetHistory { my $basketgroupname = $params{basketgroupname}; my $budget = $params{budget}; my $orderstatus = $params{orderstatus}; + my $is_standing = $params{is_standing}; my $biblionumber = $params{biblionumber}; my $get_canceled_order = $params{get_canceled_order} || 0; my $ordernumber = $params{ordernumber}; @@ -2176,6 +2179,7 @@ sub GetHistory { aqbasket.basketname, aqbasket.basketgroupid, aqbasket.authorisedby, + aqbasket.is_standing, concat( borrowers.firstname,' ',borrowers.surname) AS authorisedbyname, branch as managing_library, aqbasketgroups.name as groupname, @@ -2269,6 +2273,11 @@ sub GetHistory { push @query_params, "$orderstatus"; } + if ( $is_standing ) { + $query .= " AND is_standing = ? "; + push @query_params, $is_standing; + } + if ($basket) { if ($basket =~ m/^\d+$/) { $query .= " AND aqorders.basketno = ? "; --- a/acqui/histsearch.pl +++ a/acqui/histsearch.pl @@ -85,6 +85,7 @@ my $filters = { booksellerinvoicenumber => scalar $input->param('booksellerinvoicenumber'), budget => scalar $input->param('budget'), orderstatus => scalar $input->param('orderstatus'), + is_standing => scalar $input->param('is_standing'), ordernumber => scalar $input->param('ordernumber'), search_children_too => scalar $input->param('search_children_too'), created_by => [ $input->multi_param('created_by') ], --- a/koha-tmpl/intranet-tmpl/prog/en/includes/filter-orders.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/filter-orders.inc @@ -75,6 +75,12 @@ [% END %] + [% IF filters.is_standing %] + + [% ELSE %] + + [% END %] +
  • --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt @@ -67,6 +67,7 @@ [% CASE 'complete' %]Received [% CASE 'cancelled' %]Cancelled [% END %] + [% IF order.is_standing %](standing order)[% END %] [% order.basketname | html %] ([% order.basketno | html %]) [% order.authorisedbyname | html %] --