View | Details | Raw Unified | Return to bug 6049
Collapse All | Expand All

(-)a/circ/overdue.pl (-2 / +10 lines)
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;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tmpl (-1 / +30 lines)
Lines 69-74 Link Here
69
<style type="text/css">
69
<style type="text/css">
70
    .sql {display:none;}
70
    .sql {display:none;}
71
</style>
71
</style>
72
<!-- TMPL_INCLUDE NAME="calendar.inc" -->
72
</head>
73
</head>
73
<body>
74
<body>
74
<!-- TMPL_INCLUDE NAME="header.inc" -->
75
<!-- TMPL_INCLUDE NAME="header.inc" -->
Lines 137-142 Link Here
137
  <fieldset class="brief">
138
  <fieldset class="brief">
138
<h4>Filter On:</h4>
139
<h4>Filter On:</h4>
139
	<ol>
140
	<ol>
141
    <li style="border: dashed; border-width:1px;">Date due:
142
	<label for="dateduefrom">From:
143
	<img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="dateduefrom_button" alt="Show Calendar" />
144
	</label>
145
	<input type="text" id="dateduefrom" name="dateduefrom" size="20" value="<!-- TMPL_VAR NAME="dateduefrom" -->" />
146
	<script language="JavaScript" type="text/javascript">
147
	    Calendar.setup(
148
	    {
149
		inputField : "dateduefrom",
150
		ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
151
		button : "dateduefrom_button"
152
	    }
153
	    );
154
	</script>
155
156
	<label for="datedueto">To:
157
	<img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="datedueto_button" alt="Show Calendar" />
158
	</label>
159
	<input type="text" id="datedueto" name="datedueto" size="20" value="<!-- TMPL_VAR NAME="datedueto" -->" />
160
	<script language="JavaScript" type="text/javascript">
161
	    Calendar.setup(
162
	    {
163
		inputField : "datedueto",
164
		ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
165
		button : "datedueto_button"
166
	    }
167
	    );
168
	</script>
169
    </li>
140
    <li><label>Name or cardnumber:</label><input type="text" name="borname" value="<!--TMPL_VAR Name="borname" escape="html" -->" /></li>
170
    <li><label>Name or cardnumber:</label><input type="text" name="borname" value="<!--TMPL_VAR Name="borname" escape="html" -->" /></li>
141
    <li><label>Patron category:</label><select name="borcat" id="borcat"><option value="">Any</option>
171
    <li><label>Patron category:</label><select name="borcat" id="borcat"><option value="">Any</option>
142
      <!-- TMPL_LOOP name="borcatloop" -->
172
      <!-- TMPL_LOOP name="borcatloop" -->
143
- 

Return to bug 6049