Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

Differences Between: [Versions 400 and 401] [Versions 400 and 402] [Versions 400 and 403]

(no description)

File Size: 210 lines (8 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Amortization:: (3 methods):
  AMORDEGRC()
  AMORLINC()
  getAmortizationCoefficient()


Class: Amortization  - X-Ref

AMORDEGRC($cost,$purchased,$firstPeriod,$salvage,$period,$rate,$basis = FinancialConstants::BASIS_DAYS_PER_YEAR_NASD)   X-Ref
AMORDEGRC.

Returns the depreciation for each accounting period.
This function is provided for the French accounting system. If an asset is purchased in
the middle of the accounting period, the prorated depreciation is taken into account.
The function is similar to AMORLINC, except that a depreciation coefficient is applied in
the calculation depending on the life of the assets.
This function will return the depreciation until the last period of the life of the assets
or until the cumulated value of depreciation is greater than the cost of the assets minus
the salvage value.

Excel Function:
AMORDEGRC(cost,purchased,firstPeriod,salvage,period,rate[,basis])

return: float|string (string containing the error type if there is an error)
param: mixed $cost The float cost of the asset
param: mixed $purchased Date of the purchase of the asset
param: mixed $firstPeriod Date of the end of the first period
param: mixed $salvage The salvage value at the end of the life of the asset
param: mixed $period the period (float)
param: mixed $rate rate of depreciation (float)
param: mixed $basis The type of day count to use (int).

AMORLINC($cost,$purchased,$firstPeriod,$salvage,$period,$rate,$basis = FinancialConstants::BASIS_DAYS_PER_YEAR_NASD)   X-Ref
AMORLINC.

Returns the depreciation for each accounting period.
This function is provided for the French accounting system. If an asset is purchased in
the middle of the accounting period, the prorated depreciation is taken into account.

Excel Function:
AMORLINC(cost,purchased,firstPeriod,salvage,period,rate[,basis])

return: float|string (string containing the error type if there is an error)
param: mixed $cost The cost of the asset as a float
param: mixed $purchased Date of the purchase of the asset
param: mixed $firstPeriod Date of the end of the first period
param: mixed $salvage The salvage value at the end of the life of the asset
param: mixed $period The period as a float
param: mixed $rate Rate of depreciation as  float
param: mixed $basis Integer indicating the type of day count to use.

getAmortizationCoefficient(float $rate)   X-Ref
No description