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

(-)a/C4/Members.pm (-2 / +2 lines)
Lines 325-335 sub GetMemberDetails { Link Here
325
    my $query;
325
    my $query;
326
    my $sth;
326
    my $sth;
327
    if ($borrowernumber) {
327
    if ($borrowernumber) {
328
        $sth = $dbh->prepare("SELECT borrowers.*,category_type,categories.description,reservefee,enrolmentperiod FROM borrowers LEFT JOIN categories ON borrowers.categorycode=categories.categorycode WHERE  borrowernumber=?");
328
        $sth = $dbh->prepare("SELECT borrowers.*,category_type,categories.description,categories.BlockExpiredOpacActions,reservefee,enrolmentperiod FROM borrowers LEFT JOIN categories ON borrowers.categorycode=categories.categorycode WHERE  borrowernumber=?");
329
        $sth->execute($borrowernumber);
329
        $sth->execute($borrowernumber);
330
    }
330
    }
331
    elsif ($cardnumber) {
331
    elsif ($cardnumber) {
332
        $sth = $dbh->prepare("SELECT borrowers.*,category_type,categories.description,reservefee,enrolmentperiod FROM borrowers LEFT JOIN categories ON borrowers.categorycode=categories.categorycode WHERE cardnumber=?");
332
        $sth = $dbh->prepare("SELECT borrowers.*,category_type,categories.description,categories.BlockExpiredOpacActions,reservefee,enrolmentperiod FROM borrowers LEFT JOIN categories ON borrowers.categorycode=categories.categorycode WHERE cardnumber=?");
333
        $sth->execute($cardnumber);
333
        $sth->execute($cardnumber);
334
    }
334
    }
335
    else {
335
    else {
(-)a/admin/categorie.pl (-55 / +71 lines)
Lines 68-73 my $searchfield=$input->param('description'); Link Here
68
my $script_name="/cgi-bin/koha/admin/categorie.pl";
68
my $script_name="/cgi-bin/koha/admin/categorie.pl";
69
my $categorycode=$input->param('categorycode');
69
my $categorycode=$input->param('categorycode');
70
my $op = $input->param('op');
70
my $op = $input->param('op');
71
my $block_expired = $input->param("block_expired");
71
72
72
my ($template, $loggedinuser, $cookie)
73
my ($template, $loggedinuser, $cookie)
73
    = get_template_and_user({template_name => "admin/categorie.tmpl",
74
    = get_template_and_user({template_name => "admin/categorie.tmpl",
Lines 94-100 if ($op eq 'add_form') { Link Here
94
    my @selected_branches;
95
    my @selected_branches;
95
	if ($categorycode) {
96
	if ($categorycode) {
96
		my $dbh = C4::Context->dbh;
97
		my $dbh = C4::Context->dbh;
97
		my $sth=$dbh->prepare("select categorycode,description,enrolmentperiod,enrolmentperioddate,upperagelimit,dateofbirthrequired,enrolmentfee,issuelimit,reservefee,hidelostitems,overduenoticerequired,category_type from categories where categorycode=?");
98
         my $sth=$dbh->prepare("select categorycode,description,enrolmentperiod,enrolmentperioddate,upperagelimit,dateofbirthrequired,enrolmentfee,issuelimit,reservefee,hidelostitems,overduenoticerequired,category_type,BlockExpiredOpacActions from categories where categorycode=?");
98
		$sth->execute($categorycode);
99
		$sth->execute($categorycode);
99
		$data=$sth->fetchrow_hashref;
100
		$data=$sth->fetchrow_hashref;
100
101
Lines 119-140 if ($op eq 'add_form') { Link Here
119
        };
120
        };
120
    }
121
    }
121
122
122
	$template->param(description        => $data->{'description'},
123
    $template->param(
123
				enrolmentperiod         => $data->{'enrolmentperiod'},
124
        description             => $data->{'description'},
124
				enrolmentperioddate     => C4::Dates::format_date($data->{'enrolmentperioddate'}),
125
        enrolmentperiod         => $data->{'enrolmentperiod'},
125
				upperagelimit           => $data->{'upperagelimit'},
126
        enrolmentperioddate     => C4::Dates::format_date($data->{'enrolmentperioddate'}),
126
				dateofbirthrequired     => $data->{'dateofbirthrequired'},
127
        upperagelimit           => $data->{'upperagelimit'},
127
				enrolmentfee            => sprintf("%.2f",$data->{'enrolmentfee'}),
128
        dateofbirthrequired     => $data->{'dateofbirthrequired'},
128
				overduenoticerequired   => $data->{'overduenoticerequired'},
129
        enrolmentfee            => sprintf("%.2f",$data->{'enrolmentfee'}),
129
				issuelimit              => $data->{'issuelimit'},
130
        overduenoticerequired   => $data->{'overduenoticerequired'},
130
				reservefee              => sprintf("%.2f",$data->{'reservefee'}),
131
        issuelimit              => $data->{'issuelimit'},
131
                                hidelostitems           => $data->{'hidelostitems'},
132
        reservefee              => sprintf("%.2f",$data->{'reservefee'}),
132
				category_type           => $data->{'category_type'},
133
        hidelostitems           => $data->{'hidelostitems'},
133
                SMSSendDriver => C4::Context->preference("SMSSendDriver"),
134
        category_type           => $data->{'category_type'},
134
                TalkingTechItivaPhone => C4::Context->preference("TalkingTechItivaPhoneNotification"),
135
        SMSSendDriver           => C4::Context->preference("SMSSendDriver"),
135
				"type_".$data->{'category_type'} => 1,
136
        TalkingTechItivaPhone   => C4::Context->preference("TalkingTechItivaPhoneNotification"),
136
                branches_loop           => \@branches_loop,
137
        branches_loop           => \@branches_loop,
137
				);
138
        SMSSendDriver => C4::Context->preference("SMSSendDriver")
139
140
        "type_".$data->{'category_type'} => 1,
141
        "block_" . ($data->{'BlockExpiredOpacActions'} == -1 ? 'syspref' : $data->{'BlockExpiredOpacActions'} ? 'block' : 'dontblock') => 1,
142
    );
143
    
138
    if (C4::Context->preference('EnhancedMessagingPreferences')) {
144
    if (C4::Context->preference('EnhancedMessagingPreferences')) {
139
        C4::Form::MessagingPreferences::set_form_values({ categorycode => $categorycode } , $template);
145
        C4::Form::MessagingPreferences::set_form_values({ categorycode => $categorycode } , $template);
140
    }
146
    }
Lines 148-157 if ($op eq 'add_form') { Link Here
148
	if($input->param('enrolmentperioddate')){
154
	if($input->param('enrolmentperioddate')){
149
	    $input->param('enrolmentperioddate' => C4::Dates::format_date_in_iso($input->param('enrolmentperioddate')) );
155
	    $input->param('enrolmentperioddate' => C4::Dates::format_date_in_iso($input->param('enrolmentperioddate')) );
150
	}
156
	}
151
	
157
152
	if ($is_a_modif) {
158
	if ($is_a_modif) {
153
            my $sth=$dbh->prepare("UPDATE categories SET description=?,enrolmentperiod=?, enrolmentperioddate=?,upperagelimit=?,dateofbirthrequired=?,enrolmentfee=?,reservefee=?,hidelostitems=?,overduenoticerequired=?,category_type=? WHERE categorycode=?");
159
            my $sth=$dbh->prepare("UPDATE categories SET description=?,enrolmentperiod=?, enrolmentperioddate=?,upperagelimit=?,dateofbirthrequired=?,enrolmentfee=?,reservefee=?,hidelostitems=?,overduenoticerequired=?,category_type=?,BlockExpiredOpacActions=? WHERE categorycode=?");
154
            $sth->execute(map { $input->param($_) } ('description','enrolmentperiod','enrolmentperioddate','upperagelimit','dateofbirthrequired','enrolmentfee','reservefee','hidelostitems','overduenoticerequired','category_type','categorycode'));
160
            $sth->execute(map { $input->param($_) } ('description','enrolmentperiod','enrolmentperioddate','upperagelimit','dateofbirthrequired','enrolmentfee','reservefee','hidelostitems','overduenoticerequired','category_type','block_expired','categorycode'));
155
            my @branches = $input->param("branches");
161
            my @branches = $input->param("branches");
156
            if ( @branches ) {
162
            if ( @branches ) {
157
                $sth = $dbh->prepare("DELETE FROM categories_branches WHERE categorycode = ?");
163
                $sth = $dbh->prepare("DELETE FROM categories_branches WHERE categorycode = ?");
Lines 170-177 if ($op eq 'add_form') { Link Here
170
            }
176
            }
171
            $sth->finish;
177
            $sth->finish;
172
        } else {
178
        } else {
173
            my $sth=$dbh->prepare("INSERT INTO categories  (categorycode,description,enrolmentperiod,enrolmentperioddate,upperagelimit,dateofbirthrequired,enrolmentfee,reservefee,hidelostitems,overduenoticerequired,category_type) values (?,?,?,?,?,?,?,?,?,?,?)");
179
            my $sth=$dbh->prepare("INSERT INTO categories  (categorycode,description,enrolmentperiod,enrolmentperioddate,upperagelimit,dateofbirthrequired,enrolmentfee,reservefee,hidelostitems,overduenoticerequired,category_type,BlockExpiredOpacActions) values (?,?,?,?,?,?,?,?,?,?,?,?)");
174
            $sth->execute(map { $input->param($_) } ('categorycode','description','enrolmentperiod','enrolmentperioddate','upperagelimit','dateofbirthrequired','enrolmentfee','reservefee','hidelostitems','overduenoticerequired','category_type'));
180
            $sth->execute(map { $input->param($_) } ('categorycode','description','enrolmentperiod','enrolmentperioddate','upperagelimit','dateofbirthrequired','enrolmentfee','reservefee','hidelostitems','overduenoticerequired','category_type','block_expired'));
175
            $sth->finish;
181
            $sth->finish;
176
        }
182
        }
177
    if (C4::Context->preference('EnhancedMessagingPreferences')) {
183
    if (C4::Context->preference('EnhancedMessagingPreferences')) {
Lines 194-200 if ($op eq 'add_form') { Link Here
194
	$sth->finish;
200
	$sth->finish;
195
	$template->param(total => $total->{'total'});
201
	$template->param(total => $total->{'total'});
196
	
202
	
197
	my $sth2=$dbh->prepare("select categorycode,description,enrolmentperiod,enrolmentperioddate,upperagelimit,dateofbirthrequired,enrolmentfee,issuelimit,reservefee,hidelostitems,overduenoticerequired,category_type from categories where categorycode=?");
203
        my $sth2=$dbh->prepare("select categorycode,description,enrolmentperiod,enrolmentperioddate,upperagelimit,dateofbirthrequired,enrolmentfee,issuelimit,reservefee,hidelostitems,overduenoticerequired,category_type,BlockExpiredOpacActions from categories where categorycode=?");
198
	$sth2->execute($categorycode);
204
	$sth2->execute($categorycode);
199
	my $data=$sth2->fetchrow_hashref;
205
	my $data=$sth2->fetchrow_hashref;
200
	$sth2->finish;
206
	$sth2->finish;
Lines 213-218 if ($op eq 'add_form') { Link Here
213
                                reservefee              =>  sprintf("%.2f",$data->{'reservefee'}),
219
                                reservefee              =>  sprintf("%.2f",$data->{'reservefee'}),
214
                                hidelostitems           => $data->{'hidelostitems'},
220
                                hidelostitems           => $data->{'hidelostitems'},
215
                                category_type           => $data->{'category_type'},
221
                                category_type           => $data->{'category_type'},
222
                                "block_" . $data->{'BlockExpiredOpacActions'} == -1 ? 'syspref' : $data->{'BlockExpiredOpacActions'} ? 'block' : 'dontblock',
216
                                );
223
                                );
217
													# END $OP eq DELETE_CONFIRM
224
													# END $OP eq DELETE_CONFIRM
218
################## DELETE_CONFIRMED ##################################
225
################## DELETE_CONFIRMED ##################################
Lines 229-279 if ($op eq 'add_form') { Link Here
229
236
230
													# END $OP eq DELETE_CONFIRMED
237
													# END $OP eq DELETE_CONFIRMED
231
} else { # DEFAULT
238
} else { # DEFAULT
232
	$template->param(else => 1);
239
    $template->param(else => 1);
233
	my @loop;
240
    my @loop;
234
	my ($count,$results)=StringSearch($searchfield,'web');
241
    my ($count,$results) = StringSearch($searchfield,'web');
242
    
235
    my $dbh = C4::Context->dbh;
243
    my $dbh = C4::Context->dbh;
236
    my $sth = $dbh->prepare("SELECT b.branchcode, b.branchname FROM categories_branches AS cb, branches AS b WHERE cb.branchcode = b.branchcode AND cb.categorycode = ?");
244
    my $sth = $dbh->prepare("SELECT b.branchcode, b.branchname FROM categories_branches AS cb, branches AS b WHERE cb.branchcode = b.branchcode AND cb.categorycode = ?");
237
	for (my $i=0; $i < $count; $i++){
245
246
    for (my $i=0; $i < $count; $i++){
238
        $sth->execute( $results->[$i]{'categorycode'} );
247
        $sth->execute( $results->[$i]{'categorycode'} );
248
239
        my @selected_branches;
249
        my @selected_branches;
240
        while ( my $branch = $sth->fetchrow_hashref ) {
250
        while ( my $branch = $sth->fetchrow_hashref ) {
241
            push @selected_branches, $branch;
251
            push @selected_branches, $branch;
242
        }
252
        }
243
		my %row = (
253
244
		        categorycode            => $results->[$i]{'categorycode'},
254
        my %row = (
245
				description             => $results->[$i]{'description'},
255
            categorycode            => $results->[$i]{'categorycode'},
246
				enrolmentperiod         => $results->[$i]{'enrolmentperiod'},
256
            description             => $results->[$i]{'description'},
247
				enrolmentperioddate     => C4::Dates::format_date($results->[$i]{'enrolmentperioddate'}),
257
            enrolmentperiod         => $results->[$i]{'enrolmentperiod'},
248
				upperagelimit           => $results->[$i]{'upperagelimit'},
258
            enrolmentperioddate     => C4::Dates::format_date($results->[$i]{'enrolmentperioddate'}),
249
				dateofbirthrequired     => $results->[$i]{'dateofbirthrequired'},
259
            upperagelimit           => $results->[$i]{'upperagelimit'},
250
				enrolmentfee            => sprintf("%.2f",$results->[$i]{'enrolmentfee'}),
260
            dateofbirthrequired     => $results->[$i]{'dateofbirthrequired'},
251
				overduenoticerequired   => $results->[$i]{'overduenoticerequired'},
261
            enrolmentfee            => sprintf("%.2f",$results->[$i]{'enrolmentfee'}),
252
				issuelimit              => $results->[$i]{'issuelimit'},
262
            overduenoticerequired   => $results->[$i]{'overduenoticerequired'},
253
				reservefee              => sprintf("%.2f",$results->[$i]{'reservefee'}),
263
            issuelimit              => $results->[$i]{'issuelimit'},
254
                                hidelostitems           => $results->[$i]{'hidelostitems'},
264
            reservefee              => sprintf("%.2f",$results->[$i]{'reservefee'}),
255
				category_type           => $results->[$i]{'category_type'},
265
            hidelostitems           => $results->[$i]{'hidelostitems'},
256
                "type_".$results->[$i]{'category_type'} => 1,
266
            category_type           => $results->[$i]{'category_type'},
257
                branches                => \@selected_branches,
267
            block_syspref           => 1,
268
            branches                => \@selected_branches,
269
            "type_".$results->[$i]{'category_type'} => 1,
258
        );
270
        );
271
259
        if (C4::Context->preference('EnhancedMessagingPreferences')) {
272
        if (C4::Context->preference('EnhancedMessagingPreferences')) {
260
            my $brief_prefs = _get_brief_messaging_prefs($results->[$i]{'categorycode'});
273
            my $brief_prefs = _get_brief_messaging_prefs($results->[$i]{'categorycode'});
261
            $row{messaging_prefs} = $brief_prefs if @$brief_prefs;
274
            $row{messaging_prefs} = $brief_prefs if @$brief_prefs;
262
        }
275
        }
263
		push @loop, \%row;
276
        
264
	}
277
        push @loop, \%row;
265
	$template->param(loop => \@loop);
278
    }
266
	# check that I (institution) and C (child) exists. otherwise => warning to the user
279
267
    $sth=$dbh->prepare("select category_type from categories where category_type='C'");
280
    $template->param(loop => \@loop);
268
	$sth->execute;
281
    # check that I (institution) and C (child) exists. otherwise => warning to the user
269
	my ($categoryChild) = $sth->fetchrow;
282
270
	$template->param(categoryChild => $categoryChild);
283
    $sth = $dbh->prepare("select category_type from categories where category_type='C'");
271
	$sth=$dbh->prepare("select category_type from categories where category_type='I'");
284
    $sth->execute;
272
	$sth->execute;
285
    my ($categoryChild) = $sth->fetchrow;
273
	my ($categoryInstitution) = $sth->fetchrow;
286
    $template->param(categoryChild => $categoryChild);
274
	$template->param(categoryInstitution => $categoryInstitution);
275
	$sth->finish;
276
287
288
    $sth = $dbh->prepare("select category_type from categories where category_type='I'");
289
    $sth->execute;
290
    my ($categoryInstitution) = $sth->fetchrow;
291
    $template->param(categoryInstitution => $categoryInstitution);
292
    $sth->finish;
277
293
278
} #---- END $OP eq DEFAULT
294
} #---- END $OP eq DEFAULT
279
output_html_with_http_headers $input, $cookie, $template->output;
295
output_html_with_http_headers $input, $cookie, $template->output;
(-)a/installer/data/mysql/kohastructure.sql (+1 lines)
Lines 438-443 CREATE TABLE `categories` ( -- this table shows information related to Koha patr Link Here
438
  `reservefee` decimal(28,6) default NULL, -- cost to place holds
438
  `reservefee` decimal(28,6) default NULL, -- cost to place holds
439
  `hidelostitems` tinyint(1) NOT NULL default '0', -- are lost items shown to this category (1 for yes, 0 for no)
439
  `hidelostitems` tinyint(1) NOT NULL default '0', -- are lost items shown to this category (1 for yes, 0 for no)
440
  `category_type` varchar(1) NOT NULL default 'A', -- type of Koha patron (Adult, Child, Professional, Organizational, Statistical, Staff)
440
  `category_type` varchar(1) NOT NULL default 'A', -- type of Koha patron (Adult, Child, Professional, Organizational, Statistical, Staff)
441
  `BlockExpiredOpacActions` tinyint(1) NOT NULL default '-1', -- wheither or not a patron of this categori can renew books or place holds once their card has expired. 0 means they can, 1 means they cannot, -1 means use syspref BLockExpiredPAtronOpacACtions
441
  PRIMARY KEY  (`categorycode`),
442
  PRIMARY KEY  (`categorycode`),
442
  UNIQUE KEY `categorycode` (`categorycode`)
443
  UNIQUE KEY `categorycode` (`categorycode`)
443
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
444
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 418-420 INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' Link Here
418
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('Persona',0,'Use Mozilla Persona for login','','YesNo');
418
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('Persona',0,'Use Mozilla Persona for login','','YesNo');
419
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacItemLocation','callnum','Show the shelving location of items in the opac','callnum|ccode|location','Choice');
419
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacItemLocation','callnum','Show the shelving location of items in the opac','callnum|ccode|location','Choice');
420
INSERT INTO systempreferences (variable,value,explanation,options,type)  VALUES('TrackClicks','0','Track links clicked',NULL,'Integer');
420
INSERT INTO systempreferences (variable,value,explanation,options,type)  VALUES('TrackClicks','0','Track links clicked',NULL,'Integer');
421
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('BlockExpiredPatronOpacActions', 'yes', 'Set whether an expired patron can perform opac actions such as placing a hold or reserve, can be overridden on a per patron-type basis',NULL,'YesNo');
(-)a/installer/data/mysql/updatedatabase.pl (+8 lines)
Lines 6476-6481 if ( CheckVersion($DBversion) ) { Link Here
6476
    SetVersion($DBversion);
6476
    SetVersion($DBversion);
6477
}
6477
}
6478
6478
6479
$DBversion = "3.11.00.XXX";
6480
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
6481
    $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('BlockExpiredPatronOpacActions', 'yes', 'Set whether an expired patron can perform opac actions such as placing a hold or reserve, can be overridden on a per patron-type basis',NULL,'YesNo')");
6482
    $dbh->do("ALTER TABLE `categories` ADD COLUMN `BlockExpiredOpacActions` TINYINT(1) DEFAULT 0 NOT NULL");
6483
    print "Upgraded to $DBversion done (Added syspref BlockExpiredPartonOpacActions, When this preference is turned on opac actions such as placing a hold or reserve are blocked for expired patrons (can be overridden on a per patron-type basis) \n";
6484
    SetVersion ($DBversion);
6485
}
6486
=head1 FUNCTIONS
6479
6487
6480
=head1 FUNCTIONS
6488
=head1 FUNCTIONS
6481
6489
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tt (+8 lines)
Lines 198-203 Link Here
198
        <span>Select All if this category type must to be displayed all the time. Otherwise select librairies you want to associate with this value.
198
        <span>Select All if this category type must to be displayed all the time. Otherwise select librairies you want to associate with this value.
199
        </span>
199
        </span>
200
    </li>
200
    </li>
201
    <li><label for="block_expired">Block expired patrons</label>
202
        <select name="block_expired" id="block_expired">
203
            <option value="-1" [% IF ( block_syspref ) %] selected="selected" [% END %]> Use syspref </option>
204
            <option value="1" [% IF ( block_block ) %] selected="selected" [% END %]> Block </option>
205
            <option value="0" [% IF ( block_dontblock ) %] selected="selected" [% END %]> Don't block </option>
206
        </select>
207
        Should patrons of this category be blocked from opac actions such as renew and reserve when their cards have expired.
208
    </li>
201
    </ol>
209
    </ol>
202
</fieldset>
210
</fieldset>
203
211
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (+7 lines)
Lines 493-498 OPAC: Link Here
493
                  yes: Allow
493
                  yes: Allow
494
            - opac users to share private lists with other patrons. This feature is not active yet but will be released soon
494
            - opac users to share private lists with other patrons. This feature is not active yet but will be released soon
495
495
496
        -
497
            - pref: BlockExpiredPatronOpacActions
498
              choices:
499
                yes: "Block"
500
                no: "Don't Block"
501
            - expired patrons from opac actions such as placing a hold or renew, the setting for a patron category takes priority over this
502
496
    Privacy:
503
    Privacy:
497
        -
504
        -
498
            - pref: AnonSuggestions
505
            - pref: AnonSuggestions
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref (-1 / +1 lines)
Lines 91-97 Patrons: Link Here
91
           class: integer
91
           class: integer
92
         - characters long.
92
         - characters long.
93
     -
93
     -
94
         - Show a notice that a patron is about to expire
94
         - Show a notice if the patron is about to expire or has expired
95
         - pref: NotifyBorrowerDeparture
95
         - pref: NotifyBorrowerDeparture
96
           class: integer
96
           class: integer
97
         - days beforehand.
97
         - days beforehand.
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt (+3 lines)
Lines 210-215 Link Here
210
            [% IF ( bad_data ) %]
210
            [% IF ( bad_data ) %]
211
              <div id="bad_data" class="dialog alert">ERROR: Internal error: incomplete hold request.</div>
211
              <div id="bad_data" class="dialog alert">ERROR: Internal error: incomplete hold request.</div>
212
            [% END %]
212
            [% END %]
213
            [% IF ( expired_patron ) %]
214
                <div id="expired_patron" class="dialog alert"><p><strong>Sorry</strong>, you cannot place holds because your library card has expired.<p><p>Please contact your librarian if you wish to renew your card</p></div>
215
            [% END %]
213
          [% ELSE %]
216
          [% ELSE %]
214
            [% IF ( none_available ) %]
217
            [% IF ( none_available ) %]
215
                <div id="none_available" class="dialog alert"><strong>Sorry</strong>, none of these items can be placed on hold.
218
                <div id="none_available" class="dialog alert"><strong>Sorry</strong>, none of these items can be placed on hold.
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt (+11 lines)
Lines 96-103 $.tablesorter.addParser({ Link Here
96
        <div class="dialog alert" id="warnexpired">
96
        <div class="dialog alert" id="warnexpired">
97
            <strong>Please note:</strong><span> Your card has expired. Please contact the library for more information.</span>
97
            <strong>Please note:</strong><span> Your card has expired. Please contact the library for more information.</span>
98
        </div>
98
        </div>
99
        [% ELSIF ( BORROWER_INF.warnexpired ) %]
100
        <div class="dialog alert">
101
                <string>Please note:</string><span> You card has expired as of [% BORROWER_INF.warnexpired %]. Please contact the library if you wish to renew your subscription.</span>
102
        </div>
99
        [% END %]
103
        [% END %]
100
104
105
        [% IF ( RENEW_ERROR ) %]
106
        <div class="dialog alert">
107
                <string>Please note:</string><span> You're renew failed with the following error: [% RENEW_ERROR %]</span>
108
        </div>
109
        [% END %]
110
111
101
        [% IF ( patron_flagged ) %]
112
        [% IF ( patron_flagged ) %]
102
		<div class="dialog alert">
113
		<div class="dialog alert">
103
        <ul>
114
        <ul>
(-)a/opac/opac-renew.pl (-35 / +43 lines)
Lines 29-78 use C4::Circulation; Link Here
29
use C4::Auth;
29
use C4::Auth;
30
use C4::Items;
30
use C4::Items;
31
use C4::Members;
31
use C4::Members;
32
use Date::Calc qw( Today Date_to_Days );
32
my $query = new CGI;
33
my $query = new CGI;
33
34
34
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
35
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
35
	{
36
    {
36
		  template_name   => "opac-user.tmpl",
37
        template_name   => "opac-user.tmpl",
37
		  query           => $query,
38
        query           => $query,
38
		  type            => "opac",
39
        type            => "opac",
39
		  authnotrequired => 0,
40
        authnotrequired => 0,
40
		  flagsrequired   => { borrow => 1 },
41
        flagsrequired   => { borrow => 1 },
41
		  debug           => 1,
42
        debug           => 1,
42
	}
43
    }
43
); 
44
); 
44
my @items          = $query->param('item');
45
my @items          = $query->param('item');
45
46
46
my $opacrenew = C4::Context->preference("OpacRenewalAllowed");
47
my $opacrenew = C4::Context->preference("OpacRenewalAllowed");
47
48
48
my $errorstring='';
49
my $errorstring='';
49
for my $itemnumber ( @items ) {
50
my $member_details = GetMemberDetails($borrowernumber);
50
    my ($status,$error) = CanBookBeRenewed( $borrowernumber, $itemnumber );
51
# BlockExpiredPatronOpacActions syspref 0 is false, 1 is true. BlockExpiredOpacActions for categories (from GetMemberDetails) -1 means use syspref, 0 is false, 1 is true (where false means dont block, true means block)
51
    if ( $status == 1 && $opacrenew == 1 ) {
52
if( ($member_details->{'BlockExpiredOpacActions'} == -1 ? C4::Conext->preference('BlockExpiredPatronOpacActions') : $member_details->{'BlockExpiredOpacActions'})
52
	my $renewalbranch = C4::Context->preference('OpacRenewalBranch');
53
    && Date_to_Days( Today() ) > Date_to_Days( split /-/, $member_details->{'dateexpiry'} ) ){
53
	my $branchcode;
54
   $errorstring='unable to renew as your card has expired';
54
	if ($renewalbranch eq 'itemhomebranch'){
55
} else {
55
	    my $item = GetItem($itemnumber);
56
    for my $itemnumber ( @items ) {
56
	    $branchcode=$item->{'homebranch'};
57
        my ($status,$error) = CanBookBeRenewed( $borrowernumber, $itemnumber );
57
	}
58
        if ( $status == 1 && $opacrenew == 1 ) {
58
	elsif ($renewalbranch eq 'patronhomebranch'){
59
            my $renewalbranch = C4::Context->preference('OpacRenewalBranch');
59
	    my $borrower = GetMemberDetails($borrowernumber);
60
            my $branchcode;
60
	    $branchcode = $borrower->{'branchcode'};
61
            if ($renewalbranch eq 'itemhomebranch'){
61
	}
62
                my $item = GetItem($itemnumber);
62
	elsif ($renewalbranch eq 'checkoutbranch'){
63
                $branchcode=$item->{'homebranch'};
63
	    my $issue = GetOpenIssue($itemnumber);
64
            }
64
	    $branchcode = $issue->{'branchcode'};
65
            elsif ($renewalbranch eq 'patronhomebranch'){
65
	}
66
                my $borrower = GetMemberDetails($borrowernumber);
66
	elsif ($renewalbranch eq 'NULL'){
67
                $branchcode = $borrower->{'branchcode'};
67
	    $branchcode='';
68
            }
68
	}
69
            elsif ($renewalbranch eq 'checkoutbranch'){
69
	else {
70
                my $issue = GetOpenIssue($itemnumber);
70
	    $branchcode='OPACRenew'
71
                $branchcode = $issue->{'branchcode'};
71
	}
72
            }
72
        AddRenewal( $borrowernumber, $itemnumber, $branchcode);
73
            elsif ($renewalbranch eq 'NULL'){
73
    }
74
                $branchcode='';
74
    else {
75
            }
75
	$errorstring .= $error ."|";
76
            else {
77
                $branchcode='OPACRenew'
78
            }
79
            AddRenewal( $borrowernumber, $itemnumber, $branchcode);
80
        }
81
        else {
82
            $errorstring .= $error ."|";
83
        }
76
    }
84
    }
77
}
85
}
78
86
(-)a/opac/opac-reserve.pl (+11 lines)
Lines 35-40 use C4::Branch; # GetBranches Link Here
35
use C4::Overdues;
35
use C4::Overdues;
36
use C4::Debug;
36
use C4::Debug;
37
use Koha::DateUtils;
37
use Koha::DateUtils;
38
use Date::Calc qw/Today Date_to_Days/;
38
# use Data::Dumper;
39
# use Data::Dumper;
39
40
40
my $MAXIMUM_NUMBER_OF_RESERVES = C4::Context->preference("maxreserves");
41
my $MAXIMUM_NUMBER_OF_RESERVES = C4::Context->preference("maxreserves");
Lines 65-70 sub get_out { Link Here
65
# get borrower information ....
66
# get borrower information ....
66
my ( $borr ) = GetMemberDetails( $borrowernumber );
67
my ( $borr ) = GetMemberDetails( $borrowernumber );
67
68
69
# check if this user can place a reserve, -1 means use sys pref, 0 means dont block, 1 means block
70
if( $borr->{'BlockExpiredOpacActions'} == -1 ? C4::Context->preference("BlockExpiredPatronOpacActions") : $borr->{'BlockExpiredOpacActions'} ) {
71
72
    if( Date_to_Days( Today() ) > Date_to_Days( split /-/, $borr->{'dateexpiry'} ) ){
73
        # cannot reserve, their card has expired and the rules set mean this is not allowed
74
        $template->param( message=>1, expired_patron=>1 );
75
        get_out($query, $cookie, $template->output);
76
    }
77
}
78
68
# Pass through any reserve charge
79
# Pass through any reserve charge
69
if ($borr->{reservefee} > 0){
80
if ($borr->{reservefee} > 0){
70
    $template->param( RESERVE_CHARGE => sprintf("%.2f",$borr->{reservefee}));
81
    $template->param( RESERVE_CHARGE => sprintf("%.2f",$borr->{reservefee}));
(-)a/opac/opac-user.pl (-76 / +81 lines)
Lines 12-20 Link Here
12
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
12
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
13
# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
13
# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
14
#
14
#
15
# You should have received a copy of the GNU General Public License along
15
# You should have received a copy of the GNU General Public License along with
16
# with Koha; if not, write to the Free Software Foundation, Inc.,
16
# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
17
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17
# Suite 330, Boston, MA  02111-1307 USA
18
18
19
19
20
use strict;
20
use strict;
Lines 65-74 my ( $template, $borrowernumber, $cookie ) = get_template_and_user( Link Here
65
    }
65
    }
66
);
66
);
67
67
68
my $show_priority;
68
my $OPACDisplayRequestPriority = (C4::Context->preference("OPACDisplayRequestPriority")) ? 1 : 0;
69
for ( C4::Context->preference("OPACShowHoldQueueDetails") ) {
70
    m/priority/ and $show_priority = 1;
71
}
72
my $patronupdate = $query->param('patronupdate');
69
my $patronupdate = $query->param('patronupdate');
73
my $canrenew = 1;
70
my $canrenew = 1;
74
71
Lines 110-116 if ( $borr->{amountoutstanding} > $no_renewal_amt ) { Link Here
110
    $canrenew = 0;
107
    $canrenew = 0;
111
    $template->param(
108
    $template->param(
112
        renewal_blocked_fines => sprintf( '%.02f', $no_renewal_amt ),
109
        renewal_blocked_fines => sprintf( '%.02f', $no_renewal_amt ),
113
        renewal_blocked_fines_amountoutstanding => sprintf( '%.02f', $borr->{amountoutstanding} ),
114
    );
110
    );
115
}
111
}
116
112
Lines 125-143 my @bordat; Link Here
125
$bordat[0] = $borr;
121
$bordat[0] = $borr;
126
122
127
# Warningdate is the date that the warning starts appearing
123
# Warningdate is the date that the warning starts appearing
128
if ( $borr->{dateexpiry} && Date_to_Days( $today_year, $today_month, $today_day ) > Date_to_Days( $warning_year, $warning_month, $warning_day ) ) {
124
if ( $borr->{'dateexpiry'} && C4::Context->preference('NotifyBorrowerDeparture') ) {
129
    $borr->{'warnexpired'} = 1;
125
    my $days_to_expiry = Date_to_Days( $warning_year, $warning_month, $warning_day ) - Date_to_Days( $today_year, $today_month, $today_day );
130
}
126
    if ( $days_to_expiry < 0 ) {
131
elsif ( $borr->{dateexpiry} && C4::Context->preference('NotifyBorrowerDeparture') &&
127
132
        Date_to_Days(Add_Delta_Days($warning_year, $warning_month, $warning_day,- C4::Context->preference('NotifyBorrowerDeparture'))) <
128
        #borrower card has expired, warn the borrower
133
        Date_to_Days( $today_year, $today_month, $today_day ) ) {
129
        $borr->{'warnexpired'} = $borr->{'dateexpiry'};
130
    } elsif ( $days_to_expiry < C4::Context->preference('NotifyBorrowerDeparture') ) {
131
134
        # borrower card soon to expire, warn the borrower
132
        # borrower card soon to expire, warn the borrower
135
        $borr->{'warndeparture'} = $borr->{dateexpiry};
133
        $borr->{'warndeparture'} = $borr->{dateexpiry};
136
        if (C4::Context->preference('ReturnBeforeExpiry')){
134
        if ( C4::Context->preference('ReturnBeforeExpiry') ) {
137
            $borr->{'returnbeforeexpiry'} = 1;
135
            $borr->{'returnbeforeexpiry'} = 1;
138
        }
136
        }
137
    }
139
}
138
}
140
139
140
# pass on any renew errors to the template for displaying
141
$template->param( RENEW_ERROR => $query->param('renew_error') ) if $query->param('renew_error');
141
142
142
$template->param(   BORROWER_INFO     => \@bordat,
143
$template->param(   BORROWER_INFO     => \@bordat,
143
                    borrowernumber    => $borrowernumber,
144
                    borrowernumber    => $borrowernumber,
Lines 145-150 $template->param( BORROWER_INFO => \@bordat, Link Here
145
                    OPACMySummaryHTML => (C4::Context->preference("OPACMySummaryHTML")) ? 1 : 0,
146
                    OPACMySummaryHTML => (C4::Context->preference("OPACMySummaryHTML")) ? 1 : 0,
146
                    surname           => $borr->{surname},
147
                    surname           => $borr->{surname},
147
                    showname          => $borr->{showname},
148
                    showname          => $borr->{showname},
149
148
                );
150
                );
149
151
150
#get issued items ....
152
#get issued items ....
Lines 156-210 my @issuedat; Link Here
156
my $itemtypes = GetItemTypes();
158
my $itemtypes = GetItemTypes();
157
my $issues = GetPendingIssues($borrowernumber);
159
my $issues = GetPendingIssues($borrowernumber);
158
if ($issues){
160
if ($issues){
159
    foreach my $issue ( sort { $b->{date_due}->datetime() cmp $a->{date_due}->datetime() } @{$issues} ) {
161
	foreach my $issue ( sort { $b->{date_due}->datetime() cmp $a->{date_due}->datetime() } @{$issues} ) {
160
        # check for reserves
162
		# check for reserves
161
        my ( $restype, $res, undef ) = CheckReserves( $issue->{'itemnumber'} );
163
		my ( $restype, $res, undef ) = CheckReserves( $issue->{'itemnumber'} );
162
        if ( $restype ) {
164
		if ( $restype ) {
163
            $issue->{'reserved'} = 1;
165
			$issue->{'reserved'} = 1;
164
        }
166
		}
165
167
		
166
        my ( $total , $accts, $numaccts) = GetMemberAccountRecords( $borrowernumber );
168
		my ( $total , $accts, $numaccts) = GetMemberAccountRecords( $borrowernumber );
167
        my $charges = 0;
169
		my $charges = 0;
168
        foreach my $ac (@$accts) {
170
		foreach my $ac (@$accts) {
169
            if ( $ac->{'itemnumber'} == $issue->{'itemnumber'} ) {
171
			if ( $ac->{'itemnumber'} == $issue->{'itemnumber'} ) {
170
                $charges += $ac->{'amountoutstanding'}
172
				$charges += $ac->{'amountoutstanding'}
171
                  if $ac->{'accounttype'} eq 'F';
173
				  if $ac->{'accounttype'} eq 'F';
172
                $charges += $ac->{'amountoutstanding'}
174
				$charges += $ac->{'amountoutstanding'}
173
                  if $ac->{'accounttype'} eq 'FU';
175
				  if $ac->{'accounttype'} eq 'L';
174
                $charges += $ac->{'amountoutstanding'}
176
			}
175
                  if $ac->{'accounttype'} eq 'L';
177
		}
176
            }
178
		$issue->{'charges'} = $charges;
177
        }
179
178
        $issue->{'charges'} = $charges;
180
		# get publictype for icon
179
181
180
        # check if item is renewable
182
		my $publictype = $issue->{'publictype'};
181
        my ($status,$renewerror) = CanBookBeRenewed( $borrowernumber, $issue->{'itemnumber'} );
183
		$issue->{$publictype} = 1;
182
        ($issue->{'renewcount'},$issue->{'renewsallowed'},$issue->{'renewsleft'}) = GetRenewCount($borrowernumber, $issue->{'itemnumber'});
184
185
		# check if item is renewable
186
		my ($status,$renewerror) = CanBookBeRenewed( $borrowernumber, $issue->{'itemnumber'} );
187
		($issue->{'renewcount'},$issue->{'renewsallowed'},$issue->{'renewsleft'}) = GetRenewCount($borrowernumber, $issue->{'itemnumber'});
183
        if($status && C4::Context->preference("OpacRenewalAllowed")){
188
        if($status && C4::Context->preference("OpacRenewalAllowed")){
184
            $issue->{'status'} = $status;
189
            $issue->{'status'} = $status;
185
        }
190
        }
186
        $issue->{'too_many'} = 1 if $renewerror and $renewerror eq 'too_many';
191
		$issue->{'too_many'} = 1 if $renewerror and $renewerror eq 'too_many';
187
        $issue->{'on_reserve'} = 1 if $renewerror and $renewerror eq 'on_reserve';
192
		$issue->{'on_reserve'} = 1 if $renewerror and $renewerror eq 'on_reserve';
188
193
189
        if ( $issue->{'overdue'} ) {
194
		if ( $issue->{'overdue'} ) {
190
            push @overdues, $issue;
195
			push @overdues, $issue;
191
            $overdues_count++;
196
			$overdues_count++;
192
            $issue->{'overdue'} = 1;
197
			$issue->{'overdue'} = 1;
193
        }
198
		}
194
        else {
199
		else {
195
            $issue->{'issued'} = 1;
200
			$issue->{'issued'} = 1;
196
        }
201
		}
197
        # imageurl:
202
		# imageurl:
198
        my $itemtype = $issue->{'itemtype'};
203
		my $itemtype = $issue->{'itemtype'};
199
        if ( $itemtype ) {
204
		if ( $itemtype ) {
200
            $issue->{'imageurl'}    = getitemtypeimagelocation( 'opac', $itemtypes->{$itemtype}->{'imageurl'} );
205
			$issue->{'imageurl'}    = getitemtypeimagelocation( 'opac', $itemtypes->{$itemtype}->{'imageurl'} );
201
            $issue->{'description'} = $itemtypes->{$itemtype}->{'description'};
206
			$issue->{'description'} = $itemtypes->{$itemtype}->{'description'};
202
        }
207
		}
203
        push @issuedat, $issue;
208
		push @issuedat, $issue;
204
        $count++;
209
		$count++;
205
210
		
206
        my $isbn = GetNormalizedISBN($issue->{'isbn'});
211
		my $isbn = GetNormalizedISBN($issue->{'isbn'});
207
        $issue->{normalized_isbn} = $isbn;
212
		$issue->{normalized_isbn} = $isbn;
208
213
209
                # My Summary HTML
214
                # My Summary HTML
210
                if (my $my_summary_html = C4::Context->preference('OPACMySummaryHTML')){
215
                if (my $my_summary_html = C4::Context->preference('OPACMySummaryHTML')){
Lines 216-222 if ($issues){ Link Here
216
                    $issue->{biblionumber} ? $my_summary_html =~ s/{BIBLIONUMBER}/$issue->{biblionumber}/g : $my_summary_html =~ s/{BIBLIONUMBER}//g;
221
                    $issue->{biblionumber} ? $my_summary_html =~ s/{BIBLIONUMBER}/$issue->{biblionumber}/g : $my_summary_html =~ s/{BIBLIONUMBER}//g;
217
                    $issue->{MySummaryHTML} = $my_summary_html;
222
                    $issue->{MySummaryHTML} = $my_summary_html;
218
                }
223
                }
219
    }
224
	}
220
}
225
}
221
$template->param( ISSUES       => \@issuedat );
226
$template->param( ISSUES       => \@issuedat );
222
$template->param( issues_count => $count );
227
$template->param( issues_count => $count );
Lines 256-268 foreach my $res (@reserves) { Link Here
256
    if ( $res->{'expirationdate'} eq '0000-00-00' ) {
261
    if ( $res->{'expirationdate'} eq '0000-00-00' ) {
257
      $res->{'expirationdate'} = '';
262
      $res->{'expirationdate'} = '';
258
    }
263
    }
259
264
    
265
    my $publictype = $res->{'publictype'};
266
    $res->{$publictype} = 1;
260
    $res->{'waiting'} = 1 if $res->{'found'} eq 'W';
267
    $res->{'waiting'} = 1 if $res->{'found'} eq 'W';
261
    $res->{'branch'} = $branches->{ $res->{'branchcode'} }->{'branchname'};
268
    $res->{'branch'} = $branches->{ $res->{'branchcode'} }->{'branchname'};
262
    my $biblioData = GetBiblioData($res->{'biblionumber'});
269
    my $biblioData = GetBiblioData($res->{'biblionumber'});
263
    $res->{'reserves_title'} = $biblioData->{'title'};
270
    $res->{'reserves_title'} = $biblioData->{'title'};
264
    if ($show_priority) {
271
    if ($OPACDisplayRequestPriority) {
265
        $res->{'priority'} ||= '';
272
        $res->{'priority'} = '' if $res->{'priority'} eq '0';
266
    }
273
    }
267
    $res->{'suspend_until'} = C4::Dates->new( $res->{'suspend_until'}, "iso")->output("syspref") if ( $res->{'suspend_until'} );
274
    $res->{'suspend_until'} = C4::Dates->new( $res->{'suspend_until'}, "iso")->output("syspref") if ( $res->{'suspend_until'} );
268
}
275
}
Lines 272-278 foreach my $res (@reserves) { Link Here
272
279
273
$template->param( RESERVES       => \@reserves );
280
$template->param( RESERVES       => \@reserves );
274
$template->param( reserves_count => $#reserves+1 );
281
$template->param( reserves_count => $#reserves+1 );
275
$template->param( showpriority=>$show_priority );
282
$template->param( showpriority=>1 ) if $OPACDisplayRequestPriority;
276
283
277
my @waiting;
284
my @waiting;
278
my $wcount = 0;
285
my $wcount = 0;
Lines 288-294 foreach my $res (@reserves) { Link Here
288
        if ( ( $res->{'found'} eq 'W' ) ) {
295
        if ( ( $res->{'found'} eq 'W' ) ) {
289
            my $item = $res->{'itemnumber'};
296
            my $item = $res->{'itemnumber'};
290
            $item = GetBiblioFromItemNumber($item,undef);
297
            $item = GetBiblioFromItemNumber($item,undef);
291
            $res->{'wait'}= 1;
298
            $res->{'wait'}= 1; 
292
            $res->{'holdingbranch'}=$item->{'holdingbranch'};
299
            $res->{'holdingbranch'}=$item->{'holdingbranch'};
293
            $res->{'biblionumber'}=$item->{'biblionumber'};
300
            $res->{'biblionumber'}=$item->{'biblionumber'};
294
            $res->{'barcode'} = $item->{'barcode'};
301
            $res->{'barcode'} = $item->{'barcode'};
Lines 314-320 foreach my $res (@reserves) { Link Here
314
    # can be cancelled
321
    # can be cancelled
315
    #$res->{'cancelable'} = 1 if ($res->{'wait'} && $res->{'atdestination'} && $res->{'found'} ne "1");
322
    #$res->{'cancelable'} = 1 if ($res->{'wait'} && $res->{'atdestination'} && $res->{'found'} ne "1");
316
    $res->{'cancelable'} = 1 if    ($res->{wait} and not $res->{found}) or (not $res->{wait} and not $res->{intransit});
323
    $res->{'cancelable'} = 1 if    ($res->{wait} and not $res->{found}) or (not $res->{wait} and not $res->{intransit});
317
324
    
318
}
325
}
319
326
320
$template->param( WAITING => \@waiting );
327
$template->param( WAITING => \@waiting );
Lines 338-349 if (C4::Context->preference('BakerTaylorEnabled')) { Link Here
338
if (C4::Context->preference("OPACAmazonCoverImages") or 
345
if (C4::Context->preference("OPACAmazonCoverImages") or 
339
    C4::Context->preference("GoogleJackets") or
346
    C4::Context->preference("GoogleJackets") or
340
    C4::Context->preference("BakerTaylorEnabled") or
347
    C4::Context->preference("BakerTaylorEnabled") or
341
    C4::Context->preference("SyndeticsCoverImages")) {
348
	C4::Context->preference("SyndeticsCoverImages")) {
342
        $template->param(JacketImages=>1);
349
        $template->param(JacketImages=>1);
343
}
350
}
344
351
345
if ( GetMessagesCount( $borrowernumber, 'B' ) ) {
352
if ( GetMessagesCount( $borrowernumber, 'B' ) ) {
346
    $template->param( bor_messages => 1 );
353
	$template->param( bor_messages => 1 );
347
}
354
}
348
355
349
if ( $borr->{'opacnote'} ) {
356
if ( $borr->{'opacnote'} ) {
Lines 354-370 if ( $borr->{'opacnote'} ) { Link Here
354
}
361
}
355
362
356
$template->param(
363
$template->param(
357
    bor_messages_loop    => GetMessages( $borrowernumber, 'B', 'NONE' ),
364
    bor_messages_loop	=> GetMessages( $borrowernumber, 'B', 'NONE' ),
358
    waiting_count      => $wcount,
365
    waiting_count      => $wcount,
359
    patronupdate => $patronupdate,
366
    patronupdate => $patronupdate,
360
    OpacRenewalAllowed => C4::Context->preference("OpacRenewalAllowed"),
367
    OpacRenewalAllowed => C4::Context->preference("OpacRenewalAllowed"),
361
    userview => 1,
368
    userview => 1,
369
    dateformat    => C4::Context->preference("dateformat"),
362
);
370
);
363
371
364
$template->param(
372
$template->param( DHTMLcalendar_dateformat  => C4::Dates->DHTMLcalendar() );
365
    SuspendHoldsOpac => C4::Context->preference('SuspendHoldsOpac'),
373
$template->param( AutoResumeSuspendedHolds => C4::Context->preference('AutoResumeSuspendedHolds') );
366
    AutoResumeSuspendedHolds => C4::Context->preference('AutoResumeSuspendedHolds'),
367
);
368
374
369
output_html_with_http_headers $query, $cookie, $template->output;
375
output_html_with_http_headers $query, $cookie, $template->output;
370
376
371
- 

Return to bug 6739