use warnings;
use strict;
-our $VERSION = '0.001'; # VERSION
+our $VERSION = '0.010'; # VERSION
sub new {
=head1 VERSION
-version 0.001
+version 0.010
=head1 SYNOPSIS
This is a fully-qualified account name. Names may contain colons for representing a hierarchy of
accounts. Examples:
-=head1 ATTRIBUTES
-
-=head2 accounts
-
-Get an arrayref of accounts.
-
-=head2 commodities
-
-Get an arrayref of commodities.
-
-=head2 payees
-
-Get an arrayref of payees.
-
-=head2 tags
-
-Get an arrayref of tags.
-
-=head2 transactions
-
-Get an arrayref of transactions.
-
-=head1 METHODS
-
-=head2 new
+=over 4
- $ledger = App::HomeBank2Ledger::Ledger->new(%ledger_data);
+=item *
-Construct a new ledger instance.
+"Assets:Bank:Chase1234"
-=head2 add_accounts
+=item *
-Add accounts.
+"Liabilities:Credit Card:Capital One"
-=head2 add_commodities
-
-Add commodities.
-
-=head2 add_payees
-
-Add payees.
-
-=head2 add_tags
-
-Add tags.
-
-=head2 add_transactions
-
-Add transactions.
-
-=for: list
-* "Assets:Bank:Chase1234"
-* "Liabilities:Credit Card:CapitalOne"
+=back
=head2 commodity
{
date => '2019-06-12', # required
- payee => 'Malcolm Reynolds', # required
+ aux_date => '2019-06-13', # optional
status => 'cleared', # optional; can be "cleared" or "pending"
- memo => 'Medical supplies', # optional
+ code => '1234', # optional
+ payee => 'Malcolm Reynolds', # required
+ note => 'Medical supplies', # optional
postings => [ # required
{
account => 'Some Account', # required
frac => 2,
},
payee => 'Somebody', # optional
- memo => 'Whatever', # 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 => { ... },
+ },
},
...
],
}
+=head1 ATTRIBUTES
+
+=head2 accounts
+
+Get an arrayref of accounts.
+
+=head2 commodities
+
+Get an arrayref of commodities.
+
+=head2 payees
+
+Get an arrayref of payees.
+
+=head2 tags
+
+Get an arrayref of tags.
+
+=head2 transactions
+
+Get an arrayref of transactions.
+
+=head1 METHODS
+
+=head2 new
+
+ $ledger = App::HomeBank2Ledger::Ledger->new(%ledger_data);
+
+Construct a new ledger instance.
+
+=head2 add_accounts
+
+Add accounts.
+
+=head2 add_commodities
+
+Add commodities.
+
+=head2 add_payees
+
+Add payees.
+
+=head2 add_tags
+
+Add tags.
+
+=head2 add_transactions
+
+Add transactions.
+
=head1 BUGS
Please report any bugs or feature requests on the bugtracker website