Bug 335277 - 0% interest rate loan is miscalculed
Summary: 0% interest rate loan is miscalculed
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: 4.6.6
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-24 13:00 UTC by lephilousophe
Modified: 2014-09-23 06:03 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Patch that fixes the bug (1.54 KB, patch)
2014-05-24 13:01 UTC, lephilousophe
Details

Note You need to log in before you can comment on or make changes to this bug.
Description lephilousophe 2014-05-24 13:00:27 UTC
When you create a loan with 0% interest rate, the scheduled transaction is OK but the forecast in the Loan register is wrong with a huge negative number (autoCalc). As a side effect the planned operation in the check account register is in red.

Reproducible: Always

Steps to Reproduce:
1. Create a 0% interest loan
2. Go to loan register and see the planned operation

Actual Results:  
Operation has a huge negative number

Expected Results:  
Operation should be the amortization value which is equal to the payment value in this case (no interests)

I attach a patch that fixes the bug
Comment 1 lephilousophe 2014-05-24 13:01:42 UTC
Created attachment 86797 [details]
Patch that fixes the bug
Comment 2 Cristian Oneț 2014-07-31 14:36:24 UTC
The patch looks good, I'll take care of it.
Comment 3 Cristian Oneț 2014-09-23 06:03:46 UTC
Git commit ed3ef1673cc960e48949fb310881b74a29ce657a by Cristian Oneț.
Committed on 23/09/2014 at 06:00.
Pushed by conet into branch 'master'.

Fix the forecast of a '0%' interest rate loan payment.

Take the interest split into account only when it's valid. Thanks
to 'lephilousophe@users.sourceforge.net' for the patch.

M  +8    -4    kmymoney/mymoney/mymoneyforecast.cpp

http://commits.kde.org/kmymoney/ed3ef1673cc960e48949fb310881b74a29ce657a