mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 21:24:13 -08:00
parse purchase date even though it's cast
This commit is contained in:
parent
7dab59c98d
commit
cbef531811
|
@ -3,6 +3,7 @@
|
|||
namespace App\Presenters;
|
||||
|
||||
use App\Models\CustomField;
|
||||
use Carbon\CarbonImmutable;
|
||||
use DateTime;
|
||||
|
||||
/**
|
||||
|
@ -429,7 +430,7 @@ class AssetPresenter extends Presenter
|
|||
public function eol_date()
|
||||
{
|
||||
if (($this->purchase_date) && ($this->model->model) && ($this->model->model->eol)) {
|
||||
return $this->purchase_date->addMonths($this->model->model->eol)->format('Y-m-d');
|
||||
return CarbonImmutable::parse($this->purchase_date)->addMonths($this->model->model->eol)->format('Y-m-d');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue