Merge branch 'master' of bitbucket.org:code2lab/sxrestaurant into adminbsb_ui_changes

This commit is contained in:
phyusin
2018-04-11 09:34:23 +06:30
36 changed files with 584 additions and 80 deletions

View File

@@ -163,7 +163,6 @@ For CloseCashierCustomisePdf in lookups
1) settings/print_settings
2) settings/lookups => { type:print_settings, name: CloseCashierCustomisePdf, value:1 }
<<<<<<< HEAD
<---- Extra Fields Script ----->
For MoveTablePdf in lookups
*** Both Table and Room Moving ***
@@ -175,13 +174,12 @@ For MoveTablePdf in print settings
ii) Unique Code: MoveTablePdf
iii)Template: ...
iv) Font: Zawgyi-One v) Printer: #printer name
=======
/* Tax Profile Group Types in lookups */
1) settings/lookups => { type:tax_profiles, name: Cashier, value:cashier }
2) settings/lookups => { type:tax_profiles, name: Quick Service, value: quick_service }
3) settings/lookups => { type:tax_profiles, name: Doemal, value: doemal }
/* Tax Profile Group Types in lookups */
>>>>>>> 1c13b0469758fb968c0dfcc1f0a876ed2c5e395a
Add Kitchen Role of Employee
=> 1) settings/lookups => { type:employee_roles, name: Kitchen, value:kitchen }

View File

@@ -974,7 +974,7 @@ console.log(d_option)
dataType: "json",
success:function(result){
if (result.status) {
console.log(result)
if (result.data == null){
swal({
title: "Please Open Shift !",
@@ -984,11 +984,13 @@ console.log(d_option)
confirmButtonText: "Ok",
closeOnConfirm: false
}, function () {
window.location.href = '/origami/quick_service/pending_order/' + $('#sale_id').text();
window.location.href = '/origami/quick_service/pending_order/' + $('#sale_id').text();
});
}else if(result.data == 'OK'){
window.location.href = '/origami/quick_service/pending_order/' + $('#sale_id').text();
}else{
window.location.href = "/origami/sale/"+result.data["sale_id"]+"/"+type+"/payment"
window.location.href = "/origami/sale/"+result.data["sale_id"]+"/"+type+"/payment"
}
}
}

View File

@@ -9,7 +9,7 @@ class Api::CallWaitersController < ActionController::API
ActionCable.server.broadcast "call_waiter_channel",table: @table,time:@time
# get printer info
@shop = Shop::ShopDetail
@shop = Shop.first
unique_code = "CallWaiterPdf"
print_settings = PrintSetting.find_by_unique_code(unique_code)
printer = Printer::ReceiptPrinter.new(print_settings)

View File

@@ -6,7 +6,7 @@ class Origami::AlipayController < BaseOrigamiController
sale_data = Sale.find_by_sale_id(@sale_id)
total = 0
@alipaycount = 0
@shop = Shop::ShopDetail
@shop = Shop.first
@rounding_adj = 0
@can_alipay = 0
@member_discount = 0
@@ -54,7 +54,7 @@ class Origami::AlipayController < BaseOrigamiController
ref_no = params[:ref_no]
if(Sale.exists?(sale_id))
saleObj = Sale.find(sale_id)
shop_details = Shop::ShopDetail
shop_details = Shop.first
# rounding adjustment
# if shop_details.is_rounding_adj

View File

@@ -9,7 +9,7 @@ class Origami::CreditPaymentsController < BaseOrigamiController
@creditcount = 0
others = 0
@shop = Shop::ShopDetail
@shop = Shop.first
if @shop.is_rounding_adj
new_total = Sale.get_rounding_adjustment(sale_data.grand_total)
else
@@ -32,7 +32,7 @@ class Origami::CreditPaymentsController < BaseOrigamiController
sale_id = params[:sale_id]
if(Sale.exists?(sale_id))
saleObj = Sale.find(sale_id)
shop_details = Shop::ShopDetail
shop_details = Shop.first
# rounding adjustment
if shop_details.is_rounding_adj

View File

@@ -6,7 +6,7 @@ class Origami::DingaController < BaseOrigamiController
@membership_rebate_balance=0
sale_data = Sale.find_by_sale_id(@sale_id)
@shop = Shop::ShopDetail
@shop = Shop.first
# if @shop.is_rounding_adj
# new_total = Sale.get_rounding_adjustment(sale_data.grand_total)
# else
@@ -77,7 +77,7 @@ class Origami::DingaController < BaseOrigamiController
payment_method = "dinga"
if(Sale.exists?(sale_id))
saleObj = Sale.find(sale_id)
shop_details = Shop::ShopDetail
shop_details = Shop.first
# rounding adjustment
if shop_details.is_rounding_adj

