aboutsummaryrefslogtreecommitdiffstats
path: root/tests/check.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/check.py')
-rw-r--r--tests/check.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/check.py b/tests/check.py
index 2020363..4387120 100644
--- a/tests/check.py
+++ b/tests/check.py
@@ -1059,12 +1059,15 @@ on restock {
}
}
on order {
+ let taken = 0
for l in order.lines {
- stock[l.item].left = stock[l.item].left - l.qty
- require stock[l.item].left >= 0
+ let s = stock[l.item]
+ s.left = s.left - l.qty
+ require s.left >= 0
log.append(Entry { item: l.item, qty: l.qty, note: l.note })
+ taken = taken + 1
}
- orders = orders + order.lines.count
+ orders = orders + taken
}
on clean {
for s in stock where s.left < clean.below {