diff --git a/src/Control/Buy.hs b/src/Control/Buy.hs index de76176..6f4a5e9 100644 --- a/src/Control/Buy.hs +++ b/src/Control/Buy.hs @@ -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