add journal on cash purchase

This commit is contained in:
nek0 2019-12-26 21:36:06 +01:00
parent f10a729a22
commit 3a529f4071

View file

@ -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