singles should be able to be zero.

This commit is contained in:
nek0 2016-02-05 11:15:57 +01:00
parent 1cb116ea4f
commit 52804ce9ce
1 changed files with 1 additions and 1 deletions

View File

@ -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]