Initial commit
authorJames, Mason <mtj@kohaaloha.com>
Thu, 23 Jun 2011 03:18:08 +0000 (15:18 +1200)
committerJames, Mason <mtj@kohaaloha.com>
Thu, 23 Jun 2011 03:18:08 +0000 (15:18 +1200)
new file:   mod_cutter.pl

mod_cutter.pl [new file with mode: 0755]

diff --git a/mod_cutter.pl b/mod_cutter.pl
new file mode 100755 (executable)
index 0000000..5bc64ea
--- /dev/null
@@ -0,0 +1,26 @@
+#!/usr/bin/perl
+use strict;
+
+use C4::Context;
+use C4::Items;
+
+my $dbh = C4::Context->dbh();
+
+my $q   = qq|select * from  items where homebranch = 'LORIEN'|;
+my $sth = $dbh->prepare($q);
+$sth->execute();
+
+while ( my $rec = $sth->fetchrow_hashref() ) {
+    my $call   = $rec->{'itemcallnumber'};
+    my $cutter = $rec->{'materials'};
+    $call = $call . ' ' . $cutter;
+    ModItem(
+        {   itemcallnumber => $call,
+            materials      => undef
+        },
+
+        $rec->{'biblionumber'},
+        $rec->{'itemnumber'}
+    );
+}
+