Bug 26503: Add limit for standing orders to acq advanced search
This allows to filter on standing orders on the acq advanced search checkbox. For this purpose a new checkbox is shown behind the order status search option. As both not yet ordered and standing orders have the status 'new' or partially received internally, this seems like a good placement as it will help distinguish these cases clearly. new + standing order = standing order, but nothing received yet partially received + standing order = active standing order all status + standing order = all standing orders To test: - 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). Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
d50332c1e5
commit
352e8d2306
|
|
@ -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 = ? ";
|
||||
|
|
|
|||
|
|
@ -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') ],
|
||||
|
|
|
|||
|
|
@ -75,6 +75,12 @@
|
|||
<option value="cancelled">Cancelled</option>
|
||||
[% END %]
|
||||
</select>
|
||||
[% IF filters.is_standing %]
|
||||
<input type="checkbox" name="is_standing" id="is_standing" value="1" checked="checked" />
|
||||
[% ELSE %]
|
||||
<input type="checkbox" name="is_standing" id="is_standing" value="1" />
|
||||
[% END %]
|
||||
<label class="yesno" for="search_children_too">Standing order</label>
|
||||
</li>
|
||||
<li>
|
||||
<label for="fund">Fund: </label>
|
||||
|
|
|
|||
|
|
@ -67,6 +67,7 @@
|
|||
[% CASE 'complete' %]Received
|
||||
[% CASE 'cancelled' %]Cancelled
|
||||
[% END %]
|
||||
[% IF order.is_standing %](standing order)[% END %]
|
||||
</td>
|
||||
<td><a href="basket.pl?basketno=[% order.basketno | uri %]">[% order.basketname | html %] ([% order.basketno | html %])</a></td>
|
||||
<td>[% order.authorisedbyname | html %]</td>
|
||||
|
|
|
|||
Loading…
Reference in New Issue