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

(-)a/C4/Circulation.pm (-7 / +8 lines)
Lines 3266-3277 sub CanBookBeRenewed { Link Here
3266
        $final_unseen_renewal = ( C4::Context->preference('UnseenRenewals')
3266
        $final_unseen_renewal = ( C4::Context->preference('UnseenRenewals')
3267
                && $issuing_rule->{unseen_renewals_allowed} == ( $issue->unseen_renewals + 1 ) ) ? 1 : 0;
3267
                && $issuing_rule->{unseen_renewals_allowed} == ( $issue->unseen_renewals + 1 ) ) ? 1 : 0;
3268
3268
3269
        my $overduesblockrenewing    = C4::Context->preference('OverduesBlockRenewing');
3269
        my $overduesblockrenewing     = C4::Context->preference('OverduesBlockRenewing');
3270
        my $finesblockrenewing       = C4::Context->preference("FineNoRenewals");
3270
        my $finesblockrenewing        = C4::Context->preference("FineNoRenewals");
3271
        my $restrictionblockrenewing = C4::Context->preference('RestrictionBlockRenewing');
3271
        my $restrictionblockrenewing  = C4::Context->preference('RestrictionBlockRenewing');
3272
        my $restricted               = $patron->is_debarred;
3272
        my $allowfineoverriderenewing = C4::Context->preference("AllowFineOverrideRenewing");
3273
        my $hasoverdues              = $patron->has_overdues;
3273
        my $restricted                = $patron->is_debarred;
3274
        my $balance                  = $patron->account->balance;
3274
        my $hasoverdues               = $patron->has_overdues;
3275
        my $balance                   = $patron->account->balance;
3275
3276
3276
        if ( $restricted and $restrictionblockrenewing ) {
3277
        if ( $restricted and $restrictionblockrenewing ) {
3277
            return ( 0, 'restriction' );
3278
            return ( 0, 'restriction' );
Lines 3279-3285 sub CanBookBeRenewed { Link Here
3279
            || ( $issue->is_overdue and $overduesblockrenewing eq 'blockitem' ) )
3280
            || ( $issue->is_overdue and $overduesblockrenewing eq 'blockitem' ) )
3280
        {
3281
        {
3281
            return ( 0, 'overdue' );
3282
            return ( 0, 'overdue' );
3282
        } elsif ( $finesblockrenewing && $balance > $finesblockrenewing ) {
3283
        } elsif ( $finesblockrenewing && $balance > $finesblockrenewing && !$allowfineoverriderenewing ) {
3283
            return ( 0, 'too_much_oweing');
3284
            return ( 0, 'too_much_oweing');
3284
        }
3285
        }
3285
3286
(-)a/installer/data/mysql/atomicupdate/bug_23415.pl (-2 / +11 lines)
Lines 2-18 use Modern::Perl; Link Here
2
2
3
return {
3
return {
4
    bug_number  => "23415",
4
    bug_number  => "23415",
5
    description => "Rename OPACFineNoRenewals",
5
    description => "Rename OPACFineNoRenewals and add new syspref AllowFineOverrideRenewing",
6
    up          => sub {
6
    up          => sub {
7
        my ($args) = @_;
7
        my ($args) = @_;
8
        my ( $dbh, $out ) = @$args{qw(dbh out)};
8
        my ( $dbh, $out ) = @$args{qw(dbh out)};
9
9
10
        $dbh->do(
10
        $dbh->do(
11
            q{
11
            q{
12
            UPDATE systempreferences SET variable = "FineNoRenewals", explanation = "Fine limit above which user or staff cannot renew items" WHERE variable = "OPACFineNoRenewals";
12
            UPDATE IGNORE systempreferences SET variable = "FineNoRenewals", explanation = "Fine limit above which user or staff cannot renew items" WHERE variable = "OPACFineNoRenewals";
13
        }
13
        }
14
        );
14
        );
15
15
16
        say $out "Updated system preference 'OPACFineNoRenewals'";
16
        say $out "Updated system preference 'OPACFineNoRenewals'";
17
18
        $dbh->do(
19
            q{
20
            INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type)
21
            VALUES ('AllowFineOverrideRenewing', '0', '0', 'If on, staff will be able to renew items for patrons with fines greater than FineNoRenewals.','YesNo')
22
        }
23
        );
24
25
        say $out "Added new system preference 'AllowFineOverrideRenewing'";
17
    },
26
    },
18
};
27
};
(-)a/installer/data/mysql/mandatory/sysprefs.sql (-1 / +2 lines)
Lines 30-37 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
30
('AllowAllMessageDeletion','0',NULL,'Allow any Library to delete any message','YesNo'),
30
('AllowAllMessageDeletion','0',NULL,'Allow any Library to delete any message','YesNo'),
31
('AllowCheckoutNotes', '0', NULL, 'Allow patrons to submit notes about checked out items.','YesNo'),
31
('AllowCheckoutNotes', '0', NULL, 'Allow patrons to submit notes about checked out items.','YesNo'),
32
('AllowFineOverride','0',NULL,'If on, staff will be able to issue books to patrons with fines greater than noissuescharge.','YesNo'),
32
('AllowFineOverride','0',NULL,'If on, staff will be able to issue books to patrons with fines greater than noissuescharge.','YesNo'),
33
('AllowFineOverrideRenewing','0',NULL,'If on, staff will be able to renew items for patrons with fines greater than FineNoRenewals.','YesNo'),
33
('AllowHoldDateInFuture','0',NULL,'If set a date field is displayed on the Hold screen of the Staff Interface, allowing the hold date to be set in the future.','YesNo'),
34
('AllowHoldDateInFuture','0',NULL,'If set a date field is displayed on the Hold screen of the Staff Interface, allowing the hold date to be set in the future.','YesNo'),
34
('AllowHoldItemTypeSelection','0',NULL,'If enabled, patrons and staff will be able to select the itemtype when placing a hold','YesNo'),
35
('AllowHoldItemTypeSelection','0','','If enabled, patrons and staff will be able to select the itemtype when placing a hold','YesNo'),
35
('AllowHoldPolicyOverride','0',NULL,'Allow staff to override hold policies when placing holds','YesNo'),
36
('AllowHoldPolicyOverride','0',NULL,'Allow staff to override hold policies when placing holds','YesNo'),
36
('AllowHoldsOnDamagedItems','1',NULL,'Allow hold requests to be placed on damaged items','YesNo'),
37
('AllowHoldsOnDamagedItems','1',NULL,'Allow hold requests to be placed on damaged items','YesNo'),
37
('AllowHoldsOnPatronsPossessions','1',NULL,'Allow holds on records that patron have items of it','YesNo'),
38
('AllowHoldsOnPatronsPossessions','1',NULL,'Allow holds on records that patron have items of it','YesNo'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (+6 lines)
Lines 263-268 Circulation: Link Here
263
                  1: Allow
263
                  1: Allow
264
                  0: "Don't allow"
264
                  0: "Don't allow"
265
            - staff to manually override and check out items to patrons who have more in fines than set in the <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=noissuescharge">noissuescharge</a> system preference.
265
            - staff to manually override and check out items to patrons who have more in fines than set in the <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=noissuescharge">noissuescharge</a> system preference.
266
        -
267
            - pref: AllowFineOverrideRenewing
268
              choices:
269
                  1: Allow
270
                  0: "Don't allow"
271
            - staff to manually override and renew items for patrons who have more in fines than set in the <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=FineNoRenewals">FineNoRenewals</a> system preference.
266
        -
272
        -
267
            - pref: AutomaticItemReturn
273
            - pref: AutomaticItemReturn
268
              choices:
274
              choices:
(-)a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js (-1 / +12 lines)
Lines 501-506 function LoadIssuesTable() { Link Here
501
                                __("Renewal denied by syspref") +
501
                                __("Renewal denied by syspref") +
502
                                "</span>";
502
                                "</span>";
503
503
504
                            span_style = "display: none";
505
                            span_class = "renewals-allowed";
506
                        } else if (
507
                            oObj.can_renew_error == "too_much_oweing"
508
                        ) {
509
                            msg +=
510
                                "<span class='renewals-disabled'>" +
511
                                __(
512
                                    "Cannot renew, he patron has a debt of " + parseFloat(oObj.fine).format_price()
513
                                ) +
514
                                "</span>";
515
504
                            span_style = "display: none";
516
                            span_style = "display: none";
505
                            span_class = "renewals-allowed";
517
                            span_class = "renewals-allowed";
506
                        } else {
518
                        } else {
507
- 

Return to bug 23415