fixed item type import

This commit is contained in:
Denis Duliçi 2023-04-04 19:05:18 +03:00
parent e4154a7e38
commit 467fede4ff

View File

@ -331,7 +331,7 @@ trait Import
$data = [ $data = [
'company_id' => company_id(), 'company_id' => company_id(),
'type' => $row['item_type'], 'type' => !empty($row['item_type']) ? $row['item_type'] : (!empty($row['type']) ? $row['type'] : 'product'),
'name' => $row['item_name'], 'name' => $row['item_name'],
'description' => !empty($row['item_description']) ? $row['item_description'] : null, 'description' => !empty($row['item_description']) ? $row['item_description'] : null,
'sale_price' => !empty($row['sale_price']) ? $row['sale_price'] : (!empty($row['price']) ? $row['price'] : 0), 'sale_price' => !empty($row['sale_price']) ? $row['sale_price'] : (!empty($row['price']) ? $row['price'] : 0),