From 720132fb4653b40d03426418c7c43a763bd0dfa5 Mon Sep 17 00:00:00 2001 From: Linas Vepstas Date: Sat, 2 Jan 1999 03:11:58 +0000 Subject: [PATCH] more git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@1514 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/quotes/Quote.pm | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/src/quotes/Quote.pm b/src/quotes/Quote.pm index bc438faa0a..4bffb0a1c9 100644 --- a/src/quotes/Quote.pm +++ b/src/quotes/Quote.pm @@ -80,9 +80,10 @@ sub yahoo { # sub fidelity { my @symbols = @_; - my(%aa,$sym); + my(%aa,%cc,$sym, $k); - # rather iritatingly, fidelity sorts its funds into different groups. + # rather irritatingly, fidelity sorts its funds into different groups. + # as a result, the fetch that we need to do depends on the group. my @gandi = ("FBALX", "FCVSX", "FEQIX", "FEQTX", "FFIDX", "FGRIX", "FIUIX", "FPURX", "FRESX", ); my @growth = ("FBGRX", "FCNTX", "FCONX", "FDCAX", "FDEGX", "FDEQX", @@ -91,18 +92,27 @@ sub fidelity { "FMILX", "FOCPX", "FSLCX", "FSLSX", "FTQGX", "FTRNX", "FTXMX", ); my (%agandi, %agrowth); + my $dgandi=0; + my $dgrowth=0; for (@gandi) { $agandi{$_} ++; } for (@growth) { $agrowth{$_} ++; } # for Fidelity, we get them all. for (@symbols) { -print "duuude handling $_\n"; if ($agandi {$_} ) { - %aa = &fidelity_gandi; + if (0 == $dgandi ) { + %cc = &fidelity_gandi; + $dgandi = 1; + foreach $k (keys %cc) { $aa{$k} = $cc{$k}; } + } } if ($agrowth {$_} ) { - %aa = &fidelity_growth; + if (0 == $dgrowth ) { + %cc = &fidelity_growth; + $dgrowth = 1; + foreach $k (keys %cc) { $aa{$k} = $cc{$k}; } + } } } return %aa;