projects
/
ferlib2koha.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
convert barcodes back for lookups to work
[ferlib2koha.git]
/
ferlib2koha.pl
diff --git
a/ferlib2koha.pl
b/ferlib2koha.pl
index
a3abc3b
..
9a9529a
100755
(executable)
--- a/
ferlib2koha.pl
+++ b/
ferlib2koha.pl
@@
-56,7
+56,7
@@
sub insert {
);
foreach my $c ( grep { /(date|timestamp)/ } keys %$row ) {
);
foreach my $c ( grep { /(date|timestamp)/ } keys %$row ) {
- $row->{$c} =~ s/^(\d\d)\.(\d\d)\.(\d\d\d\d)/$3-$2-$1/
;
+ $row->{$c} =~ s/^(\d\d)\.(\d\d)\.(\d\d\d\d)/$3-$2-$1/
or $row->{$c} = undef; # XXX NULL dates istead of 0000-00-00
}
$insert->{$table}->execute( values %$row );
}
$insert->{$table}->execute( values %$row );
@@
-196,6
+196,8
@@
warn "# BorrowersTitles [$BorrowersTitles]";
} # import->{borrowers}
} # import->{borrowers}
+$k->do(qq{ update items set barcode=substr(barcode,1,12)*1 where length(barcode) = 13 }); # convert barcodes back for lookups to work
+
sub issues {
my ($table,$sql) = @_;
my $sth = $f->prepare($sql);
sub issues {
my ($table,$sql) = @_;
my $sth = $f->prepare($sql);