Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module allows to convert the final ledgers generated by Accounting into strings for display.
This module is ditry and work in progress. Look at the source to use it
- writeHtml :: FilePath -> World -> IO ()
- toHtmlTable :: FullLedger -> Html
- monthClass :: [Char] -> ADate -> Attribute
- rowHtml :: Show a => [FullAccountName] -> (DecimalRaw Integer -> String) -> String -> (a, Row (DecimalRaw Integer)) -> MarkupM ()
- logHtml :: [FullAccountName] -> ADate -> Int -> EntityLogEntry -> Html
- css :: AttributeValue -> Html
- js :: AttributeValue -> Html
- indexPage :: MarkupM () -> BL.ByteString
- toVar :: (Monoid a, IsString a) => a -> a -> a
- scale :: DecimalRaw Integer -> DecimalRaw Integer
- transactionRow :: (AccountNumber, AccountNumber) -> Tx -> (Row Amount, Comment)
- type Row e = [e]
- type Group e = [Row e]
- type Scale b = Amount -> b
- renderTable :: [Group String] -> String
- toRow :: (r -> e) -> (a -> e) -> (r, Row a) -> Row e
- to2DTable :: (Ix r, Ix c) => Array (r, c) a -> [(r, Row a)]
HTML
toHtmlTable :: FullLedger -> Html Source #
convert ledger to Html Markup
rowHtml :: Show a => [FullAccountName] -> (DecimalRaw Integer -> String) -> String -> (a, Row (DecimalRaw Integer)) -> MarkupM () Source #
create one html row with comment and date
:: [FullAccountName] | |
-> ADate | |
-> Int | number of columns present |
-> EntityLogEntry | |
-> Html |
convert log entries to markup
css :: AttributeValue -> Html Source #
js :: AttributeValue -> Html Source #
indexPage :: MarkupM () -> BL.ByteString Source #
the html skeletton
JSON instances
String
scale :: DecimalRaw Integer -> DecimalRaw Integer Source #
:: (AccountNumber, AccountNumber) | account number bounds |
-> Tx | |
-> (Row Amount, Comment) |
generates a row containing the posting's amount at the column corresponding to the posting's account
Helpers
to2DTable :: (Ix r, Ix c) => Array (r, c) a -> [(r, Row a)] Source #
Convert a 2D array into a list of pairs, where the first component contains the first index and the second the coresponding row o the array