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
|
module Control.Buy where
|
||||||
|
|
||||||
import Control.Monad (void, foldM)
|
import Control.Monad (void, foldM)
|
||||||
|
@ -48,7 +49,13 @@ buy auth pds = do
|
||||||
else PurchaseOK
|
else PurchaseOK
|
||||||
)
|
)
|
||||||
missing
|
missing
|
||||||
Nothing ->
|
Nothing -> do
|
||||||
|
void $ insertNewJournalEntry
|
||||||
|
(JournalSubmit
|
||||||
|
("Cash purchase")
|
||||||
|
price
|
||||||
|
)
|
||||||
|
conn
|
||||||
return $ PurchaseResult
|
return $ PurchaseResult
|
||||||
(PayAmount price)
|
(PayAmount price)
|
||||||
missing
|
missing
|
||||||
|
|
Loading…
Reference in a new issue