From 4014f5e15bbcaf5b7d12088c2eb6728d445dff15 Mon Sep 17 00:00:00 2001 From: snipe Date: Mon, 27 Jul 2015 17:11:46 -0700 Subject: [PATCH] Bug in purchase date --- app/commands/ImportCommand.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/commands/ImportCommand.php b/app/commands/ImportCommand.php index ac4eaeacda..5c43898c8a 100644 --- a/app/commands/ImportCommand.php +++ b/app/commands/ImportCommand.php @@ -123,8 +123,12 @@ class ImportCommand extends Command { $user_asset_notes = ''; } - if (array_key_exists('9',$row)) { - $user_asset_purchase_date = date("Y-m-d 00:00:01", strtotime($row[10])); + if (array_key_exists('10',$row)) { + if ($row[10]!='') { + $user_asset_purchase_date = date("Y-m-d 00:00:01", strtotime($row[10])); + } else { + $user_asset_purchase_date = ''; + } } else { $user_asset_purchase_date = ''; }