[Koha-patches] [PATCH] (BUG #4332) Changed the display of ordered search results
Alex Arnaud
alex.arnaud at biblibre.com
Tue Mar 23 11:38:34 CET 2010
Changing the display of the basket column: changing "basketNumber" to "my
basket (basketNumber)".
Adding the Basket group column with fallowing display: "my group (group
Number)"
---
C4/Acquisition.pm | 14 ++++++++++----
.../prog/en/modules/acqui/histsearch.tmpl | 4 +++-
2 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm
index 9017586..4616d69 100644
--- a/C4/Acquisition.pm
+++ b/C4/Acquisition.pm
@@ -1672,7 +1672,11 @@ sub GetHistory {
biblio.title,
biblio.author,
aqorders.basketno,
- name,aqbasket.creationdate,
+ aqbasket.basketname,
+ aqbasket.basketgroupid,
+ aqbasketgroups.name as groupname,
+ aqbooksellers.name,
+ aqbasket.creationdate,
aqorders.datereceived,
aqorders.quantity,
aqorders.quantityreceived,
@@ -1683,12 +1687,13 @@ sub GetHistory {
aqorders.biblionumber
FROM aqorders
LEFT JOIN aqbasket ON aqorders.basketno=aqbasket.basketno
+ LEFT JOIN aqbasketgroups ON aqbasket.basketgroupid=aqbasketgroups.id
LEFT JOIN aqbooksellers ON aqbasket.booksellerid=aqbooksellers.id
LEFT JOIN biblio ON biblio.biblionumber=aqorders.biblionumber";
$query .= " LEFT JOIN borrowers ON aqbasket.authorisedby=borrowers.borrowernumber"
if ( C4::Context->preference("IndependantBranches") );
-
+
$query .= " WHERE (datecancellationprinted is NULL or datecancellationprinted='0000-00-00') ";
my @query_params = ();
@@ -1704,7 +1709,7 @@ sub GetHistory {
}
if ( defined $name ) {
- $query .= " AND name LIKE ? ";
+ $query .= " AND aqbooksellers.name LIKE ? ";
push @query_params, "%$name%";
}
@@ -1725,7 +1730,8 @@ sub GetHistory {
push @query_params, $userenv->{branch};
}
}
- $query .= " ORDER BY booksellerid";
+ $query .= " ORDER BY id";
+ warn $query;
my $sth = $dbh->prepare($query);
$sth->execute( @query_params );
my $cnt = 1;
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tmpl
index d83516b..4ceaad4 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tmpl
@@ -60,6 +60,7 @@
<table>
<tr>
<th>Basket</th>
+ <th>Basket group</th>
<th>Invoice Number</th>
<th>Summary</th>
<th>Vendor</th>
@@ -71,7 +72,8 @@
<!-- TMPL_LOOP NAME="suggestions_loop" -->
<tr>
- <td><a href="basket.pl?basketno=<!-- TMPL_VAR name="basketno" -->"><!-- TMPL_VAR name="basketno" --></a></td>
+ <td><!-- TMPL_VAR name="basketname" --> (<a href="basket.pl?basketno=<!-- TMPL_VAR name="basketno" -->"><!-- TMPL_VAR name="basketno" --></a>)</td>
+ <td><!-- TMPL_VAR name="groupname" --> (<a href="basketgroup.pl?booksellerid=<!-- TMPL_VAR name="id" -->"><!-- TMPL_VAR name="basketgroupid" --></a>)</td>
<td><!-- TMPL_IF NAME="invoicenumber" -->
<a href="/cgi-bin/koha/acqui/parcel.pl?invoice=<!-- TMPL_VAR NAME="invoicenumber"-->&supplierid=<!-- TMPL_VAR NAME="id"-->&datereceived=<!-- TMPL_VAR NAME="datereceived" -->"><!-- TMPL_VAR NAME="invoicenumber"--></a>
<!-- TMPL_ELSE -->
--
1.6.3.3
More information about the Koha-patches
mailing list