forgot currency in buy cash message

This commit is contained in:
nek0 2015-04-05 01:49:15 +02:00
parent a41a9aad2e
commit 8f6303750c

View file

@ -66,11 +66,16 @@ postBuyCashR bId = do
((res, _), _) <- runFormPost buyForm
case res of
FormSuccess quant -> do
master <- getYesod
price <- return $ quant * (beveragePrice bev + 50)
runDB $ update bId [BeverageAmount -=. quant]
updateCashier price "Barzahlung"
checkAlert bId
setMessage $ Content $ Text $ "Viel Vergnügen. Bitte Zahle " `T.append` (T.pack $ show ((fromIntegral price) / 100)) `T.append` " in die Kasse ein"
setMessage $ Content $ Text $ "Viel Vergnügen. Bitte Zahle "
`T.append` (T.pack $ show ((fromIntegral price) / 100))
`T.append` " "
`T.append` (appCurrency $ appSettings master)
`T.append` " in die Kasse ein"
redirect $ HomeR
_ -> do
setMessage "Etwas ist schief gelaufen"