add missing return value

This commit is contained in:
viehlieb 2023-01-20 13:48:52 +01:00
parent e8ae076cf4
commit ab05688240
2 changed files with 9 additions and 9 deletions

View file

@ -38,6 +38,14 @@ module FoodsoftArticleImport
# @todo handle wrong or undetected type
parser = file_formats[type]
if block_given?
puts "
" + "______________" + "
" + "______________" + "
" + "______________" + "
" + "given" + "
" + "______________"+ "
" + "______________"+ "
" + "______________"
parser.parse(file, custom_file, **opts, &blk)
else
data = []

View file

@ -57,14 +57,6 @@ module FoodsoftArticleImport
col_sep = opts[:col_sep] || OPTIONS[:col_sep]
self.load_codes(custom_file)
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
unless row[0] == "" || row[0].nil?
article = {
@ -88,7 +80,7 @@ module FoodsoftArticleImport
if row[62] != nil
# consider special prices
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
# N=neu, A=Änderung, X=ausgelistet, R=Restbestand,