Bug 345061 - Date of future payments change automatically
Summary: Date of future payments change automatically
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: 4.7.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks: 348166
  Show dependency treegraph
 
Reported: 2015-03-11 18:54 UTC by Philippe Debrabant
Modified: 2017-07-01 11:19 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.8.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Debrabant 2015-03-11 18:54:24 UTC
The payment's date of my loans is the last day of the month.
The first date is ok : 31/10/2012.
The second date is ok : 30/11/2012 (the program knows that 31/11 is incorrect)
The third date is not ok : 30/12/2012. I change it manually but...
The fourth date is not ok : 30/01/2012
The firth date is ok : 28/02/2012 (the program knows that 30/02 is incorrect)
And next, the day other payments  is 28 !!! no change is possible.

Reproducible: Always

Steps to Reproduce:
See details

Actual Results:  
See details

Expected Results:  
If I enter the 31/10 as the first payment, next dates should be :
- 30/11
- 31/12
- 31/01
- 28/02
- 31/03
...
Comment 1 Cristian Oneț 2015-03-29 18:49:44 UTC
KMyMoney's schedules currently can't handle the "last day of the month" concept.
Comment 2 Jack 2015-03-29 19:05:00 UTC
While "last day of the month" should be a wishlist if it is not already, I'm curious about what happens (or doesn't happen) in this example.  The payment date is entered as the 31st of the month.  If a subsequent month has fewer days, then the payment is moved to the last day of that month, say the 30th, but that change to the 30th is permanent.  Should this type of change be considered similar to what happens if they date is on a weekend?  In that case, an adjustment is made for that payment only, but the scheduled date is not changed for future payments.  I just wonder if that could be a way to handle this instead of explicitly using the last day of the month.
Comment 3 Thomas Baumgart 2015-05-15 17:33:26 UTC
Git commit 4d0d3092e77964cb8005621438a4e4d03defbe94 by Thomas Baumgart.
Committed on 15/05/2015 at 17:28.
Pushed by tbaumgart into branch 'master'.

Don't change the original start date of a schedule

Entering schedules updates the next due date of the schedule. Before
this change, this also used to change the start date member variable
which is the reason that the day of the first execution of the schedule
is lost over time when it is modified because it is in the range of
29-31 and the month for the transaction does not have that many days. In
this case, the day was adjusted and caused future transaction not to
happen on this day anymore.

I have updated testcases and added a new one but still we need more
testing before we cherry pick this change over to the 4.7 branch.

M  +1    -1    kmymoney/mymoney/mymoneyschedule.cpp
M  +48   -0    kmymoney/mymoney/mymoneyscheduletest.cpp
M  +1    -0    kmymoney/mymoney/mymoneyscheduletest.h

http://commits.kde.org/kmymoney/4d0d3092e77964cb8005621438a4e4d03defbe94