Skip to content

Commit

Permalink
Ignore bad bar codes from SLS
Browse files Browse the repository at this point in the history
  • Loading branch information
jimwins committed Jun 30, 2015
1 parent f32a6ae commit 56ea1db
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions api/vendor-upload.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,12 @@
$r= $db->query($q)
or die_query($db, $q);

// toss bad barcodes
$q= "UPDATE macitem SET barcode = NULL WHERE LENGTH(barcode) < 3";

$r= $db->query($q)
or die_query($db, $q);

} elseif (preg_match('/^ma-sku/i', $_FILES['src']['name'])) {
$q= "CREATE TEMPORARY TABLE macitem (
item_no VARCHAR(32),
Expand Down

0 comments on commit 56ea1db

Please sign in to comment.