From 52804ce9ce88c7107854b95b46ae2e033c953d46 Mon Sep 17 00:00:00 2001 From: nek0 Date: Fri, 5 Feb 2016 11:15:57 +0100 Subject: [PATCH] singles should be able to be zero. --- Handler/Restock.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Handler/Restock.hs b/Handler/Restock.hs index bd18ecf..8b35aee 100644 --- a/Handler/Restock.hs +++ b/Handler/Restock.hs @@ -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]