Bug 27287: Make note fields from orders history searchable
This patch adds aqorders.order_internalnote and aqorders.order_vendornote to the Acquisitions history search. To test: 1) Apply patch and restart services 2) Create an order in Acquisitions and set an internal note and a vendor note 3) Go to /cgi-bin/acqui/histsearch.pl and search by internal or vendor note using the terms you set in step 2 4) Note your order is returned and internal note and vendor note are included in the search results at the end of the table Sponsored-by: Bibliotheksservice-Zentrum Baden-Wuerttemberg Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
02ebc90e4b
commit
b5b6dc9e5b
4 changed files with 22 additions and 0 deletions
|
@ -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%";
|
||||
|
|
|
@ -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'),
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
[% END %]
|
||||
<li><label for="name">Vendor: </label> <input type="text" name="name" id="name" value="[% filters.name | html %]" /></li>
|
||||
<li><label for="basket">Basket: </label> <input type="text" name="basket" id="basket" value="[% filters.basket | html %]" /></li>
|
||||
<li><label for="internalnote">Internal note: </label> <input type="text" name="internalnote" id="internalnote" value="[% filters.internalnote | html %]" /></li>
|
||||
<li><label for="vendornote">Vendor note: </label> <input type="text" name="vendornote" id="vendornote" value="[% filters.vendornote | html %]" /></li>
|
||||
<li><label for="basket_creators">Basket created by: </label>
|
||||
<input autocomplete="off" id="find_patron" type="text" class="noEnterSubmit" />
|
||||
<div>
|
||||
|
|
|
@ -76,6 +76,8 @@
|
|||
<th>Quantity ordered</th>
|
||||
<th>Unit cost</th>
|
||||
<th>Fund</th>
|
||||
<th>Internal note</th>
|
||||
<th>Vendor note</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -124,6 +126,8 @@
|
|||
<td>[% order.quantity | html %]</td>
|
||||
<td>[% order.ecost | html %]</td>
|
||||
<td>[% order.budget_name | html %]</td>
|
||||
<td>[% order.order_internalnote | html %]</td>
|
||||
<td>[% order.order_vendornote | html %]</td>
|
||||
</tr>
|
||||
[% END %]
|
||||
</tbody>
|
||||
|
|
Loading…
Reference in a new issue