fixed "price" checking
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 5 Apr 2005 21:36:11 +0000 (21:36 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 5 Apr 2005 21:36:11 +0000 (21:36 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@453 dcc99617-32d9-48b4-a31d-7c20da2025e4

Evergreen/src/extras/import/import_holdings.pl

index b1e0c7f..10e8d9b 100755 (executable)
@@ -99,7 +99,9 @@ while ( $xml .= <STDIN> ) {
                $barcode =~ s/\\/\\\\/og;
                $label =~ s/\\/\\\\/og;
                $price =~ s/\$//og;
-               $price ||= '0.00';
+               if ($price !~ /^\s*\d{1,6}\.\d{2}\s*$/o) {
+                       $price = '0.00';
+               }
 
                unless (exists($$cn_map{"$rec_id/$owning_lib/$label"})) {
                        $$cn_map{"$rec_id/$owning_lib/$label"} = $cn_id;