=cut
#'
sub getbasketcontent {
- my ($basketno,$supplier)=@_;
+ my ($basketno,$supplier,$orderby)=@_;
my $dbh = C4::Context->dbh;
my $query="Select *,biblio.title from aqorders,biblio,biblioitems
left join aqorderbreakdown on aqorderbreakdown.ordernumber=aqorders.ordernumber
if ($supplier ne ''){
$query.=" and aqorders.booksellerid='$supplier'";
}
- $query.=" order by biblioitems.publishercode";
+
+ $orderby="biblioitems.publishercode" unless $orderby;
+ $query.=" order by $orderby";
my $sth=$dbh->prepare($query);
$sth->execute;
my @results;
my $query =new CGI;
my $basketno = $query ->param('basket');
my $booksellerid = $query->param('supplierid');
+my $order = $query->param('order');
my ($template, $loggedinuser, $cookie)
= get_template_and_user({template_name => "acqui/basket.tmpl",
query => $query,
# if new basket, pre-fill infos
$basket->{creationdate} = "" unless ($basket->{creationdate});
$basket->{authorisedby} = $loggedinuser unless ($basket->{authorisedby});
-($count,@results)=getbasketcontent($basketno);
+($count,@results)=getbasketcontent($basketno,'',$order);
my $line_total; # total of each line
my $sub_total; # total of line totals
<table>
<tr valign="top" bgcolor="#ffdf61">
<th class="acquisition">Order</th>
- <th class="acquisition">Publisher</th>
+ <th class="acquisition">Publisher<a href="basket.pl?basket=<!-- TMPL_VAR name="basketno" -->&order=biblioitems.publishercode">[order]</a></th>
<th class="acquisition">Isbn</th>
<th class="acquisition">Title</th>
<th class="acquisition">Author</th>
<th class="acquisition">est</th>
<th class="acquisition">Qty</th>
<th class="acquisition">Total</th>
- <th class="acquisition">Book fund</th>
+ <th class="acquisition">Fund <a href="basket.pl?basket=<!-- TMPL_VAR name="basketno" -->&order=aqorderbreakdown.bookfundid,biblioitems.publishercode">[order]</a></th>
</tr>
<!-- TMPL_LOOP NAME="books_loop" -->
<tr valign="top" bgcolor="<!-- TMPL_VAR NAME="color" -->">