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 qw( dt_from_string output_pref ); |
29 |
use Koha::DateUtils qw( dt_from_string output_pref ); |
Lines 139-151
while ( my $h = $holds_rs->next() ) {
Link Here
|
139 |
$hold->{enumchron} = $item->enumchron(); |
138 |
$hold->{enumchron} = $item->enumchron(); |
140 |
$hold->{itemcallnumber} = $item->itemcallnumber() || q{}; |
139 |
$hold->{itemcallnumber} = $item->itemcallnumber() || q{}; |
141 |
|
140 |
|
142 |
my ( $transferred_when, $transferred_from, $transferred_to ) = |
141 |
my $transfer = $item->get_transfer; |
143 |
GetTransfers( $item->itemnumber() ); |
142 |
if ( $transfer && $transfer->in_transit ) { |
144 |
if ($transferred_when) { |
|
|
145 |
$hold->{color} = 'transferred'; |
143 |
$hold->{color} = 'transferred'; |
146 |
$hold->{transferred} = 1; |
144 |
$hold->{transferred} = 1; |
147 |
$hold->{date_sent} = output_pref( dt_from_string($transferred_when) ); |
145 |
$hold->{date_sent} = output_pref({ dt => dt_from_string($transfer->datesent) }); |
148 |
$hold->{from_branch} = Koha::Libraries->find($transferred_from)->branchname; |
146 |
$hold->{from_branch} = Koha::Libraries->find($transfer->frombranch)->branchname; |
149 |
} |
147 |
} |
150 |
elsif ( $item->holding_branch() && $item->holding_branch()->branchcode() ne |
148 |
elsif ( $item->holding_branch() && $item->holding_branch()->branchcode() ne |
151 |
$h->branch()->branchcode() ) |
149 |
$h->branch()->branchcode() ) |
152 |
- |
|
|