apologies On Mon, Jun 15, 2009 at 05:42:59AM -0500, Dirk Eddelbuettel wrote: > > On 15 June 2009 at 08:51, Henry Bremridge wrote: > | On Sat, Jun 13, 2009 at 05:52:04AM -0500, Dirk Eddelbuettel wrote: > | > sub portfolio_update { > | > my $res = shift; > | > if ($Config{fxupdate}) { > | > if ($Config{ubcfx}) { > | > UpdateFXviaUBC($dbh, $res); > | > } else { > | > UpdateFXDatabase($dbh, $res); > | > } > | > } > | > UpdateDatabase($dbh, $res) if $Config{equityupdate}; > | > } > | > | Made the change at line 863. I now have three currencies: USD, GBP and > | SEK > | > | If I run > | beancounter --ubcfx fxbackpopulate --prevdate 200901 --date 20090612 > GBP SEK > | > | Then no problems > > Not a valid prevdate, misses the day -- you need a yyyymmdd format.
Should have read beancounter --ubcfx fxbackpopulate --prevdate 20090101 --date 20090612 GBP SEK > > | If I run > | beancounter plreport > | > | Then I get the error > | > | Found no GBP for 20081215 in the beancounter database. > > plreport does a spot comparison to six months ago, this needs historical fx > prices. Let's tackle that next. > > So to get back on track, let's revisit > > | > sub portfolio_update { > | > my $res = shift; > | > if ($Config{fxupdate}) { > | > if ($Config{ubcfx}) { > | > UpdateFXviaUBC($dbh, $res); > | > } else { > | > UpdateFXDatabase($dbh, $res); > | > } > | > } > | > UpdateDatabase($dbh, $res) if $Config{equityupdate}; > | > } > > which should allow you to run 'update' (with --extrafx and --ubcfx) and > something like 'dayendreport' just fine, right? > Ran beancounter plreport --prevdate 20090601 --date 20090612 Worked: no problems I have to add the prevdate because the GBP was added fairly recently Ran beancounter dayendreport Worked: no problems Ran beancounter update Error message Use of uninitialized value $b[3] in join or string at /usr/share/perl5/Finance/YahooQuote.pm line 88 Ran beancounter --ubcfx update Modification of non-creatable array value attempted, subscript -4 at /usr/share/perl5/Finance/BeanCounter.pm line 372. Anytime I try and add --ubcfx into the command line I get the same error message as above. The only way I can get it to work is using the fxbackpopulate command If I look in the fxprices table, using sqlite3, then I have the following data: currency date previous_close day_open day_low day_high day_close day_change EUR 20090615 -1.2345 -1.2345 -1.2345 -1.2345 1.3851 -1.2345 CAD 20090615 -1.2345 -1.2345 -1.2345 -1.2345 0.8843 -1.2345 GBP 20090615 -1.2345 -1.2345 -1.2345 -1.2345 1.6346 -1.2345 GBP 20090611 1.65461555 SEK 20090611 0.13057728 SEK 20090612 0.13071553 EUR 20090615 -1.2345 -1.2345 -1.2345 -1.2345 1.3851 -1.2345 CAD 20090615 -1.2345 -1.2345 -1.2345 -1.2345 0.8843 -1.2345 GBP 20090615 -1.2345 -1.2345 -1.2345 -1.2345 1.6346 -1.2345 GBP 20090611 1.65461555 SEK 20090611 0.13057728 SEK 20090612 0.13071553 -- Henry Photocopies or faxes of my signature are not binding. Digital Key Signature: GPG RSA 0xFB447AA1 Mon Jun 15 12:20:09 BST 2009 -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org