]> Dogcows Code - chaz/homebank2ledger/commitdiff
set code from check transaction info
authorCharles McGarvey <chazmcgarvey@brokenzipper.com>
Sun, 30 Jan 2022 03:41:42 +0000 (20:41 -0700)
committerCharles McGarvey <chazmcgarvey@brokenzipper.com>
Sun, 30 Jan 2022 03:42:54 +0000 (20:42 -0700)
lib/App/HomeBank2Ledger.pm

index 9ff8b00a23b4dd0ab01309fd24a9d07ce76e53fa..0aa1562a3833c52984e1fcf5d23d2c3b6075cd02 100644 (file)
@@ -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,
         });
This page took 0.025143 seconds and 4 git commands to generate.