price is not reset when importing descriptions
This commit is contained in:
@@ -195,10 +195,13 @@ def import_single_item(row, index, logger)
|
|||||||
item = (Item.find_by code: code) || Item.new
|
item = (Item.find_by code: code) || Item.new
|
||||||
item.name = row[lookup[:name_on_ribica]]
|
item.name = row[lookup[:name_on_ribica]]
|
||||||
item.code = code
|
item.code = code
|
||||||
item.current_input_price = 0 #row[lookup[:current_input_price]] || 11.00
|
if item.new_record?
|
||||||
item.list_price = 0 #row[lookup[:list_price]] || 12.00
|
item.current_input_price = 0 #row[lookup[:current_input_price]] || 11.00
|
||||||
|
item.list_price = 0 #row[lookup[:list_price]] || 12.00
|
||||||
|
end
|
||||||
item.units_in_pack = row[lookup[:units_in_pack]]
|
item.units_in_pack = row[lookup[:units_in_pack]]
|
||||||
item.description = row[lookup[:description]] || "default description"
|
item.description = row[lookup[:description]]
|
||||||
|
item.description ||= item.name
|
||||||
item.stock = row[lookup[:stock]]
|
item.stock = row[lookup[:stock]]
|
||||||
item.on_display = row[lookup[:on_display]]
|
item.on_display = row[lookup[:on_display]]
|
||||||
item.tags = row[lookup[:tags]]
|
item.tags = row[lookup[:tags]]
|
||||||
|
|||||||
Reference in New Issue
Block a user