yammat/Handler/Journal.hs

15 lines
373 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
2015-04-04 06:25:10 +00:00
master <- getYesod
2015-04-04 04:46:33 +00:00
entries <- runDB $ selectList [] [Asc TransactionId]
total <- return $ L.sum $ I.map (transactionAmount . entityVal) entries
cashBalance <- getCashierBalance
defaultLayout $ do
$(widgetFile "journal")