-
This commit is contained in:
@@ -7,7 +7,7 @@ class Api::BillController < Api::ApiController
|
||||
@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])
|
||||
|
||||
@@ -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])
|
||||
|
||||
@@ -47,7 +47,7 @@ class Foodcourt::SurveysController < BaseFoodcourtController
|
||||
# shift_by_terminal = ShiftSale.find_by_cashier_terminal_id_and_shift_closed_at(cashier_zone.cashier_terminal_id,nil)
|
||||
# set cashier
|
||||
open_cashier = Employee.where("role = 'cashier' AND token_session <> '' and shop_code='#{@shop.shop_code}'")
|
||||
current_shift = ShiftSale.current_shift(@shop.shop_code)
|
||||
current_shift = ShiftSale.current_shift
|
||||
current_shift_user =Employee.find_by_id(current_user.employee_id)
|
||||
if open_cashier.count>0
|
||||
shift_by_terminal = ShiftSale.current_open_shift(open_cashier[0])
|
||||
|
||||
@@ -47,7 +47,7 @@ class Origami::CreditPaymentsController < BaseOrigamiController
|
||||
|
||||
def create_credit_payment
|
||||
arr_sale = JSON.parse(params[:data])
|
||||
if !ShiftSale.current_shift(@shop.shop_code).nil?
|
||||
if !ShiftSale.current_shift.nil?
|
||||
if !arr_sale.nil?
|
||||
arr_sale.each do |arr_sale|
|
||||
arr_sale.each do |sale|
|
||||
|
||||
@@ -22,7 +22,7 @@ class Origami::OrderReservationController < BaseOrigamiController
|
||||
|
||||
order_reserve = OrderReservation.find_by_transaction_ref(params[:ref_no])
|
||||
if !order_reserve.nil?
|
||||
if !ShiftSale.current_shift(@shop.shop_code).nil?
|
||||
if !ShiftSale.current_shift.nil?
|
||||
if @status == "processed"
|
||||
if order_reserve.status == "accepted"
|
||||
result = OrderReservation.create_doemal_order(order_reserve,current_user)
|
||||
@@ -86,7 +86,7 @@ class Origami::OrderReservationController < BaseOrigamiController
|
||||
def send_status
|
||||
order_reservation = OrderReservation.find_by_transaction_ref(params[:ref_no])
|
||||
if !order_reservation.nil?
|
||||
if !ShiftSale.current_shift(@shop.shop_code).nil? || params[:status] == 'accepted' || (order_reservation.status == 'new' && params[:status] == 'rejected')
|
||||
if !ShiftSale.current_shift.nil? || params[:status] == 'accepted' || (order_reservation.status == 'new' && params[:status] == 'rejected')
|
||||
response = OrderReservation.send_status_to_ordering(params[:url],params[:ref_no],params[:status],params[:waiting_time],params[:min_type],params[:reason])
|
||||
else
|
||||
response = { status: false, message: 'No current shift open for this employee!'}
|
||||
|
||||
@@ -100,7 +100,7 @@ class Origami::SplitBillController < BaseOrigamiController
|
||||
end
|
||||
|
||||
status = false
|
||||
if !ShiftSale.current_shift(@shop.shop_code).nil?
|
||||
if !ShiftSale.current_shift.nil?
|
||||
#create Bill by Booking ID
|
||||
table = 0
|
||||
if !params[:booking_id].empty?
|
||||
|
||||
@@ -47,7 +47,7 @@ class Origami::SurveysController < BaseOrigamiController
|
||||
# shift_by_terminal = ShiftSale.find_by_cashier_terminal_id_and_shift_closed_at(cashier_zone.cashier_terminal_id,nil)
|
||||
# set cashier
|
||||
open_cashier = Employee.where("role = 'cashier' AND token_session <> '' and shop_code='#{@shop.shop_code}'")
|
||||
current_shift = ShiftSale.current_shift(@shop.shop_code)
|
||||
current_shift = ShiftSale.current_shift
|
||||
current_shift_user =Employee.find_by_id(current_user.employee_id)
|
||||
if open_cashier.count>0
|
||||
shift_by_terminal = ShiftSale.current_open_shift(open_cashier[0])
|
||||
|
||||
Reference in New Issue
Block a user