Bug 331638 - Transaction splitting ignores third decimal place
Summary: Transaction splitting ignores third decimal place
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: 4.6.4
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
: 340079 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-03-01 07:42 UTC by AbdulRahiem Dubelaar
Modified: 2017-07-01 13:10 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.8.0


Attachments
Test file that confirms this (23.29 KB, text/xml)
2014-07-31 13:43 UTC, Cristian Oneț
Details
Split editor before entering (42.59 KB, image/png)
2014-07-31 13:43 UTC, Cristian Oneț
Details
Split editor after entering (37.76 KB, image/png)
2014-07-31 13:44 UTC, Cristian Oneț
Details
attachment-28798-0.html (2.67 KB, text/html)
2014-08-19 13:37 UTC, AbdulRahiem Dubelaar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description AbdulRahiem Dubelaar 2014-03-01 07:42:44 UTC
KWD has three decimal places. It all works well in the main pages. But when trying to split a transaction of, say KWD 16.575, in the split window the last 5 fils get rounded to zero. So, there is forever a warning that 5 fils have not been allocated.

Reproducible: Always

Steps to Reproduce:
1.Enter any amount, say, 16.575 or 48.840 (these are randomly picked amounts)
2.Split into any amount, where the split amount ends with 5 fils
3.
Actual Results:  
If a split amount of, say, 10.075 is selected, it get deducted correctly from the intitial amount that will then show (correctly) 6.500, but the amount of the split is captured as 10.08 and not as 10.075.

Expected Results:  
Expected result is 10.075.

Since the problem does not occur on any of the main pages, it seems to me that it is merely a matter of allocating three, instead of two decimal place in the code for split window.
Comment 1 Cristian Oneț 2014-07-31 13:43:08 UTC
Created attachment 88060 [details]
Test file that confirms this

I can confirm this, the edit in the split editor might be missing a proper precision setup.
Comment 2 Cristian Oneț 2014-07-31 13:43:43 UTC
Created attachment 88061 [details]
Split editor before entering
Comment 3 Cristian Oneț 2014-07-31 13:44:04 UTC
Created attachment 88062 [details]
Split editor after entering
Comment 4 Cristian Oneț 2014-07-31 13:44:21 UTC
Fixing this should be easy.
Comment 5 Cristian Oneț 2014-08-19 12:40:31 UTC
Git commit 98df765f2cb5fcb2ee253d7ba7141a59b0cf7bed by Cristian Oneț.
Committed on 19/08/2014 at 12:37.
Pushed by conet into branch 'master'.

Use the proper precision in the split table.

We must have only a few users with a precision more than 2
otherwise this should have been catched a long time ago.

M  +5    -2    kmymoney/dialogs/kmymoneysplittable.cpp
M  +6    -1    kmymoney/dialogs/kmymoneysplittable.h
M  +1    -1    kmymoney/dialogs/ksplittransactiondlg.cpp

http://commits.kde.org/kmymoney/98df765f2cb5fcb2ee253d7ba7141a59b0cf7bed
Comment 6 Cristian Oneț 2014-08-19 12:41:41 UTC
Git commit 49c06bbd56834f963f20dc7a96b2cb3bcff393b3 by Cristian Oneț.
Committed on 19/08/2014 at 12:37.
Pushed by conet into branch 'frameworks'.

Use the proper precision in the split table.

We must have only a few users with a precision more than 2
otherwise this should have been catched a long time ago.
(cherry picked from commit 98df765f2cb5fcb2ee253d7ba7141a59b0cf7bed)

M  +5    -2    kmymoney/dialogs/kmymoneysplittable.cpp
M  +6    -1    kmymoney/dialogs/kmymoneysplittable.h
M  +1    -1    kmymoney/dialogs/ksplittransactiondlg.cpp

http://commits.kde.org/kmymoney/49c06bbd56834f963f20dc7a96b2cb3bcff393b3
Comment 7 AbdulRahiem Dubelaar 2014-08-19 13:37:08 UTC
Created attachment 88317 [details]
attachment-28798-0.html

Thank you for sorting this out, Cristian.

Regards,

Rahiem

Cristian Oneț schreef op 2014-08-19 om 15:41:
> https://bugs.kde.org/show_bug.cgi?id=331638
>
> Cristian Oneț <onet.cristian@gmail.com> changed:
>
>             What    |Removed                     |Added
> ----------------------------------------------------------------------------
>        Latest Commit|http://commits.kde.org/kmym |http://commits.kde.org/kmym
>                     |oney/98df765f2cb5fcb2ee253d |oney/49c06bbd56834f963f20dc
>                     |7ba7141a59b0cf7bed          |7a96b2cb3bcff393b3
>
> --- Comment #6 from Cristian Oneț <onet.cristian@gmail.com> ---
> Git commit 49c06bbd56834f963f20dc7a96b2cb3bcff393b3 by Cristian Oneț.
> Committed on 19/08/2014 at 12:37.
> Pushed by conet into branch 'frameworks'.
>
> Use the proper precision in the split table.
>
> We must have only a few users with a precision more than 2
> otherwise this should have been catched a long time ago.
> (cherry picked from commit 98df765f2cb5fcb2ee253d7ba7141a59b0cf7bed)
>
> M  +5    -2    kmymoney/dialogs/kmymoneysplittable.cpp
> M  +6    -1    kmymoney/dialogs/kmymoneysplittable.h
> M  +1    -1    kmymoney/dialogs/ksplittransactiondlg.cpp
>
> http://commits.kde.org/kmymoney/49c06bbd56834f963f20dc7a96b2cb3bcff393b3
>
Comment 8 Cristian Oneț 2014-08-19 15:09:30 UTC
You're welcome.
Comment 9 Christian David 2014-09-24 19:30:59 UTC
Git commit 5131eaf3fa1c4dec7ca6a4d0dcb177d281e3fa57 by Christian Dávid, on behalf of Cristian Oneț.
Committed on 19/08/2014 at 12:37.
Pushed by christiand into branch 'add-onlinebanking'.

Use the proper precision in the split table.

We must have only a few users with a precision more than 2
otherwise this should have been catched a long time ago.

M  +5    -2    kmymoney/dialogs/kmymoneysplittable.cpp
M  +6    -1    kmymoney/dialogs/kmymoneysplittable.h
M  +1    -1    kmymoney/dialogs/ksplittransactiondlg.cpp

http://commits.kde.org/kmymoney/5131eaf3fa1c4dec7ca6a4d0dcb177d281e3fa57
Comment 10 Cristian Oneț 2014-10-18 11:18:42 UTC
*** Bug 340079 has been marked as a duplicate of this bug. ***