check checkedin exist in lookups and void - sale
This commit is contained in:
@@ -25,9 +25,10 @@ class Api::CheckInProcessController < Api::ApiController
|
|||||||
alert_time_min = checkout_time[1].to_i
|
alert_time_min = checkout_time[1].to_i
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
render :json => { :status => true, :check_in_time => check_in_time, :check_out_time => check_out_time, :alert_time_min => alert_time_min, :extra_minutes => extra_minutes }
|
||||||
|
else
|
||||||
|
render :json => { :status => true }
|
||||||
end
|
end
|
||||||
|
|
||||||
render :json => { :status => true, :check_in_time => check_in_time, :check_out_time => check_out_time, :alert_time_min => alert_time_min, :extra_minutes => extra_minutes }
|
|
||||||
else
|
else
|
||||||
render :json => { :status => false, :error_message => "No current booking!" }
|
render :json => { :status => false, :error_message => "No current booking!" }
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -12,21 +12,21 @@ class Origami::CheckInProcessController < BaseOrigamiController
|
|||||||
checkout_at = checkout_at + (checkout_time[1]).to_i.minutes
|
checkout_at = checkout_at + (checkout_time[1]).to_i.minutes
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@dining_facility = DiningFacility.find(params[:dining_id])
|
||||||
|
@dining_facility.status = "occupied"
|
||||||
|
@dining_facility.save!
|
||||||
|
|
||||||
|
if @dining_facility.type == "Table"
|
||||||
|
type = "TableBooking"
|
||||||
|
else
|
||||||
|
type = "RoomBooking"
|
||||||
|
end
|
||||||
|
|
||||||
|
@booking = Booking.create({:dining_facility_id => params[:dining_id],:type => type,
|
||||||
|
:checkin_by=>current_login_employee.name,:checkin_at => Time.now.utc,:checkout_at =>checkout_at, :booking_status => "assign", :reserved_at => checkout_at, :reserved_by => current_login_employee.name })
|
||||||
|
@booking.save!
|
||||||
end
|
end
|
||||||
@dining_facility = DiningFacility.find(params[:dining_id])
|
|
||||||
@dining_facility.status = "occupied"
|
|
||||||
@dining_facility.save!
|
|
||||||
|
|
||||||
if @dining_facility.type == "Table"
|
|
||||||
type = "TableBooking"
|
|
||||||
else
|
|
||||||
type = "RoomBooking"
|
|
||||||
end
|
|
||||||
|
|
||||||
@booking = Booking.create({:dining_facility_id => params[:dining_id],:type => type,
|
|
||||||
:checkin_by=>current_login_employee.name,:checkin_at => Time.now.utc,:checkout_at =>checkout_at, :booking_status => "assign", :reserved_at => checkout_at, :reserved_by => current_login_employee.name })
|
|
||||||
@booking.save!
|
|
||||||
|
|
||||||
respond = {:status => 'ok'}
|
respond = {:status => 'ok'}
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.json { render json: respond }
|
format.json { render json: respond }
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ class Origami::VoidController < BaseOrigamiController
|
|||||||
rebate = MembershipSetting.find_by_rebate(1)
|
rebate = MembershipSetting.find_by_rebate(1)
|
||||||
if customer.membership_id != nil && rebate
|
if customer.membership_id != nil && rebate
|
||||||
member_info = Customer.get_member_account(customer)
|
member_info = Customer.get_member_account(customer)
|
||||||
rebate_amount = Customer.get_membership_transactions(customer,saleObj.receipt_no)
|
rebate_amount = Customer.get_membership_transactions(customer,sale.receipt_no)
|
||||||
current_balance = SaleAudit.paymal_search(sale_id)
|
current_balance = SaleAudit.paymal_search(sale_id)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user