NAME

Beancounter::Ledger

SYNOPSIS

my $ledger = Beancounter::Ledger->new(@accounts); $ledger->post($trans);

DESCRIPTION

A collection of accounts that implement the debit and credit methods and methods to update the account balance based on transaction data.

METHODS

post

The post method takes a transaction object and updates the account balances with the debits and credit from that transaction.

ATTRIBUTES

account

The account attribute is a collection of account objects to be acted on. At this time there is no reason to call account directly as it is populated when you pass the array of hashrefs at build time and it has the Hash trait. Currently the following hash methods are delegated.

get_account

Return the account object by hash key (account_code).

add_account

Add an account object to the hash.

delete_account

Remove the account object from the hash.

list_accounts

Returns the keys (account code) for the account objects in the hash.

is_account

Checks for the existence of the account in the hash.

SEE ALSO

Beancounter::Journal::Entry

AUTHOR

Jesse Shy, <jesse@holdtheplan.com>

COPYRIGHT

Copyright 2011 Jesse Shy. All Rights Reserved. This is free software; you may redistribute it and/or modify it under the same terms as Perl itself.

==cut