foodsoft/app/models/stock_taking.rb
Patrick Gansterer 785313ac23 Make StockEvent a base class for Delivery and StockTaking
This helps to share code between the two entities and allows easier
extensions in the future.
2020-09-05 13:52:18 +02:00

7 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