Subject: | UK funds quotes from yahoo_europe in pence still not correct |
The patch in 46135 for quotes returned in GB pence is incomplete. For
mutual funds, there is no exchange defined (at least for some ISIN
securites, GB0007018194GBP for example).
The attached patch adds another section for cases where the exchange is
!defined, but the currency is GBp.
Subject: | GBpFunds.patch |
diff -Nurd old/Base.pm new/Base.pm
--- old/Base.pm 2009-10-05 13:39:57.000000000 -0400
+++ new/Base.pm 2009-10-05 22:21:15.000000000 -0400
@@ -275,6 +275,17 @@
}
# Other exchanges here as needed.
}
+ #need to account for GBp values returned for funds without exchange set
+ if (!defined($exchange)) {
+ if ($info{$symbol,"currency"} eq "GBp") {
+ foreach my $field ($quoter->default_currency_fields) {
+ next unless ($info{$symbol,$field});
+ $info{$symbol,$field} =
+ $quoter->scale_field($info{$symbol,$field},0.01);
+ }
+ }
+ }
+
if (defined($info{$symbol,"currency"})) {
# Having converted London prices to GBP above we