Bug 143772 - Currency doesn't round properly in calculated fields of Calc.
Summary: Currency doesn't round properly in calculated fields of Calc.
Status: RESOLVED INSUFFICIENTDATA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.1.3.2 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-07 15:33 UTC by Michael Boyer
Modified: 2022-06-29 03:39 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Boyer 2021-08-07 15:33:03 UTC
Description:
When I do some major calculations involving currency, the stated currency is correct, however, when adding two cells together based upon a formula, it used the non-currency amount to add them which results in a penny difference. If I used the ROUNDUP function, it gives the correct result.

Steps to Reproduce:
1. Calculated value that is $1.46 is added to a calculated value of $4809.69.
2. Actual decimal value of $1.46 is $1.45506815
3. Actual decimal value of $4809.69 is $4809.68880000
4. Resulting addition should be $4,811.14386815.
5. Limiting the decimal places to both values to 2 places as in standard currency gives the values $1.46 and $4809.69 respectively, which is the correct rounding.
6. However, in adding the two values, it calculate them to $4811.14 off of the NON-truncated 2 decimal place currency value, when it should calculate them to $4811.15.
7. If I use the ROUNDUP function on the calculated value, it displays correct, but as currency values, the decimal places allowed should be the amounts summed, not the non-truncated values.

Actual Results:
$1.46 + $4809.69 = $4811.14 when it should be $4811.15.

Expected Results:
$1.46 + $4809.69 = $4811.14 when it should be $4811.15.


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.1.3.2 (x64) / LibreOffice Community
Build ID: 47f78053abe362b9384784d31a6e56f8511eb1c1
CPU threads: 12; OS: Windows 10.0 Build 19042; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded
Comment 1 raal 2021-08-08 07:28:12 UTC
Please attach test file. Currency format of the cell is only format, but Calc still use whole number in the cell for computation.
Comment 2 Nii 2021-11-29 15:51:04 UTC
Hi, 

I changed the status to NEEDINFO, can you attach a test file, please? 

Thank you!
Comment 3 QA Administrators 2022-05-29 03:41:32 UTC Comment hidden (obsolete)
Comment 4 QA Administrators 2022-06-29 03:39:16 UTC
Dear Michael Boyer,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INSUFFICIENTDATA due to inactivity and
a lack of information which is needed in order to accurately
reproduce and confirm the problem. We encourage you to retest
your bug against the latest release. If the issue is still
present in the latest stable release, we need the following
information (please ignore any that you've already provided):

a) Provide details of your system including your operating
   system and the latest version of LibreOffice that you have
   confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED
and we will attempt to reproduce the issue. Please do not:

a) respond via email 

b) update the version field in the bug or any of the other details
   on the top section of our bug tracker

Warm Regards,
QA Team

MassPing-NeedInfo-FollowUp