booking status changed
This commit is contained in:
@@ -53,6 +53,19 @@ class Transactions::BookingsController < ApplicationController
|
||||
end
|
||||
end
|
||||
|
||||
def update_status
|
||||
data = Booking.where("sale_id IS NULL AND booking_status='assign' AND booking_id = ?", params[:booking_id])
|
||||
if !data.nil?
|
||||
booking = Booking.find(params[:booking_id])
|
||||
booking.booking_status = 'moved'
|
||||
booking.save!
|
||||
|
||||
render :json => {:status => true, :message => "Update status successfully."}
|
||||
else
|
||||
render :json => {:status => false, :error_message => "Can't update status!"}
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
# Use callbacks to share common setup or constraints between actions.
|
||||
def set_transactions_booking
|
||||
|
||||
Reference in New Issue
Block a user