[Koha] Barcode's continued part three

library at princeofpeaceabbey.org library at princeofpeaceabbey.org
Sun Feb 21 05:28:43 NZDT 2021


When I tried to run barcode.pl


use Modern::Perl;
use Koha::Biblios;
use Koha::Items;

my $biblios = Koha::Biblios->search;
my $branchcode='ppa';
while (my $biblio=$biblios->next) {

	Koha::Item->new(
		  {
				biblionumber  =>$biblio->biblionumber,
				homebranch    =>$branchcode,
				holdingbranch =>$branchcode,
				barcode	=>'barcode_'.$biblio->biblionumber,
				itype =>$biblio->biblioitem->itemtype,
		  }
		)->store;

}





This is the error messages that I got:

No method biblioitem! at barcode.pl line 8

Can't call method "itemtype" on an undefined value at barcode.pl line 10

Any help will be nice.




More information about the Koha mailing list