Version: unspecified (using KDE 4.4.2) OS: Linux From comment 4 of bug 237964 (said by Alvaro Soliverez) The problem lies in MyMoneySchedule, in the way nextPayment and adjustedNextPayment work. adjustedNextPayment only adjusts the calculation made by nextPayment, whereas nextPayment should have within its logic how to adjust the date. Otherwise, when it gets a date prior to current date, it simply returns the current date, which is the logic thing to do. nextPayment has to be modified to account for adjusted dates and behave accordingly. Reproducible: Always
Created attachment 43926 [details] Rewrite of adjustedNextPayment/nextPayment patch v0.1 This patch: * Splits out and rewrites main part of nextPayment into new method nextPaymentDate taking relevant next due date and the refDate; * Changes adjustedNextPayment and nextPayment to use new method passing adjustedNextDueDate and nextDueDate respectively; I've confirmed that all tests pass (including the new one).
Keep in mind that BUG:238583 may also be related to this somehow.
SVN commit 1131313 by iann: BUG: 238937 Fix MyMoneySchedule::adjustedNextPayment so it behaves consistently This patch: * Splits out and rewrites main part of nextPayment into new method nextPaymentDate taking relevant next due date and the refDate; * Changes adjustedNextPayment and nextPayment to use new method passing adjustedNextDueDate and nextDueDate respectively. M +35 -24 mymoneyscheduled.cpp M +14 -0 mymoneyscheduled.h WebSVN link: http://websvn.kde.org/?view=rev&revision=1131313
Created attachment 47451 [details] Port to KMM2 of rewrite of adjustedNextPayment/nextPayment patch v0.1 This patch backports rewrite to KMM2 and also the test by Alvaro
Spotted an issue with certain scheduled transactions that are moved to the next processing day. Patch coming up.
Created attachment 47468 [details] Revised of adjustedNextPayment/nextPayment/nextPaymentDate patch v0.1 This patch: * Revises nextPaymentDate to be more like paymentDates having two variables, one for non-adjusted dates and the other for adjusted (if required) dates. * Fixes call to mymoneyforecast to adjustedNextPayment to use an adjusted lastPayment date.
Created attachment 47469 [details] Port to KMM2 of revised rewrite of adjustedNextPayment/nextPayment/nextPaymentDate patch v0.1 Port of combined patches for KMM4
SVN commit 1132176 by iann: BUG: 238937 Fix MyMoneySchedule::adjustedNextPayment so it behaves consistently This patch: * Revises nextPaymentDate to be more like paymentDates having two variables, one for non-adjusted dates and the other for adjusted (if required) dates. * Fixes call to mymoneyforecast to adjustedNextPayment to use an adjusted lastPayment date. M +3 -1 mymoneyforecast.cpp M +27 -19 mymoneyscheduled.cpp M +4 -3 mymoneyscheduled.h WebSVN link: http://websvn.kde.org/?view=rev&revision=1132176