From 467fede4ffa552a9f79a44405fad5088ef0a4436 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Duli=C3=A7i?= Date: Tue, 4 Apr 2023 19:05:18 +0300 Subject: [PATCH] fixed item type import --- app/Traits/Import.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Traits/Import.php b/app/Traits/Import.php index 5af5dc13c..b289dcf2c 100644 --- a/app/Traits/Import.php +++ b/app/Traits/Import.php @@ -331,7 +331,7 @@ trait Import $data = [ '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'], 'description' => !empty($row['item_description']) ? $row['item_description'] : null, 'sale_price' => !empty($row['sale_price']) ? $row['sale_price'] : (!empty($row['price']) ? $row['price'] : 0),