update pay without existing invoice in salepayment.rb
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user