Fixed bug in deliveries. Extended test fixtures.
This commit is contained in:
parent
46d0a9c485
commit
0a87294ed4
9 changed files with 28 additions and 8 deletions
|
|
@ -21,7 +21,7 @@ class Delivery < ActiveRecord::Base
|
|||
|
||||
def stock_change_attributes=(stock_change_attributes)
|
||||
for attributes in stock_change_attributes
|
||||
stock_changes.build(attributes) unless attributes[:quantity] == 0.0 or attributes[:quantity].blank?
|
||||
stock_changes.build(attributes) unless attributes[:quantity].to_i == 0
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue