shop code
This commit is contained in:
@@ -17,9 +17,9 @@ class ShiftSale < ApplicationRecord
|
||||
belongs_to :employee, :foreign_key => 'employee_id'
|
||||
has_many :sales
|
||||
|
||||
def self.current_shift(shop_code)
|
||||
def self.current_shift
|
||||
# today_date = DateTime.now.strftime("%Y-%m-%d")
|
||||
shift = ShiftSale.where("shop_code='#{shop_code}' and shift_started_at is not null and shift_closed_at is null").first
|
||||
shift = ShiftSale.where("shift_started_at is not null and shift_closed_at is null").first
|
||||
return shift
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user