mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-23 11:43:47 -08:00
Fixes purchase date if no purchase date given
This commit is contained in:
parent
7a9cfb1a8f
commit
6fa4d1252d
|
@ -113,7 +113,12 @@ class ObjectImportCommand extends Command {
|
||||||
$item_status_name = $this->array_smart_fetch($row, "status");
|
$item_status_name = $this->array_smart_fetch($row, "status");
|
||||||
|
|
||||||
$item["item_name"] = $this->array_smart_fetch($row, "item name");
|
$item["item_name"] = $this->array_smart_fetch($row, "item name");
|
||||||
|
if ($this->array_smart_fetch($row, "purchase date")!='') {
|
||||||
$item["purchase_date"] = date("Y-m-d 00:00:01", strtotime($this->array_smart_fetch($row, "purchase date")));
|
$item["purchase_date"] = date("Y-m-d 00:00:01", strtotime($this->array_smart_fetch($row, "purchase date")));
|
||||||
|
} else {
|
||||||
|
$item["purchase_date"] = null;
|
||||||
|
}
|
||||||
|
|
||||||
$item["purchase_cost"] = $this->array_smart_fetch($row, "purchase cost");
|
$item["purchase_cost"] = $this->array_smart_fetch($row, "purchase cost");
|
||||||
$item["order_number"] = $this->array_smart_fetch($row, "order number");
|
$item["order_number"] = $this->array_smart_fetch($row, "order number");
|
||||||
$item["notes"] = $this->array_smart_fetch($row, "notes");
|
$item["notes"] = $this->array_smart_fetch($row, "notes");
|
||||||
|
|
Loading…
Reference in a new issue