X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fhomebank2ledger;a=blobdiff_plain;f=lib%2FApp%2FHomeBank2Ledger.pm;h=022f2c310ecae417437bde7f5223bd5702c6b39e;hp=367f42597343ab036d4a6baf2825d8eed7d27fd4;hb=4ea7ddc5c5393a9e6493dee172c5e3ae8a0f89c9;hpb=b902bb516a91fd76711281b476b9911a05946dec diff --git a/lib/App/HomeBank2Ledger.pm b/lib/App/HomeBank2Ledger.pm index 367f425..022f2c3 100644 --- a/lib/App/HomeBank2Ledger.pm +++ b/lib/App/HomeBank2Ledger.pm @@ -11,7 +11,7 @@ This module is part of the L script. =cut -use warnings FATAL => 'all'; # temp fatal all +use warnings; use strict; use App::HomeBank2Ledger::Formatter; @@ -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);