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

(-)a/C4/Circulation.pm (-6 / +3 lines)
Lines 1329-1335 sub checkHighHolds { Link Here
1329
1329
1330
        my $orig_due = C4::Circulation::CalcDateDue( $issuedate, $itype, $branchcode, $borrower );
1330
        my $orig_due = C4::Circulation::CalcDateDue( $issuedate, $itype, $branchcode, $borrower );
1331
1331
1332
        my $decreaseLoanHighHoldsDuration = C4::Context->preference('decreaseLoanHighHoldsDuration');
1333
        my $rule = Koha::CirculationRules->get_effective_rule(
1332
        my $rule = Koha::CirculationRules->get_effective_rule(
1334
            {
1333
            {
1335
                categorycode => $borrower->{categorycode},
1334
                categorycode => $borrower->{categorycode},
Lines 1338-1353 sub checkHighHolds { Link Here
1338
                rule_name    => 'decreaseloanholds',
1337
                rule_name    => 'decreaseloanholds',
1339
            }
1338
            }
1340
        );
1339
        );
1341
        my $reduced_datedue;
1340
1342
        my $duration;
1341
        my $duration;
1343
        if ( defined($rule) && $rule->rule_value ne '' ){
1342
        if ( defined($rule) && $rule->rule_value ne '' ){
1344
            # overrides decreaseLoanHighHoldsDuration syspref
1343
            # overrides decreaseLoanHighHoldsDuration syspref
1345
            $duration = $rule->rule_value;
1344
            $duration = $rule->rule_value;
1346
            $reduced_datedue = $calendar->addDate( $issuedate, $rule->rule_value );
1347
        } else {
1345
        } else {
1348
            $duration = $decreaseLoanHighHoldsDuration;
1346
            $duration = C4::Context->preference('decreaseLoanHighHoldsDuration');
1349
            $reduced_datedue = $calendar->addDate( $issuedate, $decreaseLoanHighHoldsDuration );
1350
        }
1347
        }
1348
        my $reduced_datedue = $calendar->addDate( $issuedate, $duration );
1351
        $reduced_datedue->set_hour($orig_due->hour);
1349
        $reduced_datedue->set_hour($orig_due->hour);
1352
        $reduced_datedue->set_minute($orig_due->minute);
1350
        $reduced_datedue->set_minute($orig_due->minute);
1353
        $reduced_datedue->truncate( to => 'minute' );
1351
        $reduced_datedue->truncate( to => 'minute' );
1354
- 

Return to bug 14866