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

This commit is contained in:
Aung Myo
2017-07-02 09:38:01 +06:30
14 changed files with 96 additions and 81 deletions

View File

@@ -6,19 +6,24 @@ class Oqs::HomeController < BaseOqsController
@queue_items_details = queue_items_query(false) @queue_items_details = queue_items_query(false)
# Query for OQS with delivery status true # Query for OQS with delivery status true
@queue_completed_item = queue_items_query(true) @queue_completed_item = completed_order
@queue_stations_items=Array.new @queue_stations_items=Array.new
# Calculate Count for each station tab # Calculate Count for each station tab
queue_stations.each do |que| queue_stations.each do |que|
i=0 i = 0
zone_id = 0
@queue_items_details.each do |qid| @queue_items_details.each do |qid|
if qid.station_name == que.station_name dining = DiningFacility.find_by_name(qid.zone)
i=i+1 que.order_queue_process_by_zones.each do |qz|
end if qid.station_id == qz.order_queue_station_id && qid.zone_id == dining.zone_id
zone_id = qid.zone_id
i=i+1
end
end
end end
@queue_stations_items.push({:station_name => que.station_name, :is_active => que.is_active ,:item_count => i }) @queue_stations_items.push({:zone_id => zone_id , :station_name => que.station_name, :is_active => que.is_active , :is_ap => que.auto_print, :item_count => i })
end end
@queue_stations_items @queue_stations_items
@@ -83,34 +88,9 @@ class Oqs::HomeController < BaseOqsController
# Query for OQS with delivery status # Query for OQS with delivery status
def queue_items_query(status) def queue_items_query(status)
# queue_items = [] AssignedOrderItem.select("assigned_order_items.assigned_order_item_id, oqs.id as station_id, oqs.station_name, oqs.is_active, oqpz.zone_id, df.name as zone, df.type, odt.order_id, odt.item_code, odt.item_name, odt.price, odt.qty, odt.item_order_by, odt.options, cus.name as customer_name, odt.created_at")
# AssignedOrderItem.all.each do |aoi|
# oqs = OrderQueueStation.find(aoi.order_queue_station_id)
# order = Order.find(aoi.order_id)
# order_items = OrderItem.find_by_order_id(aoi.order_id)
# booking_orders = BookingOrder.find_by_order_id(aoi.order_id)
# booking = Booking.find(booking_orders.booking_id)
# dining = DiningFacility.find(booking.dining_facility_id)
# customer = Customer.find_by_customer_id(order.customer_id)
# queue_item = {
# :assigned_order_item_id => aoi.assigned_order_item_id,
# :station_name => oqs.station_name,
# :is_active => oqs.is_active,
# :zone => dining.name,
# :item_code => aoi.item_code,
# :item_name => order_items.item_name,
# :price => order_items.price,
# :qty => order_items.qty,
# :item_order_by => order_items.item_order_by,
# :options => order_items.options,
# :customer_name => customer.name,
# :created_at => order_items.created_at
# }
# queue_items.push(queue_item)
# end
# return queue_items
AssignedOrderItem.select("assigned_order_items.assigned_order_item_id, oqs.station_name, oqs.is_active, df.name as zone, df.type, odt.order_id, odt.item_code, odt.item_name, odt.price, odt.qty, odt.item_order_by, odt.options, cus.name as customer_name, odt.created_at")
.joins(" left join order_queue_stations as oqs on oqs.id = assigned_order_items.order_queue_station_id .joins(" left join order_queue_stations as oqs on oqs.id = assigned_order_items.order_queue_station_id
left join order_queue_process_by_zones as oqpz on oqpz.order_queue_station_id = oqs.id
left join orders as od ON od.order_id = assigned_order_items.order_id left join orders as od ON od.order_id = assigned_order_items.order_id
left join order_items as odt ON odt.item_code = assigned_order_items.item_code AND odt.order_id = assigned_order_items.order_id left join order_items as odt ON odt.item_code = assigned_order_items.item_code AND odt.order_id = assigned_order_items.order_id
left join customers as cus ON cus.customer_id = od.customer_id left join customers as cus ON cus.customer_id = od.customer_id
@@ -120,4 +100,23 @@ class Oqs::HomeController < BaseOqsController
.where("assigned_order_items.delivery_status = #{status} AND odt.price <> 0") .where("assigned_order_items.delivery_status = #{status} AND odt.price <> 0")
.group("assigned_order_items.assigned_order_item_id") .group("assigned_order_items.assigned_order_item_id")
end end
# Completed Order
def completed_order
AssignedOrderItem.select("assigned_order_items.assigned_order_item_id, oqs.id as station_id, oqs.station_name, oqs.is_active, oqpz.zone_id, df.name as zone, df.type, odt.order_id, odt.item_code, odt.item_name, odt.price, odt.qty, odt.item_order_by, odt.options, cus.name as customer_name, odt.created_at")
.joins(" left join order_queue_stations as oqs on oqs.id = assigned_order_items.order_queue_station_id
left join order_queue_process_by_zones as oqpz on oqpz.order_queue_station_id = oqs.id
left join orders as od ON od.order_id = assigned_order_items.order_id
left join order_items as odt ON odt.item_code = assigned_order_items.item_code AND odt.order_id = assigned_order_items.order_id
left join customers as cus ON cus.customer_id = od.customer_id
left join booking_orders as bo on bo.order_id = assigned_order_items.order_id
left join bookings as bk on bk.booking_id = bo.booking_id
left join dining_facilities as df on df.id = bk.dining_facility_id")
.where("assigned_order_items.delivery_status = true AND odt.price <> 0")
.group("assigned_order_items.order_id")
# completed_order = AssignedOrderItem.group(:order_id).where('delivery_status=true');
end
end end

View File

@@ -74,8 +74,10 @@ class Origami::DiscountsController < BaseOrigamiController
end end
end end
sale.grand_total = (sale.total_amount - sale.total_discount) + sale.total_tax; # sale.grand_total = (sale.total_amount - sale.total_discount) + sale.total_tax;
sale.save # sale.save
# Re-calc All Amount in Sale
sale.compute_by_sale_items(sale_id, sale.sale_items, sale.total_discount)
end end
dining = {:table_id => table_id, :table_type => table_type } dining = {:table_id => table_id, :table_type => table_type }
@@ -100,8 +102,12 @@ class Origami::DiscountsController < BaseOrigamiController
end end
end end
sale.grand_total = (sale.total_amount - sale.total_discount) + sale.total_tax; # sale.total_discount = 0
sale.save # sale.grand_total = (sale.total_amount - sale.total_discount) + sale.total_tax;
# sale.save
# Re-calc All Amount in Sale
sale.compute_by_sale_items(sale_id, sale.sale_items, 0)
end end
dining = {:table_id => table_id, :table_type => table_type } dining = {:table_id => table_id, :table_type => table_type }

View File

@@ -29,7 +29,7 @@ class Origami::OtherChargesController < BaseOrigamiController
sale_item.sale_id = sale_id sale_item.sale_id = sale_id
sale_item.product_code = "Other Charges" sale_item.product_code = "Other Charges"
sale_item.product_name = di["name"] sale_item.product_name = "*" + di["name"]
sale_item.product_alt_name = "" sale_item.product_alt_name = ""
sale_item.remark = "Other Charges" sale_item.remark = "Other Charges"

View File

@@ -30,7 +30,7 @@ class Origami::PaymentsController < BaseOrigamiController
printer = Printer::ReceiptPrinter.new(print_settings) printer = Printer::ReceiptPrinter.new(print_settings)
printer.print_receipt_bill(print_settings,sale_items,sale_data,customer.name, item_price_by_accounts, discount_price_by_accounts, member_info, shop_details) printer.print_receipt_bill(print_settings,sale_items,sale_data,customer.name, item_price_by_accounts, discount_price_by_accounts, member_info, shop_details, "Frt")
end end
def create def create
@@ -63,7 +63,7 @@ class Origami::PaymentsController < BaseOrigamiController
discount_price_by_accounts = SaleItem.get_discount_price_by_accounts(saleObj.sale_items) discount_price_by_accounts = SaleItem.get_discount_price_by_accounts(saleObj.sale_items)
printer = Printer::ReceiptPrinter.new(print_settings) printer = Printer::ReceiptPrinter.new(print_settings)
printer.print_receipt_bill(print_settings,saleObj.sale_items,saleObj,customer.name, item_price_by_accounts, discount_price_by_accounts, member_info,rebate_amount,shop_details) printer.print_receipt_bill(print_settings,saleObj.sale_items,saleObj,customer.name, item_price_by_accounts, discount_price_by_accounts, member_info,rebate_amount,shop_details, "Paid")
end end
end end
@@ -142,7 +142,7 @@ class Origami::PaymentsController < BaseOrigamiController
discount_price_by_accounts = SaleItem.get_discount_price_by_accounts(saleObj.sale_items) discount_price_by_accounts = SaleItem.get_discount_price_by_accounts(saleObj.sale_items)
printer = Printer::ReceiptPrinter.new(print_settings) printer = Printer::ReceiptPrinter.new(print_settings)
printer.print_receipt_bill(print_settings,saleObj.sale_items,saleObj,customer.name, item_price_by_accounts, discount_price_by_accounts, member_info,rebate_amount,shop_details) printer.print_receipt_bill(print_settings,saleObj.sale_items,saleObj,customer.name, item_price_by_accounts, discount_price_by_accounts, member_info,rebate_amount,shop_details, "Re-print")
end end
def rounding_adj def rounding_adj

View File

@@ -18,7 +18,7 @@ class Origami::SaleEditController < BaseOrigamiController
@newsaleitem.save @newsaleitem.save
@newsaleitem.qty = saleitemObj.qty * -1 @newsaleitem.qty = saleitemObj.qty * -1
@newsaleitem.price = saleitemObj.price * -1 @newsaleitem.price = saleitemObj.price * -1
@newsaleitem.is_taxable = 0 @newsaleitem.is_taxable = 1
@newsaleitem.product_name = saleitemObj.product_name + " - void" @newsaleitem.product_name = saleitemObj.product_name + " - void"
@newsaleitem.save @newsaleitem.save
end end

View File

@@ -30,6 +30,13 @@ class Origami::VoidController < BaseOrigamiController
table.save table.save
end end
# update complete order items in oqs
SaleOrder.where("sale_id = '#{ sale_id }'").find_each do |sodr|
AssignedOrderItem.where("order_id = '#{ sodr.order_id }'").find_each do |aoi|
aoi.delivery_status = 1
aoi.save
end
end
end end
end end

View File

@@ -65,11 +65,12 @@ class Printer::ReceiptPrinter < Printer::PrinterWorker
end end
#Bill Receipt Print #Bill Receipt Print
def print_receipt_bill(printer_settings,sale_items,sale_data, customer_name, item_price_by_accounts, discount_price_by_accounts, member_info = nil,rebate_amount=nil,shop_details) def print_receipt_bill(printer_settings,sale_items,sale_data, customer_name, item_price_by_accounts, discount_price_by_accounts, member_info = nil,rebate_amount=nil,shop_details, printed_status)
#Use CUPS service #Use CUPS service
#Generate PDF #Generate PDF
#Print #Print
pdf = ReceiptBillPdf.new(printer_settings, sale_items, sale_data, customer_name, item_price_by_accounts, discount_price_by_accounts, member_info,rebate_amount,shop_details)
pdf = ReceiptBillPdf.new(printer_settings, sale_items, sale_data, customer_name, item_price_by_accounts, discount_price_by_accounts, member_info,rebate_amount,shop_details,printed_status)
# print as print copies in printer setting # print as print copies in printer setting
count = printer_settings.print_copies count = printer_settings.print_copies

View File

@@ -223,7 +223,7 @@ class Sale < ApplicationRecord
total_taxable = total_taxable + (item.taxable_price * item.qty) total_taxable = total_taxable + (item.taxable_price * item.qty)
end end
compute_tax(sale, total_taxable) compute_tax(sale, total_taxable, total_discount)
sale.total_amount = subtotal_price sale.total_amount = subtotal_price
sale.total_discount = total_discount sale.total_discount = total_discount
sale.grand_total = (sale.total_amount - sale.total_discount) + sale.total_tax sale.grand_total = (sale.total_amount - sale.total_discount) + sale.total_tax
@@ -261,7 +261,7 @@ class Sale < ApplicationRecord
end end
# Tax Re-Calculte # Tax Re-Calculte
def compute_tax(sale, total_taxable) def compute_tax(sale, total_taxable, total_discount = 0)
#if tax is not apply create new record #if tax is not apply create new record
SaleTax.where("sale_id='#{sale.sale_id}'").find_each do |existing_tax| SaleTax.where("sale_id='#{sale.sale_id}'").find_each do |existing_tax|
#delete existing and create new #delete existing and create new
@@ -279,9 +279,12 @@ class Sale < ApplicationRecord
sale_tax.tax_rate = tax.rate sale_tax.tax_rate = tax.rate
#include or execulive #include or execulive
# sale_tax.tax_payable_amount = total_taxable * tax.rate # sale_tax.tax_payable_amount = total_taxable * tax.rate
# substract , to give after discount
total_taxable = total_taxable - total_discount
sale_tax.tax_payable_amount = total_taxable * tax.rate / 100 sale_tax.tax_payable_amount = total_taxable * tax.rate / 100
#new taxable amount #new taxable amount is standard rule for step by step
total_taxable = total_taxable + sale_tax.tax_payable_amount # total_taxable = total_taxable + sale_tax.tax_payable_amount
sale_tax.inclusive = tax.inclusive sale_tax.inclusive = tax.inclusive
sale_tax.save sale_tax.save
@@ -318,8 +321,8 @@ class Sale < ApplicationRecord
#include or execulive #include or execulive
# sale_tax.tax_payable_amount = total_taxable * tax.rate # sale_tax.tax_payable_amount = total_taxable * tax.rate
sale_tax.tax_payable_amount = total_taxable * tax.rate / 100 sale_tax.tax_payable_amount = total_taxable * tax.rate / 100
#new taxable amount #new taxable amount is standard rule for step by step
total_taxable = total_taxable + sale_tax.tax_payable_amount # total_taxable = total_taxable + sale_tax.tax_payable_amount
sale_tax.inclusive = tax.inclusive sale_tax.inclusive = tax.inclusive
sale_tax.save sale_tax.save

View File

@@ -20,12 +20,7 @@ class ShiftSale < ApplicationRecord
#if current_user #if current_user
#find open shift where is open today and is not closed and login by current cashier #find open shift where is open today and is not closed and login by current cashier
today_date = DateTime.now.strftime("%Y-%m-%d") today_date = DateTime.now.strftime("%Y-%m-%d")
# puts today_date shift = ShiftSale.where("DATE(shift_started_at)= #{ today_date } and shift_started_at is not null and shift_closed_at is null and employee_id = #{current_user}").take
# shift = ShiftSale.where("DATE(shift_started_at)= #{ today_date } and shift_started_at is not null and shift_closed_at is null and employee_id = #{current_user}").take
shift = ShiftSale.where("DATE(shift_started_at)=? and shift_started_at is not null and shift_closed_at is null and employee_id = #{current_user}",today_date).take
return shift return shift
#end #end
end end

View File

@@ -1,7 +1,7 @@
class ReceiptBillPdf < Prawn::Document class ReceiptBillPdf < Prawn::Document
include ActionView::Helpers::NumberHelper include ActionView::Helpers::NumberHelper
attr_accessor :label_width,:price_column_width,:page_width, :page_height, :margin, :price_width, :item_width, :header_font_size, :item_font_size,:item_height,:qty_width,:total_width,:item_description_width attr_accessor :label_width,:price_column_width,:page_width, :page_height, :margin, :price_width, :item_width, :header_font_size, :item_font_size,:item_height,:qty_width,:total_width,:item_description_width
def initialize(printer_settings, sale_items, sale_data, customer_name, item_price_by_accounts, discount_price_by_accounts, member_info = nil,rebate_amount = nil,shop_details) def initialize(printer_settings, sale_items, sale_data, customer_name, item_price_by_accounts, discount_price_by_accounts, member_info = nil,rebate_amount = nil,shop_details, printed_status)
self.page_width = 210 self.page_width = 210
self.page_height = 7000 self.page_height = 7000
self.margin = 5 self.margin = 5
@@ -53,7 +53,7 @@ class ReceiptBillPdf < Prawn::Document
items_account(item_price_by_accounts,printer_settings.precision,delimiter) items_account(item_price_by_accounts,printer_settings.precision,delimiter)
footer footer(printed_status)
end end
def header (shop_details) def header (shop_details)
@@ -82,14 +82,11 @@ class ReceiptBillPdf < Prawn::Document
move_down 5 move_down 5
y_position = cursor y_position = cursor
bounding_box([0, y_position], :width =>self.item_width) do bounding_box([0, y_position], :width =>self.label_width, :height => self.item_height) do
text "Waiter: #{sale_data.requested_by}" , :size => self.item_font_size, :align => :left text "W: #{sale_data.requested_by}" , :size => self.item_font_size, :align => :left
end end
move_down 5 bounding_box([self.label_width,y_position], :width =>self.label_width, :height => self.item_height) do
text "C: #{sale_data.cashier_name}", :size => self.item_font_size,:align => :right
y_position = cursor
bounding_box([0,y_position], :width =>self.item_width, :height => self.item_height) do
text "Cashier: #{sale_data.cashier_name}", :size => self.item_font_size,:align => :left
end end
move_down 5 move_down 5
@@ -182,7 +179,7 @@ class ReceiptBillPdf < Prawn::Document
y_position = cursor y_position = cursor
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
text "#{ st.tax_name }", :size => self.item_font_size,:align => :left text "#{ st.tax_name } ( #{ st.tax_rate.to_i }%)", :size => self.item_font_size,:align => :left
end end
bounding_box([self.item_description_width,y_position], :width =>self.label_width) do bounding_box([self.item_description_width,y_position], :width =>self.label_width) do
text "#{number_with_precision(st.tax_payable_amount, :precision => precision.to_i, :delimiter => delimiter)}" , :size => self.item_font_size,:align => :right text "#{number_with_precision(st.tax_payable_amount, :precision => precision.to_i, :delimiter => delimiter)}" , :size => self.item_font_size,:align => :right
@@ -360,12 +357,18 @@ class ReceiptBillPdf < Prawn::Document
end end
end end
def footer def footer(printed_status)
move_down 5 move_down 5
stroke_horizontal_rule stroke_horizontal_rule
move_down 5 move_down 5
text "Thank You! See you Again", :left_margin => -10, :size => self.header_font_size,:align => :center y_position = cursor
bounding_box([0, y_position], :width =>self.label_width, :height => self.item_height) do
text "#{printed_status}", :size => self.header_font_size,:align => :left
end
bounding_box([self.label_width,y_position], :width =>self.label_width, :height => self.item_height) do
text "Thank You! See you Again", :left_margin => -10, :size => self.header_font_size,:align => :right
end
move_down 5 move_down 5
end end

View File

@@ -22,7 +22,10 @@
<%= qsi[:station_name] %> <%= qsi[:station_name] %>
<span class="badge badge-pill badge-default" id=<%= qsi[:station_name].gsub(' ', '_') + '_count' %>> <span class="badge badge-pill badge-default" id=<%= qsi[:station_name].gsub(' ', '_') + '_count' %>>
<%= qsi[:item_count] %> <%= qsi[:item_count] %>
</span> </span>
<% if qsi[:is_ap] %>
<span>(ap)</span>
<% end %>
</a> </a>
</li> </li>
<% end %> <% end %>
@@ -34,8 +37,7 @@
<div class="tab-pane active" id="completed" role="tabpanel"> <div class="tab-pane active" id="completed" role="tabpanel">
<div class="card-columns" style="padding-top:10px; column-gap: 1.2rem;"> <div class="card-columns" style="padding-top:10px; column-gap: 1.2rem;">
<% <%
@queue_completed_item.each do |qid| @queue_completed_item.each do |qid|
if qid.price != 0
%> %>
<div class="card queue_station"> <div class="card queue_station">
<div class="card-block"> <div class="card-block">
@@ -70,8 +72,7 @@
<p class="hidden assigned-order-item"><%= qid.assigned_order_item_id %></p> <p class="hidden assigned-order-item"><%= qid.assigned_order_item_id %></p>
</div> </div>
</div> </div>
<% <%
end
end end
%> %>
</div> </div>
@@ -89,7 +90,7 @@
<% <%
@queue_items_details.each do |qid| @queue_items_details.each do |qid|
if qid.price != 0 if qid.price != 0
if qid.station_name == qsi[:station_name] if qid.zone_id == qsi[:zone_id] && qid.station_name == qsi[:station_name]
%> %>
<div class="card queue_station"> <div class="card queue_station">
<div class="card-block"> <div class="card-block">

View File

@@ -174,7 +174,7 @@
<div class="form-group"> <div class="form-group">
<button id="net" class="btn btn-info fluid action-btn">Nett</button> <button id="net" class="btn btn-info fluid action-btn">Nett</button>
<button id="percentage" class="btn btn-primary fluid action-btn">Percentage</button> <button id="percentage" class="btn btn-primary fluid action-btn">Percentage</button>
<button id="remove-item" class="btn btn-default fluid action-btn">Remove</button> <button id="remove-item" class="btn btn-default fluid action-btn">Clear Discount</button>
</div> </div>
</div> </div>
</div> </div>
@@ -187,7 +187,7 @@
<!-- Action Panel --> <!-- Action Panel -->
<div> <div>
<button type="button" class="btn btn-primary btn-block" onclick="window.location.href = '/origami';"><i class="fa fa-arrow-left"></i> Back </button> <button type="button" class="btn btn-primary btn-block" onclick="window.location.href = '/origami';"><i class="fa fa-arrow-left"></i> Back </button>
<button id="remove-item-discount" class="btn btn-warning btn-block action-btn">Remove Discount</button> <button id="remove-item-discount" class="btn btn-warning btn-block action-btn">RemoveItem Discount</button>
<button id="remove-all" class="btn btn-warning btn-block action-btn">Remove All</button> <button id="remove-all" class="btn btn-warning btn-block action-btn">Remove All</button>
<button id="pay-discount" class="btn btn-danger btn-block action-btn">Enter</button> <button id="pay-discount" class="btn btn-danger btn-block action-btn">Enter</button>
</div> </div>

View File

@@ -301,7 +301,7 @@
<button type="button" id="customer" class="btn btn-primary btn-block" >Customer</button> <button type="button" id="customer" class="btn btn-primary btn-block" >Customer</button>
<% if @status_order == 'order' && @status_sale != 'sale' %> <% if @status_order == 'order' && @status_sale != 'sale' %>
<button type="button" class="btn btn-primary btn-block" >Add Order</button> <!-- <button type="button" class="btn btn-primary btn-block" >Add Order</button> -->
<button type="button" class="btn btn-primary btn-block" disabled >Edit</button> <button type="button" class="btn btn-primary btn-block" disabled >Edit</button>
<button type="button" id="discount" class="btn btn-primary btn-block" disabled>Discount</button> <button type="button" id="discount" class="btn btn-primary btn-block" disabled>Discount</button>
<button type="button" id="other-charges" class="btn btn-primary btn-block" disabled>Charges</button> <button type="button" id="other-charges" class="btn btn-primary btn-block" disabled>Charges</button>
@@ -311,7 +311,7 @@
<button type="button" id="pay" class="btn btn-primary btn-block" disabled>Pay</button> <button type="button" id="pay" class="btn btn-primary btn-block" disabled>Pay</button>
<button type="button" class="btn btn-primary btn-block" disabled> Void </button> <button type="button" class="btn btn-primary btn-block" disabled> Void </button>
<% else %> <% else %>
<button type="button" class="btn btn-primary btn-block" disabled>Add Order</button> <!-- <button type="button" class="btn btn-primary btn-block" disabled>Add Order</button> -->
<button type="button" class="btn btn-primary btn-block" id='edit'>Edit</button> <button type="button" class="btn btn-primary btn-block" id='edit'>Edit</button>
<button type="button" id="discount" class="btn btn-primary btn-block" >Discount</button> <button type="button" id="discount" class="btn btn-primary btn-block" >Discount</button>
<button type="button" id="other-charges" class="btn btn-primary btn-block" >Charges</button> <button type="button" id="other-charges" class="btn btn-primary btn-block" >Charges</button>

View File

@@ -276,7 +276,7 @@
<button type="button" id="customer" class="btn btn-primary btn-block" >Customer</button> <button type="button" id="customer" class="btn btn-primary btn-block" >Customer</button>
<% if @status_order == 'order' && @status_sale != 'sale' %> <% if @status_order == 'order' && @status_sale != 'sale' %>
<button type="button" class="btn btn-primary btn-block" >Add Order</button> <!-- <button type="button" class="btn btn-primary btn-block" >Add Order</button> -->
<button type="button" class="btn btn-primary btn-block" disabled >Edit</button> <button type="button" class="btn btn-primary btn-block" disabled >Edit</button>
<button type="button" id="discount" class="btn btn-primary btn-block" disabled >Discount</button> <button type="button" id="discount" class="btn btn-primary btn-block" disabled >Discount</button>
<button type="button" class="btn btn-primary btn-block" id='move'>Move</button> <button type="button" class="btn btn-primary btn-block" id='move'>Move</button>
@@ -285,7 +285,7 @@
<button type="button" id="pay" class="btn btn-primary btn-block" disabled>Pay</button> <button type="button" id="pay" class="btn btn-primary btn-block" disabled>Pay</button>
<button type="button" class="btn btn-primary btn-block" disabled=""> Void </button> <button type="button" class="btn btn-primary btn-block" disabled=""> Void </button>
<% else %> <% else %>
<button type="button" class="btn btn-primary btn-block" disabled>Add Order</button> <!-- <button type="button" class="btn btn-primary btn-block" disabled>Add Order</button> -->
<button type="button" class="btn btn-primary btn-block" id='edit'>Edit</button> <button type="button" class="btn btn-primary btn-block" id='edit'>Edit</button>
<button type="button" id="discount" class="btn btn-primary btn-block" >Discount</button> <button type="button" id="discount" class="btn btn-primary btn-block" >Discount</button>
<button type="button" class="btn btn-primary btn-block" id='move' disabled="">Move</button> <button type="button" class="btn btn-primary btn-block" id='move' disabled="">Move</button>