added decoration support

This commit is contained in:
Senad Uka
2015-11-24 10:29:46 +01:00
parent 31876c0c1a
commit b93660b264
4 changed files with 12 additions and 3 deletions

View File

@@ -3,7 +3,8 @@ class Item < ActiveRecord::Base
CSV_COL = {
:code => 0,
:input_price => 1,
:list_price => 2
:list_price => 2,
:decoration => 3
}
belongs_to :unit
@@ -117,6 +118,7 @@ class Item < ActiveRecord::Base
else
item.current_input_price = row[CSV_COL[:input_price]]
item.list_price = row[CSV_COL[:list_price]]
item.decoration = row[CSV_COL[:decoration]]
item.save!
end
end