Barcode's continued part three
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.
hi Raphael don't forget to upgrade your system before running the script, if needed? Jonathan's script may not run on older Koha versions, like Koha 16.05.05 On 21/02/21 5:28 am, library@princeofpeaceabbey.org wrote:
When I tried to run barcode.pl
...
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.
The lines mentioned in the errors don't match the script you pasted. If you encounter any further errors, please share the actual barcode.pl as an attachment or via pastebin. Here is an example: https://pastebin.com/k2dGC1Wf --Ere library@princeofpeaceabbey.org kirjoitti 20.2.2021 klo 18.28:
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.
_______________________________________________
Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
-- Ere Maijala Kansalliskirjasto / The National Library of Finland
participants (3)
-
Ere Maijala -
library@princeofpeaceabbey.org -
Mason James