enable upstocking of zero crates
This commit is contained in:
parent
6d36bbbf7c
commit
5b9bcfc641
1 changed files with 1 additions and 1 deletions
|
@ -47,7 +47,7 @@ postUpstockR bId = do
|
|||
$ renderBootstrap3 BootstrapBasicForm upstockForm
|
||||
case res of
|
||||
FormSuccess c ->
|
||||
if upstockSingles c > 0 && upstockCrates c > 0
|
||||
if upstockSingles c > 0 && upstockCrates c >= 0
|
||||
then do
|
||||
let total = upstockSingles c + (upstockCrates c * (fromMaybe 0 $ beveragePerCrate bev))
|
||||
runDB $ update bId [BeverageAmount +=. total]
|
||||
|
|
Loading…
Reference in a new issue