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

(-)a/C4/Circulation.pm (-3 / +9 lines)
Lines 826-834 sub CanBookBeIssued { Link Here
826
        $needsconfirmation{PATRON_CANT} = 1;
826
        $needsconfirmation{PATRON_CANT} = 1;
827
    } else {
827
    } else {
828
        if($max_loans_allowed){
828
        if($max_loans_allowed){
829
            $needsconfirmation{TOO_MANY} = 1;
829
            if ( C4::Context->preference("AllowTooManyOverride") ) {
830
            $needsconfirmation{current_loan_count} = $current_loan_count;
830
                $needsconfirmation{TOO_MANY} = 1;
831
            $needsconfirmation{max_loans_allowed} = $max_loans_allowed;
831
                $needsconfirmation{current_loan_count} = $current_loan_count;
832
                $needsconfirmation{max_loans_allowed} = $max_loans_allowed;
833
            } else {
834
                $issuingimpossible{TOO_MANY} = 1;
835
                $issuingimpossible{current_loan_count} = $current_loan_count;
836
                $issuingimpossible{max_loans_allowed} = $max_loans_allowed;
837
            }
832
        }
838
        }
833
    }
839
    }
834
840
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 427-429 INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' Link Here
427
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('UseCourseReserves', '0', 'Enable the course reserves feature.', NULL, 'YesNo');
427
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('UseCourseReserves', '0', 'Enable the course reserves feature.', NULL, 'YesNo');
428
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacShowHoldNotes',0,'Show hold notes on OPAC','','YesNo');
428
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacShowHoldNotes',0,'Show hold notes on OPAC','','YesNo');
429
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('CalculateFinesOnReturn','1','Switch to control if overdue fines are calculated on return or not', '', 'YesNo');
429
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('CalculateFinesOnReturn','1','Switch to control if overdue fines are calculated on return or not', '', 'YesNo');
430
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES ('AllowTooManyOverride', '1', 'If on, allow staff to override and check out items when the patron has reached the maximum number of allowed checkouts', '', 'YesNo');
(-)a/installer/data/mysql/updatedatabase.pl (+6 lines)
Lines 6983-6988 INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ( Link Here
6983
    SetVersion($DBversion);
6983
    SetVersion($DBversion);
6984
}
6984
}
6985
6985
6986
$DBversion ="3.13.00.XXX";
6987
if ( CheckVersion($DBversion) ) {
6988
    $dbh->do("INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES ('AllowTooManyOverride', '1', 'If on, allow staff to override and check out items when the patron has reached the maximum number of allowed checkouts', '', 'YesNo');");
6989
    print "Upgrade to $DBversion done (Bug 9576 - Enable or disable issue limit confirmation)\n";
6990
    SetVersion($DBversion);
6991
}
6986
6992
6987
=head1 FUNCTIONS
6993
=head1 FUNCTIONS
6988
6994
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (+6 lines)
Lines 126-131 Circulation: Link Here
126
126
127
    Checkout Policy:
127
    Checkout Policy:
128
        -
128
        -
129
            - pref: AllowTooManyOverride
130
              choices:
131
                  yes: Allow
132
                  no: "Don't allow"
133
            - staff to override and check out items when the patron has reached the maximum number of allowed checkouts.
134
        -
129
            - pref: AllowNotForLoanOverride
135
            - pref: AllowNotForLoanOverride
130
              choices:
136
              choices:
131
                  yes: Allow
137
                  yes: Allow
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (-1 / +4 lines)
Lines 520-525 function validate1(date) { Link Here
520
            <li>Patron's card is expired</li>
520
            <li>Patron's card is expired</li>
521
        [% END %]
521
        [% END %]
522
522
523
        [% IF ( TOO_MANY ) %]
524
            <li>Too many checked out. [% current_loan_count %] checked out, only [% max_loans_allowed %] are allowed.</li>
525
        [% END %]
526
523
        [% IF ( ITEMNOTSAMEBRANCH ) %]
527
        [% IF ( ITEMNOTSAMEBRANCH ) %]
524
            <li>This item belongs to [% itemhomebranch %] and cannot be issued from this location.</li>
528
            <li>This item belongs to [% itemhomebranch %] and cannot be issued from this location.</li>
525
        [% END %]
529
        [% END %]
526
- 

Return to bug 9576