Depreciation
in package
Table of Contents
Properties
- $zeroPointZero : float
Methods
- DB() : string|float|int
- DB.
- DDB() : float|string
- DDB.
- SLN() : float|string
- SLN.
- SYD() : float|string
- SYD.
- validateCost() : float
- validateFactor() : float
- validateLife() : float
- validateMonth() : int
- validatePeriod() : float
- validateSalvage() : float
Properties
$zeroPointZero
private
static float
$zeroPointZero
= 0.0
Methods
DB()
DB.
public
static DB(mixed $cost, mixed $salvage, mixed $life, mixed $period[, mixed $month = 12 ]) : string|float|int
Returns the depreciation of an asset for a specified period using the fixed-declining balance method. This form of depreciation is used if you want to get a higher depreciation value at the beginning of the depreciation (as opposed to linear depreciation). The depreciation value is reduced with every depreciation period by the depreciation already deducted from the initial cost.
Excel Function: DB(cost,salvage,life,period[,month])
Parameters
- $cost : mixed
-
Initial cost of the asset
- $salvage : mixed
-
Value at the end of the depreciation. (Sometimes called the salvage value of the asset)
- $life : mixed
-
Number of periods over which the asset is depreciated. (Sometimes called the useful life of the asset)
- $period : mixed
-
The period for which you want to calculate the depreciation. Period must use the same units as life.
- $month : mixed = 12
-
Number of months in the first year. If month is omitted, it defaults to 12.
Return values
string|float|intDDB()
DDB.
public
static DDB(mixed $cost, mixed $salvage, mixed $life, mixed $period[, mixed $factor = 2.0 ]) : float|string
Returns the depreciation of an asset for a specified period using the double-declining balance method or some other method you specify.
Excel Function: DDB(cost,salvage,life,period[,factor])
Parameters
- $cost : mixed
-
Initial cost of the asset
- $salvage : mixed
-
Value at the end of the depreciation. (Sometimes called the salvage value of the asset)
- $life : mixed
-
Number of periods over which the asset is depreciated. (Sometimes called the useful life of the asset)
- $period : mixed
-
The period for which you want to calculate the depreciation. Period must use the same units as life.
- $factor : mixed = 2.0
-
The rate at which the balance declines. If factor is omitted, it is assumed to be 2 (the double-declining balance method).
Return values
float|stringSLN()
SLN.
public
static SLN(mixed $cost, mixed $salvage, mixed $life) : float|string
Returns the straight-line depreciation of an asset for one period
Parameters
- $cost : mixed
-
Initial cost of the asset
- $salvage : mixed
-
Value at the end of the depreciation
- $life : mixed
-
Number of periods over which the asset is depreciated
Return values
float|string —Result, or a string containing an error
SYD()
SYD.
public
static SYD(mixed $cost, mixed $salvage, mixed $life, mixed $period) : float|string
Returns the sum-of-years' digits depreciation of an asset for a specified period.
Parameters
- $cost : mixed
-
Initial cost of the asset
- $salvage : mixed
-
Value at the end of the depreciation
- $life : mixed
-
Number of periods over which the asset is depreciated
- $period : mixed
-
Period
Return values
float|string —Result, or a string containing an error
validateCost()
private
static validateCost(mixed $cost[, bool $negativeValueAllowed = false ]) : float
Parameters
- $cost : mixed
- $negativeValueAllowed : bool = false
Return values
floatvalidateFactor()
private
static validateFactor(mixed $factor) : float
Parameters
- $factor : mixed
Return values
floatvalidateLife()
private
static validateLife(mixed $life[, bool $negativeValueAllowed = false ]) : float
Parameters
- $life : mixed
- $negativeValueAllowed : bool = false
Return values
floatvalidateMonth()
private
static validateMonth(mixed $month) : int
Parameters
- $month : mixed
Return values
intvalidatePeriod()
private
static validatePeriod(mixed $period[, bool $negativeValueAllowed = false ]) : float
Parameters
- $period : mixed
- $negativeValueAllowed : bool = false
Return values
floatvalidateSalvage()
private
static validateSalvage(mixed $salvage[, bool $negativeValueAllowed = false ]) : float
Parameters
- $salvage : mixed
- $negativeValueAllowed : bool = false