Lines 24-30
use JSON qw(to_json);
Link Here
|
24 |
|
24 |
|
25 |
use C4::Auth qw(check_cookie_auth); |
25 |
use C4::Auth qw(check_cookie_auth); |
26 |
use C4::Charset; |
26 |
use C4::Charset; |
27 |
use C4::Circulation qw(GetTransfers); |
|
|
28 |
use C4::Context; |
27 |
use C4::Context; |
29 |
|
28 |
|
30 |
use Koha::DateUtils; |
29 |
use Koha::DateUtils; |
Lines 138-150
while ( my $h = $holds_rs->next() ) {
Link Here
|
138 |
$hold->{enumchron} = $item->enumchron(); |
137 |
$hold->{enumchron} = $item->enumchron(); |
139 |
$hold->{itemcallnumber} = $item->itemcallnumber() || q{}; |
138 |
$hold->{itemcallnumber} = $item->itemcallnumber() || q{}; |
140 |
|
139 |
|
141 |
my ( $transferred_when, $transferred_from, $transferred_to ) = |
140 |
my $transfer = $item->get_transfer; |
142 |
GetTransfers( $item->itemnumber() ); |
141 |
if ( $transfer->in_transit ) { |
143 |
if ($transferred_when) { |
|
|
144 |
$hold->{color} = 'transferred'; |
142 |
$hold->{color} = 'transferred'; |
145 |
$hold->{transferred} = 1; |
143 |
$hold->{transferred} = 1; |
146 |
$hold->{date_sent} = output_pref( dt_from_string($transferred_when) ); |
144 |
$hold->{date_sent} = output_pref({ dt => dt_from_string($transfer->datesent) }); |
147 |
$hold->{from_branch} = Koha::Libraries->find($transferred_from)->branchname; |
145 |
$hold->{from_branch} = Koha::Libraries->find($transfer->frombranch)->branchname; |
148 |
} |
146 |
} |
149 |
elsif ( $item->holding_branch() && $item->holding_branch()->branchcode() ne |
147 |
elsif ( $item->holding_branch() && $item->holding_branch()->branchcode() ne |
150 |
$h->branch()->branchcode() ) |
148 |
$h->branch()->branchcode() ) |
151 |
- |
|
|