From: Charles McGarvey Date: Sun, 30 Jan 2022 03:41:42 +0000 (-0700) Subject: set code from check transaction info X-Git-Tag: v0.010~2 X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=3ae1d0174fc5bce082ed26b0c6b4e69550474e39;p=chaz%2Fhomebank2ledger set code from check transaction info --- diff --git a/lib/App/HomeBank2Ledger.pm b/lib/App/HomeBank2Ledger.pm index 9ff8b00..0aa1562 100644 --- a/lib/App/HomeBank2Ledger.pm +++ b/lib/App/HomeBank2Ledger.pm @@ -295,6 +295,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; @@ -392,6 +394,7 @@ sub convert_homebank_to_ledger { $ledger->add_transactions({ date => $date, payee => $payee->{name}, + code => $code, memo => $memo, postings => \@postings, });