mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
Adds setter to model Asset class for expected checkin
This commit is contained in:
parent
fdffe76b9f
commit
6e994c209f
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue