|
Lines 24-30
use CGI qw ( -utf8 );
Link Here
|
| 24 |
use C4::Output qw( output_html_with_http_headers ); |
24 |
use C4::Output qw( output_html_with_http_headers ); |
| 25 |
use C4::Auth qw( get_template_and_user ); |
25 |
use C4::Auth qw( get_template_and_user ); |
| 26 |
use C4::Koha; |
26 |
use C4::Koha; |
| 27 |
use C4::Tags qw( get_count_by_tag_status ); |
27 |
use C4::Tags qw( get_count_by_tag_status ); |
|
|
28 |
use Koha::DateUtils qw( dt_from_string ); |
| 28 |
use Koha::AdditionalContents; |
29 |
use Koha::AdditionalContents; |
| 29 |
use Koha::Patron::Modifications; |
30 |
use Koha::Patron::Modifications; |
| 30 |
use Koha::Patron::Discharge; |
31 |
use Koha::Patron::Discharge; |
|
Lines 133-138
unless ( $logged_in_user->has_permission( { parameters => 'manage_background_job
Link Here
|
| 133 |
$template->param( |
134 |
$template->param( |
| 134 |
holds_with_cancellation_requests => Koha::Holds->waiting->filter_by_has_cancellation_requests->count ); |
135 |
holds_with_cancellation_requests => Koha::Holds->waiting->filter_by_has_cancellation_requests->count ); |
| 135 |
|
136 |
|
|
|
137 |
my $holds_to_pull_start_date = C4::Context->preference('HoldsToPullStartDate') || 2; |
| 138 |
my $reserves_to_pull_from = dt_from_string()->subtract( days => $holds_to_pull_start_date ); |
| 139 |
|
| 140 |
my $holds_to_pull = Koha::Holds->search( |
| 141 |
{ |
| 142 |
found => undef, |
| 143 |
reservedate => { '>=' => $reserves_to_pull_from->ymd() } |
| 144 |
} |
| 145 |
)->count; |
| 146 |
|
| 147 |
#get local holds to pull by looking for holds with an item homebranch that matches the loggedinuser's location |
| 148 |
my $local_holds_to_pull = Koha::Holds->search( |
| 149 |
{ |
| 150 |
'me.found' => undef, |
| 151 |
'item.homebranch' => C4::Context->userenv()->{'branch'}, |
| 152 |
'me.reservedate' => { '>=' => $reserves_to_pull_from->ymd() } |
| 153 |
}, |
| 154 |
{ join => 'item' } |
| 155 |
)->count; |
| 156 |
|
| 136 |
if ( C4::Context->preference('CurbsidePickup') ) { |
157 |
if ( C4::Context->preference('CurbsidePickup') ) { |
| 137 |
$template->param( |
158 |
$template->param( |
| 138 |
new_curbside_pickups => Koha::CurbsidePickups->search( |
159 |
new_curbside_pickups => Koha::CurbsidePickups->search( |
|
Lines 163-168
$template->param(
Link Here
|
| 163 |
pending_discharge_requests => $pending_discharge_requests, |
184 |
pending_discharge_requests => $pending_discharge_requests, |
| 164 |
pending_article_requests => $pending_article_requests, |
185 |
pending_article_requests => $pending_article_requests, |
| 165 |
pending_problem_reports => $pending_problem_reports, |
186 |
pending_problem_reports => $pending_problem_reports, |
|
|
187 |
holds_to_pull => $holds_to_pull, |
| 188 |
local_holds_to_pull => $local_holds_to_pull, |
| 166 |
); |
189 |
); |
| 167 |
|
190 |
|
| 168 |
output_html_with_http_headers $query, $cookie, $template->output; |
191 |
output_html_with_http_headers $query, $cookie, $template->output; |
| 169 |
- |
|
|