Changeset View
Changeset View
Standalone View
Standalone View
kmymoney/views/kgloballedgerview.cpp
Show First 20 Lines • Show All 793 Lines • ▼ Show 20 Line(s) | 792 | if (stock.isInvest()) { | |||
---|---|---|---|---|---|
794 | const MyMoneyPrice &priceInfo = file->price(sec.id(), currencyId); | 794 | const MyMoneyPrice &priceInfo = file->price(sec.id(), currencyId); | ||
795 | d->m_balanceIsApproximated |= !priceInfo.isValid(); | 795 | d->m_balanceIsApproximated |= !priceInfo.isValid(); | ||
796 | rate = priceInfo.rate(sec.tradingCurrency()); | 796 | rate = priceInfo.rate(sec.tradingCurrency()); | ||
797 | } | 797 | } | ||
798 | 798 | | |||
799 | if (currencyId != base.id()) { | 799 | if (currencyId != base.id()) { | ||
800 | const MyMoneyPrice &priceInfo = file->price(sec.tradingCurrency(), base.id()); | 800 | const MyMoneyPrice &priceInfo = file->price(sec.tradingCurrency(), base.id()); | ||
801 | d->m_balanceIsApproximated |= !priceInfo.isValid(); | 801 | d->m_balanceIsApproximated |= !priceInfo.isValid(); | ||
802 | rate = (rate * priceInfo.rate(base.id())).convert(MyMoneyMoney::precToDenom(KMyMoneyGlobalSettings::pricePrecision())); | 802 | rate = (rate * priceInfo.rate(base.id())).convertPrecision(sec.pricePrecision()); | ||
803 | } | 803 | } | ||
804 | balance += ((*it_b) * rate).convert(base.smallestAccountFraction()); | 804 | balance += ((*it_b) * rate).convert(base.smallestAccountFraction()); | ||
805 | } | 805 | } | ||
806 | d->m_totalBalance = balance; | 806 | d->m_totalBalance = balance; | ||
807 | } | 807 | } | ||
808 | m_rightSummaryLabel->setPalette(palette); | 808 | m_rightSummaryLabel->setPalette(palette); | ||
809 | } | 809 | } | ||
810 | // determine the number of selected transactions | 810 | // determine the number of selected transactions | ||
▲ Show 20 Lines • Show All 792 Lines • Show Last 20 Lines |