Include MathPHP's finance fuctions in Dolibarr #22742
Labels
Feature request
This is a feature request
Issue Stale (automatic label)
This issue is stale because it has been open 1 year with no activity. Remove this label to keep open
Feature Request
Including MathPHP, a mathematics library, to make some financial (among others) calculations more flexible and more reliable.
Use case
I am currently working on improvements to the Loan module. It currently uses its own calculation formula to compute installments including compounded interest. As far as I can tell, the formulas are correct, but they use implicit parameters (hard-coded constants that should be parameters). The features I am working on require more flexibility in those formulas, but the current formula is not documented and therefore hard to modify without risking introducing errors.
Current implementation in Dolibarr:
The calculation is correct (as far as my testing goes), but it will only work with an annual proportional rate for monthly installments in arrear. I am trying to enable (for instance) quarterly installments in advance (the rate will still be annual + proportional with the features I am trying to introduce, but it will be explicit to avoid any confusion).
I could implement my own calculation function, but I think there are clear benefits if we use MathPHP for those calculations:
.git
, 5MB if you include them)Finance.php
), which is what I need today, is completely independant of the rest of the lib.Finance.php
only weighs 27 kBSuggested implementation
No response
Suggested steps
No response
The text was updated successfully, but these errors were encountered: