|
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 131-136
unless ( $logged_in_user->has_permission( { parameters => 'manage_background_job
Link Here
|
| 131 |
$template->param( |
132 |
$template->param( |
| 132 |
holds_with_cancellation_requests => Koha::Holds->waiting->filter_by_has_cancellation_requests->count ); |
133 |
holds_with_cancellation_requests => Koha::Holds->waiting->filter_by_has_cancellation_requests->count ); |
| 133 |
|
134 |
|
|
|
135 |
my $holds_to_pull_start_date = C4::Context->preference('HoldsToPullStartDate') || 2; |
| 136 |
my $reserves_to_pull_from = dt_from_string()->subtract( days => $holds_to_pull_start_date ); |
| 137 |
|
| 138 |
my $holds_to_pull = Koha::Holds->search( |
| 139 |
{ |
| 140 |
found => undef, |
| 141 |
reservedate => { '>=' => $reserves_to_pull_from->ymd() } |
| 142 |
} |
| 143 |
)->count; |
| 144 |
|
| 145 |
#get local holds to pull by looking for holds with an item homebranch that matches the loggedinuser's location |
| 146 |
my $local_holds_to_pull = Koha::Holds->search( |
| 147 |
{ |
| 148 |
'me.found' => undef, |
| 149 |
'item.homebranch' => C4::Context->userenv()->{'branch'}, |
| 150 |
'me.reservedate' => { '>=' => $reserves_to_pull_from->ymd() } |
| 151 |
}, |
| 152 |
{ join => 'item' } |
| 153 |
)->count; |
| 154 |
|
| 134 |
if ( C4::Context->preference('CurbsidePickup') ) { |
155 |
if ( C4::Context->preference('CurbsidePickup') ) { |
| 135 |
$template->param( |
156 |
$template->param( |
| 136 |
new_curbside_pickups => Koha::CurbsidePickups->search( |
157 |
new_curbside_pickups => Koha::CurbsidePickups->search( |
|
Lines 160-165
$template->param(
Link Here
|
| 160 |
pending_discharge_requests => $pending_discharge_requests, |
181 |
pending_discharge_requests => $pending_discharge_requests, |
| 161 |
pending_article_requests => $pending_article_requests, |
182 |
pending_article_requests => $pending_article_requests, |
| 162 |
pending_problem_reports => $pending_problem_reports, |
183 |
pending_problem_reports => $pending_problem_reports, |
|
|
184 |
holds_to_pull => $holds_to_pull, |
| 185 |
local_holds_to_pull => $local_holds_to_pull, |
| 163 |
); |
186 |
); |
| 164 |
|
187 |
|
| 165 |
output_html_with_http_headers $query, $cookie, $template->output; |
188 |
output_html_with_http_headers $query, $cookie, $template->output; |
| 166 |
- |
|
|