yammat/Handler/Journal.hs

14 lines
352 B
Haskell
Raw Normal View History

2015-04-04 04:46:33 +00:00
module Handler.Journal where
import Import as I
import Data.List as L
import Handler.Common
getJournalR :: Handler Html
getJournalR = do
entries <- runDB $ selectList [] [Asc TransactionId]
total <- return $ L.sum $ I.map (transactionAmount . entityVal) entries
cashBalance <- getCashierBalance
defaultLayout $ do
$(widgetFile "journal")