X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fhomebank2ledger;a=blobdiff_plain;f=lib%2FApp%2FHomeBank2Ledger.pm;h=022f2c310ecae417437bde7f5223bd5702c6b39e;hp=cc7a3e9ec9794bb7c8e1304200367f0a04e29a8a;hb=4ea7ddc5c5393a9e6493dee172c5e3ae8a0f89c9;hpb=f4e4bb40c65810f62b4c5fc5fa48a7d4df712918;ds=sidebyside diff --git a/lib/App/HomeBank2Ledger.pm b/lib/App/HomeBank2Ledger.pm index cc7a3e9..022f2c3 100644 --- a/lib/App/HomeBank2Ledger.pm +++ b/lib/App/HomeBank2Ledger.pm @@ -162,7 +162,8 @@ sub convert_homebank_to_ledger { if ($opts->{accounts}) { my @accounts = map { $_->{ledger_name} } grep { !$_->{excluded} } @$accounts, @$categories; - push @accounts, $default_account_income, $default_account_expenses; + push @accounts, $default_account_income if !grep { $_ eq $default_account_income } @accounts; + push @accounts, $default_account_expenses if !grep { $_ eq $default_account_expenses } @accounts; push @accounts, $OPENING_BALANCES_ACCOUNT if $has_initial_balance; $ledger->add_accounts(@accounts);