Hello Al, MyMoneyPrice is not a single value. It contains the currencies involved and the date.
You can then call MyMoneyPrice::rate(currencyId) to get the MyMoneyMoney value you want. Regards, Alvaro On Mon, Oct 31, 2011 at 3:12 PM, <softw...@quantentunnel.de> wrote: > Hi > > To provide a first small piece of code (to add currency conversion to > kMyMoneyCalculator) I started to look at the relevant source code, > downlodade about a week ago. > > I do not understand the function below from mymoneyfile.cpp > > MyMoneyFile::price(const QString& fromId, const QString& toId, const > QDate& date, const bool exactDate) const > { > ... > // search 'from-to' rate > MyMoneyPrice rc = d->m_storage->price(fromId, to, date, exactDate); > if (!rc.isValid()) { > // not found, search 'to-fron' rate and use reciprocal value > rc = d->m_storage->price(to, fromId, date, exactDate); > } > return rc; > } > > The comment correctly states that the reciprocal value needs to be taken, > if to-from instead of from-to is returned. But there is no "1/". What am I > missing? > > Thanks > > Al_ > -- > NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie! > Jetzt informieren: http://www.gmx.net/de/go/freephone > _______________________________________________ > KMyMoney-devel mailing list > KMyMoney-devel@kde.org > https://mail.kde.org/mailman/listinfo/kmymoney-devel >
_______________________________________________ KMyMoney-devel mailing list KMyMoney-devel@kde.org https://mail.kde.org/mailman/listinfo/kmymoney-devel