Posting invoices and currency conversion dialog - bug?

Geert Janssens janssens-geert at telenet.be
Wed Nov 9 04:20:07 EST 2011


On woensdag 9 november 2011, Maf. King wrote:
> On Tuesday 08 Nov 2011 19:26:41 you wrote:
> > On dinsdag 8 november 2011, Derek Atkins wrote:
> > > Hi,
> > > 
> > > On Tue, November 8, 2011 11:34 am, Maf. King wrote:
> > > > On Tuesday 08 Nov 2011 15:16:52 you wrote:
> > > >> Hi,
> > > >> 
> > > >> On Tue, November 8, 2011 10:07 am, Maf. King wrote:
> > > >> > Hi List,
> > > >> > 
> > > >> > I've just been dissmissing the dialogs (the invoices seem to post
> > > >> > OK)
> > > >> 
> > > >> -
> > > >> 
> > > >> > am I
> > > >> > likely to be storing up trouble for some time in the future?
> > > >> 
> > > >> IMHO this is a bug.  If you do not have an account then it shouldn't
> > > >> ask for an exchange rate.  And IMHO I think it's perfectly valid to
> > > >> have a line-item without an account, and indeed I've been using that
> > > >> feature for
> > > >> years (although not with 2.2 or 2.4).
> > > >> 
> > > >> > TIA for your words of wisdom
> > > >> > Maf.
> > > >> 
> > > >> -derek
> > > > 
> > > > Hi Derek,
> > > > 
> > > > Bug reported (severity:minor).
> > > > https://bugzilla.gnome.org/show_bug.cgi?id=663638
> > > > 
> > > > Is there likely to be any issue with my data file and the blank
> > > > transfer account entries - I'm not familiar with the internals of GC
> > > > to expect either
> > > > way!
> > > 
> > > Alas, I don't know the answer to you here.  I don't know what the
> > > internal exchange rate requirements are.  Hopefully Geert will pipe up,
> > > I think he is more familiar with the multi-currency biz features.
> > 
> > From what I know of the code, nothing bad has happened.
> > 
> > The entries with blank transfer account are skipped when creating real
> > transactions at post time. So your transactions are ok.
> > 
> > It seems the exchange dialog pop-ups add a price each time, regardless of
> > whether you dismissed it or clicked ok. But because you didn't specify a
> > transfer account, the price has no commodity. These prices are not
> > visible in the price editor. So likely your datafile contains a bunch of
> > those fake prices, unless the save code filters them out. I haven't
> > tested this.
> > 
> > Anyway since the entry without transfer account is not converted into a
> > transaction, the price is never needed either and hence I doubt if these
> > fake prices would do any harm.
> > 
> > With the fix I have just committed, the exchange dialog won't be called
> > again on text only entries and hence no additional fake prices will be
> > created anymore.
> 
> Geert
> 
> Thanks for the speedy bug-fix and the advice - I've had a quick dig in the
> XML file and looked at some of the invoices I created today (a search for
> some unique text in the non-account lines)
> 
> The invoice line where I specified a transfer account (but no quantity or
> price) has a line like this in the XML
>  <entry:i-acct type="guid">9943a4badeedbe93b84439c3c1348fa4</entry:i-acct>
> (the guid points to the expected account)
> 
> The blank-account invoices lines look the same except for that <entry> line
> being missing, so I thinnk that the file isn't corrupt at the moment.
> 
>  What would a "fake price" look like? The commodity counter shows a value
> of 1, if that is relevant.
> 
I did the actual test and it turns out that GnuCash discards invalid prices. 
So even though GnuCash popped up the exchange rate dialog, the invalid price 
won't be saved in the end.

Conclusion: your data file is in good shape. It was only a GUI glitch.

Geert


More information about the gnucash-user mailing list