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 421-423 INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES( Link Here
421
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('PatronSelfRegistrationAdditionalInstructions','','A free text field to display additional instructions to newly self registered patrons.','','free');
421
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('PatronSelfRegistrationAdditionalInstructions','','A free text field to display additional instructions to newly self registered patrons.','','free');
422
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('UseQueryParser', '0', 'If enabled, try to use QueryParser for queries.', NULL, 'YesNo');
422
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('UseQueryParser', '0', 'If enabled, try to use QueryParser for queries.', NULL, 'YesNo');
423
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('FinesIncludeGracePeriod','1','If enabled, fines calculations will include the grace period.',NULL,'YesNo');
423
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('FinesIncludeGracePeriod','1','If enabled, fines calculations will include the grace period.',NULL,'YesNo');
424
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 (+7 lines)
Lines 6532-6537 if (C4::Context->preference("Version") < TransformToNum($DBversion)) { Link Here
6532
    SetVersion ($DBversion);
6532
    SetVersion ($DBversion);
6533
}
6533
}
6534
6534
6535
$DBversion ="3.11.00.XXX";
6536
if ( CheckVersion($DBversion) ) {
6537
    $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');");
6538
    print "Upgrade to $DBversion done (Bug 9576 - Enable or disable issue limit confirmation)\n";
6539
    SetVersion($DBversion);
6540
}
6541
6535
=head1 FUNCTIONS
6542
=head1 FUNCTIONS
6536
6543
6537
=head2 TableExists($table)
6544
=head2 TableExists($table)
(-)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