Lines 311-317
sub GetWaitingHolds {
Link Here
|
311 |
|
311 |
|
312 |
my $patron_branchcode_filter = $patron_branchcode ? "AND borrowers.branchcode = '$patron_branchcode'" : q{}; |
312 |
my $patron_branchcode_filter = $patron_branchcode ? "AND borrowers.branchcode = '$patron_branchcode'" : q{}; |
313 |
|
313 |
|
314 |
my $query = "SELECT borrowers.borrowernumber, borrowers.cardnumber, borrowers.title as patron_title, borrowers.firstname, borrowers.surname, |
314 |
my $query = "SELECT borrowers.borrowernumber, borrowers.cardnumber, borrowers.title as patron_title, borrowers.firstname, borrowers.surname, borrowers.categorycode, |
315 |
borrowers.phone, borrowers.email, borrowers.branchcode, biblio.biblionumber, biblio.title, items.barcode, reserves.waitingdate, |
315 |
borrowers.phone, borrowers.email, borrowers.branchcode, biblio.biblionumber, biblio.title, items.barcode, reserves.waitingdate, |
316 |
reserves.branchcode AS site, branches.branchname AS site_name, |
316 |
reserves.branchcode AS site, branches.branchname AS site_name, |
317 |
TO_DAYS(NOW())-TO_DAYS(reserves.waitingdate) AS days_since_waiting |
317 |
TO_DAYS(NOW())-TO_DAYS(reserves.waitingdate) AS days_since_waiting |
Lines 332-338
sub GetWaitingHolds {
Link Here
|
332 |
$sth->execute(); |
332 |
$sth->execute(); |
333 |
my @results; |
333 |
my @results; |
334 |
while ( my $issue = $sth->fetchrow_hashref() ) { |
334 |
while ( my $issue = $sth->fetchrow_hashref() ) { |
335 |
my $calendar = Koha::Calendar->new( branchcode => $issue->{'site'} ); |
335 |
my $item = Koha::Items->find({ barcode => $issue->{barcode} }); |
|
|
336 |
my $useDaysMode_value = Koha::CirculationRules->get_useDaysMode_effective_value( |
337 |
{ |
338 |
categorycode => $issue->{categorycode}, |
339 |
itemtype => $item->effective_itemtype, |
340 |
branchcode => $issue->{site}, |
341 |
} |
342 |
); |
343 |
|
344 |
my $calendar = Koha::Calendar->new( branchcode => $issue->{'site'}, days_mode => $useDaysMode_value ); |
336 |
|
345 |
|
337 |
my $waiting_date = dt_from_string( $issue->{waitingdate}, 'sql' ); |
346 |
my $waiting_date = dt_from_string( $issue->{waitingdate}, 'sql' ); |
338 |
my $pickup_date = $waiting_date->clone->add( days => $pickupdelay ); |
347 |
my $pickup_date = $waiting_date->clone->add( days => $pickupdelay ); |
339 |
- |
|
|