update db index
This commit is contained in:
@@ -53,12 +53,15 @@ class Origami::ShiftsController < BaseOrigamiController
|
||||
cashier_terminal.save
|
||||
|
||||
#add shift_sale_id to card_settle_trans
|
||||
card_settle_trans = CardSettleTran.select('id').where(['shift_sale_id IS NULL and status IS NOT NULL'])
|
||||
bank_integration = Lookup.find_by_lookup_type('bank_integration')
|
||||
if !bank_integration.nil?
|
||||
card_settle_trans = CardSettleTran.select('id').where(['shift_sale_id IS NULL and status IS NOT NULL'])
|
||||
|
||||
card_settle_trans.each do |data|
|
||||
card_sett_trans = CardSettleTran.find(data.id)
|
||||
card_sett_trans.shift_sale_id = @shift.id
|
||||
card_sett_trans.save()
|
||||
card_settle_trans.each do |data|
|
||||
card_sett_trans = CardSettleTran.find(data.id)
|
||||
card_sett_trans.shift_sale_id = @shift.id
|
||||
card_sett_trans.save()
|
||||
end
|
||||
end
|
||||
|
||||
if ENV["SERVER_MODE"] != "cloud" #no print in cloud server
|
||||
@@ -77,7 +80,7 @@ class Origami::ShiftsController < BaseOrigamiController
|
||||
end
|
||||
end
|
||||
end
|
||||
shop_details = Shop.find(1)
|
||||
shop_details = shop_detail
|
||||
#get tax
|
||||
shift_obj = ShiftSale.where('id =?',@shift.id)
|
||||
@sale_taxes = Sale.get_separate_tax(shift_obj,from=nil,to=nil,type='')
|
||||
|
||||
Reference in New Issue
Block a user