|
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 1211-1217
sub checkHighHolds {
Link Here
|
| 1211 |
|
1211 |
|
| 1212 |
my $issuedate = DateTime->now( time_zone => C4::Context->tz() ); |
1212 |
my $issuedate = DateTime->now( time_zone => C4::Context->tz() ); |
| 1213 |
|
1213 |
|
| 1214 |
my $calendar = Koha::Calendar->new( branchcode => $branch ); |
1214 |
my $calendar = Koha::DiscreteCalendar->new( branchcode => $branch ); |
| 1215 |
|
1215 |
|
| 1216 |
my $itype = $item_object->effective_itemtype; |
1216 |
my $itype = $item_object->effective_itemtype; |
| 1217 |
my $orig_due = C4::Circulation::CalcDateDue( $issuedate, $itype, $branch, $borrower ); |
1217 |
my $orig_due = C4::Circulation::CalcDateDue( $issuedate, $itype, $branch, $borrower ); |
|
Lines 2151-2157
sub MarkIssueReturned {
Link Here
|
| 2151 |
my $query = 'UPDATE issues SET returndate='; |
2151 |
my $query = 'UPDATE issues SET returndate='; |
| 2152 |
my @bind; |
2152 |
my @bind; |
| 2153 |
if ($dropbox_branch) { |
2153 |
if ($dropbox_branch) { |
| 2154 |
my $calendar = Koha::Calendar->new( branchcode => $dropbox_branch ); |
2154 |
my $calendar = Koha::DiscreteCalendar->new( branchcode => $dropbox_branch ); |
| 2155 |
my $dropboxdate = $calendar->addDate( DateTime->now( time_zone => C4::Context->tz), -1 ); |
2155 |
my $dropboxdate = $calendar->addDate( DateTime->now( time_zone => C4::Context->tz), -1 ); |
| 2156 |
$query .= ' ? '; |
2156 |
$query .= ' ? '; |
| 2157 |
push @bind, $dropboxdate->strftime('%Y-%m-%d %H:%M'); |
2157 |
push @bind, $dropboxdate->strftime('%Y-%m-%d %H:%M'); |
|
Lines 3474-3480
sub CalcDateDue {
Link Here
|
| 3474 |
else { # days |
3474 |
else { # days |
| 3475 |
$dur = DateTime::Duration->new( days => $loanlength->{$length_key}); |
3475 |
$dur = DateTime::Duration->new( days => $loanlength->{$length_key}); |
| 3476 |
} |
3476 |
} |
| 3477 |
my $calendar = Koha::Calendar->new( branchcode => $branch ); |
3477 |
my $calendar = Koha::DiscreteCalendar->new( branchcode => $branch ); |
| 3478 |
$datedue = $calendar->addDate( $datedue, $dur, $loanlength->{lengthunit} ); |
3478 |
$datedue = $calendar->addDate( $datedue, $dur, $loanlength->{lengthunit} ); |
| 3479 |
if ($loanlength->{lengthunit} eq 'days') { |
3479 |
if ($loanlength->{lengthunit} eq 'days') { |
| 3480 |
$datedue->set_hour(23); |
3480 |
$datedue->set_hour(23); |