View File

@@ -8,7 +8,7 @@ class Origami::HomeController < BaseOrigamiController
@rooms = Room.all.active.order('status desc')
@complete = Sale.where("DATE_FORMAT(created_at,'%Y-%m-%d') = ? and sale_status != 'new'",DateTime.now.strftime('%Y-%m-%d'))
@orders = Order.where("DATE_FORMAT(date,'%Y-%m-%d') = ? and status != 'billed'",DateTime.now.strftime('%Y-%m-%d')).order('date desc')
@shop = Shop::ShopDetail
@shop = Shop.first
# @shift = ShiftSale.current_open_shift(current_user.id)
end
@@ -26,7 +26,7 @@ class Origami::HomeController < BaseOrigamiController
@status_sale = ""
@sale_array = Array.new
@shop = Shop::ShopDetail
@shop = Shop.first
@membership = MembershipSetting::MembershipSetting
@payment_methods = PaymentMethodSetting.all

View File

@@ -7,7 +7,7 @@ class Origami::JcbController < BaseOrigamiController
sale_data = Sale.find_by_sale_id(@sale_id)
total = 0
@jcbcount = 0
@shop = Shop::ShopDetail
@shop = Shop.first
@rounding_adj = 0
@can_jcb = 0
@member_discount= 0
@@ -56,7 +56,7 @@ class Origami::JcbController < BaseOrigamiController
ref_no = params[:ref_no]
if(Sale.exists?(sale_id))
saleObj = Sale.find(sale_id)
shop_details = Shop::ShopDetail
shop_details = Shop.first
# rounding adjustment
# if shop_details.is_rounding_adj

View File

@@ -11,7 +11,7 @@ class Origami::JunctionPayController < BaseOrigamiController
@cashier_id = current_user.emp_id
@payment_method_setting_nav = PaymentMethodSetting.all
@shop = Shop::ShopDetail
@shop = Shop.first
if @shop.is_rounding_adj
new_total = Sale.get_rounding_adjustment(sale_data.grand_total)
else
@@ -52,7 +52,7 @@ class Origami::JunctionPayController < BaseOrigamiController
if(Sale.exists?(sale_id))
saleObj = Sale.find(sale_id)
shop_details = Shop::ShopDetail
shop_details = Shop.first
# rounding adjustment
# if shop_details.is_rounding_adj

View File

@@ -7,7 +7,7 @@ class Origami::MasterController < BaseOrigamiController
sale_data = Sale.find_by_sale_id(@sale_id)
total = 0
@mastercount = 0
@shop = Shop::ShopDetail
@shop = Shop.first
@rounding_adj = 0
@can_master = 0
@member_discount = 0
@@ -53,7 +53,7 @@ class Origami::MasterController < BaseOrigamiController
ref_no = params[:ref_no]
if(Sale.exists?(sale_id))
saleObj = Sale.find(sale_id)
shop_details = Shop::ShopDetail
shop_details = Shop.first
# rounding adjustment
# if shop_details.is_rounding_adj

View File

@@ -86,7 +86,7 @@ class Origami::MovetableController < BaseOrigamiController
@type = (DiningFacility.find(change_to)).type
@moved_by = @current_user.name
@date = DateTime.now
@shop = Shop::ShopDetail
@shop = Shop.first
unique_code = "MoveTablePdf"
pdf_no = PrintSetting.where(:unique_code => unique_code).count
#print_settings = PrintSetting.find_by_unique_code(unique_code)

View File

@@ -6,7 +6,7 @@ class Origami::MpuController < BaseOrigamiController
sale_data = Sale.find_by_sale_id(@sale_id)
total = 0
@mpucount = 0
@shop = Shop::ShopDetail
@shop = Shop.first
@rounding_adj = 0
@can_mpu = 0
@member_discount = 0
@@ -54,7 +54,7 @@ class Origami::MpuController < BaseOrigamiController
ref_no = params[:ref_no]
if(Sale.exists?(sale_id))
saleObj = Sale.find(sale_id)
shop_details = Shop::ShopDetail
shop_details = Shop.first
# rounding adjustment
# if shop_details.is_rounding_adj

View File

@@ -0,0 +1,12 @@
class Origami::OrderReservationController < BaseOrigamiController
def index
@webview = check_mobile
@shop = Shop::ShopDetail
end
end

View File

