Lines 43-49
use Koha::Account;
Link Here
|
43 |
use Koha::AuthorisedValues; |
43 |
use Koha::AuthorisedValues; |
44 |
use Koha::Biblioitems; |
44 |
use Koha::Biblioitems; |
45 |
use Koha::DateUtils; |
45 |
use Koha::DateUtils; |
46 |
use Koha::Calendar; |
46 |
use Koha::DiscreteCalendar; |
47 |
use Koha::Checkouts; |
47 |
use Koha::Checkouts; |
48 |
use Koha::IssuingRules; |
48 |
use Koha::IssuingRules; |
49 |
use Koha::Items; |
49 |
use Koha::Items; |
Lines 1213-1219
sub checkHighHolds {
Link Here
|
1213 |
|
1213 |
|
1214 |
my $issuedate = DateTime->now( time_zone => C4::Context->tz() ); |
1214 |
my $issuedate = DateTime->now( time_zone => C4::Context->tz() ); |
1215 |
|
1215 |
|
1216 |
my $calendar = Koha::Calendar->new( branchcode => $branch ); |
1216 |
my $calendar = Koha::DiscreteCalendar->new( branchcode => $branch ); |
1217 |
|
1217 |
|
1218 |
my $itype = $item_object->effective_itemtype; |
1218 |
my $itype = $item_object->effective_itemtype; |
1219 |
my $orig_due = C4::Circulation::CalcDateDue( $issuedate, $itype, $branch, $borrower ); |
1219 |
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 3478-3484
sub CalcDateDue {
Link Here
|
3478 |
else { # days |
3478 |
else { # days |
3479 |
$dur = DateTime::Duration->new( days => $loanlength->{$length_key}); |
3479 |
$dur = DateTime::Duration->new( days => $loanlength->{$length_key}); |
3480 |
} |
3480 |
} |
3481 |
my $calendar = Koha::Calendar->new( branchcode => $branch ); |
3481 |
my $calendar = Koha::DiscreteCalendar->new( branchcode => $branch ); |
3482 |
$datedue = $calendar->addDate( $datedue, $dur, $loanlength->{lengthunit} ); |
3482 |
$datedue = $calendar->addDate( $datedue, $dur, $loanlength->{lengthunit} ); |
3483 |
if ($loanlength->{lengthunit} eq 'days') { |
3483 |
if ($loanlength->{lengthunit} eq 'days') { |
3484 |
$datedue->set_hour(23); |
3484 |
$datedue->set_hour(23); |