App-HomeBank2Ledger
view release on metacpan or search on metacpan
lib/File/HomeBank.pm view on Meta::CPAN
=head2 accounts
Get an arrayref of accounts.
=head2 categories
Get an arrayref of categories.
=head2 currencies
Get an arrayref of currencies.
=head2 payees
Get an arrayref of payees.
=head2 tags
Get an arrayref of tags.
=head2 transactions
Get an arrayref of transactions.
=head2 find_account_by_key
$account = $homebank->find_account_by_key($key);
Find an account with the given key.
=head2 find_currency_by_key
$currency = $homebank->find_currency_by_key($key);
Find a currency with the given key.
=head2 find_category_by_key
$category = $homebank->find_category_by_key($key);
Find a category with the given key.
=head2 find_payee_by_key
$payee = $homebank->find_payee_by_key($key);
Find a payee with the given key.
=head2 find_transactions_by_transfer_key
@transactions = $homebank->find_transactions_by_transfer_key($key);
Find all transactions that share the same transfer key.
=head2 find_transaction_transfer_pair
$other_transaction = $homebank->find_transaction_transfer_pair($transaction);
Given a transaction hashref, return its corresponding transaction if it is an internal transfer. If
the transaction is an internal transaction with a destination account but is orphaned (has no
matching transfer key), this also looks for another orphaned transaction in the destination account
that it can call its partner.
Returns undef or empty if no corresponding transaction is found.
=head2 sorted_transactions
$transations = $homebank->sorted_transactions;
Get an arrayref of transactions sorted by date (oldest first).
=head2 full_category_name
$category_name = $homebank->full_category_name($key);
Generate the full name for a category, taking category inheritance into consideration.
Income
Salary <--
will become:
"Income:Salary"
=head2 format_amount
$formatted_amount = $homebank->format_amount($amount);
$formatted_amount = $homebank->format_amount($amount, $currency);
Formats an amount in either the base currency (for the whole file) or in the given currency.
Currency can be a key or the actualy currency structure.
=head1 FUNCTIONS
=head2 parse_file
$homebank_data = parse_file($filepath);
Read and parse a HomeBank .xhb file from a filesystem.
=head2 parse_string
$homebank_data = parse_string($str);
Parse a HomeBank file from a string.
=head1 BUGS
Please report any bugs or feature requests on the bugtracker website
L<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.
=head1 AUTHOR
Charles McGarvey <chazmcgarvey@brokenzipper.com>
=head1 COPYRIGHT AND LICENSE
( run in 2.116 seconds using v1.01-cache-2.11-cpan-d8267643d1d )