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

(-)a/C4/Circulation.pm (-3 / +9 lines)
Lines 822-830 sub CanBookBeIssued { Link Here
822
        $needsconfirmation{PATRON_CANT} = 1;
822
        $needsconfirmation{PATRON_CANT} = 1;
823
    } else {
823
    } else {
824
        if($max_loans_allowed){
824
        if($max_loans_allowed){
825
            $needsconfirmation{TOO_MANY} = 1;
825
            if ( C4::Context->preference("AllowTooManyOverride") ) {
826
            $needsconfirmation{current_loan_count} = $current_loan_count;
826
                $needsconfirmation{TOO_MANY} = 1;
827
            $needsconfirmation{max_loans_allowed} = $max_loans_allowed;
827
                $needsconfirmation{current_loan_count} = $current_loan_count;
828
                $needsconfirmation{max_loans_allowed} = $max_loans_allowed;
829
            } else {
830
                $issuingimpossible{TOO_MANY} = 1;
831
                $issuingimpossible{current_loan_count} = $current_loan_count;
832
                $issuingimpossible{max_loans_allowed} = $max_loans_allowed;
833
            }
828
        }
834
        }
829
    }
835
    }
830
836
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 411-413 INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ( Link Here
411
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('IDreamBooksReviews','0','Display book review snippets from IDreamBooks.com','','YesNo');
411
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('IDreamBooksReviews','0','Display book review snippets from IDreamBooks.com','','YesNo');
412
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('IDreamBooksReadometer','0','Display Readometer from IDreamBooks.com','','YesNo');
412
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('IDreamBooksReadometer','0','Display Readometer from IDreamBooks.com','','YesNo');
413
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('IDreamBooksResults','0','Display IDreamBooks.com rating in search results','','YesNo');
413
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('IDreamBooksResults','0','Display IDreamBooks.com rating in search results','','YesNo');
414
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 6399-6404 if ( CheckVersion($DBversion) ) { Link Here
6399
    SetVersion($DBversion);
6399
    SetVersion($DBversion);
6400
}
6400
}
6401
6401
6402
$DBversion ="3.11.00.XXX";
6403
if ( CheckVersion($DBversion) ) {
6404
    $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');");
6405
    print "Upgrade to $DBversion done (Bug 9576 - Enable or disable issue limit confirmation)\n";
6406
    SetVersion($DBversion);
6407
}
6402
6408
6403
=head1 FUNCTIONS
6409
=head1 FUNCTIONS
6404
6410
(-)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 489-494 function validate1(date) { Link Here
489
            <li>Patron's card is expired</li>
489
            <li>Patron's card is expired</li>
490
        [% END %]
490
        [% END %]
491
491
492
        [% IF ( TOO_MANY ) %]
493
            <li>Too many checked out. [% current_loan_count %] checked out, only [% max_loans_allowed %] are allowed.</li>
494
        [% END %]
495
492
        [% IF ( ITEMNOTSAMEBRANCH ) %]
496
        [% IF ( ITEMNOTSAMEBRANCH ) %]
493
            <li>This item belongs to [% itemhomebranch %] and cannot be issued from this location.</li>
497
            <li>This item belongs to [% itemhomebranch %] and cannot be issued from this location.</li>
494
        [% END %]
498
        [% END %]
495
- 

Return to bug 9576