add journal on cash purchase
This commit is contained in:
parent
f10a729a22
commit
3a529f4071
1 changed files with 8 additions and 1 deletions
|
@ -1,3 +1,4 @@
|
|||
{-# LANGUAGE OverloadedStrings #-}
|
||||
module Control.Buy where
|
||||
|
||||
import Control.Monad (void, foldM)
|
||||
|
@ -48,7 +49,13 @@ buy auth pds = do
|
|||
else PurchaseOK
|
||||
)
|
||||
missing
|
||||
Nothing ->
|
||||
Nothing -> do
|
||||
void $ insertNewJournalEntry
|
||||
(JournalSubmit
|
||||
("Cash purchase")
|
||||
price
|
||||
)
|
||||
conn
|
||||
return $ PurchaseResult
|
||||
(PayAmount price)
|
||||
missing
|
||||
|
|
Loading…
Reference in a new issue