@@ -6,7 +6,7 @@ class Origami::PaymalController < BaseOrigamiController
@membership_rebate_balance=0
sale_data = Sale.find_by_sale_id(@sale_id)
@shop = Shop::ShopDetail
@shop = Shop.first
# if @shop.is_rounding_adj
# new_total = Sale.get_rounding_adjustment(sale_data.grand_total)
# else
@@ -73,7 +73,7 @@ class Origami::PaymalController < BaseOrigamiController
sale_id = params[:sale_id]
if(Sale.exists?(sale_id))
saleObj = Sale.find(sale_id)
shop_details = Shop::ShopDetail
shop_details = Shop.first
# rounding adjustment
# if shop_details.is_rounding_adj

View File

@@ -44,7 +44,7 @@ class Origami::PaymentsController < BaseOrigamiController
end
#shop detail
shop_details = Shop::ShopDetail
shop_details = Shop.first
# customer= Customer.where('customer_id=' +.customer_id)
customer = Customer.find(sale_data.customer_id)
# rounding adjustment
@@ -99,7 +99,7 @@ class Origami::PaymentsController < BaseOrigamiController
if(Sale.exists?(sale_id))
saleObj = Sale.find(sale_id)
shop_details = Shop::ShopDetail
shop_details = Shop.first
# rounding adjustment
if shop_details.is_rounding_adj
a = saleObj.grand_total % 25 # Modulus
@@ -238,7 +238,7 @@ class Origami::PaymentsController < BaseOrigamiController
@dining = ''
@other_payment = 0.0
@shop = Shop::ShopDetail #show shop info
@shop = Shop.first #show shop info
@customer_lists = Customer.where("customer_id = 'CUS-000000000001' or customer_id = 'CUS-000000000002'")
@@ -391,7 +391,7 @@ class Origami::PaymentsController < BaseOrigamiController
customer= Customer.find(saleObj.customer_id)
#shop detail
shop_details = Shop::ShopDetail
shop_details = Shop.first
# get member information
rebate = MembershipSetting.find_by_rebate(1)
if customer.membership_id != nil && rebate
@@ -475,7 +475,7 @@ class Origami::PaymentsController < BaseOrigamiController
customer= Customer.find(saleObj.customer_id)
#shop detail
shop_details = Shop::ShopDetail
shop_details = Shop.first
# get printer info
print_settings=PrintSetting.find_by_unique_code(unique_code)

View File

@@ -7,7 +7,7 @@ class Origami::PayparPaymentsController < BaseOrigamiController
payment_method = "paypar"
if(Sale.exists?(sale_id))
saleObj = Sale.find(sale_id)
shop_details = Shop::ShopDetail
shop_details = Shop.first
# rounding adjustment
if shop_details.is_rounding_adj

View File

@@ -154,10 +154,13 @@ class Origami::QuickServiceController < ApplicationController
result = {:status=> true, :data => @sale }
render :json => result.to_json
end
end
elsif (params[:sale_id][0,3] == "BKI")
result = {:status=> true, :data => 'OK' }
render :json => result.to_json
else
result = {:status=> true, :data => nil }
render :json => result.to_json
render :json => result.to_json
end
end

View File

@@ -6,7 +6,7 @@ class Origami::RedeemPaymentsController < BaseOrigamiController
@membership_rebate_balance=0
sale_data = Sale.find_by_sale_id(@sale_id)
@shop = Shop::ShopDetail
@shop = Shop.first
# if @shop.is_rounding_adj
# new_total = Sale.get_rounding_adjustment(sale_data.grand_total)
# else

View File

@@ -16,7 +16,12 @@ class Origami::RequestBillsController < ApplicationController
bk_order = BookingOrder.find_by_order_id(order_id)
order = Order.find(order_id)
check_booking = Booking.find_by_booking_id(bk_order.booking_id)
table = DiningFacility.find(check_booking.dining_facility_id)
if check_booking.dining_facility_id.to_i > 0
table = DiningFacility.find(check_booking.dining_facility_id)
else
table = nil
end
if check_booking.sale_id.nil?
# Create Sale if it doesn't exist
@status, @sale_id = @sale.generate_invoice_from_booking(check_booking.id,current_login_employee, current_user, order.source)

View File

@@ -28,7 +28,7 @@ class Origami::RoomsController < BaseOrigamiController
@status_sale = ""
@sale_array = Array.new
@shop = Shop::ShopDetail
@shop = Shop.first
@membership = MembershipSetting::MembershipSetting
@payment_methods = PaymentMethodSetting.all

View File

