Skip to content

A free open source IT asset/license management system

Moved asset-only date stuff into the asset importer

snipec8279c0b9906
diff --git a/app/Importer/ItemImporter.php b/app/Importer/ItemImporter.php
index e1b0f1c289..c472023fa0 100644
--- a/app/Importer/ItemImporter.php
+++ b/app/Importer/ItemImporter.php
@@ -79,26 +79,6 @@ class ItemImporter extends Importer
$this->item['purchase_date'] = date('Y-m-d', strtotime($this->findCsvMatch($row, 'purchase_date')));
}
- $this->item['last_audit_date'] = null;
- if ($this->findCsvMatch($row, 'last_audit_date') != '') {
- $this->item['last_audit_date'] = date('Y-m-d', strtotime($this->findCsvMatch($row, 'last_audit_date')));
- }
-
- $this->item['next_audit_date'] = null;
- if ($this->findCsvMatch($row, 'next_audit_date') != '') {
- $this->item['next_audit_date'] = date('Y-m-d', strtotime($this->findCsvMatch($row, 'next_audit_date')));
- }
-
- $this->item['asset_eol_date'] = null;
- if($this->findCsvMatch($row, 'asset_eol_date') != '') {
- $csvMatch = $this->findCsvMatch($row, 'asset_eol_date');
- try {
- $this->item['asset_eol_date'] = CarbonImmutable::parse($csvMatch)->format('Y-m-d');
- } catch (\Exception $e) {
- Log::info($e->getMessage());
- $this->log('Unable to parse date: '.$csvMatch);
- }
- }
$this->item['qty'] = $this->findCsvMatch($row, 'quantity');
$this->item['requestable'] = $this->findCsvMatch($row, 'requestable');