stock check report

This commit is contained in:
Zin Lin Phyo
2017-09-07 10:30:20 +06:30
parent 2e53b72574
commit 43cc308d89
6 changed files with 218 additions and 206 deletions

View File

@@ -1,5 +1,4 @@
class StockCheck < ApplicationRecord
has_many :stock_check_items
def create(user, reason, item_list)
@@ -7,11 +6,11 @@ class StockCheck < ApplicationRecord
self.check_by = user.id
self.check_start = Time.now
self.check_end = Time.now
self.save
save
item_list.each do |item|
stockItem = StockCheckItem.new
stockItem.create(self.id,item)
stockItem.create(id, item)
end
return self
self
end
end