Lines 42-48
use Data::Dumper;
Link Here
|
42 |
use Koha::Account; |
42 |
use Koha::Account; |
43 |
use Koha::AuthorisedValues; |
43 |
use Koha::AuthorisedValues; |
44 |
use Koha::DateUtils; |
44 |
use Koha::DateUtils; |
45 |
use Koha::Calendar; |
45 |
use Koha::DiscreteCalendar; |
46 |
use Koha::Checkouts; |
46 |
use Koha::Checkouts; |
47 |
use Koha::IssuingRules; |
47 |
use Koha::IssuingRules; |
48 |
use Koha::Items; |
48 |
use Koha::Items; |
Lines 1205-1211
sub checkHighHolds {
Link Here
|
1205 |
|
1205 |
|
1206 |
my $issuedate = DateTime->now( time_zone => C4::Context->tz() ); |
1206 |
my $issuedate = DateTime->now( time_zone => C4::Context->tz() ); |
1207 |
|
1207 |
|
1208 |
my $calendar = Koha::Calendar->new( branchcode => $branch ); |
1208 |
my $calendar = Koha::DiscreteCalendar->new( branchcode => $branch ); |
1209 |
|
1209 |
|
1210 |
my $itype = $item_object->effective_itemtype; |
1210 |
my $itype = $item_object->effective_itemtype; |
1211 |
my $orig_due = C4::Circulation::CalcDateDue( $issuedate, $itype, $branch, $borrower ); |
1211 |
my $orig_due = C4::Circulation::CalcDateDue( $issuedate, $itype, $branch, $borrower ); |
Lines 2153-2159
sub MarkIssueReturned {
Link Here
|
2153 |
my $query = 'UPDATE issues SET returndate='; |
2153 |
my $query = 'UPDATE issues SET returndate='; |
2154 |
my @bind; |
2154 |
my @bind; |
2155 |
if ($dropbox_branch) { |
2155 |
if ($dropbox_branch) { |
2156 |
my $calendar = Koha::Calendar->new( branchcode => $dropbox_branch ); |
2156 |
my $calendar = Koha::DiscreteCalendar->new( branchcode => $dropbox_branch ); |
2157 |
my $dropboxdate = $calendar->addDate( DateTime->now( time_zone => C4::Context->tz), -1 ); |
2157 |
my $dropboxdate = $calendar->addDate( DateTime->now( time_zone => C4::Context->tz), -1 ); |
2158 |
$query .= ' ? '; |
2158 |
$query .= ' ? '; |
2159 |
push @bind, $dropboxdate->strftime('%Y-%m-%d %H:%M'); |
2159 |
push @bind, $dropboxdate->strftime('%Y-%m-%d %H:%M'); |
Lines 3484-3490
sub CalcDateDue {
Link Here
|
3484 |
else { # days |
3484 |
else { # days |
3485 |
$dur = DateTime::Duration->new( days => $loanlength->{$length_key}); |
3485 |
$dur = DateTime::Duration->new( days => $loanlength->{$length_key}); |
3486 |
} |
3486 |
} |
3487 |
my $calendar = Koha::Calendar->new( branchcode => $branch ); |
3487 |
my $calendar = Koha::DiscreteCalendar->new( branchcode => $branch ); |
3488 |
$datedue = $calendar->addDate( $datedue, $dur, $loanlength->{lengthunit} ); |
3488 |
$datedue = $calendar->addDate( $datedue, $dur, $loanlength->{lengthunit} ); |
3489 |
if ($loanlength->{lengthunit} eq 'days') { |
3489 |
if ($loanlength->{lengthunit} eq 'days') { |
3490 |
$datedue->set_hour(23); |
3490 |
$datedue->set_hour(23); |