After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 511606 - ipmt() and ppmt() functions don't work correctly in scheduled transactions
ipmt() and ppmt() functions don't work correctly in scheduled transactions
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: Scheduled Transactions
2.4.x
Other All
: Normal major
: ---
Assigned To: John Ralls
gnucash-core-maint
Depends on:
Blocks:
 
 
Reported: 2008-01-23 19:18 UTC by Bo Najdrovsky
Modified: 2018-06-29 22:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
The instance counter is now incremented into increment_sx_state function (488 bytes, patch)
2010-01-11 10:13 UTC, Jean-Baptiste
committed Details | Review

Description Bo Najdrovsky 2008-01-23 19:18:07 UTC
Please describe the problem:
Posted this to the gnucash-users list, but was asked to place it here into bugzilla so I'll just paste what I said in my posting...

It appears that the ipmt() and ppmt() functions no longer function properly in scheduled transactions.  I have a couple of loans that are set up in my scheduled transactions, and up until September of last year, everything was working fine.  Then suddenly, beginning with the September payments, the interest and principal have been remaining the same for every month since then, instead of what should be happening, which of course is that the principal value should be growing while the interest value is dropping. I suspect that this issue coincided with a GnuCash package upgrade to my current version. Sorry if this is already a known issue, I searched the list archives to see if anyone has already reported this and didn't find anything.

I'm running the standard Fedora 7  build of GnuCash 2.2.1, which comes with this particular distribution.  I don't recall what version of GnuCash was on my system prior to September, but I'd guess it was perhaps the 2.0 series? Anyway, my principal and interest balances are now quite a bit off from what they should be, so I thought I'd try to report the issue.


Steps to reproduce:
1. create a loan repayment scheduled transaction
2. allow it to execute several times



Actual results:
interest and principal calculations remain the same month after month

Expected results:
interest decreasing while principal increasing

Does this happen every time?
yes

Other information:
I don't know if this is related to scheduled transactions or just a general bug in the ipmt() or ppmt() functions, but since I saw it in my scheduled transactions, that's where I'm reporting it in the Bugzilla.
Comment 1 ggeens 2008-10-31 20:56:19 UTC
I have the same problem. All my loans keep on giving the same intrest/principal amounts.

Seems like the instance count is not updated.
Comment 2 Bo Najdrovsky 2009-10-06 21:15:08 UTC
Has there been any movement on this problem?  I reported the bug well over a year and a half ago.  If the issue is indeed just instance count not being updated, it seems that it would be a rather trivial fix.
Comment 3 Jean-Baptiste 2010-01-11 10:13:50 UTC
Created attachment 151164 [details] [review]
The instance counter is now incremented into increment_sx_state function

Hello,

I have posted the patch into the GnuCash - Dev list at 09-Nov-23.
In case of, i prefer to join the patch here, it's probably better in order to take into account.

This patch has been made from trunk branch on November.

JeB.
Comment 4 Christian Stimming 2010-01-11 15:31:22 UTC
http://lists.gnucash.org/pipermail/gnucash-devel/2009-November/026790.html

I would apply this patch, but I cannot judge whether this really fixes the problem or not. Can you give a reason (or point me to additional e-mail discussion) which confirms whether this fixes the problem? Thanks.
Comment 5 Christian Stimming 2010-01-15 20:39:10 UTC
Comment on attachment 151164 [details] [review]
The instance counter is now incremented into increment_sx_state function

r18571, thanks!
Comment 6 Andreas Köhler 2010-02-03 02:48:44 UTC
Is this bug fixed then?
Comment 7 Geert Janssens 2010-03-15 08:23:35 UTC
Closing this bug since there's no feedback. Should this bug still exist after applying the above patch, feel free to reopen.
Comment 8 Steve Hill 2011-10-17 10:27:00 UTC
This bug still appears to be present in Gnucash 2.4.7 shipped with Fedora 15 (built from rb5bdf19+ on 2011-07-06)
Comment 9 Bo Najdrovsky 2012-05-14 13:09:12 UTC
I know this bug had been marked as resolved/fixed, and it is in the standard file based back end, however I have recently switched to a MySQL based back end, and now the problem is occurring again, so it doesn't seem to be fixed in that case.
Comment 10 John Ralls 2013-09-19 19:32:23 UTC
Sounds like a dup of bug 684670, which I just fixed a couple of days ago. Can you test against a current SVN/Git checkout of either trunk or 2.4?
Comment 11 Mike Evans 2013-12-08 10:53:03 UTC
Closing this bug since there's no feedback. Feel free to reopen.
Comment 12 Stéphane G. 2014-10-17 13:34:09 UTC
Hi,
The same problem occurs when I want to setup schedule transactions for loan payments [GnuCash 2.6.4-2 / Windows 8]
Thanks for your help,
Stephane
Comment 13 John Ralls 2014-12-24 20:29:45 UTC
Please test again with Gnucash 2.6.5. 2.6.4 had a variety of weird problems on Windows due to some library mismatch issues.
Comment 14 John Ralls 2017-09-24 22:41:17 UTC
Reassign version to 2.4.x so that individual 2.4 versions can be retired.
Comment 15 John Ralls 2018-06-29 22:00:09 UTC
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=511606. Please update any external references or bookmarks.