Lines 38-43
use C4::Branch qw( GetBranchDetail );
Link Here
|
38 |
use C4::Dates qw( format_date_in_iso ); |
38 |
use C4::Dates qw( format_date_in_iso ); |
39 |
|
39 |
|
40 |
use Koha::DateUtils; |
40 |
use Koha::DateUtils; |
|
|
41 |
use Koha::Calendar; |
42 |
|
43 |
use DateTime; |
41 |
|
44 |
|
42 |
use List::MoreUtils qw( firstidx ); |
45 |
use List::MoreUtils qw( firstidx ); |
43 |
|
46 |
|
Lines 132-137
BEGIN {
Link Here
|
132 |
&ToggleSuspend |
135 |
&ToggleSuspend |
133 |
&SuspendAll |
136 |
&SuspendAll |
134 |
|
137 |
|
|
|
138 |
&_reserve_last_pickup_date |
139 |
|
135 |
&GetReservesControlBranch |
140 |
&GetReservesControlBranch |
136 |
); |
141 |
); |
137 |
@EXPORT_OK = qw( MergeHolds ); |
142 |
@EXPORT_OK = qw( MergeHolds ); |
Lines 1815-1820
sub _Findgroupreserve {
Link Here
|
1815 |
return @results; |
1820 |
return @results; |
1816 |
} |
1821 |
} |
1817 |
|
1822 |
|
|
|
1823 |
=head2 _reserve_last_pickup_date |
1824 |
|
1825 |
my $last_dt = _reserve_last_pickup_date($reserve); |
1826 |
|
1827 |
Returns the DateTime for the last pickup date for reserve. |
1828 |
|
1829 |
=cut |
1830 |
|
1831 |
sub _reserve_last_pickup_date { |
1832 |
my ($reserve) = @_; |
1833 |
|
1834 |
my $startdate = $reserve->{waitingdate} ? dt_from_string($reserve->{waitingdate}) : DateTime->now( time_zone => C4::Context->tz() ); |
1835 |
my $calendar = Koha::Calendar->new( branchcode => $reserve->{branchcode} ); |
1836 |
my $expiration = $calendar->days_forward( $startdate, C4::Context->preference('ReservesMaxPickUpDelay') ); |
1837 |
|
1838 |
return $expiration; |
1839 |
} |
1840 |
|
1818 |
=head2 _koha_notify_reserve |
1841 |
=head2 _koha_notify_reserve |
1819 |
|
1842 |
|
1820 |
_koha_notify_reserve( $itemnumber, $borrowernumber, $biblionumber, $reserve_id ); |
1843 |
_koha_notify_reserve( $itemnumber, $borrowernumber, $biblionumber, $reserve_id ); |