change get_Cashier to current_login_emp in checkin api

This commit is contained in:
phyusin
2017-12-08 11:48:04 +06:30
parent 1e7cec4646
commit ede4851257

View File

@@ -51,7 +51,7 @@ class Api::CheckInProcessController < Api::ApiController
end
booking = Booking.create({:dining_facility_id => params[:dining_id],:type => type,
:checkin_by=>get_cashier[0].name,:checkin_at => Time.now.utc,:checkout_at =>checkout_at, :booking_status => "assign", :reserved_at => checkout_at, :reserved_by => get_cashier[0].name })
:checkin_by=>current_login_employee.name,:checkin_at => Time.now.utc,:checkout_at =>checkout_at, :booking_status => "assign", :reserved_at => checkout_at, :reserved_by => get_cashier[0].name })
booking.save!
render :json => { :status => true, :checkout_at => booking.checkout_at.utc.getlocal.strftime("%Y-%m-%d %H:%M") }