This commit is contained in:
Myat Zin Wai Maw
2020-01-08 15:35:47 +06:30
parent fab750c53a
commit d43266bd7d
8 changed files with 12 additions and 12 deletions

View File

@@ -2,12 +2,12 @@ class Api::BillController < Api::ApiController
#Create invoice based on booking
#Output and invoice
def create
@status = false
@error_message = "Order ID or Booking ID is require to request for a bill."
# if shift_by_terminal = ShiftSale.current_open_shift(get_cashier[0].id)
if !ShiftSale.current_shift(@shop.shop_code).nil?
if !ShiftSale.current_shift.nil?
#create Bill by Booking ID
table = 0
if (params[:booking_id])

View File

@@ -16,7 +16,7 @@ class Api::SurveyController < Api::ApiController
def create
dining_facility = DiningFacility.find(params[:id])
open_cashier = Employee.where("role = 'cashier' AND token_session <> ''")
current_shift = ShiftSale.current_shift(@shop.shop_code)
current_shift = ShiftSale.current_shift
current_shift_user =Employee.find_by_id(current_shift.employee_id)
if open_cashier.count>0
shift_by_terminal = ShiftSale.current_open_shift(open_cashier[0])