Jonathan Druart
bbb504c86f
Starting to replace the ModItem calls with Koha::Item->store Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
19 lines
492 B
Perl
Executable file
19 lines
492 B
Perl
Executable file
#!/usr/bin/perl
|
|
|
|
use Modern::Perl;
|
|
use Koha::Script;
|
|
use Koha::Items;
|
|
#
|
|
# the items.onloan field did not exist in koha 2.2
|
|
# in koha 3.0, it's used to define item availability
|
|
# this script takes the items.onloan field
|
|
# and put it in the MARC::Record of the item
|
|
#
|
|
|
|
my $items = Koha::Items->({ onloan => { '!=' => undef } });
|
|
|
|
$|=1;
|
|
while ( my $item = $items->next ) {
|
|
$item->store;
|
|
print sprintf "Onloan : %s for %s / %s\n", $item->onloan, $item->biblionumber, $item->itemnumber;
|
|
}
|