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 83-89
if ( $op eq 'form' ) {
Link Here
|
83 |
$biblio = $biblio->unblessed; |
84 |
$biblio = $biblio->unblessed; |
84 |
my $record = &GetMarcBiblio({ biblionumber => $record_id }); |
85 |
my $record = &GetMarcBiblio({ biblionumber => $record_id }); |
85 |
$biblio->{subtitle} = GetRecordValue( 'subtitle', $record, GetFrameworkCode( $record_id ) ); |
86 |
$biblio->{subtitle} = GetRecordValue( 'subtitle', $record, GetFrameworkCode( $record_id ) ); |
86 |
$biblio->{itemnumbers} = C4::Items::GetItemnumbersForBiblio( $record_id ); |
87 |
$biblio->{itemnumbers} = [Koha::Items->search({ biblionumber => $record_id })->get_column('itemnumber')]; |
87 |
$biblio->{holds_count} = $holds_count; |
88 |
$biblio->{holds_count} = $holds_count; |
88 |
$biblio->{issues_count} = C4::Biblio::CountItemsIssued( $record_id ); |
89 |
$biblio->{issues_count} = C4::Biblio::CountItemsIssued( $record_id ); |
89 |
push @records, $biblio; |
90 |
push @records, $biblio; |
Lines 164-170
if ( $op eq 'form' ) {
Link Here
|
164 |
} |
165 |
} |
165 |
|
166 |
|
166 |
# Delete items |
167 |
# Delete items |
167 |
my @itemnumbers = @{ C4::Items::GetItemnumbersForBiblio( $biblionumber ) }; |
168 |
my @itemnumbers = Koha::Items->search({ biblionumber => $biblionumber })->get_column('itemnumber'); |
168 |
ITEMNUMBER: for my $itemnumber ( @itemnumbers ) { |
169 |
ITEMNUMBER: for my $itemnumber ( @itemnumbers ) { |
169 |
my $error = eval { C4::Items::DelItemCheck( $biblionumber, $itemnumber ) }; |
170 |
my $error = eval { C4::Items::DelItemCheck( $biblionumber, $itemnumber ) }; |
170 |
if ( $error != 1 or $@ ) { |
171 |
if ( $error != 1 or $@ ) { |
171 |
- |
|
|