Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
snipe committed Jul 20, 2023
2 parents 19df0b8 + 0b8a3ee commit d26bc19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Models/Depreciable.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function getDepreciatedValue()
*/
public function getLinearDepreciatedValue() // TODO - for testing it might be nice to have an optional $relative_to param here, defaulted to 'now'
{
if ($this->purchase_date) {
if (($this->get_depreciation()) && ($this->purchase_date)) {
$months_passed = ($this->purchase_date->diff(now())->m)+($this->purchase_date->diff(now())->y*12);
} else {
return null;
Expand Down

0 comments on commit d26bc19

Please sign in to comment.