[PATCH] price editor for currencies not working
Rainer Dorsch
rdorsch at alzental-castle.de
Mon Jun 9 18:13:21 CDT 2003
Hello,
for me, the price editor in GnuCash was not retriving automatic updates for
currencies. A more detailed investigation showed, that the backend Quote.pm
of Finance::Quote was broken for me. I can hardly believe, that this was
broken for everybody, please let me know, if I missed something.
The fix for making it working for me again:
# diff -u Quote.pm~ Quote.pm
--- Quote.pm~ Tue Jun 26 07:23:42 2001
+++ Quote.pm Mon Jun 9 16:59:37 2003
@@ -233,7 +233,7 @@
my $ua = $this->user_agent;
my $data = $ua->request(GET
"${YAHOO_CURRENCY_URL}s=$from&t=$to")->content;
- my ($exchange_rate) = $data =~ m#$from$to=X</a></td><td>1</td><td(?:
nowrap)?>[^<]+</td><td>(\d+\.\d+)</td>#;
+ my ($exchange_rate) = $data =~ m#$from$to=X</a></th><th>1</th><th(?:
nowrap)?>[^<]+</th><td>(\d+\.\d+)</td>#;
return undef unless $exchange_rate;
return ($exchange_rate * $amount);
#
Thanks,
Rainer
--
Rainer Dorsch
Alzentalstr. 28
71083 Herrenberg
07032-919495
More information about the gnucash-devel
mailing list