-
This commit is contained in:
@@ -118,7 +118,7 @@ class Api::OrdersController < Api::ApiController
|
|||||||
@order = Order.new
|
@order = Order.new
|
||||||
@order.source = params[:order_source]
|
@order.source = params[:order_source]
|
||||||
@order.order_type = params[:order_type]
|
@order.order_type = params[:order_type]
|
||||||
@order.customer_id = params[:customer_id].present? ? params[:customer_id] : walkin.customer_id # for no customer id from mobile
|
@order.customer_id = params[:customer_id].present? ? params[:customer_id] : Customer.walkin.customer_id # for no customer id from mobile
|
||||||
@order.items = items_arr
|
@order.items = items_arr
|
||||||
@order.guest = params[:guest_info]
|
@order.guest = params[:guest_info]
|
||||||
@order.table_id = params[:table_id] # this is dining facilities's id
|
@order.table_id = params[:table_id] # this is dining facilities's id
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ module MultiTenancy
|
|||||||
if request.subdomains.last && request.subdomains.last != 'www'
|
if request.subdomains.last && request.subdomains.last != 'www'
|
||||||
set_current_tenant(Shop.find_by(subdomain: request.subdomains.last))
|
set_current_tenant(Shop.find_by(subdomain: request.subdomains.last))
|
||||||
end
|
end
|
||||||
set_current_tenant(Shop.first) if current_tenant.nil?
|
set_current_tenant(Shop.last) if current_tenant.nil?
|
||||||
end
|
end
|
||||||
|
|
||||||
def current_shop
|
def current_shop
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ class Foodcourt::AddordersController < BaseFoodcourtController
|
|||||||
if params[:order_source] == "quick_service" && params[:table_id].to_i == 0
|
if params[:order_source] == "quick_service" && params[:table_id].to_i == 0
|
||||||
customer_id = takeaway.customer_id # for no customer id from mobile
|
customer_id = takeaway.customer_id # for no customer id from mobile
|
||||||
else
|
else
|
||||||
customer_id = params[:customer_id].present? ? params[:customer_id] : walkin.customer_id # for no customer id from mobile
|
customer_id = params[:customer_id].present? ? params[:customer_id] : Customer.walkin.customer_id # for no customer id from mobile
|
||||||
end
|
end
|
||||||
|
|
||||||
@order = Order.new
|
@order = Order.new
|
||||||
|
|||||||
@@ -241,8 +241,7 @@ class Foodcourt::PaymentsController < BaseFoodcourtController
|
|||||||
|
|
||||||
# @shop = shop_detail #show shop info
|
# @shop = shop_detail #show shop info
|
||||||
|
|
||||||
@customer_lists = Customer.where("customer_id = 'CUS-000000000001' or customer_id = 'CUS-000000000002'")
|
@customer_lists = Customer.where(name: ["WALK-IN", "TAKEAWAY"])
|
||||||
|
|
||||||
saleObj = Sale.find(sale_id)
|
saleObj = Sale.find(sale_id)
|
||||||
|
|
||||||
#total customer with individual total amount
|
#total customer with individual total amount
|
||||||
|
|||||||
@@ -42,17 +42,17 @@ class Printer::PrinterWorker
|
|||||||
end
|
end
|
||||||
|
|
||||||
def print(file_path, printer_destination = nil )
|
def print(file_path, printer_destination = nil )
|
||||||
# if printer_destination.nil?
|
if printer_destination.nil?
|
||||||
# printer_destination = self.printer_destination
|
printer_destination = self.printer_destination
|
||||||
# end
|
end
|
||||||
|
|
||||||
# copy = self.print_copies
|
copy = self.print_copies
|
||||||
# #Print only when printer information is not null
|
#Print only when printer information is not null
|
||||||
# if !self.printer_destination.nil?
|
if !self.printer_destination.nil?
|
||||||
# (1..copy).each do
|
(1..copy).each do
|
||||||
# page = Cups::PrintJob.new(file_path, printer_destination)
|
page = Cups::PrintJob.new(file_path, printer_destination)
|
||||||
# page.print
|
page.print
|
||||||
# end
|
end
|
||||||
# end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -190,7 +190,6 @@
|
|||||||
<td style="padding:2px; text-align:" width="25%" class="item-attr"><strong id="sub_total">0.00</strong></td>
|
<td style="padding:2px; text-align:" width="25%" class="item-attr"><strong id="sub_total">0.00</strong></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<input type="hidden" name="customer_id" id="customer_id" value="CUS-000000000001">
|
|
||||||
<% if @sale_id.nil?%>
|
<% if @sale_id.nil?%>
|
||||||
<button type="button" class="btn btn-primary action-btn create col-md-11" id="create_pay_order" disabled="disabled" style="padding-top:4px !important;padding-bottom:4px !important;"><i class="material-icons" style="font-size:34px;width:34px">attach_money</i></button>
|
<button type="button" class="btn btn-primary action-btn create col-md-11" id="create_pay_order" disabled="disabled" style="padding-top:4px !important;padding-bottom:4px !important;"><i class="material-icons" style="font-size:34px;width:34px">attach_money</i></button>
|
||||||
<% else %>
|
<% else %>
|
||||||
|
|||||||
Reference in New Issue
Block a user