https://bugs.kde.org/show_bug.cgi?id=333236

--- Comment #4 from Alvaro Soliverez <asolive...@kde.org> ---
Based on the original trace, there's something weird happening. Here's the
relevant snippet of code.

      MyMoneyMoney balance;
      if (balances.count() == 0)
        balance = MyMoneyFile::instance()->balance(acc.id(),
dueDate.addDays(-1));
      else
        balance = balances[acc.id()];

      // FIXME: for now, we only support interest calculation at the end of the
period
      calc.setBep();
      // FIXME: for now, we only support periodic compounding
      calc.setDisc();

      calc.setPF(MyMoneySchedule::eventsPerYear(schedule.occurrence()));
      MyMoneySchedule::occurrenceE compoundingOccurrence =
static_cast<MyMoneySchedule::occurrenceE>(acc.interestCompounding());
      if (compoundingOccurrence == MyMoneySchedule::OCCUR_ANY)
        compoundingOccurrence = schedule.occurrence();

      calc.setCF(MyMoneySchedule::eventsPerYear(compoundingOccurrence));

      calc.setPv(balance.toDouble());   <--- this is line 1264.

I think the only way this might happen, is if QMap balances does not actually
contain acc.id(), but it should still return a default MyMoneyMoney value,
which is 0, and is a normal case

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
KMyMoney-devel mailing list
KMyMoney-devel@kde.org
https://mail.kde.org/mailman/listinfo/kmymoney-devel

Reply via email to