Bugzilla – Attachment 10163 Details for
Bug 6809
Add branch filter in holds to pull report
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Branch filter in holds to pull report
0001-6809-branch-filter-in-holds-to-pull-report.patch (text/plain), 3.34 KB, created by
Sagar.B.R
on 2012-06-11 09:26:11 UTC
(
hide
)
Description:
Branch filter in holds to pull report
Filename:
MIME Type:
Creator:
Sagar.B.R
Created:
2012-06-11 09:26:11 UTC
Size:
3.34 KB
patch
obsolete
>From a1e8310e557c6a0e20a898c2b077cea33a69448d Mon Sep 17 00:00:00 2001 >From: Amit Gupta <amit.gupta@osslabs.biz> >Date: Mon, 4 Jun 2012 10:30:03 +0530 >Subject: [PATCH] 6809 branch filter in holds to pull report > >--- > circ/pendingreserves.pl | 9 +++++++++ > .../prog/en/modules/circ/pendingreserves.tt | 13 +++++++++++++ > 2 files changed, 22 insertions(+), 0 deletions(-) > >diff --git a/circ/pendingreserves.pl b/circ/pendingreserves.pl >index 52a0450..c8b0b46 100755 >--- a/circ/pendingreserves.pl >+++ b/circ/pendingreserves.pl >@@ -32,10 +32,12 @@ use C4::Auth; > use C4::Dates qw/format_date format_date_in_iso/; > use C4::Debug; > use Date::Calc qw/Today Add_Delta_YMD/; >+use C4::Branch; # GetBranches GetBranchesLoop > > my $input = new CGI; > my $startdate=$input->param('from'); > my $enddate=$input->param('to'); >+my $branch =$input->param('branch'); > my $run_report=$input->param('run_report'); > > my $theme = $input->param('theme'); # only used if allowthemeoverride is set >@@ -89,6 +91,7 @@ my @reservedata; > if ( $run_report ) { > my $dbh = C4::Context->dbh; > my $sqldatewhere = ""; >+ my $sqlbranch = ""; > $debug and warn format_date_in_iso($startdate) . "\n" . format_date_in_iso($enddate); > my @query_params = (); > if ($startdate) { >@@ -99,6 +102,10 @@ if ( $run_report ) { > $sqldatewhere .= " AND reservedate <= ?"; > push @query_params, format_date_in_iso($enddate); > } >+ if ($branch) { >+ $sqlbranch .= " AND items.homebranch= ?"; >+ push @query_params,($branch); >+ } > > my $strsth = > "SELECT min(reservedate) as l_reservedate, >@@ -138,6 +145,7 @@ if ( $run_report ) { > WHERE > reserves.found IS NULL > $sqldatewhere >+ $sqlbranch > AND (reserves.itemnumber IS NULL OR reserves.itemnumber = items.itemnumber) > AND items.itemnumber NOT IN (SELECT itemnumber FROM branchtransfers where datearrived IS NULL) > AND issues.itemnumber IS NULL >@@ -196,6 +204,7 @@ $template->param( > todaysdate => format_date($todaysdate), > from => $startdate, > to => $enddate, >+ branchloop => GetBranchesLoop(), > run_report => $run_report, > reserveloop => \@reservedata, > "BiblioDefaultView".C4::Context->preference("BiblioDefaultView") => 1, >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt >index c79a231..23dfecc 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt >@@ -210,6 +210,19 @@ Calendar.setup( > } > ); > </script></li> >+<li><label for="branch"> >+ Branch: >+</label> >+<select name="branch" id="branch"> >+ [% FOREACH branchloo IN branchloop %] >+ [% IF ( branchloo.selected ) %] >+ <option value="[% branchloo.value %]" selected=selected">[% branchloo.branchname %]</option> >+ [% ELSE %] >+ <option value="[% branchloo.value %]">[% branchloo.branchname %]</option> >+ [% END %] >+ [% END %] >+ </select> >+</li> > </ol> > <p><i>(Inclusive, default is two days ago to today, set other date ranges as needed. )</i></p> > <fieldset class="action"><input type="submit" name="run_report" value="Submit" class="submit"/></fieldset> >-- >1.6.4.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 6809
: 10163