[Bug 13870] Add warnings about subscriptions and orders when deleting items
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13870 --- Comment #13 from Fridolin Somers <fridolin.somers@biblibre.com> --- Yop : for my $item ( $biblio->items->as_list, $biblio->host_items->as_list ) { my $i = $item->columns_to_str; $i->{nomod} = 1 unless $patron->can_edit_items_from( $item->homebranch ); + my $i_order = GetOrderFromItemnumber( $i->{itemnumber} ); + my $i_serialid = Koha::Serial::Items->find( { itemnumber => $i->{itemnumber} }, { prefetch => 'serialid' } ); + if ($i_order) { + $warning_messages{ $i->{itemnumber} } = + sprintf( 'There is an order (ordernumber %s) on this item', $i_order->{ordernumber} ); + } + if ($i_serialid) { + $warning_messages{ $i->{itemnumber} } = 'A subscription is linked to this item'; + } + $i->{nomod} = 1 unless $patron->can_edit_items_from( $item->homebranch ); push @items, $i; } This ends with twice the same line "$i->{nomod} = 1 unless ..." no ? -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org