module Handler.Stock where import Import getStockR :: Handler Html getStockR = loginOrDo (\(uid,user) -> do items <- runDB $ selectList [TransactionUser ==. uid, TransactionInStock >. 0] [Asc TransactionTypeName] defaultLayout $ [whamlet|

Current Stock
Item name Quantity Buy Price $forall Entity _ t <- items
#{transactionTypeName t} #{transactionInStock t} #{transactionPriceCents t} |] )