# Qual: Update fields phpdoc to include fields that are defined/used in some cases
comment, copytoclipboard, autofocusoncreated are documented and used in some cases for the
$fields definition
* FIX: assets: division by zero when trying to calculate depreciation on assets that don't have it
* FIX: assets: division by zero when trying to calculate depreciation on assets that don't have it, part 2
* Qual: Fix FunctionArray phan notices
* Fix class name in typing of htdocs/modulebuilder/index.php
* Fix customreports phpdoc
* Adjust file type after completeFileArrayWithDatabaseInfo
* Further phpdoc typing improvements
* More phpdoc
* Improve typing with cast on position field
* Force phpstan version
* Add phpstan exception
* Fix array index type + adjust phan config comment
* NEW FY Changed Period handle in Module Asset
NEW This is the code modification to take in consideration any changed in fiscal year period adjustments to shortened or extended periods (e.g., fiscal years of 9 or 15 months)
* Clean asset.class.php
* NEW CONST ASSET_ROUND_INTEGER_NUMBER_UPWARDS
New CONST ASSET_ROUND_INTEGER_NUMBER_UPWARDS
During several months, we worked with 3 accounting experts in migrating from Quadratus to Dolibarr several assets.(more than 200). We compared all of them ot get same result in Dolibarr. During this test we discoverd that Quadratus has an option to round upwards all the calculated asset values (less the last one). With this const and the code attach we get same result. This is really helpful to migration and also clarity in the lines.
Update asset.class.php Round upwards AssetCalculationThis new CONSTUpdate asset.class.php Round upwards AssetCalculation
* Update asset.class.php
This fix corrects 2 issues:
- PHP Error required (float)
- $depreciation_date_end was incorrect with an extra day. This was impacting last calculation period.
e.g; 5 years period starting the 30/09/2019 means $depreciation_date_end = 29/09/2024. It was returning 30/09/2024
The AssetDepreciationOptionAmountBaseDepreciationHT (Base Amortissable) and 2 others fields AssetDepreciationOptionAmountBaseDeductibleHT, AssetDepreciationOptionTotalAmountLastDepreciationHT did not get their default value executed when using the following TPL:
asset/tpl/depreciation_options_edit.tpl.php
* Qual: Enable & fix or ignore Invalid DimOffset
# Qual: Enable & fix or ignore Invalid DimOffset
The Invalid DimOffset notices occur when array keys are defined and
the index used is not amongst the known array keys.
This PR enables these notices and fixes array definitions when needed,
or ignores the notices locally if it's a false positive, or in the
baseline.txt when it does not seem to be a false positive so that
it can be fixed later
* Nullable object typing in function signature not ok for 7.0/8.4
Can't user '?User' as argument type for PHP7.0 which is required by PHP8.4.
Therefore, removing the typing specification in the function definition
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>