@@ -1,7 +1,7 @@
class Origami::TableInvoicesController < BaseOrigamiController
def index
@table = DiningFacility.find(params[:table_id])
shop = Shop::ShopDetail
shop = Shop.first
puts "table bookig lenght"
@sale_array = Array.new
@table.bookings.each do |booking|
@@ -33,7 +33,7 @@ class Origami::TableInvoicesController < BaseOrigamiController
@table = DiningFacility.find(params[:table_id])
@membership = MembershipSetting::MembershipSetting
@payment_methods = PaymentMethodSetting.all
shop = Shop::ShopDetail
shop = Shop.first
@sale_array = Array.new
@table.bookings.each do |booking|
if booking.sale_id.nil?

View File

@@ -6,7 +6,7 @@ class Origami::UnionpayController < BaseOrigamiController
sale_data = Sale.find_by_sale_id(@sale_id)
total = 0
@unionpaycount = 0
@shop = Shop::ShopDetail
@shop = Shop.first
@rounding_adj = 0
@can_unionpay = 0
@member_discount = 0
@@ -51,7 +51,7 @@ class Origami::UnionpayController < BaseOrigamiController
ref_no = params[:ref_no]
if(Sale.exists?(sale_id))
saleObj = Sale.find(sale_id)
shop_details = Shop::ShopDetail
shop_details = Shop.first
# rounding adjustment
# if shop_details.is_rounding_adj

View File

@@ -6,7 +6,7 @@ class Origami::VisaController < BaseOrigamiController
sale_data = Sale.find_by_sale_id(@sale_id)
total = 0
@visacount = 0
@shop = Shop::ShopDetail
@shop = Shop.first
@rounding_adj = 0
@can_visa = 0
@member_discount = 0
@@ -51,7 +51,7 @@ class Origami::VisaController < BaseOrigamiController
ref_no = params[:ref_no]
if(Sale.exists?(sale_id))
saleObj = Sale.find(sale_id)
shop_details = Shop::ShopDetail
shop_details = Shop.first
# rounding adjustment
# if shop_details.is_rounding_adj

View File

@@ -8,7 +8,7 @@ class Origami::VoucherController < BaseOrigamiController
@vouchercount = 0
others = 0
@shop = Shop::ShopDetail
@shop = Shop.first
if @shop.is_rounding_adj
new_total = Sale.get_rounding_adjustment(sale_data.grand_total)
else

View File

@@ -72,7 +72,7 @@ class Settings::MenusController < ApplicationController
# end
end
def export
def export
@settings_menus = Menu.all.page(params[:page]).per(10)
menu = Menu.find(params[:id])
@@ -99,11 +99,11 @@ class Settings::MenusController < ApplicationController
sheet.add_row ["Name",menu.name], :style=>title
sheet.add_row
sheet.add_row ["Category Code", "Category Name", "Item Code", "Item Name", "Item AltName", "Taxable", "Instance Code", "Instance Name", "Price"], :style=>header_text
sheet.add_row ["Category Code", "Category Name", "Item Code", "Item Name", "Account", "Item AltName", "Taxable", "Instance Code", "Instance Name", "Price"], :style=>header_text
menu.menu_categories.each do |mc|
mc.menu_items.each do |mi|
mi.menu_item_instances.each do |mii|
sheet.add_row [ mc.code, mc.name, mi.item_code, mi.name, mi.alt_name, mi.taxable, mii.item_instance_code, mii.item_instance_name, mii.price], :style=>wrap_text
sheet.add_row [ mc.code, mc.name, mi.item_code, mi.name, mi.account.title, mi.alt_name, mi.taxable, mii.item_instance_code, mii.item_instance_name, mii.price], :style=>wrap_text
end
end
end

View File

@@ -140,14 +140,6 @@ class Menu < ApplicationRecord
end
else
# Menu by Menu Import
accs = Account.all
account_id = 1
if accs.length > 0
account_id = accs[0].id
else
status = "No Account Created."
end
sheet = spreadsheet.sheet(0)
menu = sheet.row(1)[1]
imported_menu = Menu.create({name: menu, is_active: true, valid_days: "1,2,3,4,5,6,7",valid_time_from: "00:00:00", valid_time_to: "23:59:59", created_by: created_by})
@@ -163,7 +155,12 @@ class Menu < ApplicationRecord
menu_itm = MenuItem.find_by_item_code(row["Item Code"])
if !menu_itm
menu_itm = MenuItem.create(item_code: row["Item Code"], name: row["Item Name"], alt_name: row["Item AltName"], image_path: "", description: '', information: '', unit: '', type: "SimpleMenuItem", menu_category_id: menu_cat.id, item_attributes: "[]", item_options: "[]", account_id: account_id, is_sub_item: 0, is_available: 1, created_by: created_by)
account = Account.find_by_title(row["Account"])
if account.nil?
account = Account.create({title: row["Account"], account_type: "0"})
end
menu_itm = MenuItem.create(item_code: row["Item Code"], name: row["Item Name"], account_id: account.id, alt_name: row["Item AltName"], image_path: "", description: '', information: '', unit: '', type: "SimpleMenuItem", menu_category_id: menu_cat.id, item_attributes: "[]", item_options: "[]", account_id: account_id, is_sub_item: 0, is_available: 1, created_by: created_by)
# else
# status = status + "Item Code already exists for " + row["Item Name"] + "."
end

