foodsoft/app/models/stock_taking.rb

8 lines
228 B
Ruby

class StockTaking < StockEvent
def stock_change_attributes=(stock_change_attributes)
for attributes in stock_change_attributes
stock_changes.build(attributes) unless attributes[:quantity].to_i == 0
end
end
end