summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2017-05-04 23:18:39 (GMT)
committerWerner Almesberger <werner@almesberger.net>2017-05-04 23:18:39 (GMT)
commitd0cdd7924b0984e82b9282b4f7fd91094ea8ca61 (patch)
tree96c93a8ff1313708fa4879b6a37e7b4857710d40
parente82617f5a9cae54c9984b2ee19e81e4d32527e08 (diff)
downloadmisc-d0cdd7924b0984e82b9282b4f7fd91094ea8ca61.zip
misc-d0cdd7924b0984e82b9282b4f7fd91094ea8ca61.tar.gz
misc-d0cdd7924b0984e82b9282b4f7fd91094ea8ca61.tar.bz2
bom/calc.pl (part): fix reporting of insufficient stock
-rwxr-xr-xbom/calc.pl5
1 files changed, 2 insertions, 3 deletions
diff --git a/bom/calc.pl b/bom/calc.pl
index 5fc526e..e7286f2 100755
--- a/bom/calc.pl
+++ b/bom/calc.pl
@@ -158,9 +158,8 @@ sub part
return;
}
- if (!$found) {
- my $want = $qty * $units;
-
+ my $want = $qty * $units;
+ if ($found && $avail < $want) {
warn "want $want $src $name, known stock may be $avail\n";
$missing = 1;
}