View File

@@ -535,7 +535,7 @@ class Sale < ApplicationRecord
end
def adjust_rounding
shop_details = Shop::ShopDetail
shop_details = Shop.first
# rounding adjustment
if shop_details.is_rounding_adj
a = self.grand_total % 25 # Modulus
@@ -555,7 +555,7 @@ class Sale < ApplicationRecord
end
def compute_adjust_rounding(grand_total)
shop_details = Shop::ShopDetail
shop_details = Shop.first
# rounding adjustment
if shop_details.is_rounding_adj
a = grand_total % 25 # Modulus
@@ -577,7 +577,7 @@ class Sale < ApplicationRecord
#Generate new Receipt No when it is not assigned
def generate_receipt_no
#shop_code and client_code
shop_details = Shop::ShopDetail
shop_details = Shop.first
#Date-Shift-
if self.receipt_no.nil?
@@ -2592,6 +2592,7 @@ end
query = query.joins("join sale_orders as sale_orders on sale_orders.sale_id = sales.sale_id")
.joins("join orders as orders on orders.order_id = sale_orders.order_id")
query = query.where("sales.sale_status = 'new' AND orders.status = 'billed' AND orders.source =? ","quick_service")
.group("sales.sale_id")
end
def self.pending_order
query = Booking.all

View File

@@ -34,6 +34,14 @@
<div class="text font-20 m-l-5" style="line-height: 80px;"><%= t :dine_in_cashier %></div>
</div>
</div>
<div class="col-lg-3 col-md-3 col-sm-4 col-xs-12 order_reservation">
<div class="info-box bg-blue">
<div class="icon" >
<i class="material-icons">arrow_forward</i>
</div>
<div class="text font-20 m-l-5" style="line-height: 80px;"><%= t :order_reservation %></div>
</div>
</div>
</div>
<!-- #END# Widgets -->
<% if !@current_user.nil? && @current_user.role != 'waiter' %>
@@ -199,8 +207,11 @@
$(".qs_view").on('click', function() {
document.getElementById('second_view').click();
window.location.href = '/origami/quick_service';
window.location.href = '/origami/quick_service';
});
$(".order_reservation").on('click', function() {
window.location.href = '/origami/order_reservation';
});
$("#second_view").on('click', function () {

View File

@@ -0,0 +1,471 @@
<div class="container-fluid">
<div class="row m-t--10">
<div class="col-lg-4 col-md-4 col-sm-4" style="margin:0px 0px 0px -5px !important ">
<ul class="nav nav-tabs tab-col-teal" role="tablist">
<li class="nav-item active" data-color="#F44336" style="background-color: #F44336;">
<a class="nav-link" data-toggle="tab" href="#pending" role="tab"><p class="num">4</p> <%= t :pending %></a>
</li>
<li class="nav-item" data-color="#673AB7" style="background-color: #673AB7;">
<a class="nav-link" data-toggle="tab" href="#processing" role="tab"><p class="num">4</p> <%= t :processing %></a>
</li>
<li class="nav-item" data-color="#009688" style="background-color: #009688;">
<a class="nav-link" data-toggle="tab" href="#delivery" role="tab"><p class="num">4</p> <%= t :delivering %></a>
</li>
<li class="nav-item" data-color="#03A9F4" style="background-color: #03A9F4;">
<a class="nav-link" data-toggle="tab" href="#completed" role="tab"><p class="num">4</p> <%= t :completed %></a>
</li>
</ul>
<div class="tab-content m-t--10">
<div class="tab-pane active" id="pending" role="tabpanel">
<div class="card-block font-13">
<div id="menu-slimscroll" data-height="50">
<table class="table table-stripe custom-table">
<tbody>
<tr>
<td width ="5%" class="align-left">
1
</td>
<td width ="30%" class="align-center">
3:30 PM
</td>
<td width ="30%" class="align-center">
13000
</td>
<td width ="30%" class="align-center">
<span class="font-10 col-blue">STATUS</span>
</td>
</tr>
<tr>
<td width ="5%" class="align-left">
2
</td>
<td width ="30%" class="align-center">
3:30 PM
</td>
<td width ="30%" class="align-center">
13000
</td>
<td width ="30%" class="align-center">
<span class="font-10 col-blue">STATUS</span>
</td>
</tr>
<tr>
<td width ="5%" class="align-left">
3
</td>
<td width ="30%" class="align-center">
3:30 PM
</td>
<td width ="30%" class="align-center">
13000
</td>
<td width ="30%" class="align-center">
<span class="font-10 col-blue">STATUS</span>
</td>
</tr>
<tr>
<td width ="5%" class="align-left">
4
</td>
<td width ="30%" class="align-center">
3:30 PM
</td>
<td width ="30%" class="align-center">
13000
</td>
<td width ="30%" class="align-center">
<span class="font-10 col-blue">STATUS</span>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<!--- Panel 3 - Orders -->
<div class="tab-pane dining" id="processing" role="tabpanel">
<div class="card-block font-13">
<div id="menu-slimscroll" data-height="50">
<table class="table table-stripe custom-table">
<tbody>
<tr>
<td width ="5%" class="align-left">
1
</td>
<td width ="30%" class="align-center">
3:30 PM
</td>
<td width ="30%" class="align-center">
13000
</td>
<td width ="30%" class="align-center">
<span class="font-10 col-blue">STATUS</span>
</td>
</tr>
<tr>
<td width ="5%" class="align-left">
2
</td>
<td width ="30%" class="align-center">
3:30 PM
</td>
<td width ="30%" class="align-center">
13000
</td>
<td width ="30%" class="align-center">
<span class="font-10 col-blue">STATUS</span>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<!--- Panel 3 - Orders -->
<div class="tab-pane dining" id="delivery" role="tabpanel">
<div class="card-block font-13">
<div id="menu-slimscroll" data-height="50">
<table class="table table-stripe custom-table">
<tbody>
<tr>
<td width ="5%" class="align-left">
1
</td>
<td width ="30%" class="align-center">
3:30 PM
</td>
<td width ="30%" class="align-center">
13000
</td>
<td width ="30%" class="align-center">
<span class="font-10 col-blue">STATUS</span>
</td>
</tr>
<tr>
<td width ="5%" class="align-left">
2
</td>
<td width ="30%" class="align-center">
3:30 PM
</td>
<td width ="30%" class="align-center">
13000
</td>
<td width ="30%" class="align-center">
<span class="font-10 col-blue">STATUS</span>
</td>
</tr>
<tr>
<td width ="5%" class="align-left">
3
</td>
<td width ="30%" class="align-center">
3:30 PM
</td>
<td width ="30%" class="align-center">
13000
</td>
<td width ="30%" class="align-center">
<span class="font-10 col-blue">STATUS</span>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<!--- Panel 3 - Orders -->
<div class="tab-pane dining" id="completed" role="tabpanel">
<div class="card-block font-13">
<div id="menu-slimscroll" data-height="50">
<table class="table table-stripe custom-table">
<tbody>
<tr>
<td width ="5%" class="align-left">
1
</td>
<td width ="30%" class="align-center">
3:30 PM
</td>
<td width ="30%" class="align-center">
13000
</td>
<td width ="30%" class="align-center">
<span class="font-10 col-blue">STATUS</span>
</td>
</tr>
<tr>
<td width ="5%" class="align-left">
3
</td>
<td width ="30%" class="align-center">
3:30 PM
</td>
<td width ="30%" class="align-center">
13000
</td>
<td width ="30%" class="align-center">
<span class="font-10 col-blue">STATUS</span>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="col-lg-4 col-md-4 col-sm-4" style="margin:0px -5px !important ">
<div class="card">
<div class="card-header custom-card-header" style="color:">
<table class="table">
<tr>
<td width ="70%" class="header-td align-left"><b class="col-pink font-16">No.11</b>
<span class="font-13">(DELIVERY)</span>
</td>
<td width ="30%" class="header-td font-16 align-right"><b>0065 4321</b></td>
</tr>
</table>
</div>
<div class="card-block custom-card-block">
<div id="order-detail-slimscroll" data-height="220">
<table class="table">
<tbody>
<tr>
<td width ="70%" class="body-td align-left">
MENU ITEM 01
<br><span class="font-13">2 <span class="col-blue">X700</span></span>
</td>
<td width ="30%" class="body-td align-right">1400.00</td>
</tr>
<tr>
<td width ="70%" class="body-td align-left">
MENU ITEM 01
<br><span class="font-13">2 <span class="col-blue">X700</span></span>
</td>
<td width ="30%" class="body-td align-right">1400.00</td>
</tr>
<tr>
<td width ="70%" class="body-td align-left">
MENU ITEM 01
<br><span class="font-13">2 <span class="col-blue">X700</span></span>
</td>
<td width ="30%" class="body-td align-right">1400.00</td>
</tr>
<tr>
<td width ="70%" class="body-td align-left">
MENU ITEM 01
<br><span class="font-13">2 <span class="col-blue">X700</span></span>
</td>
<td width ="30%" class="body-td align-right">1400.00</td>
</tr>
<tr>
<td width ="70%" class="body-td align-left">
MENU ITEM 01
<br><span class="font-13">2 <span class="col-blue">X700</span></span>
</td>
<td width ="30%" class="body-td align-right">1400.00</td>
</tr>
<tr>
<td width ="70%" class="body-td align-left">
MENU ITEM 01
<br><span class="font-13">2 <span class="col-blue">X700</span></span>
</td>
<td width ="30%" class="body-td align-right">1400.00</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="card-footer custom-card-footer">
<table class="table">
<tbody>
<tr>
<td width ="70%" class="footer-td align-left">
SUB TOTAL
</td>
<td width ="30%" class="footer-td align-right">1400.00</td>
</tr>
<tr>
<td width ="70%" class="footer-td align-left">
DELIVERY FEES (PICK-UP)
</td>
<td width ="30%" class="footer-td align-right">1400.00</td>
</tr>
<tr>
<td width ="70%" class="footer-td align-left">
CONVENIENCE CHARGES
</td>
<td width ="30%" class="footer-td align-right">1400.00</td>
</tr>
<tr>
<td width ="70%" class="footer-td align-left">
GOVERNMENT TAX
</td>
<td width ="30%" class="footer-td align-right">1400.00</td>
</tr>
</tbody>
</table>
</div>
<div class="card-footer grand-card-footer">
<table class="table">
<tbody>
<tr>
<td width ="70%" class="footer-td align-left col-blue">
GRAND TOTAL
</td>
<td width ="30%" class="footer-td align-right col-blue">1400.00</td>
</tr>
<tr>
<td width ="50%" class="footer-td align-left col-blue">
<button type="button" class="btn btn-lg bg-blue waves-effect" data-dismiss="modal"><strong>DECLINE</strong></button>
</td>
<td width ="50%" class="footer-td align-right col-blue">
<button type="button" class="btn btn-lg bg-blue waves-effect" data-dismiss="modal"><strong>ACCEPT</strong></button>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="'col-lg-4 col-md-4 col-sm-4'" style="margin:0px -5px 0px -2px !important ">
<div class="card" style="background-color: #E8EAF6">
<div class="card-header custom-card-header" style="background-color: #E8EAF6">
<table class="table">
<tr>
<td width ="" class="header-td align-left col-blue">CUSTOMER & DELIVERY INFORMATION
</td>
</tr>
</table>
</div>
<div class="card-block">
<table class="table">
<tbody>
<tr>
<td class="body-td align-left">
<span class="font-13">NAME</span><br>
<b>DAW AYE AYE</b>
</td>
</tr>
<tr>
<td class="body-td align-left">
<span class="font-13">PHONE</span><br>
<b>09 8765 4321 098</b>
</td>
</tr>
<tr>
<td class="body-td align-left">
<span class="font-13">ADDRESS</span><br>
<b>No. (12), 3rd floor, zay kyee Street, kyi myin dine
infront of Nya Zay Main Entrance</b>
</td>
</tr>
<tr>
<td class="body-td align-left">
<span class="font-13">DELEVER TO</span><br>
<b>HOME</b>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<style type="text/css">
.nav-tabs > li.active > a,
.nav-tabs > li.active > a:hover,
.nav-tabs > li.active > a:focus {
border-bottom: 2px solid #2196F3 ;
bottom: 2px ;
}
.nav-tabs .nav-link {
padding: 0.5286em .33em;
}
.nav-tabs li a.active {
color: #111 !important;
border-bottom: 0px solid #fff !important;
}
.nav-tabs .nav-link.active {
color: #111;
border-color: #fff;
}
.nav-tabs > li > a {
margin-right: 0px;
color:#fff !important;
}
.nav-tabs > li > a {
border-bottom: 2px solid #2196F3;
bottom: 2px;
}
.nav-tabs.tab-col-teal > li > a:before {
border-bottom: 0px solid #009688;
}
.nav-tabs .nav-item{
margin-bottom: 2px ;
}
.num{
color:#fff;
text-align: center;
margin-bottom: -1px !important;
}
.nav-tabs .nav-link.active > p{
color: #111;
border-color: #fff;
}
/*Custosm Class*/
.table .header-td{
border-top:0px solid !important;
border-bottom: 0px solid !important;
padding:3px 7px !important;
border-top:0px solid !important;
border-bottom: 0px solid !important;
}
.custom-card-block .table td:first-child,
.custom-card-block .table td:nth-child(2),
.custom-card-footer .table td:first-child,
.custom-card-footer .table td:nth-child(2){
border-top:0px solid !important;
}
.custom-card-footer .footer-td ,
.grand-card-footer .footer-td {
border-top:0px solid !important;
border-bottom:0px solid !important;
font-weight: bold;
padding:5px 10px;
}
.custom-card-header{
border-bottom: 1px solid #F8BBD0 !important;
padding:13px 5px !important;
}
.custom-card-footer{
border-top: 1px solid #F8BBD0 !important;
}
.custom-card-block,
.grand-card-footer,
.custom-card-footer{
padding :5px !important;
}
.custom-table{
background-color:#F3E5F5;
}
.custom-table tbody tr td,
.custom-table tbody tr th{
border-top: 1px solid #FFEBEE;
border-bottom: 1px solid #FFEBEE;
}
</style>

View File

@@ -10,19 +10,19 @@
<div id="custom-slimscroll">
<div class="card-columns">
<% @sale.each do |sale| %>
<div class="card sales bg-red text-white" data-id = "<%= sale.sale_id %>">
<div class="card sales bg-red text-white" data-id = "<%= sale.sale_id %>">
<div class="card-block">
<%= sale.receipt_no %><span style="font-size:12px;float:right;line-height:inherit;">Billed</span>
</div>
</div>
</div>
<% end %>
<% @order.each do |order| %>
<div class="card sales blue text-white" data-id = "<%= order.booking_id %>">
<div class="card-block">
<%= order.booking_id %><span style="font-size:12px;float:right;line-height:inherit;">new</span>
</div>
</div>
<% end %>
<% @order.each do |order| %>
<div class="card sales blue text-white" data-id = "<%= order.booking_id %>">
<div class="card-block">
<%= order.booking_id %><span style="font-size:12px;float:right;line-height:inherit;">new</span>
</div>
</div>
<% end %>
</div>
</div>
</div>

View File

@@ -202,13 +202,13 @@ $(document).ready(function(){
// Bill Request
$('#request_bills').click(function () {
var order_id = $('#save_order_id').val();
var ajax_url = "/origami/" + order_id + "/request_bills";
var ajax_url = "../../../origami/" +order_id+ "/request_bills";
console.log(ajax_url)
$.ajax({
type: "GET",
url: ajax_url,
// data: 'order_id='+ order_id,
success: function (result) {
console.log(result)
if (!result.status) {
swal("Information!", result.error_message);
}

View File

@@ -62,7 +62,7 @@
<!-- <td><%= settings_menu.created_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") %></td> -->
<td>
<%= link_to t("views.btn.edit"), edit_settings_menu_path(settings_menu),:class => 'btn btn-info btn-sm waves-effect' %>
<a href="#" id="export-xlsx" data-attr="<%= settings_menu.id %>" class="btn btn-primary btn-sm waves-effect" style="height: 33px;">
<a href="#" id="export-xlsx" data-attr="<%= settings_menu.id %>" class="export-xlsx btn btn-primary btn-sm waves-effect" style="height: 33px;">
<i class="material-icons" style="top: 0px;">backup</i>
</a>
</td>
@@ -107,9 +107,9 @@
<script type="text/javascript">
$(document).ready(function(){
$("#export-xlsx").on('click', function(){
$(".export-xlsx").on('click', function(){
var menu_id= $(this).attr('data-attr');
console.log(menu_id);
$.ajax({
type: "GET",
url: "/settings/menus/" + menu_id + "/export",

View File

@@ -20,11 +20,11 @@ class ActionController::Base
end
else
#check for license file
# if check_license
# current_license(ENV["SX_PROVISION_URL"])
# else
# redirect_to activate_path
# end
if check_license
current_license(ENV["SX_PROVISION_URL"])
else
redirect_to activate_path
end
end
end

View File

@@ -74,6 +74,7 @@ en:
date_time: "DateTime"
dine_in_cashier: "Dine-in Cashier"
quick_service: "Quick Service"
order_reservation: "Order & Reservation"
views:
btn:

View File

@@ -69,6 +69,7 @@ mm:
date_time: "ရက်စွဲအချိန်"
dine_in_cashier: "Dine-in Cashier"
quick_service: "Quick Service"
order_reservation: "Order & Reservation"
views:
btn:

View File

@@ -263,6 +263,8 @@ scope "(:locale)", locale: /en|mm/ do
post '/customer_view' => "second_display#customer_view",:as => "customer_view", :defaults => { :format => 'json' }
#order and reservation
resources :order_reservation
end
#--------- Waiter/Ordering Station ------------#