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
|
| On running beancounter update as part of my cron job the error this
| morning was "Found no GBP for 20090101 in the beancounter database."
|
| GBP was added on Thursday
|
| If I run
| beancounter fxbackpopulate --prevdate 20090101 --date 20090612 GBP SEK
|
| Then the error is:
|
| No luck with symbol ^XBX
| ** Ignoring SEK which is not currently known to the internal tables
That is a _different issue_ as fx backpopulation uses a different routine
than the one you fixed up there! All of our recent mails were aboout fixing
'update'.
| 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.
| 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?
Dirk
--
Three out of two people have difficulties with fractions.
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]