shop code

This commit is contained in:
Myat Zin Wai Maw
2019-11-22 18:24:02 +06:30
parent 5a3f328789
commit d1ab2c194d
106 changed files with 834 additions and 895 deletions

View File

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