separate foodcourt module
This commit is contained in:
@@ -16,7 +16,6 @@ class ShiftSale < ApplicationRecord
|
||||
belongs_to :cashier_terminal
|
||||
belongs_to :employee, :foreign_key => 'employee_id'
|
||||
has_many :sales
|
||||
belongs_to :shop
|
||||
|
||||
def self.current_shift(shop_code)
|
||||
# today_date = DateTime.now.strftime("%Y-%m-%d")
|
||||
@@ -84,6 +83,7 @@ class ShiftSale < ApplicationRecord
|
||||
self.shift_started_at = DateTime.now
|
||||
self.employee_id = current_user.id
|
||||
self.opening_balance = opening_balance
|
||||
self.shop_code = current_user.shop_code
|
||||
self.other_sales = 0
|
||||
self.save
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user