Advertisement
Guest User

barcodes.pl

a guest
Feb 22nd, 2021
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.47 KB | None | 0 0
  1. use Modern::Perl;
  2. use Koha::Biblios;
  3. use Koha::Items;
  4.  
  5. my $biblios = Koha::Biblios->search;
  6. my $branchcode='ppa';
  7. while (my $biblio=$biblios->next) {
  8.  
  9.     Koha::Item->new(
  10.         {
  11.             biblionumber  => $biblio->biblionumber,
  12.             homebranch    => $branchcode,
  13.             holdingbranch => $branchcode,
  14.             barcode       => 'barcode_'.$biblio->biblionumber,
  15.             itype         => $biblio->biblioitem->itemtype
  16.         }
  17.     )->store;
  18.  
  19. }
  20.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement