merge with crm

This commit is contained in:
Yan
2017-07-01 11:13:34 +06:30
5 changed files with 80 additions and 38 deletions

View File

@@ -20,9 +20,7 @@ class ShiftSale < ApplicationRecord
#if current_user
#find open shift where is open today and is not closed and login by current cashier
today_date = DateTime.now.strftime("%Y-%m-%d")
shift = ShiftSale.where("DATE(shift_started_at)= #{ today_date } and shift_started_at is not null and shift_closed_at is null and employee_id = #{current_user}").take
return shift
#end
end