Lines 52-57
use Koha::Plugins;
Link Here
|
52 |
use Koha::Database; |
52 |
use Koha::Database; |
53 |
use Koha::BiblioFrameworks; |
53 |
use Koha::BiblioFrameworks; |
54 |
use Koha::Items; |
54 |
use Koha::Items; |
|
|
55 |
use Koha::CirculationRules; |
55 |
use Koha::SearchEngine; |
56 |
use Koha::SearchEngine; |
56 |
use Koha::SearchEngine::Search; |
57 |
use Koha::SearchEngine::Search; |
57 |
use Koha::Patron::Modifications; |
58 |
use Koha::Patron::Modifications; |
Lines 482-489
if (@$barcodes && $op eq 'cud-checkout') {
Link Here
|
482 |
$template_params->{NEEDSCONFIRMATION} = 1; |
483 |
$template_params->{NEEDSCONFIRMATION} = 1; |
483 |
$confirm_required = 1; |
484 |
$confirm_required = 1; |
484 |
if ( $needsconfirmation_key eq 'BOOKED_TO_ANOTHER' ) { |
485 |
if ( $needsconfirmation_key eq 'BOOKED_TO_ANOTHER' ) { |
|
|
486 |
my $rule = Koha::CirculationRules->get_effective_rule( |
487 |
{ |
488 |
rule_name => 'bookings_lead_period', |
489 |
itemtype => $item->effective_itemtype, |
490 |
branchcode => "*" |
491 |
} |
492 |
); |
493 |
my $preparation_period = $rule ? $rule->rule_value : 1; |
485 |
my $reduceddue = |
494 |
my $reduceddue = |
486 |
dt_from_string( $$needsconfirmation{$needsconfirmation_key}->start_date )->subtract( days => 1 ); |
495 |
dt_from_string( $$needsconfirmation{$needsconfirmation_key}->start_date ) |
|
|
496 |
->subtract( days => $preparation_period ); |
487 |
$template_params->{reduceddue} = $reduceddue; |
497 |
$template_params->{reduceddue} = $reduceddue; |
488 |
} |
498 |
} |
489 |
} |
499 |
} |
490 |
- |
|
|