singles should be able to be zero.
This commit is contained in:
parent
1cb116ea4f
commit
52804ce9ce
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