Version: Koffice (using KDE KDE 3.5.1) Installed from: Gentoo Packages Compiler: gcc 3.4.4 gentoo 3.4.4-r1 OS: Linux 1- open resource setting 2- add a resource 3- set cost 4- save the project 5- close the project 6- reopen the project 7- open reseouce setting and select the last insert resource Result: The cost setting load the default Aspected result: The right cost saved
SVN commit 509044 by danders: Save/load resource cost and units. CCBUG: 121828 M +9 -0 kptresource.cc --- trunk/koffice/kplato/kptresource.cc #509043:509044 @@ -28,6 +28,8 @@ #include "kptschedule.h" #include <kdebug.h> +#include <kglobal.h> +#include <klocale.h> namespace KPlato { @@ -346,12 +348,16 @@ m_email = element.attribute("email"); setType(element.attribute("type")); m_calendar = findCalendar(element.attribute("calendar-id")); + m_units = element.attribute("units").toInt(); s = element.attribute("available-from"); if (s != "") m_availableFrom = QDateTime::fromString(s); s = element.attribute("available-until"); if (s != "") m_availableUntil = QDateTime::fromString(s); + + cost.normalRate = KGlobal::locale()->readMoney(element.attribute("normal-rate")); + cost.overtimeRate = KGlobal::locale()->readMoney(element.attribute("overtime-rate")); return true; } @@ -367,8 +373,11 @@ me.setAttribute("initials", m_initials); me.setAttribute("email", m_email); me.setAttribute("type", typeToString()); + me.setAttribute("units", m_units); me.setAttribute("available-from", m_availableFrom.toString()); me.setAttribute("available-until", m_availableUntil.toString()); + me.setAttribute("normal-rate", KGlobal::locale()->formatMoney(cost.normalRate)); + me.setAttribute("overtime-rate", KGlobal::locale()->formatMoney(cost.overtimeRate)); } bool Resource::isAvailable(Task *task) {
*** Bug has been marked as fixed ***.
You need to log in before you can comment on or make changes to this bug.