Lines 33-41
use C4::Biblio qw/GetMarcBiblio GetRecordValue GetFrameworkCode/;
Link Here
|
33 |
use C4::Acquisition qw/GetOrdersByBiblionumber/; |
33 |
use C4::Acquisition qw/GetOrdersByBiblionumber/; |
34 |
|
34 |
|
35 |
my $input = new CGI; |
35 |
my $input = new CGI; |
36 |
my $startdate = $input->param('from'); |
36 |
my $startdate = $input->param('from'); |
37 |
my $enddate = $input->param('to'); |
37 |
my $enddate = $input->param('to'); |
38 |
my $ratio = $input->param('ratio'); |
38 |
my $ratio = $input->param('ratio'); |
|
|
39 |
my $include_ordered = $input->param('include_ordered'); |
39 |
|
40 |
|
40 |
my ( $template, $loggedinuser, $cookie ) = get_template_and_user( |
41 |
my ( $template, $loggedinuser, $cookie ) = get_template_and_user( |
41 |
{ |
42 |
{ |
Lines 90-95
if ($enddate) {
Link Here
|
90 |
push @query_params, format_date_in_iso($enddate); |
91 |
push @query_params, format_date_in_iso($enddate); |
91 |
} |
92 |
} |
92 |
|
93 |
|
|
|
94 |
my $nfl_comparison = $include_ordered ? '<=' : '='; |
93 |
my $strsth = |
95 |
my $strsth = |
94 |
"SELECT reservedate, |
96 |
"SELECT reservedate, |
95 |
reserves.borrowernumber as borrowernumber, |
97 |
reserves.borrowernumber as borrowernumber, |
Lines 116-122
my $strsth =
Link Here
|
116 |
LEFT JOIN items ON items.biblionumber=reserves.biblionumber |
118 |
LEFT JOIN items ON items.biblionumber=reserves.biblionumber |
117 |
LEFT JOIN biblio ON reserves.biblionumber=biblio.biblionumber |
119 |
LEFT JOIN biblio ON reserves.biblionumber=biblio.biblionumber |
118 |
WHERE |
120 |
WHERE |
119 |
notforloan = 0 AND damaged = 0 AND itemlost = 0 AND withdrawn = 0 |
121 |
notforloan $nfl_comparison 0 AND damaged = 0 AND itemlost = 0 AND withdrawn = 0 |
120 |
$sqldatewhere |
122 |
$sqldatewhere |
121 |
"; |
123 |
"; |
122 |
|
124 |
|
Lines 177-182
$template->param(
Link Here
|
177 |
from => $startdate, |
179 |
from => $startdate, |
178 |
to => $enddate, |
180 |
to => $enddate, |
179 |
ratio => $ratio, |
181 |
ratio => $ratio, |
|
|
182 |
include_ordered => $include_ordered, |
180 |
reserveloop => \@reservedata, |
183 |
reserveloop => \@reservedata, |
181 |
); |
184 |
); |
182 |
|
185 |
|