diff --git a/lib/foodsoft_article_import.rb b/lib/foodsoft_article_import.rb index ec30348..fee3162 100644 --- a/lib/foodsoft_article_import.rb +++ b/lib/foodsoft_article_import.rb @@ -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 = [] diff --git a/lib/foodsoft_article_import/bnn.rb b/lib/foodsoft_article_import/bnn.rb index 0dfa703..d848674 100644 --- a/lib/foodsoft_article_import/bnn.rb +++ b/lib/foodsoft_article_import/bnn.rb @@ -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,