From 3ae1d0174fc5bce082ed26b0c6b4e69550474e39 Mon Sep 17 00:00:00 2001 From: Charles McGarvey Date: Sat, 29 Jan 2022 20:41:42 -0700 Subject: [PATCH] set code from check transaction info --- lib/App/HomeBank2Ledger.pm | 3 +++ 1 file changed, 3 insertions(+) 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, }); -- 2.45.2