Commit 3bfc2f789d2368efaa838b944e5241406cf1d63d
1 parent
662a869d
Exists in
master
and in
29 other branches
Fix nil production cost
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
app/models/product.rb
@@ -188,7 +188,7 @@ class Product < ActiveRecord::Base | @@ -188,7 +188,7 @@ class Product < ActiveRecord::Base | ||
188 | 188 | ||
189 | def price_described? | 189 | def price_described? |
190 | return false if price.blank? or price == 0 | 190 | return false if price.blank? or price == 0 |
191 | - (price - total_production_cost).zero? | 191 | + (price - total_production_cost.to_f).zero? |
192 | end | 192 | end |
193 | 193 | ||
194 | def update_price_details(price_details) | 194 | def update_price_details(price_details) |