Lines 160-168
$template->param(
Link Here
|
160 |
|
160 |
|
161 |
my $itemtypes = { map { $_->{itemtype} => $_ } @{ Koha::ItemTypes->search_with_localization->unblessed } }; |
161 |
my $itemtypes = { map { $_->{itemtype} => $_ } @{ Koha::ItemTypes->search_with_localization->unblessed } }; |
162 |
|
162 |
|
163 |
my $dbh = C4::Context->dbh; |
163 |
my $all_items = $biblio->items( |
164 |
|
164 |
{}, |
165 |
my $all_items = $biblio->items; |
165 |
{ |
|
|
166 |
# FIXME A different order is expected if at least one items.serial is true |
167 |
order_by => [ |
168 |
'homebranch.branchname', |
169 |
'me.enumchron', |
170 |
\"LDAP( me.copynumber, 8, '0' )", |
171 |
-asc => 'me.dateacessioned' |
172 |
], |
173 |
join => ['homebranch'] |
174 |
} |
175 |
); |
166 |
my @items; |
176 |
my @items; |
167 |
my $patron = Koha::Patrons->find( $borrowernumber ); |
177 |
my $patron = Koha::Patrons->find( $borrowernumber ); |
168 |
while ( my $item = $all_items->next ) { |
178 |
while ( my $item = $all_items->next ) { |
Lines 351-357
foreach my $item (@items) {
Link Here
|
351 |
# FIXME The following must be Koha::Item->serial |
361 |
# FIXME The following must be Koha::Item->serial |
352 |
my $serial_item = Koha::Serial::Items->find($item->itemnumber); |
362 |
my $serial_item = Koha::Serial::Items->find($item->itemnumber); |
353 |
if ( $serial_item ) { |
363 |
if ( $serial_item ) { |
354 |
$item_info->{serial} = $serial_item->serialid; # FIXME Not returning a Koha::Object! |
364 |
$item_info->{serial} = $serial_item; |
355 |
$itemfields{publisheddate} = 1; |
365 |
$itemfields{publisheddate} = 1; |
356 |
} |
366 |
} |
357 |
|
367 |
|
Lines 425-430
foreach my $item (@items) {
Link Here
|
425 |
if ( not C4::Context->IsSuperLibrarian() |
435 |
if ( not C4::Context->IsSuperLibrarian() |
426 |
and $userenv->{branch} ne $item->homebranch ) { |
436 |
and $userenv->{branch} ne $item->homebranch ) { |
427 |
$item_info->{cannot_be_edited} = 1; |
437 |
$item_info->{cannot_be_edited} = 1; |
|
|
438 |
$item_info->{not_same_branch} = 1; |
428 |
} |
439 |
} |
429 |
} |
440 |
} |
430 |
|
441 |
|