Lines 30-35
use C4::Biblio;
Link Here
|
30 |
|
30 |
|
31 |
use Koha::Authorities; |
31 |
use Koha::Authorities; |
32 |
use Koha::Biblios; |
32 |
use Koha::Biblios; |
|
|
33 |
use Koha::Items; |
33 |
|
34 |
|
34 |
my $input = new CGI; |
35 |
my $input = new CGI; |
35 |
my $op = $input->param('op') // q|form|; |
36 |
my $op = $input->param('op') // q|form|; |
Lines 84-90
if ( $op eq 'form' ) {
Link Here
|
84 |
$biblio = $biblio->unblessed; |
85 |
$biblio = $biblio->unblessed; |
85 |
my $record = &GetMarcBiblio({ biblionumber => $record_id }); |
86 |
my $record = &GetMarcBiblio({ biblionumber => $record_id }); |
86 |
$biblio->{subtitle} = GetRecordValue( 'subtitle', $record, GetFrameworkCode( $record_id ) ); |
87 |
$biblio->{subtitle} = GetRecordValue( 'subtitle', $record, GetFrameworkCode( $record_id ) ); |
87 |
$biblio->{itemnumbers} = C4::Items::GetItemnumbersForBiblio( $record_id ); |
88 |
$biblio->{itemnumbers} = [Koha::Items->search({ biblionumber => $record_id })->get_column('itemnumber')]; |
88 |
$biblio->{holds_count} = $holds_count; |
89 |
$biblio->{holds_count} = $holds_count; |
89 |
$biblio->{issues_count} = C4::Biblio::CountItemsIssued( $record_id ); |
90 |
$biblio->{issues_count} = C4::Biblio::CountItemsIssued( $record_id ); |
90 |
push @records, $biblio; |
91 |
push @records, $biblio; |
Lines 165-171
if ( $op eq 'form' ) {
Link Here
|
165 |
} |
166 |
} |
166 |
|
167 |
|
167 |
# Delete items |
168 |
# Delete items |
168 |
my @itemnumbers = @{ C4::Items::GetItemnumbersForBiblio( $biblionumber ) }; |
169 |
my @itemnumbers = Koha::Items->search({ biblionumber => $biblionumber })->get_column('itemnumber'); |
169 |
ITEMNUMBER: for my $itemnumber ( @itemnumbers ) { |
170 |
ITEMNUMBER: for my $itemnumber ( @itemnumbers ) { |
170 |
my $error = eval { C4::Items::DelItemCheck( $biblionumber, $itemnumber ) }; |
171 |
my $error = eval { C4::Items::DelItemCheck( $biblionumber, $itemnumber ) }; |
171 |
if ( $error != 1 or $@ ) { |
172 |
if ( $error != 1 or $@ ) { |
172 |
- |
|
|