X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fhomebank2ledger;a=blobdiff_plain;f=lib%2FApp%2FHomeBank2Ledger.pm;h=3a6e62f2127b02306f30e7689f9ade88e0fe3903;hp=5a22d6234eb35b277adc5cf7df29d6a2b2bbf2e8;hb=refs%2Fheads%2Fdist;hpb=50b191bba1443cafa2fab882ef51f94136272166 diff --git a/lib/App/HomeBank2Ledger.pm b/lib/App/HomeBank2Ledger.pm index 5a22d62..3a6e62f 100644 --- a/lib/App/HomeBank2Ledger.pm +++ b/lib/App/HomeBank2Ledger.pm @@ -11,7 +11,7 @@ use File::HomeBank; use Getopt::Long 2.38 qw(GetOptionsFromArray); use Pod::Usage; -our $VERSION = '0.009'; # VERSION +our $VERSION = '0.010'; # VERSION my %ACCOUNT_TYPES = ( # map HomeBank account types to Ledger accounts bank => 'Assets:Bank', @@ -265,6 +265,8 @@ sub convert_homebank_to_ledger { my $payee = $homebank->find_payee_by_key($transaction->{payee}); my $tags = _split_tags($transaction->{tags}); my $date = $transaction->{date}; + my $code = $transaction->{paymode} =~ /^(?:check|epayment)$/ ? $transaction->{info} + : undef; my @postings; @@ -362,6 +364,7 @@ sub convert_homebank_to_ledger { $ledger->add_transactions({ date => $date, payee => $payee->{name}, + code => $code, memo => $memo, postings => \@postings, }); @@ -449,7 +452,7 @@ App::HomeBank2Ledger - A tool to convert HomeBank files to Ledger format =head1 VERSION -version 0.009 +version 0.010 =head1 SYNOPSIS