use C4::Auth qw(check_cookie_auth);
use C4::Biblio qw(GetMarcBiblio GetFrameworkCode GetRecordValue );
-use C4::Branch qw(GetBranchName);
use C4::Charset;
use C4::Circulation qw(GetTransfers);
use C4::Context;
use Koha::DateUtils;
use Koha::Holds;
+use Koha::Libraries;
my $input = new CGI;
$itemtype_limit = $itemtype->{translated_description};
}
+ my $libraries = Koha::Libraries->search({}, { order_by => ['branchname'] })->unblessed;
+ for my $library ( @$libraries ) {
+ $library->{selected} = 1 if $library->{branchcode} eq $h->branchcode();
+ }
my $hold = {
DT_RowId => $h->reserve_id(),
biblionumber => $biblionumber,
author => $h->biblio()->author(),
reserve_id => $h->reserve_id(),
branchcode => $h->branch()->branchname(),
+ branches => $libraries,
reservedate => $h->reservedate(),
expirationdate => $h->expirationdate(),
suspend => $h->suspend(),
$hold->{color} = 'transferred';
$hold->{transferred} = 1;
$hold->{date_sent} = output_pref( dt_from_string($transferred_when) );
- $hold->{from_branch} = GetBranchName($transferred_from);
+ $hold->{from_branch} = Koha::Libraries->find($transferred_from)->branchname;
}
elsif ( $item->holding_branch() && $item->holding_branch()->branchcode() ne
$h->branch()->branchcode() )