App::HomeBank2Ledger::Ledger - Ledger data representation
version 0.010
my $ledger = App::HomeBank2Ledger::Ledger->new; $ledger->add_payees("Ann's Antiques", "Missy Automative"); for my $payee (@{$ledger->payees}) { print "Payee: $payee\n"; }
This class provides a unified in-memory representation of a ledger, including associated metadata.
Here is a specification for the substructures:
This is a fully-qualified account name. Names may contain colons for representing a hierarchy of accounts. Examples:
"Assets:Bank:Chase1234"
"Liabilities:Credit Card:Capital One"
This is a hashref like this:
{ symbol => '$', # required iso => 'USD', # optional name => 'US Dollar', # optional format => '$1000.00', # optional }
This is just a string with the name of a "payee" or memo/description/narration.
This is just a string with the text of a tag.
{ date => '2019-06-12', # required aux_date => '2019-06-13', # optional status => 'cleared', # optional; can be "cleared" or "pending" code => '1234', # optional payee => 'Malcolm Reynolds', # required note => 'Medical supplies', # optional postings => [ # required { account => 'Some Account', # required amount => '16.25', # required for at least n-1 postings commodity => { symbol => '$', format => '$1,000.00', iso => 'USD', name => 'US Dollar', syprf => 1, dchar => '.', gchar => ',', frac => 2, }, payee => 'Somebody', # optional note => 'Whatever', # optional status => 'pending', # optional; can be "cleared" or "pending" tags => [qw(niska train-job)], lot => { # optional date => '2019-01-28', price => { amount => '15.00', commodity => { ... }, }, }, cost => { # optional amount => '10.00', commodity => { ... }, }, }, ... ], }
Get an arrayref of accounts.
Get an arrayref of commodities.
Get an arrayref of payees.
Get an arrayref of tags.
Get an arrayref of transactions.
$ledger = App::HomeBank2Ledger::Ledger->new(%ledger_data);
Construct a new ledger instance.
Add accounts.
Add commodities.
Add payees.
Add tags.
Add transactions.
Please report any bugs or feature requests on the bugtracker website https://github.com/chazmcgarvey/homebank2ledger/issues
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
Charles McGarvey <chazmcgarvey@brokenzipper.com>
This software is Copyright (c) 2019 by Charles McGarvey.
This is free software, licensed under:
The MIT (X11) License
To install App::HomeBank2Ledger, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::HomeBank2Ledger
CPAN shell
perl -MCPAN -e shell install App::HomeBank2Ledger
For more information on module installation, please visit the detailed CPAN module installation guide.