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 428-430 INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) V Link Here
428
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacHoldNotes',0,'Show hold notes on OPAC','','YesNo');
428
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacHoldNotes',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 INTO systempreferences (variable,value,explanation,options,type) VALUES ('AcqWarnOnDuplicateInvoice','0','Warn librarians when they try to create a duplicate invoice', '', 'YesNo');
430
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('AcqWarnOnDuplicateInvoice','0','Warn librarians when they try to create a duplicate invoice', '', 'YesNo');
431
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 (-1 / +7 lines)
Lines 7036-7042 if ( CheckVersion($DBversion) ) { Link Here
7036
    SetVersion($DBversion);
7036
    SetVersion($DBversion);
7037
}
7037
}
7038
7038
7039
7040
$DBversion = "3.13.00.012";
7039
$DBversion = "3.13.00.012";
7041
if ( CheckVersion($DBversion) ) {
7040
if ( CheckVersion($DBversion) ) {
7042
    $dbh->do("ALTER TABLE issuingrules MODIFY COLUMN overduefinescap decimal(28,6) DEFAULT NULL;");
7041
    $dbh->do("ALTER TABLE issuingrules MODIFY COLUMN overduefinescap decimal(28,6) DEFAULT NULL;");
Lines 7044-7049 if ( CheckVersion($DBversion) ) { Link Here
7044
    SetVersion($DBversion);
7043
    SetVersion($DBversion);
7045
}
7044
}
7046
7045
7046
$DBversion ="3.13.00.XXX";
7047
if ( CheckVersion($DBversion) ) {
7048
    $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');");
7049
    print "Upgrade to $DBversion done (Bug 9576 - Enable or disable issue limit confirmation)\n";
7050
    SetVersion($DBversion);
7051
}
7052
7047
=head1 FUNCTIONS
7053
=head1 FUNCTIONS
7048
7054
7049
=head2 TableExists($table)
7055
=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 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