add missing return value
This commit is contained in:
parent
e8ae076cf4
commit
ab05688240
2 changed files with 9 additions and 9 deletions
|
@ -38,6 +38,14 @@ module FoodsoftArticleImport
|
||||||
# @todo handle wrong or undetected type
|
# @todo handle wrong or undetected type
|
||||||
parser = file_formats[type]
|
parser = file_formats[type]
|
||||||
if block_given?
|
if block_given?
|
||||||
|
puts "
|
||||||
|
" + "______________" + "
|
||||||
|
" + "______________" + "
|
||||||
|
" + "______________" + "
|
||||||
|
" + "given" + "
|
||||||
|
" + "______________"+ "
|
||||||
|
" + "______________"+ "
|
||||||
|
" + "______________"
|
||||||
parser.parse(file, custom_file, **opts, &blk)
|
parser.parse(file, custom_file, **opts, &blk)
|
||||||
else
|
else
|
||||||
data = []
|
data = []
|
||||||
|
|
|
@ -57,14 +57,6 @@ module FoodsoftArticleImport
|
||||||
col_sep = opts[:col_sep] || OPTIONS[:col_sep]
|
col_sep = opts[:col_sep] || OPTIONS[:col_sep]
|
||||||
self.load_codes(custom_file)
|
self.load_codes(custom_file)
|
||||||
CSV.foreach(file, {col_sep: col_sep, encoding: encoding, headers: true}).with_index(1) do |row, i|
|
CSV.foreach(file, {col_sep: col_sep, encoding: encoding, headers: true}).with_index(1) do |row, i|
|
||||||
puts "
|
|
||||||
" + "______________" + "
|
|
||||||
" + "______________" + "
|
|
||||||
" + "______________" + "
|
|
||||||
" + "#{i}#{row}" + "
|
|
||||||
" + "______________"+ "
|
|
||||||
" + "______________"+ "
|
|
||||||
" + "______________"
|
|
||||||
# check if the line is empty
|
# check if the line is empty
|
||||||
unless row[0] == "" || row[0].nil?
|
unless row[0] == "" || row[0].nil?
|
||||||
article = {
|
article = {
|
||||||
|
@ -88,7 +80,7 @@ module FoodsoftArticleImport
|
||||||
if row[62] != nil
|
if row[62] != nil
|
||||||
# consider special prices
|
# consider special prices
|
||||||
article[:note] = "Sonderpreis: #{article[:price]} von #{row[62]} bis #{row[63]}"
|
article[:note] = "Sonderpreis: #{article[:price]} von #{row[62]} bis #{row[63]}"
|
||||||
yield article, :special
|
yield article, :special, i
|
||||||
|
|
||||||
# Check now for article status, we only consider outlisted articles right now
|
# Check now for article status, we only consider outlisted articles right now
|
||||||
# N=neu, A=Änderung, X=ausgelistet, R=Restbestand,
|
# N=neu, A=Änderung, X=ausgelistet, R=Restbestand,
|
||||||
|
|
Loading…
Reference in a new issue