Merge pull request #12537 from inietov/fixes/expected_checkin_date_validation

Fixed #12531 Expected Checkin Date on Asset Checkout throws an error
This commit is contained in:
snipe 2023-02-22 16:03:51 -08:00 committed by GitHub
commit 5a1e5f740d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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