From e594317f4de5a052c8cb4d331136ce4ad280ddef Mon Sep 17 00:00:00 2001 From: Alex Arnaud Date: Tue, 23 Mar 2010 11:38:34 +0100 Subject: [PATCH] (BUG #4332) Changed the display of ordered search results 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)" Signed-off-by: Galen Charlton --- 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 9017586d85..4616d69589 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 d83516b4e7..4ceaad4239 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 @@ + @@ -71,7 +72,8 @@ - + +
BasketBasket group Invoice Number Summary Vendor
"> (">) (">) &supplierid=&datereceived="> -- 2.39.2