bookkeeping-0.2.1.4: A module for bookkeeping by double entry.

CopyrightKadzuya Okamoto 2017
LicenseMIT
Stabilityexperimental
Portabilityunknown
Safe HaskellNone
LanguageHaskell2010

Business.Bookkeeping

Contents

Description

This module exports core functions and types for bookkeeping.

Synopsis

Usage examples

>>> :{
let
  advance :: CategoryName -> SubDescription -> Amount -> DateTransactions
  advance name = dateTrans
    (DebitCategory $ Category name Expenses)
    (CreditCategory $ Category "Deposit" Assets)
  sample =
    year 2015 $ do
      month 1 $ do
        activity 1 "Constant expenses" $
          advance "Communication" "Mobile phone" 3000
        activity 3 "Mail a contract" $ do
          advance "Communication" "Stamp" 50
          advance "Office supplies" "Envelope" 100
      month 2 $
        activity 1 "Constant expenses" $
          advance "Communication" "Mobile phone" 3000
:}

Pritty printers

ppr :: Transactions -> IO () Source #

A pretty printer for Transactions.

>>> ppr sample
tDay: 2015-01-01
tDescription: Constant expenses
tSubDescription: Mobile phone
tDebit: Communication (Expenses)
tCredit: Deposit (Assets)
tAmount: 3000

tDay: 2015-01-03
tDescription: Mail a contract
tSubDescription: Stamp
tDebit: Communication (Expenses)
tCredit: Deposit (Assets)
tAmount: 50

tDay: 2015-01-03
tDescription: Mail a contract
tSubDescription: Envelope
tDebit: Office supplies (Expenses)
tCredit: Deposit (Assets)
tAmount: 100

tDay: 2015-02-01
tDescription: Constant expenses
tSubDescription: Mobile phone
tDebit: Communication (Expenses)
tCredit: Deposit (Assets)
tAmount: 3000

Constructors

Converters

Types

type Transactions = Trans Transaction Source #

A type for handling Transaction values.

newtype Year Source #

Constructors

Year 

Fields

Instances

newtype Date Source #

Constructors

Date 

Fields

Instances