hax-0.0.2: Haskell cash-flow and tax simulation

Safe HaskellNone
LanguageHaskell2010

HAX.Report

Contents

Description

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

Synopsis

HTML

writeHtml Source #

Arguments

:: FilePath

output dir

-> World 
-> IO () 

Write the ledger to html files

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

logHtml Source #

Arguments

:: [FullAccountName] 
-> ADate 
-> Int

number of columns present

-> EntityLogEntry 
-> Html 

convert log entries to markup

indexPage :: MarkupM () -> BL.ByteString Source #

the html skeletton

JSON instances

toVar :: (Monoid a, IsString a) => a -> a -> a Source #

String

transactionRow Source #

Arguments

:: (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

type Row e = [e] Source #

type Group e = [Row e] Source #

type Scale b = Amount -> b Source #

renderTable :: [Group String] -> String Source #

Renders a list of grouped rows

toRow :: (r -> e) -> (a -> e) -> (r, Row a) -> Row e Source #

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

Orphan instances