diff --git a/app/controllers/origami/shifts_controller.rb b/app/controllers/origami/shifts_controller.rb index 5be0a735..e03dd0fc 100644 --- a/app/controllers/origami/shifts_controller.rb +++ b/app/controllers/origami/shifts_controller.rb @@ -34,10 +34,6 @@ class Origami::ShiftsController < BaseOrigamiController shift_obj = ShiftSale.where('id =?',@shift.id) @sale_taxes = Sale.get_separate_tax(shift_obj,from=nil,to=nil,type='') - puts @sale_taxes.to_a - puts @sale_taxes - puts @sale_taxes.to_json - puts "taxxxxxxxxxxxx" # get printer info print_settings=PrintSetting.find_by_unique_code(unique_code) diff --git a/app/models/sale_payment.rb b/app/models/sale_payment.rb index e1047de8..74764785 100644 --- a/app/models/sale_payment.rb +++ b/app/models/sale_payment.rb @@ -321,10 +321,14 @@ class SalePayment < ApplicationRecord bookings = table.bookings bookings.each do |tablebooking| if tablebooking.booking_status != 'moved' - if tablebooking.sale.sale_status != 'completed' && tablebooking.sale.sale_status != 'void' + if tablebooking.sale_id + if tablebooking.sale.sale_status != 'completed' && tablebooking.sale.sale_status != 'void' + status = false + end + else status = false - end - end + end + end end if status table.status = "available"