pull origin master

This commit is contained in:
Yan
2017-09-18 13:53:28 +06:30
parent 4f3b831771
commit 8966f290b5
122 changed files with 3964 additions and 2277 deletions

View File

@@ -7,8 +7,11 @@ class Api::BillController < Api::ApiController
@error_message = "Order ID or Booking ID is require to request for a bill."
if ShiftSale.current_shift
#create Bill by Booking ID
table = 0
if (params[:booking_id])
booking = Booking.find(params[:booking_id])
# for Job
table = DiningFacility.find(booking.dining_facility_id)
if booking
if booking.sale_id.nil?
@@ -23,8 +26,14 @@ class Api::BillController < Api::ApiController
elsif (params[:order_id])
@sale = Sale.new
@status, @sale_id = @sale.generate_invoice_from_order(params[:order_id], current_login_employee, get_cashier)
# for Job
booking = Booking.find_by_sale_id(@sale_id)
table = DiningFacility.find(booking.dining_facility_id)
end
Promotion.promo_activate(@sale)
BillBroadcastJob.perform_later(table)
else
@status = false
@error_message = "No Current Open Shift"

View File

@@ -1,9 +1,12 @@
class Api::Restaurant::MenuItemAttributesController < Api::ApiController
skip_before_action :authenticate
#Description
# Pull the default menu details and also other available (active) menus
# Input Params - order_id
def index
@menu_attributes = MenuItemAttribute.all
end
def show
@attribute = MenuItemAttribute.find(params[:id])
end
end