Bug 237964 - 2 payments shown in payments overview
Summary: 2 payments shown in payments overview
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Ian Neal
URL:
Keywords:
Depends on:
Blocks: 238937
  Show dependency treegraph
 
Reported: 2010-05-17 20:47 UTC by Achim Schaefer
Modified: 2010-05-26 23:01 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Change how khomeview counts overdue dates v0.1 (3.33 KB, patch)
2010-05-25 16:38 UTC, Ian Neal
Details
Backport to KMM2 of khomeview patch v0.1 (3.44 KB, patch)
2010-05-25 16:39 UTC, Ian Neal
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Achim Schaefer 2010-05-17 20:47:30 UTC
Version:           3.98.0 (using KDE 4.4.3)
Compiler:          cc
OS:                Linux (i686) release 2.6.32-5-openvz-686
Installed from:    Debian testing/unstable Packages

on the home page, in the section payments the application shows after an overduw payment the information (2 payments), even if ther is only one payment outstanding.
As soon as I use the button to enter the payment, this payment is not shown any more (as there is only one, and this is now entered).
For me this happens only for monthly payments, but not for a weekly one.
I just have these examples, so might be another reason as well.
As well this happens only in the overdue section, not in the section for future payments.
Comment 1 Achim Schaefer 2010-05-17 20:49:23 UTC
Unfortunatly the version did not get into the bug.
it is 3.98.0
Comment 2 Thomas Baumgart 2010-05-17 21:21:06 UTC
It just so happens, that I see the same thing here. The problem only shows for those schedules, that are overdue and the due date falls on a non-processing day (weekend) and the option is set to adjust the payment date to the previous processing date (Friday). In that case, one gets an extra occurrence.

I will check tomorrow (Tuesday) if that only shows on a Monday (the day after the non-processing period)
Comment 3 Thomas Baumgart 2010-05-17 21:31:51 UTC
Looks like this one also applies to version 1.0.5 of the application.
Comment 4 Alvaro Soliverez 2010-05-25 04:46:15 UTC
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.
Comment 5 Ian Neal 2010-05-25 10:07:12 UTC
I have a rewrite of nextPayment and adjustedNextPayment sitting in my tree, just needs a bit more testing before releasing.
Comment 6 Ian Neal 2010-05-25 16:38:33 UTC
Created attachment 43877 [details]
Change how khomeview counts overdue dates v0.1

This patch:
* Splits the existing mymoneyscheduled method transactionsRemaining into two methods:
** transactionsRemainingUntil which takes an endDate parameter and counts the number of transactions until that endDate;
** transactionsRemaining now calls transactionsRemainingUntil with m_endDate as an argument.
* Additional checks are in transactionsRemainingUntil to make sure the start and end date passed to paymentDates are valid;
* khomeview's showPayment function uses the new transactionsRemainingUntil method with an argument of the day before the current date.
Comment 7 Ian Neal 2010-05-25 16:39:49 UTC
Created attachment 43878 [details]
Backport to KMM2 of khomeview patch v0.1

This is a backport to KMM2 of the KMM4 patch.
Comment 8 Ian Neal 2010-05-25 23:54:41 UTC
SVN commit 1130652 by iann:

BUG: 237964
2 payments shown in payments overview
This patch:
* Splits the existing mymoneyscheduled method transactionsRemaining into two methods:
** transactionsRemainingUntil which takes an endDate parameter and counts the number of transactions until that endDate;
** transactionsRemaining now calls transactionsRemainingUntil with m_endDate as an argument.
* Additional checks are in transactionsRemainingUntil to make sure the start and end date passed to paymentDates are valid;
* khomeview's showPayment function uses the new transactionsRemainingUntil method with an argument of the day before the current date.

 M  +8 -3      mymoney/mymoneyscheduled.cpp  
 M  +9 -0      mymoney/mymoneyscheduled.h  
 M  +2 -10     views/khomeview.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1130652