string to float for currency price
This commit is contained in:
parent
249d232e0d
commit
eb201a93b6
1 changed files with 3 additions and 2 deletions
|
@ -73,9 +73,10 @@ module FoodsoftArticleImport
|
|||
|
||||
# get scale prices if exists
|
||||
# article.merge!(:scale_quantity => row[40], :scale_price => row[41]) unless row[40].nil? or row[41].nil?
|
||||
|
||||
unless row[37].nil? && row[65].nil? && row[66].nil?
|
||||
article.merge!(:price_per => row[66].to_f * row[37].to_f)
|
||||
price_per = row[66].gsub(',', '.').to_f
|
||||
price = row[37].gsub(',', '.').to_f
|
||||
article.merge!(:price_per => price_per * price)
|
||||
article.merge!(:unit_symbol => row[65] )
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue