Summary: | Financial functions, PayType parameter used incorrectly | ||
---|---|---|---|
Product: | LibreOffice | Reporter: | raal <raal> |
Component: | Calc | Assignee: | Winfried Donkers <winfrieddonkers> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | erack, h3734236, winfrieddonkers |
Priority: | medium | ||
Version: | Inherited From OOo | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | target:5.3.0 | ||
Crash report or crash signature: | Regression By: | ||
Attachments: | document used for testing |
Description
raal
2016-06-27 21:13:43 UTC
Created attachment 126058 [details]
document used for testing
Only Part Type 0 or 1 should be accepted.
PayType should be Logical, not Number. Excel and Gnumeric do the same. https://lists.oasis-open.org/archives/office-comment/201607/msg00004.html Reopening because PayType for this and related functions is evaluated weirdly as if (PayType > 0.0) ... beginning of period else ... end of period which is complete nonsense. It appears that many financial functions: CUMPIPMT FV IPMT PMT CUMPRINC PV use a horrible interpretation of boolean values (like [<=0] for false). Changing the subject of the bug report to reflect all functions affected. *** Bug 100542 has been marked as a duplicate of this bug. *** *** Bug 100559 has been marked as a duplicate of this bug. *** *** Bug 100669 has been marked as a duplicate of this bug. *** (In reply to Winfried Donkers from comment #5) > It appears that many financial functions: > CUMPIPMT > FV > IPMT > PMT > CUMPRINC > PV > use a horrible interpretation of boolean values (like [<=0] for false). > NPER is one of the functions affected, too. Winfried Donkers committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=8340f6dcfb2f391feeddb1bc24931cd6f145669a tdf#100646 Make correct use argument PartType in financial functions. It will be available in 5.3.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback. |