Bug 99308 - Amordegrc using obsolete values for degressive amortisation
Summary: Amordegrc using obsolete values for degressive amortisation
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Calc-Function
  Show dependency treegraph
 
Reported: 2016-04-14 19:58 UTC by Richard PALO
Modified: 2025-08-24 03:11 UTC (History)
3 users (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 Richard PALO 2016-04-14 19:58:55 UTC
Quite by chance I can across in the file analsishelper.cxx
line 994-1001

if( fUsePer < 3.0 )
        fAmorCoeff = 1.0;
    else if( fUsePer < 5.0 )
        fAmorCoeff = 1.5;
    else if( fUsePer <= 6.0 )
        fAmorCoeff = 2.0;
    else
        fAmorCoeff = 2.5;

these appear to be old values from 1997-2000... perhaps should be updated
(although with the exceptions that may prove complicated).

Minimally the values should probably be 1.0; 1.25; 1.75 and 2.25
but here are the references:

art 120 @ http://bofip.impots.gouv.fr/bofip/4699-PGP.html   
plus exceptions scattered in http://bofip.impots.gouv.fr/bofip/4744-PGP.html
Comment 1 Buovjaga 2016-05-02 15:07:30 UTC
I believe you, so I'll set to NEW.
Comment 2 QA Administrators 2017-05-22 13:38:59 UTC Comment hidden (obsolete)
Comment 3 Richard PALO 2017-05-22 14:01:40 UTC
FWIW, I just recently put a postit on my screen to come back to this
(guess I just thought *too* hard if you did as well:-).
I hope to come up with some time this summer to create some tests and
address the issues noted here.
Unless of course there is some young soul looking for a challenge sooner, where I would be happy to help as well...
cheers
Comment 4 QA Administrators 2018-05-23 02:36:38 UTC Comment hidden (obsolete)
Comment 5 QA Administrators 2020-05-23 03:44:08 UTC Comment hidden (obsolete)
Comment 6 QA Administrators 2022-05-24 03:33:54 UTC Comment hidden (obsolete)
Comment 7 BogdanB 2023-05-29 05:33:46 UTC
The same now in
/core/scaddins/source/analysis/analysishelper.cxx 

double GetAmordegrc( sal_Int32 nNullDate, double fCost, sal_Int32 nDate, sal_Int32 nFirstPer,
954      double fRestVal, double fPer, double fRate, sal_Int32 nBase )
955  {
956      sal_uInt32  nPer = sal_uInt32( fPer );
957      double      fUsePer = 1.0 / fRate;
958      double      fAmorCoeff;
959  
960      if( fUsePer < 3.0 )
961          fAmorCoeff = 1.0;
962      else if( fUsePer < 5.0 )
963          fAmorCoeff = 1.5;
964      else if( fUsePer <= 6.0 )
965          fAmorCoeff = 2.0;
966      else
967          fAmorCoeff = 2.5;
Comment 8 Eike Rathke 2023-08-24 18:46:03 UTC
Came across this by chance.. changing some constants that exist for old Excel interoperability (as all the Analysis plugin functions are) most likely is not the way to go. Existing documents suddenly would calculate amortisation differently. Furthermore, changing them to a French standard (if I understood that document at all) would be even more unexpected.

If at all, then a new function taking coefficients as arguments would be the way to go.
Comment 9 QA Administrators 2025-08-24 03:11:55 UTC
Dear Richard PALO,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug