Lines 29-36
use C4::Charset;
Link Here
|
29 |
use C4::Circulation qw(GetTransfers); |
29 |
use C4::Circulation qw(GetTransfers); |
30 |
use C4::Context; |
30 |
use C4::Context; |
31 |
|
31 |
|
32 |
use Koha::Database; |
|
|
33 |
use Koha::DateUtils; |
32 |
use Koha::DateUtils; |
|
|
33 |
use Koha::Holds; |
34 |
|
34 |
|
35 |
my $input = new CGI; |
35 |
my $input = new CGI; |
36 |
|
36 |
|
Lines 59-65
my $sorting_column = $sort_columns[ $input->param('iSortCol_0') ]
Link Here
|
59 |
binmode STDOUT, ":encoding(UTF-8)"; |
59 |
binmode STDOUT, ":encoding(UTF-8)"; |
60 |
print $input->header( -type => 'text/plain', -charset => 'UTF-8' ); |
60 |
print $input->header( -type => 'text/plain', -charset => 'UTF-8' ); |
61 |
|
61 |
|
62 |
my $holds_rs = $schema->resultset('Reserve')->search( |
62 |
my $holds_rs = Koha::Holds->search( |
63 |
{ borrowernumber => $borrowernumber }, |
63 |
{ borrowernumber => $borrowernumber }, |
64 |
{ |
64 |
{ |
65 |
prefetch => { 'item' => 'biblio' }, |
65 |
prefetch => { 'item' => 'biblio' }, |
Lines 85-93
while ( my $h = $holds_rs->next() ) {
Link Here
|
85 |
suspend => $h->suspend(), |
85 |
suspend => $h->suspend(), |
86 |
suspend_until => $h->suspend_until(), |
86 |
suspend_until => $h->suspend_until(), |
87 |
found => $h->found(), |
87 |
found => $h->found(), |
88 |
waiting => $h->found() eq 'W', |
88 |
waiting => $h->is_waiting(), |
89 |
waiting_at => $h->branchcode()->branchname(), |
89 |
waiting_at => $h->branch()->branchname(), |
90 |
waiting_here => $h->branchcode()->branchcode() eq $branch, |
90 |
waiting_here => $h->branch()->branchcode() eq $branch, |
91 |
priority => $h->priority(), |
91 |
priority => $h->priority(), |
92 |
subtitle => GetRecordValue( |
92 |
subtitle => GetRecordValue( |
93 |
'subtitle', GetMarcBiblio($biblionumber), |
93 |
'subtitle', GetMarcBiblio($biblionumber), |
Lines 107-112
while ( my $h = $holds_rs->next() ) {
Link Here
|
107 |
: q{}, |
107 |
: q{}, |
108 |
}; |
108 |
}; |
109 |
|
109 |
|
|
|
110 |
if ( my $e = $h->waiting_expires_on() ) { |
111 |
$hold->{expirationdate} = $e->ymd(); |
112 |
$hold->{expirationdate_formatted} = output_pref( { dt => $e, dateonly => 1 }); |
113 |
} |
114 |
|
110 |
$hold->{transfered} = 0; |
115 |
$hold->{transfered} = 0; |
111 |
$hold->{not_transfered} = 0; |
116 |
$hold->{not_transfered} = 0; |
112 |
|
117 |
|
Lines 124-134
while ( my $h = $holds_rs->next() ) {
Link Here
|
124 |
$hold->{date_sent} = output_pref( dt_from_string($transferred_when) ); |
129 |
$hold->{date_sent} = output_pref( dt_from_string($transferred_when) ); |
125 |
$hold->{from_branch} = GetBranchName($transferred_from); |
130 |
$hold->{from_branch} = GetBranchName($transferred_from); |
126 |
} |
131 |
} |
127 |
elsif ( $item->holdingbranch()->branchcode() ne |
132 |
elsif ( $item->holding_branch()->branchcode() ne |
128 |
$h->branchcode()->branchcode() ) |
133 |
$h->branch()->branchcode() ) |
129 |
{ |
134 |
{ |
130 |
$hold->{not_transferred} = 1; |
135 |
$hold->{not_transferred} = 1; |
131 |
$hold->{not_transferred_by} = $h->item()->holdingbranch()->branchname(); |
136 |
$hold->{not_transferred_by} = $h->item()->holding_branch()->branchname(); |
132 |
} |
137 |
} |
133 |
} |
138 |
} |
134 |
|
139 |
|
135 |
- |
|
|