mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
adds a months depreciated variable
This commit is contained in:
parent
cdc402fa04
commit
e6e68934f7
|
@ -73,10 +73,9 @@ class Depreciable extends SnipeModel
|
|||
$deprecation_per_year= $numerator/$denominator;
|
||||
$deprecation_per_month= $deprecation_per_year/12;
|
||||
|
||||
// fraction of value left
|
||||
$months_remaining = $this->time_until_depreciated()->m + 12 * $this->time_until_depreciated()->y; //UGlY
|
||||
// formula for current value is correct now. $months_remaining is not giving me the same value as expected. Considering how to fix this. -Godfrey M.
|
||||
$current_value = $deprecation_per_month*27;
|
||||
$months_depreciated=$this->get_depreciation()->months-$months_remaining;
|
||||
$current_value = $deprecation_per_month*$months_depreciated;
|
||||
|
||||
if($this->get_depreciation()->depreciation_min > $current_value) {
|
||||
|
||||
|
|
Loading…
Reference in a new issue