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|
Item name | Quantity | Buy Price $forall Entity _ t <- items |
---|---|---|
#{transactionTypeName t} | #{transactionInStock t} | #{transactionPriceCents t} |] ) |