From 14b2c347a17958deade438d90e70b35a2a7f12fe Mon Sep 17 00:00:00 2001 From: tipaul Date: Fri, 22 Sep 2006 15:49:34 +0000 Subject: [PATCH] show library address in basket. Usefull when printing the order list --- C4/Acquisition.pm | 4 +-- acqui/basket.pl | 7 ++++ .../default/en/acqui/basket.tmpl | 34 ++++++++++++------- 3 files changed, 31 insertions(+), 14 deletions(-) diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm index bdd204ede2..6b6b53bc7d 100644 --- a/C4/Acquisition.pm +++ b/C4/Acquisition.pm @@ -796,8 +796,8 @@ sub histsearch { $query .= " and biblio.title like ".$dbh->quote("%".$title."%") if $title; $query .= " and biblio.author like ".$dbh->quote("%".$author."%") if $author; $query .= " and name like ".$dbh->quote("%".$name."%") if $name; - $query .= " and creationdate >" .$dbh->quote($from_placed_on) if $from_placed_on; - $query .= " and creationdate<".$dbh->quote($to_placed_on) if $to_placed_on; + $query .= " and creationdate >=" .$dbh->quote($from_placed_on) if $from_placed_on; + $query .= " and creationdate=<".$dbh->quote($to_placed_on) if $to_placed_on; if (C4::Context->preference("IndependantBranches")) { my $userenv = C4::Context->userenv; if (($userenv) &&($userenv->{flags} != 1)){ diff --git a/acqui/basket.pl b/acqui/basket.pl index 7cc69a4f39..1c673547c2 100755 --- a/acqui/basket.pl +++ b/acqui/basket.pl @@ -56,6 +56,9 @@ $booksellerid = $basket->{booksellerid} unless $booksellerid; my ($count2,@booksellers)=bookseller($booksellerid); $booksellers[0]->{'postal'} =~ s/\n//g; +# get branches information, to show branchaddress in template +my $branches = getbranches(); + # get librarian branch... if (C4::Context->preference("IndependantBranches")) { my $userenv = C4::Context->userenv; @@ -143,5 +146,9 @@ $template->param(basketno => $basketno, currency => $booksellers[0]->{'listprice'}, qty_total => $qty_total, GST => C4::Context->preference("gist"), + branchname => $branches->{C4::Context->userenv->{branch}}->{branchname}, + branchaddress1 => $branches->{C4::Context->userenv->{branch}}->{branchaddress1}, + branchaddress2 => $branches->{C4::Context->userenv->{branch}}->{branchaddress2}, + branchaddress3 => $branches->{C4::Context->userenv->{branch}}->{branchaddress3}, ); output_html_with_http_headers $query, $cookie, $template->output; diff --git a/koha-tmpl/intranet-tmpl/default/en/acqui/basket.tmpl b/koha-tmpl/intranet-tmpl/default/en/acqui/basket.tmpl index 5060596ea7..debcd398e6 100644 --- a/koha-tmpl/intranet-tmpl/default/en/acqui/basket.tmpl +++ b/koha-tmpl/intranet-tmpl/default/en/acqui/basket.tmpl @@ -24,6 +24,12 @@

+
+

+

+

+

+