diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm index dc733b221a..1874289bb3 100644 --- a/C4/Acquisition.pm +++ b/C4/Acquisition.pm @@ -2085,6 +2085,8 @@ sub GetHistory { my $isbn = $params{isbn}; my $ean = $params{ean}; my $name = $params{name}; + my $internalnote = $params{internalnote}; + my $vendornote = $params{vendornote}; my $from_placed_on = $params{from_placed_on}; my $to_placed_on = $params{to_placed_on}; my $basket = $params{basket}; @@ -2150,6 +2152,8 @@ sub GetHistory { aqorders.biblionumber, aqorders.orderstatus, aqorders.parent_ordernumber, + aqorders.order_internalnote, + aqorders.order_vendornote, aqbudgets.budget_name "; $query .= ", aqbudgets.budget_id AS budget" if defined $budget; @@ -2242,6 +2246,16 @@ sub GetHistory { } } + if ( $internalnote ) { + $query .= " AND aqorders.order_internalnote LIKE ? "; + push @query_params, "%$internalnote%"; + } + + if ( $vendornote ) { + $query .= " AND aqorders.order_vendornote LIKE ?"; + push @query_params, "%$vendornote%"; + } + if ($booksellerinvoicenumber) { $query .= " AND aqinvoices.invoicenumber LIKE ? "; push @query_params, "%$booksellerinvoicenumber%"; diff --git a/acqui/histsearch.pl b/acqui/histsearch.pl index cbb371d4df..6423bd1881 100755 --- a/acqui/histsearch.pl +++ b/acqui/histsearch.pl @@ -76,6 +76,8 @@ my $filters = { author => scalar $input->param('author'), isbn => scalar $input->param('isbn'), name => scalar $input->param('name'), + internalnote => scalar $input->param('internalnote'), + vendornote => scalar $input->param('vendornote'), ean => scalar $input->param('ean'), basketgroupname => scalar $input->param('basketgroupname'), budget => scalar $input->param('budget'), diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/filter-orders.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/filter-orders.inc index 17f1d1dc3a..2ba0802684 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/filter-orders.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/filter-orders.inc @@ -11,6 +11,8 @@ [% END %]