Lines 27-33
use CGI qw(-oldstyle_urls);
Link Here
|
27 |
use C4::Auth; |
27 |
use C4::Auth; |
28 |
use C4::Branch; |
28 |
use C4::Branch; |
29 |
use C4::Debug; |
29 |
use C4::Debug; |
30 |
use C4::Dates qw/format_date/; |
30 |
use C4::Dates qw/format_date format_date_in_iso/; |
31 |
use Date::Calc qw/Today/; |
31 |
use Date::Calc qw/Today/; |
32 |
use Text::CSV_XS; |
32 |
use Text::CSV_XS; |
33 |
|
33 |
|
Lines 40-45
my $itemtypefilter = $input->param('itemtype') || '';
Link Here
|
40 |
my $borflagsfilter = $input->param('borflag') || ''; |
40 |
my $borflagsfilter = $input->param('borflag') || ''; |
41 |
my $branchfilter = $input->param('branch') || ''; |
41 |
my $branchfilter = $input->param('branch') || ''; |
42 |
my $op = $input->param('op') || ''; |
42 |
my $op = $input->param('op') || ''; |
|
|
43 |
my $dateduefrom = format_date_in_iso($input->param( 'dateduefrom' )) || ''; |
44 |
my $datedueto = format_date_in_iso($input->param( 'datedueto' )) || ''; |
43 |
my $isfiltered = $op =~ /apply/i && $op =~ /filter/i; |
45 |
my $isfiltered = $op =~ /apply/i && $op =~ /filter/i; |
44 |
my $noreport = C4::Context->preference('FilterBeforeOverdueReport') && ! $isfiltered && $op ne "csv"; |
46 |
my $noreport = C4::Context->preference('FilterBeforeOverdueReport') && ! $isfiltered && $op ne "csv"; |
45 |
|
47 |
|
Lines 209-215
$template->param(
Link Here
|
209 |
patron_attr_filter_loop => \@patron_attr_filter_loop, |
211 |
patron_attr_filter_loop => \@patron_attr_filter_loop, |
210 |
borname => $bornamefilter, |
212 |
borname => $bornamefilter, |
211 |
order => $order, |
213 |
order => $order, |
212 |
showall => $showall); |
214 |
showall => $showall, |
|
|
215 |
DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(), |
216 |
dateduefrom => $input->param( 'dateduefrom' ) || '', |
217 |
datedueto => $input->param( 'datedueto' ) || '', |
218 |
); |
213 |
|
219 |
|
214 |
if ($noreport) { |
220 |
if ($noreport) { |
215 |
# la de dah ... page comes up presto-quicko |
221 |
# la de dah ... page comes up presto-quicko |
Lines 254-259
if ($noreport) {
Link Here
|
254 |
$strsth.=" AND biblioitems.itemtype = '" . $itemtypefilter . "' " if $itemtypefilter; |
260 |
$strsth.=" AND biblioitems.itemtype = '" . $itemtypefilter . "' " if $itemtypefilter; |
255 |
$strsth.=" AND borrowers.flags = '" . $borflagsfilter . "' " if $borflagsfilter; |
261 |
$strsth.=" AND borrowers.flags = '" . $borflagsfilter . "' " if $borflagsfilter; |
256 |
$strsth.=" AND borrowers.branchcode = '" . $branchfilter . "' " if $branchfilter; |
262 |
$strsth.=" AND borrowers.branchcode = '" . $branchfilter . "' " if $branchfilter; |
|
|
263 |
$strsth.=" AND date_due < '" . $datedueto . "' " if $datedueto; |
264 |
$strsth.=" AND date_due > '" . $dateduefrom . "' " if $dateduefrom; |
257 |
# restrict patrons (borrowers) to those matching the patron attribute filter(s), if any |
265 |
# restrict patrons (borrowers) to those matching the patron attribute filter(s), if any |
258 |
my $bnlist = $have_pattr_filter_data ? join(',',keys %borrowernumber_to_attributes) : ''; |
266 |
my $bnlist = $have_pattr_filter_data ? join(',',keys %borrowernumber_to_attributes) : ''; |
259 |
$strsth =~ s/WHERE 1=1/WHERE 1=1 AND borrowers.borrowernumber IN ($bnlist)/ if $bnlist; |
267 |
$strsth =~ s/WHERE 1=1/WHERE 1=1 AND borrowers.borrowernumber IN ($bnlist)/ if $bnlist; |