App\Models\Depreciable Class Reference
Inheritance diagram for App\Models\Depreciable:

Public Member Functions | |
depreciation () | |
Depreciation Relation, and associated helper methods. More... | |
get_depreciation () | |
getDepreciatedValue () | |
time_until_depreciated () | |
depreciated_date () | |
Detailed Description
Definition at line 7 of file Depreciable.php.
Member Function Documentation
App\Models\Depreciable::depreciated_date | ( | ) |
Definition at line 77 of file Depreciable.php.
80 date_add($date, date_interval_create_from_date_string($this->get_depreciation()->months . ' months'));
App\Models\Depreciable::depreciation | ( | ) |
Depreciation Relation, and associated helper methods.
Definition at line 28 of file Depreciable.php.
App\Models\Depreciable::get_depreciation | ( | ) |
Definition at line 33 of file Depreciable.php.
App\Models\Depreciable::getDepreciatedValue | ( | ) |
- Returns
- float|int
Definition at line 42 of file Depreciable.php.
53 $months_remaining = $this->time_until_depreciated()->m + 12*$this->time_until_depreciated()->y; //UGlY
54 $current_value = round(($months_remaining/ $this->get_depreciation()->months) * $this->purchase_cost, 2);
App\Models\Depreciable::time_until_depreciated | ( | ) |
Definition at line 62 of file Depreciable.php.
The documentation for this class was generated from the following file: