forgot currency in buy cash message
This commit is contained in:
parent
a41a9aad2e
commit
8f6303750c
1 changed files with 6 additions and 1 deletions
|
@ -66,11 +66,16 @@ postBuyCashR bId = do
|
||||||
((res, _), _) <- runFormPost buyForm
|
((res, _), _) <- runFormPost buyForm
|
||||||
case res of
|
case res of
|
||||||
FormSuccess quant -> do
|
FormSuccess quant -> do
|
||||||
|
master <- getYesod
|
||||||
price <- return $ quant * (beveragePrice bev + 50)
|
price <- return $ quant * (beveragePrice bev + 50)
|
||||||
runDB $ update bId [BeverageAmount -=. quant]
|
runDB $ update bId [BeverageAmount -=. quant]
|
||||||
updateCashier price "Barzahlung"
|
updateCashier price "Barzahlung"
|
||||||
checkAlert bId
|
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
|
redirect $ HomeR
|
||||||
_ -> do
|
_ -> do
|
||||||
setMessage "Etwas ist schief gelaufen"
|
setMessage "Etwas ist schief gelaufen"
|
||||||
|
|
Loading…
Reference in a new issue