diff --git a/app/Models/Asset.php b/app/Models/Asset.php index f6db8585f9..725d1eee81 100644 --- a/app/Models/Asset.php +++ b/app/Models/Asset.php @@ -186,6 +186,14 @@ class Asset extends Depreciable 'model.manufacturer' => ['name'], ]; + // To properly set the expected checkin as Y-m-d + public function setExpectedCheckinAttribute($value) + { + if ($value == '') { + $value = null; + } + $this->attributes['expected_checkin'] = $value; + } /** * This handles the custom field validation for assets