Fixes date sanity check in checkout

This commit is contained in:
snipe 2016-04-23 02:36:21 -07:00
parent 30c6657fc1
commit 97e218541b

View file

@ -186,7 +186,7 @@ class Asset extends Depreciable
$logaction->checkedout_to = $this->assigned_to;
$logaction->asset_type = 'hardware';
$logaction->note = $note;
if ($checkout_at) {
if ($checkout_at!='') {
$logaction->created_at = \Carbon\Carbon::createFromFormat('Y-m-d H:i:s', date('Y-m-d H:i:s', strtotime($checkout_at)));
} else {
$logaction->created_at = \Carbon\Carbon::now();