shop code
This commit is contained in:
@@ -4,7 +4,7 @@ class Origami::ShiftsController < BaseOrigamiController
|
||||
|
||||
def show
|
||||
@cashier_type = params[:type]
|
||||
@shift = ShiftSale.current_open_shift(current_user.id)
|
||||
@shift = ShiftSale.current_open_shift(current_user)
|
||||
#for bank integration
|
||||
bank_integration = Lookup.collection_of('bank_integration')
|
||||
@bank_integration = 0
|
||||
@@ -56,7 +56,7 @@ class Origami::ShiftsController < BaseOrigamiController
|
||||
cashier_terminal.save
|
||||
|
||||
#add shift_sale_id to card_settle_trans
|
||||
bank_integration = Lookup.find_by_lookup_type('bank_integration')
|
||||
bank_integration = Lookup.find_by_lookup_type_and_shop_code('bank_integration',@shop.shop_code)
|
||||
if !bank_integration.nil?
|
||||
card_settle_trans = CardSettleTran.select('id').where(['shift_sale_id IS NULL and status IS NOT NULL'])
|
||||
|
||||
@@ -74,7 +74,7 @@ class Origami::ShiftsController < BaseOrigamiController
|
||||
# if !close_cashier_print[0].nil?
|
||||
# @close_cashier_print = close_cashier_print[0][1]
|
||||
# end
|
||||
close_cashier_pdf = Lookup.collection_of("print_settings")
|
||||
close_cashier_pdf = Lookup.where("shop_code='#{@shop.shop_code}'").collection_of("print_settings")
|
||||
unique_code = "CloseCashierPdf"
|
||||
|
||||
if !close_cashier_pdf.empty?
|
||||
@@ -92,7 +92,7 @@ class Origami::ShiftsController < BaseOrigamiController
|
||||
#get tax
|
||||
shift_obj = ShiftSale.where('id =?',@shift.id)
|
||||
sale_items = ''
|
||||
@lookup = Lookup.shift_sale_items_lookup_value
|
||||
@lookup = Lookup.shift_sale_items_lookup_value(@shop.shop_code)
|
||||
if @lookup.to_i == 1
|
||||
@sale_items = Sale.get_shift_sale_items(@shift.id)
|
||||
other_charges = Sale.get_other_charges()
|
||||
@@ -129,7 +129,7 @@ class Origami::ShiftsController < BaseOrigamiController
|
||||
end
|
||||
end
|
||||
end
|
||||
Employee.logout(session[:session_token])
|
||||
Employee.logout(@shop,session[:session_token])
|
||||
session[:session_token] = nil
|
||||
end
|
||||
|
||||
@@ -137,7 +137,7 @@ class Origami::ShiftsController < BaseOrigamiController
|
||||
end
|
||||
|
||||
def sale_summary
|
||||
@shift = ShiftSale.current_open_shift(current_user.id)
|
||||
@shift = ShiftSale.current_open_shift(current_user)
|
||||
|
||||
# @shift = ShiftSale.find_by_id(shift_id)
|
||||
if @shift
|
||||
|
||||
Reference in New Issue
Block a user