würks
This commit is contained in:
parent
eedc5f7023
commit
2cb4a1b1c5
1 changed files with 9 additions and 9 deletions
|
@ -38,15 +38,15 @@ postPayoutR = do
|
||||||
case res of
|
case res of
|
||||||
FormSuccess payment -> do
|
FormSuccess payment -> do
|
||||||
balance <- getCashierBalance
|
balance <- getCashierBalance
|
||||||
if balance >= payment
|
if balance >= paymentAmount payment
|
||||||
then do
|
then do
|
||||||
msg <- renderMessage' $ MsgPayout $ paymentDesc payment
|
msg <- renderMessage' $ MsgPayout $ paymentDesc payment
|
||||||
updateCashier (- (paymentAmount payment)) msg
|
updateCashier (- (paymentAmount payment)) msg
|
||||||
setMessageI MsgPaidOut
|
setMessageI MsgPaidOut
|
||||||
redirect HomeR
|
redirect HomeR
|
||||||
else do
|
else do
|
||||||
setMessageI MsgNotEnoughFunds
|
setMessageI MsgNotEnoughFunds
|
||||||
redirect HomeR
|
redirect HomeR
|
||||||
_ -> do
|
_ -> do
|
||||||
setMessageI MsgNotPaidOut
|
setMessageI MsgNotPaidOut
|
||||||
redirect JournalR
|
redirect JournalR
|
||||||
|
|
Loading…
Reference in a new issue