This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
class Api::PaymentsController < Api::ApiController
|
class Api::PaymentsController < Api::ApiController
|
||||||
skip_before_action :authenticate
|
# skip_before_action :authenticate
|
||||||
|
|
||||||
#Payment by Invoice ID
|
#Payment by Invoice ID
|
||||||
# Payment Method - [Cash | CreditNote | VISA | MASTER | etc..]
|
# Payment Method - [Cash | CreditNote | VISA | MASTER | etc..]
|
||||||
@@ -25,6 +25,9 @@ class Api::PaymentsController < Api::ApiController
|
|||||||
if params[:sale_id] && params[:card_no]
|
if params[:sale_id] && params[:card_no]
|
||||||
sale = Sale.find_by_sale_id(params[:sale_id])
|
sale = Sale.find_by_sale_id(params[:sale_id])
|
||||||
if !sale.nil?
|
if !sale.nil?
|
||||||
|
sale_id =sale.sale_id
|
||||||
|
sale_items = SaleItem.get_all_sale_items(sale_id)
|
||||||
|
@shop =Shop.find_by_shop_code(sale.shop_code)
|
||||||
if sale.sale_status == "new"
|
if sale.sale_status == "new"
|
||||||
if !params[:card_no].empty?
|
if !params[:card_no].empty?
|
||||||
current_shift = ShiftSale.current_shift(sale.shop_code)
|
current_shift = ShiftSale.current_shift(sale.shop_code)
|
||||||
@@ -37,8 +40,124 @@ class Api::PaymentsController < Api::ApiController
|
|||||||
if status == true && @membership_data["status"] == true
|
if status == true && @membership_data["status"] == true
|
||||||
sale_payment = SalePayment.new
|
sale_payment = SalePayment.new
|
||||||
status = sale_payment.process_payment(sale, current_login_employee, 0, "cash")
|
status = sale_payment.process_payment(sale, current_login_employee, 0, "cash")
|
||||||
#card_balance amount for Paymal payment
|
|
||||||
card_balance_amount = SaleAudit.getCardBalanceAmount(params[:sale_id])
|
|
||||||
|
rebate_amount = nil
|
||||||
|
# For Cashier by Zone
|
||||||
|
# bookings = Booking.where("sale_id='#{sale_id}'")
|
||||||
|
bookings = Booking.find_by_sale_id(sale_id)
|
||||||
|
|
||||||
|
shift = ShiftSale.current_open_shift(current_login_employee)
|
||||||
|
if !shift.nil?
|
||||||
|
cashier_terminal = CashierTerminal.find(shift.cashier_terminal_id)
|
||||||
|
else
|
||||||
|
if bookings.dining_facility_id.to_i > 0
|
||||||
|
table = DiningFacility.find(bookings.dining_facility_id)
|
||||||
|
cashier_zone = CashierTerminalByZone.find_by_zone_id(table.zone_id)
|
||||||
|
cashier_terminal = CashierTerminal.find(cashier_zone.cashier_terminal_id)
|
||||||
|
|
||||||
|
type = 'payment'
|
||||||
|
from = getCloudDomain #get sub domain in cloud mode
|
||||||
|
ActionCable.server.broadcast "order_channel",table: table,type:type,from:from
|
||||||
|
else
|
||||||
|
shift = ShiftSale.find(sale.shift_sale_id)
|
||||||
|
cashier_terminal = CashierTerminal.find(shift.cashier_terminal_id)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
# For Print
|
||||||
|
# if ENV["SERVER_MODE"] != "cloud" #no print in cloud server
|
||||||
|
receipt_bill_a5_pdf = Lookup.collection_of("print_settings") #print_settings with name:ReceiptBillA5Pdf
|
||||||
|
unique_code = "ReceiptBillPdf"
|
||||||
|
print_settings = PrintSetting.all
|
||||||
|
if !print_settings.nil?
|
||||||
|
print_settings.each do |setting|
|
||||||
|
if setting.unique_code == 'ReceiptBillPdf'
|
||||||
|
unique_code = "ReceiptBillPdf"
|
||||||
|
elsif setting.unique_code == 'ReceiptBillStarPdf'
|
||||||
|
unique_code = "ReceiptBillStarPdf"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if !receipt_bill_a5_pdf.empty?
|
||||||
|
receipt_bill_a5_pdf.each do |receipt_bilA5|
|
||||||
|
if receipt_bilA5[0] == 'ReceiptBillA5Pdf'
|
||||||
|
if receipt_bilA5[1] == '1'
|
||||||
|
unique_code = "ReceiptBillA5Pdf"
|
||||||
|
# else
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
customer= Customer.find(sale.customer_id)
|
||||||
|
|
||||||
|
# get member information
|
||||||
|
rebate = MembershipSetting.find_by_rebate(1)
|
||||||
|
credit_data = SalePayment.find_by_sale_id_and_payment_method(sale_id,'creditnote')
|
||||||
|
|
||||||
|
if customer.membership_id != nil && rebate && credit_data.nil?
|
||||||
|
member_info = Customer.get_member_account(customer)
|
||||||
|
|
||||||
|
if member_info["status"] == true
|
||||||
|
rebate_amount = Customer.get_membership_transactions(customer,sale.receipt_no)
|
||||||
|
current_balance = SaleAudit.paymal_search(sale_id)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
#orders print out
|
||||||
|
# if type == "quick_service"
|
||||||
|
booking = Booking.find_by_sale_id(sale_id)
|
||||||
|
if booking.dining_facility_id.to_i>0
|
||||||
|
table_id = booking.dining_facility_id
|
||||||
|
else
|
||||||
|
table_id = 0
|
||||||
|
end
|
||||||
|
|
||||||
|
latest_order = booking.booking_orders.order("order_id DESC").limit(1).first()
|
||||||
|
if !latest_order.nil?
|
||||||
|
latest_order_no = latest_order.order_id
|
||||||
|
end
|
||||||
|
|
||||||
|
booking.booking_orders.each do |order|
|
||||||
|
# Order.pay_process_order_queue(order.order_id, table_id)
|
||||||
|
oqs = OrderQueueStation.new
|
||||||
|
oqs.pay_process_order_queue(order.order_id, table_id)
|
||||||
|
|
||||||
|
assign_order = AssignedOrderItem.assigned_order_item_by_job(order.order_id)
|
||||||
|
from = getCloudDomain #get sub domain in cloud mode
|
||||||
|
ActionCable.server.broadcast "order_queue_station_channel",order: assign_order,from:from
|
||||||
|
end
|
||||||
|
|
||||||
|
# end
|
||||||
|
|
||||||
|
#for card sale data
|
||||||
|
card_data = Array.new
|
||||||
|
card_sale_trans_ref_no = Sale.getCardSaleTrans(sale_id)
|
||||||
|
if !card_sale_trans_ref_no.nil?
|
||||||
|
card_sale_trans_ref_no.each do |cash_sale_trans|
|
||||||
|
card_res_date = cash_sale_trans.res_date.strftime("%Y-%m-%d").to_s
|
||||||
|
card_res_time = cash_sale_trans.res_time.strftime("%H:%M").to_s
|
||||||
|
card_no = cash_sale_trans.pan.last(4)
|
||||||
|
card_no = card_no.rjust(19,"**** **** **** ")
|
||||||
|
card_data.push({'res_date' => card_res_date, 'res_time' => card_res_time, 'batch_no' => cash_sale_trans.batch_no, 'trace' => cash_sale_trans.trace, 'pan' => card_no, 'app' => cash_sale_trans.app, 'tid' => cash_sale_trans.terminal_id, 'app_code' => cash_sale_trans.app_code, 'ref_no' => cash_sale_trans.ref_no, 'mid' => cash_sale_trans.merchant_id})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
#card_balance amount for Paymal payment
|
||||||
|
card_balance_amount,transaction_ref = SaleAudit.getCardBalanceAmount(sale_id)
|
||||||
|
|
||||||
|
# get printer info
|
||||||
|
print_settings=PrintSetting.find_by_unique_code(unique_code)
|
||||||
|
# Calculate Food and Beverage Total
|
||||||
|
item_price_by_accounts = SaleItem.calculate_price_by_accounts(sale.sale_items)
|
||||||
|
discount_price_by_accounts = SaleItem.get_discount_price_by_accounts(sale.sale_items)
|
||||||
|
other_amount = SaleItem.calculate_other_charges(sale_items)
|
||||||
|
|
||||||
|
printer = Printer::ReceiptPrinter.new(print_settings)
|
||||||
|
filename, sale_receipt_no, printer_name = printer.print_receipt_bill(print_settings, false, nil, cashier_terminal,sale_items,sale,customer.name, item_price_by_accounts, discount_price_by_accounts, member_info,rebate_amount,@shop, 'Foodcourt',current_balance,card_data,other_amount,latest_order_no,card_balance_amount,nil,transaction_ref)
|
||||||
|
|
||||||
render json: JSON.generate({:status => true, :balance_amount => card_balance_amount,:receipt_no => sale.receipt_no, :message => "Payment successful."})
|
render json: JSON.generate({:status => true, :balance_amount => card_balance_amount,:receipt_no => sale.receipt_no, :message => "Payment successful."})
|
||||||
else
|
else
|
||||||
@@ -182,4 +301,13 @@ class Api::PaymentsController < Api::ApiController
|
|||||||
@status, @invoice = sale_payment.process_payment(sale_payment, current_login_employee)
|
@status, @invoice = sale_payment.process_payment(sale_payment, current_login_employee)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
#get cloud domain
|
||||||
|
def getCloudDomain
|
||||||
|
from = ""
|
||||||
|
if ENV["SERVER_MODE"] == 'cloud'
|
||||||
|
from = request.subdomain.to_s + "." + request.domain.to_s
|
||||||
|
end
|
||||||
|
|
||||||
|
return from
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -9,18 +9,18 @@ module TokenVerification
|
|||||||
|
|
||||||
protected
|
protected
|
||||||
# Authenticate the user with token based authentication
|
# Authenticate the user with token based authentication
|
||||||
def authenticate
|
def authenticate
|
||||||
authenticate_token || render_unauthorized
|
authenticate_token || render_unauthorized
|
||||||
end
|
end
|
||||||
|
|
||||||
def authenticate_token
|
def authenticate_token
|
||||||
authenticate_with_http_token do |token, options|
|
authenticate_with_http_token do |token, options|
|
||||||
# Rails.logger.debug "token - " + token.to_s
|
# Rails.logger.debug "token - " + token.to_s
|
||||||
if(options.length !=0 && options["from"] == "DOEMAL")
|
if(options.length !=0 && options["from"] == "DOEMAL")
|
||||||
if(ENV["SERVER_MODE"] === "cloud")
|
if(ENV["SERVER_MODE"] === "cloud")
|
||||||
from = request.subdomain.downcase + "." + request.domain.downcase #"local"
|
from = request.subdomain.downcase + "." + request.domain.downcase #"local"
|
||||||
aes = MyAesCrypt.new
|
aes = MyAesCrypt.new
|
||||||
return aes.checkKeyForAuth(from, token)
|
return aes.checkKeyForAuth(from, token)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ class Reports::PaymentMethodController < BaseReportController
|
|||||||
@payments = [["All Payment",''],["Cash Payment","cash"], ["KBZ Payment", KbzPay::KBZ_PAY], ["Credit Payment","creditnote"],
|
@payments = [["All Payment",''],["Cash Payment","cash"], ["KBZ Payment", KbzPay::KBZ_PAY], ["Credit Payment","creditnote"],
|
||||||
["FOC Payment","foc"], ["MPU Payment","mpu"], ["Visa Payment","visa"],
|
["FOC Payment","foc"], ["MPU Payment","mpu"], ["Visa Payment","visa"],
|
||||||
["Master Payment","master"], ["JCB Payment","jcb"],["UnionPay Payment","unionpay"],
|
["Master Payment","master"], ["JCB Payment","jcb"],["UnionPay Payment","unionpay"],
|
||||||
["Alipay Payment","alipay"],["Paymal Payment", "paymal"],["Dinga Payment","dinga"],
|
["Alipay Payment","alipay"],["Card Payment", "paymal"],["Dinga Payment","dinga"],
|
||||||
["JunctionPay","junctionpay"],["Redeem Payment","paypar"],["Gift Voucher","giftvoucher"]]
|
["JunctionPay","junctionpay"],["Redeem Payment","paypar"],["Gift Voucher","giftvoucher"]]
|
||||||
|
|
||||||
from, to = get_date_range_from_params
|
from, to = get_date_range_from_params
|
||||||
|
|||||||
@@ -39,8 +39,8 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
|||||||
# end
|
# end
|
||||||
|
|
||||||
|
|
||||||
shop = Shop.current_shop
|
# shop = Shop.current_shop
|
||||||
directory_name = 'public/orders_'+shop.shop_code
|
directory_name = 'public/orders_'+oqs.shop_code
|
||||||
Dir.mkdir(directory_name) unless File.exists?(directory_name)
|
Dir.mkdir(directory_name) unless File.exists?(directory_name)
|
||||||
|
|
||||||
filename = directory_name + "/order_item_#{order_id}_#{order_item_id}" + ".pdf"
|
filename = directory_name + "/order_item_#{order_id}_#{order_item_id}" + ".pdf"
|
||||||
@@ -82,8 +82,8 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
|||||||
order=print_query('order_summary', order_id)
|
order=print_query('order_summary', order_id)
|
||||||
|
|
||||||
|
|
||||||
shop = Shop.current_shop
|
# shop = Shop.current_shop
|
||||||
directory_name = 'public/orders_'+shop.shop_code
|
directory_name = 'public/orders_'+oqs.shop_code
|
||||||
Dir.mkdir(directory_name) unless File.exists?(directory_name)
|
Dir.mkdir(directory_name) unless File.exists?(directory_name)
|
||||||
|
|
||||||
# For Print Per Item
|
# For Print Per Item
|
||||||
@@ -195,8 +195,8 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
|||||||
order=print_query('booking_summary', booking_id)
|
order=print_query('booking_summary', booking_id)
|
||||||
|
|
||||||
|
|
||||||
shop = Shop.current_shop
|
# shop = Shop.current_shop
|
||||||
directory_name = 'public/orders_'+shop.shop_code
|
directory_name = 'public/orders_'+oqs.shop_code
|
||||||
Dir.mkdir(directory_name) unless File.exists?(directory_name)
|
Dir.mkdir(directory_name) unless File.exists?(directory_name)
|
||||||
|
|
||||||
# For Print Per Item
|
# For Print Per Item
|
||||||
@@ -297,7 +297,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
|||||||
# Query for OQS with status
|
# Query for OQS with status
|
||||||
def print_query(type, id)
|
def print_query(type, id)
|
||||||
if type == "order_item"
|
if type == "order_item"
|
||||||
OrderItem.select("order_items.order_id, order_items.item_code, order_items.item_name, order_items.qty, order_items.price, order_items.options, order_items.item_order_by as order_by, order_items.created_at as order_at, order_items.set_menu_items, cus.name as customer, df.type, df.name as dining,item.alt_name as alt_name")
|
OrderItem.select("orders.source,cus.contact_no,rder_items.order_id, order_items.item_code, order_items.item_name, order_items.qty, order_items.price, order_items.options, order_items.item_order_by as order_by, order_items.created_at as order_at, order_items.set_menu_items, cus.name as customer, df.type, df.name as dining,item.alt_name as alt_name")
|
||||||
.joins("left join orders ON orders.order_id = order_items.order_id
|
.joins("left join orders ON orders.order_id = order_items.order_id
|
||||||
left join booking_orders AS bo ON bo.order_id=order_items.order_id
|
left join booking_orders AS bo ON bo.order_id=order_items.order_id
|
||||||
left join bookings AS b ON b.booking_id = bo.booking_id
|
left join bookings AS b ON b.booking_id = bo.booking_id
|
||||||
@@ -307,7 +307,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
|||||||
.where("order_items.order_items_id = '#{ id }'")
|
.where("order_items.order_items_id = '#{ id }'")
|
||||||
.group("order_items.item_code")
|
.group("order_items.item_code")
|
||||||
elsif type == "order_summary"
|
elsif type == "order_summary"
|
||||||
OrderItem.select("order_items.order_id, order_items.item_code, order_items.item_name, order_items.qty, order_items.price, order_items.options, order_items.item_order_by as order_by, order_items.created_at as order_at, order_items.set_menu_items, cus.name as customer, df.type, df.name as dining,item.alt_name as alt_name")
|
OrderItem.select("orders.source,cus.contact_no,order_items.order_id, order_items.item_code, order_items.item_name, order_items.qty, order_items.price, order_items.options, order_items.item_order_by as order_by, order_items.created_at as order_at, order_items.set_menu_items, cus.name as customer, df.type, df.name as dining,item.alt_name as alt_name")
|
||||||
.joins("left join orders ON orders.order_id = order_items.order_id
|
.joins("left join orders ON orders.order_id = order_items.order_id
|
||||||
left join booking_orders AS bo ON bo.order_id=order_items.order_id
|
left join booking_orders AS bo ON bo.order_id=order_items.order_id
|
||||||
left join bookings AS b ON b.booking_id = bo.booking_id
|
left join bookings AS b ON b.booking_id = bo.booking_id
|
||||||
@@ -318,7 +318,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
|||||||
.group("order_items.order_items_id")
|
.group("order_items.order_items_id")
|
||||||
else
|
else
|
||||||
# order summary for booking
|
# order summary for booking
|
||||||
OrderItem.select("order_items.order_id, order_items.item_code, order_items.item_name, order_items.qty, order_items.price, order_items.options, order_items.item_order_by as order_by, order_items.created_at as order_at, order_items.set_menu_items, cus.name as customer, df.type, df.name as dining,item.alt_name as alt_name")
|
OrderItem.select("orders.source,cus.contact_no,order_items.order_id, order_items.item_code, order_items.item_name, order_items.qty, order_items.price, order_items.options, order_items.item_order_by as order_by, order_items.created_at as order_at, order_items.set_menu_items, cus.name as customer, df.type, df.name as dining,item.alt_name as alt_name")
|
||||||
.joins("left join orders ON orders.order_id = order_items.order_id
|
.joins("left join orders ON orders.order_id = order_items.order_id
|
||||||
left join booking_orders AS bo ON bo.order_id=order_items.order_id
|
left join booking_orders AS bo ON bo.order_id=order_items.order_id
|
||||||
left join bookings AS b ON b.booking_id = bo.booking_id
|
left join bookings AS b ON b.booking_id = bo.booking_id
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ class CloseCashierCustomisePdf < Prawn::Document
|
|||||||
|
|
||||||
stroke_horizontal_rule
|
stroke_horizontal_rule
|
||||||
|
|
||||||
shift_detail(shift_sale,sale_taxes,other_payment,total_amount_by_account,total_discount_by_account,total_member_discount,precision,delimiter,total_dinein,total_takeway,total_other_charges,total_waste,total_spoile,total_credit_payments)
|
shift_detail(shift_sale,sale_taxes,other_payment,total_amount_by_account,total_discount_by_account,total_member_discount,precision,delimiter,total_dinein,total_takeway,total_other_charges,total_waste,total_spoile,total_credit_payments)
|
||||||
end
|
end
|
||||||
|
|
||||||
def header (shop_details)
|
def header (shop_details)
|
||||||
@@ -322,7 +322,7 @@ class CloseCashierCustomisePdf < Prawn::Document
|
|||||||
if other.paymal_amount && other.paymal_amount.to_f > 0
|
if other.paymal_amount && other.paymal_amount.to_f > 0
|
||||||
y_position = cursor
|
y_position = cursor
|
||||||
bounding_box([0,y_position], :width =>self.item_description_width, :height => 20) do
|
bounding_box([0,y_position], :width =>self.item_description_width, :height => 20) do
|
||||||
text "Paymal Payment :", :size => self.item_font_size, :align => :right
|
text "Card Payment :", :size => self.item_font_size, :align => :right
|
||||||
end
|
end
|
||||||
bounding_box([self.item_description_width,y_position], :width =>self.price_width, :height => 20) do
|
bounding_box([self.item_description_width,y_position], :width =>self.price_width, :height => 20) do
|
||||||
text "#{ number_format(other.paymal_amount, :precision => precision.to_i, :delimiter => delimiter)}", :size => self.item_font_size, :align => :right
|
text "#{ number_format(other.paymal_amount, :precision => precision.to_i, :delimiter => delimiter)}", :size => self.item_font_size, :align => :right
|
||||||
|
|||||||
@@ -276,7 +276,7 @@ class CloseCashierPdf < Prawn::Document
|
|||||||
if other.paymal_amount && other.paymal_amount.to_f > 0
|
if other.paymal_amount && other.paymal_amount.to_f > 0
|
||||||
y_position = cursor
|
y_position = cursor
|
||||||
bounding_box([0,y_position], :width =>self.item_description_width, :height => 20) do
|
bounding_box([0,y_position], :width =>self.item_description_width, :height => 20) do
|
||||||
text "Paymal Payment :", :size => self.item_font_size, :align => :right
|
text "Card Payment :", :size => self.item_font_size, :align => :right
|
||||||
end
|
end
|
||||||
bounding_box([self.item_description_width,y_position], :width =>self.price_width, :height => 20) do
|
bounding_box([self.item_description_width,y_position], :width =>self.price_width, :height => 20) do
|
||||||
text "#{ number_format(other.paymal_amount, :precision => precision.to_i, :delimiter => delimiter)}", :size => self.item_font_size, :align => :right
|
text "#{ number_format(other.paymal_amount, :precision => precision.to_i, :delimiter => delimiter)}", :size => self.item_font_size, :align => :right
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ class CloseCashierPdf < Prawn::Document
|
|||||||
|
|
||||||
stroke_horizontal_rule
|
stroke_horizontal_rule
|
||||||
|
|
||||||
shift_detail(shift_sale,sale_taxes,other_payment,total_amount_by_account,total_discount_by_account,total_member_discount,precision,delimiter,total_waste,total_spoile,total_other_charges,total_credit_payments)
|
shift_detail(shift_sale,sale_taxes,other_payment,total_amount_by_account,total_discount_by_account,total_member_discount,precision,delimiter,total_waste,total_spoile,total_other_charges,total_credit_payments)
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -263,7 +263,7 @@ class CloseCashierPdf < Prawn::Document
|
|||||||
if other.paymal_amount && other.paymal_amount.to_f > 0
|
if other.paymal_amount && other.paymal_amount.to_f > 0
|
||||||
y_position = cursor
|
y_position = cursor
|
||||||
bounding_box([0,y_position], :width =>self.item_description_width, :height => 20) do
|
bounding_box([0,y_position], :width =>self.item_description_width, :height => 20) do
|
||||||
text "Paymal Payment :", :size => self.item_font_size, :align => :right
|
text "Card Payment :", :size => self.item_font_size, :align => :right
|
||||||
end
|
end
|
||||||
bounding_box([self.item_description_width,y_position], :width =>self.price_width, :height => 20) do
|
bounding_box([self.item_description_width,y_position], :width =>self.price_width, :height => 20) do
|
||||||
text "#{ number_format(other.paymal_amount, :precision => precision.to_i, :delimiter => delimiter)}", :size => self.item_font_size, :align => :right
|
text "#{ number_format(other.paymal_amount, :precision => precision.to_i, :delimiter => delimiter)}", :size => self.item_font_size, :align => :right
|
||||||
|
|||||||
@@ -34,15 +34,20 @@ class OrderItemCustomisePdf < Prawn::Document
|
|||||||
# font "public/fonts/Zawgyi-One.ttf"
|
# font "public/fonts/Zawgyi-One.ttf"
|
||||||
# font "public/fonts/padauk.ttf"
|
# font "public/fonts/padauk.ttf"
|
||||||
#font "public/fonts/Chinese.ttf"
|
#font "public/fonts/Chinese.ttf"
|
||||||
if !order_item.dining.nil?
|
if order_item.source =='app'
|
||||||
text "#{ order_item.type + '-' + order_item.dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
text "Mobile Order", :size => self.header_font_size,:align => :center
|
||||||
else
|
move_down 1
|
||||||
text "#{ print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
text "Customer Ph : #{order_item.contact_no}", :size => self.header_font_size,:align => :center
|
||||||
end
|
move_down 1
|
||||||
|
end
|
||||||
stroke_horizontal_rule
|
if !order_item.dining.nil?
|
||||||
move_down 3
|
text "#{ order_item.type + '-' + order_item.dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
||||||
|
else
|
||||||
|
text "#{ print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
||||||
|
end
|
||||||
|
|
||||||
|
stroke_horizontal_rule
|
||||||
|
move_down 3
|
||||||
#order_info
|
#order_info
|
||||||
order_info(order_item.order_id, order_item.order_by,order_item.order_at)
|
order_info(order_item.order_id, order_item.order_by,order_item.order_at)
|
||||||
|
|
||||||
|
|||||||
@@ -32,18 +32,23 @@ class OrderItemPdf < Prawn::Document
|
|||||||
font "#{print_settings.font}"
|
font "#{print_settings.font}"
|
||||||
fallback_fonts ["Courier", "Helvetica", "Times-Roman"]
|
fallback_fonts ["Courier", "Helvetica", "Times-Roman"]
|
||||||
end
|
end
|
||||||
# font "public/fonts/Zawgyi-One.ttf"
|
# font "public/fonts/Zawgyi-One.ttf"
|
||||||
# font "public/fonts/padauk.ttf"
|
# font "public/fonts/padauk.ttf"
|
||||||
#font "public/fonts/Chinese.ttf"
|
#font "public/fonts/Chinese.ttf"
|
||||||
if !order_item.dining.nil?
|
if order_item.source =='app'
|
||||||
text "#{ order_item.type + '-' + order_item.dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
text "Mobile Order", :size => self.header_font_size,:align => :center
|
||||||
else
|
move_down 1
|
||||||
text "#{ print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
text "Customer Ph : #{order_item.contact_no}", :size => self.header_font_size,:align => :center
|
||||||
end
|
move_down 1
|
||||||
|
end
|
||||||
stroke_horizontal_rule
|
if !order_item.dining.nil?
|
||||||
move_down 3
|
text "#{ order_item.type + '-' + order_item.dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
||||||
|
else
|
||||||
|
text "#{ print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
||||||
|
end
|
||||||
|
|
||||||
|
stroke_horizontal_rule
|
||||||
|
move_down 3
|
||||||
#order_info
|
#order_info
|
||||||
order_info(order_item.order_id, order_item.order_by,order_item.order_at)
|
order_info(order_item.order_id, order_item.order_by,order_item.order_at)
|
||||||
|
|
||||||
|
|||||||
@@ -34,15 +34,20 @@ class OrderItemSlimCustomisePdf < Prawn::Document
|
|||||||
# font "public/fonts/Zawgyi-One.ttf"
|
# font "public/fonts/Zawgyi-One.ttf"
|
||||||
# font "public/fonts/padauk.ttf"
|
# font "public/fonts/padauk.ttf"
|
||||||
#font "public/fonts/Chinese.ttf"
|
#font "public/fonts/Chinese.ttf"
|
||||||
if !order_item_slim.dining.nil?
|
if order_item_slim.source =='app'
|
||||||
text "#{ order_item_slim.type + '-' + order_item_slim.dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
text "Mobile Order", :size => self.header_font_size,:align => :center
|
||||||
else
|
move_down 1
|
||||||
text "#{ print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
text "Customer Ph : #{order_item_slim.contact_no}", :size => self.header_font_size,:align => :center
|
||||||
end
|
move_down 1
|
||||||
|
end
|
||||||
stroke_horizontal_rule
|
if !order_item_slim.dining.nil?
|
||||||
move_down 1
|
text "#{ order_item_slim.type + '-' + order_item_slim.dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
||||||
|
else
|
||||||
|
text "#{ print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
||||||
|
end
|
||||||
|
|
||||||
|
stroke_horizontal_rule
|
||||||
|
move_down 1
|
||||||
#order_info
|
#order_info
|
||||||
order_info(order_item_slim.order_id, order_item_slim.order_by,order_item_slim.order_at)
|
order_info(order_item_slim.order_id, order_item_slim.order_by,order_item_slim.order_at)
|
||||||
|
|
||||||
|
|||||||
@@ -34,14 +34,20 @@ class OrderItemSlimPdf < Prawn::Document
|
|||||||
# font "public/fonts/Zawgyi-One.ttf"
|
# font "public/fonts/Zawgyi-One.ttf"
|
||||||
# font "public/fonts/padauk.ttf"
|
# font "public/fonts/padauk.ttf"
|
||||||
#font "public/fonts/Chinese.ttf"
|
#font "public/fonts/Chinese.ttf"
|
||||||
if !order_item_slim.dining.nil?
|
if order_item_slim.source =='app'
|
||||||
text "#{ order_item_slim.type + '-' + order_item_slim.dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
text "Mobile Order", :size => self.header_font_size,:align => :center
|
||||||
else
|
move_down 1
|
||||||
text "#{ print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
text "Customer Ph : #{order_item_slim.contact_no}", :size => self.header_font_size,:align => :center
|
||||||
end
|
move_down 1
|
||||||
|
end
|
||||||
|
if !order_item_slim.dining.nil?
|
||||||
|
text "#{ order_item_slim.type + '-' + order_item_slim.dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
||||||
|
else
|
||||||
|
text "#{ print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
||||||
|
end
|
||||||
|
|
||||||
stroke_horizontal_rule
|
stroke_horizontal_rule
|
||||||
move_down 1
|
move_down 1
|
||||||
|
|
||||||
#order_info
|
#order_info
|
||||||
order_info(order_item_slim.order_id, order_item_slim.order_by,order_item_slim.order_at)
|
order_info(order_item_slim.order_id, order_item_slim.order_by,order_item_slim.order_at)
|
||||||
|
|||||||
@@ -35,14 +35,20 @@ class OrderItemStarPdf < Prawn::Document
|
|||||||
# font "public/fonts/Zawgyi-One.ttf"
|
# font "public/fonts/Zawgyi-One.ttf"
|
||||||
# font "public/fonts/padauk.ttf"
|
# font "public/fonts/padauk.ttf"
|
||||||
#font "public/fonts/Chinese.ttf"
|
#font "public/fonts/Chinese.ttf"
|
||||||
if !order_item.dining.nil?
|
if order_item.source =='app'
|
||||||
text "#{ order_item.type + '-' + order_item.dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
text "Mobile Order", :size => self.header_font_size,:align => :center
|
||||||
else
|
move_down 1
|
||||||
text "#{ print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
text "Customer Ph : #{order_item.contact_no}", :size => self.header_font_size,:align => :center
|
||||||
end
|
move_down 1
|
||||||
|
end
|
||||||
|
if !order_item.dining.nil?
|
||||||
|
text "#{ order_item.type + '-' + order_item.dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
||||||
|
else
|
||||||
|
text "#{ print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
||||||
|
end
|
||||||
|
|
||||||
stroke_horizontal_rule
|
stroke_horizontal_rule
|
||||||
move_down 3
|
move_down 3
|
||||||
|
|
||||||
#order_info
|
#order_info
|
||||||
order_info(order_item.order_id, order_item.order_by,order_item.order_at)
|
order_info(order_item.order_id, order_item.order_by,order_item.order_at)
|
||||||
|
|||||||
@@ -34,13 +34,19 @@ class OrderSetItemCustomisePdf < Prawn::Document
|
|||||||
# font "public/fonts/Zawgyi-One.ttf"
|
# font "public/fonts/Zawgyi-One.ttf"
|
||||||
# font "public/fonts/padauk.ttf"
|
# font "public/fonts/padauk.ttf"
|
||||||
#font "public/fonts/Chinese.ttf"
|
#font "public/fonts/Chinese.ttf"
|
||||||
if !order_set_item.dining.nil?
|
if order_set_item.source =='app'
|
||||||
text "#{ order_set_item.type + '-' + order_set_item.dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
text "Mobile Order", :size => self.header_font_size,:align => :center
|
||||||
else
|
move_down 1
|
||||||
text "#{ print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
text "Customer Ph : #{order_set_item.contact_no}", :size => self.header_font_size,:align => :center
|
||||||
end
|
move_down 1
|
||||||
stroke_horizontal_rule
|
end
|
||||||
move_down 3
|
if !order_set_item.dining.nil?
|
||||||
|
text "#{ order_set_item.type + '-' + order_set_item.dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
||||||
|
else
|
||||||
|
text "#{ print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
||||||
|
end
|
||||||
|
stroke_horizontal_rule
|
||||||
|
move_down 3
|
||||||
|
|
||||||
#order_info
|
#order_info
|
||||||
order_info(order_set_item.order_id, order_set_item.order_by,order_set_item.order_at)
|
order_info(order_set_item.order_id, order_set_item.order_by,order_set_item.order_at)
|
||||||
|
|||||||
@@ -33,13 +33,19 @@ class OrderSetItemPdf < Prawn::Document
|
|||||||
# font "public/fonts/Zawgyi-One.ttf"
|
# font "public/fonts/Zawgyi-One.ttf"
|
||||||
# font "public/fonts/padauk.ttf"
|
# font "public/fonts/padauk.ttf"
|
||||||
#font "public/fonts/Chinese.ttf"
|
#font "public/fonts/Chinese.ttf"
|
||||||
if !order_set_item.dining.nil?
|
if order_set_item.source =='app'
|
||||||
text "#{ order_set_item.type + '-' + order_set_item.dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
text "Mobile Order", :size => self.header_font_size,:align => :center
|
||||||
else
|
move_down 1
|
||||||
text "#{ print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
text "Customer Ph : #{order_set_item.contact_no}", :size => self.header_font_size,:align => :center
|
||||||
end
|
move_down 1
|
||||||
stroke_horizontal_rule
|
end
|
||||||
move_down 3
|
if !order_set_item.dining.nil?
|
||||||
|
text "#{ order_set_item.type + '-' + order_set_item.dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
||||||
|
else
|
||||||
|
text "#{ print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
||||||
|
end
|
||||||
|
stroke_horizontal_rule
|
||||||
|
move_down 3
|
||||||
|
|
||||||
#order_info
|
#order_info
|
||||||
order_info(order_set_item.order_id, order_set_item.order_by,order_set_item.order_at)
|
order_info(order_set_item.order_id, order_set_item.order_by,order_set_item.order_at)
|
||||||
|
|||||||
@@ -34,6 +34,12 @@ class OrderSummaryCustomisePdf < Prawn::Document
|
|||||||
# font "public/fonts/Zawgyi-One.ttf"
|
# font "public/fonts/Zawgyi-One.ttf"
|
||||||
# font "public/fonts/padauk.ttf"
|
# font "public/fonts/padauk.ttf"
|
||||||
|
|
||||||
|
if order[0].source =='app'
|
||||||
|
text "Mobile Order", :size => self.header_font_size,:align => :center
|
||||||
|
move_down 1
|
||||||
|
text "Customer Ph : #{order[0].contact_no}", :size => self.header_font_size,:align => :center
|
||||||
|
move_down 1
|
||||||
|
end
|
||||||
if !order[0].dining.nil?
|
if !order[0].dining.nil?
|
||||||
text "#{ order[0].type + '-' + order[0].dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
text "#{ order[0].type + '-' + order[0].dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -32,7 +32,12 @@ class OrderSummaryPdf < Prawn::Document
|
|||||||
|
|
||||||
# font "public/fonts/Zawgyi-One.ttf"
|
# font "public/fonts/Zawgyi-One.ttf"
|
||||||
# font "public/fonts/padauk.ttf"
|
# font "public/fonts/padauk.ttf"
|
||||||
|
if order[0].source =='app'
|
||||||
|
text "Mobile Order", :size => self.header_font_size,:align => :center
|
||||||
|
move_down 1
|
||||||
|
text "Customer Ph : #{order[0].contact_no}", :size => self.header_font_size,:align => :center
|
||||||
|
move_down 1
|
||||||
|
end
|
||||||
if !order[0].dining.nil?
|
if !order[0].dining.nil?
|
||||||
text "#{ order[0].type + '-' + order[0].dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
text "#{ order[0].type + '-' + order[0].dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
||||||
else
|
else
|
||||||
@@ -41,7 +46,6 @@ class OrderSummaryPdf < Prawn::Document
|
|||||||
|
|
||||||
stroke_horizontal_rule
|
stroke_horizontal_rule
|
||||||
move_down 5
|
move_down 5
|
||||||
|
|
||||||
#order_info
|
#order_info
|
||||||
order_info(order[0].order_id, order[0].order_by,order[0].order_at)
|
order_info(order[0].order_id, order[0].order_by,order[0].order_at)
|
||||||
|
|
||||||
|
|||||||
@@ -33,6 +33,13 @@ class OrderSummarySetCustomisePdf < Prawn::Document
|
|||||||
|
|
||||||
# font "public/fonts/Zawgyi-One.ttf"
|
# font "public/fonts/Zawgyi-One.ttf"
|
||||||
# font "public/fonts/padauk.ttf"
|
# font "public/fonts/padauk.ttf"
|
||||||
|
|
||||||
|
if order[0].source =='app'
|
||||||
|
text "Mobile Order", :size => self.header_font_size,:align => :center
|
||||||
|
move_down 1
|
||||||
|
text "Customer Ph : #{order[0].contact_no}", :size => self.header_font_size,:align => :center
|
||||||
|
move_down 1
|
||||||
|
end
|
||||||
if !order[0].dining.nil?
|
if !order[0].dining.nil?
|
||||||
text "#{ order[0].type + '-' + order[0].dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
text "#{ order[0].type + '-' + order[0].dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
||||||
else
|
else
|
||||||
@@ -41,7 +48,6 @@ class OrderSummarySetCustomisePdf < Prawn::Document
|
|||||||
|
|
||||||
stroke_horizontal_rule
|
stroke_horizontal_rule
|
||||||
move_down 5
|
move_down 5
|
||||||
|
|
||||||
#order_info
|
#order_info
|
||||||
order_info(order[0].order_id, order[0].order_by,order[0].order_at)
|
order_info(order[0].order_id, order[0].order_by,order[0].order_at)
|
||||||
|
|
||||||
|
|||||||
@@ -32,6 +32,13 @@ class OrderSummarySetPdf < Prawn::Document
|
|||||||
|
|
||||||
# font "public/fonts/Zawgyi-One.ttf"
|
# font "public/fonts/Zawgyi-One.ttf"
|
||||||
# font "public/fonts/padauk.ttf"
|
# font "public/fonts/padauk.ttf"
|
||||||
|
|
||||||
|
if order[0].source =='app'
|
||||||
|
text "Mobile Order", :size => self.header_font_size,:align => :center
|
||||||
|
move_down 1
|
||||||
|
text "Customer Ph : #{order[0].contact_no}", :size => self.header_font_size,:align => :center
|
||||||
|
move_down 1
|
||||||
|
end
|
||||||
if !order[0].dining.nil?
|
if !order[0].dining.nil?
|
||||||
text "#{ order[0].type + '-' + order[0].dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
text "#{ order[0].type + '-' + order[0].dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
||||||
else
|
else
|
||||||
@@ -40,7 +47,6 @@ class OrderSummarySetPdf < Prawn::Document
|
|||||||
|
|
||||||
stroke_horizontal_rule
|
stroke_horizontal_rule
|
||||||
move_down 5
|
move_down 5
|
||||||
|
|
||||||
#order_info
|
#order_info
|
||||||
order_info(order[0].order_id, order[0].order_by,order[0].order_at)
|
order_info(order[0].order_id, order[0].order_by,order[0].order_at)
|
||||||
|
|
||||||
|
|||||||
@@ -33,6 +33,12 @@ class OrderSummarySlimCustomisePdf < Prawn::Document
|
|||||||
|
|
||||||
# font "public/fonts/Zawgyi-One.ttf"
|
# font "public/fonts/Zawgyi-One.ttf"
|
||||||
# font "public/fonts/padauk.ttf"
|
# font "public/fonts/padauk.ttf"
|
||||||
|
if order[0].source =='app'
|
||||||
|
text "Mobile Order", :size => self.header_font_size,:align => :center
|
||||||
|
move_down 1
|
||||||
|
text "Customer Ph : #{order[0].contact_no}", :size => self.header_font_size,:align => :center
|
||||||
|
move_down 1
|
||||||
|
end
|
||||||
if !order[0].dining.nil?
|
if !order[0].dining.nil?
|
||||||
text "#{ order[0].type + '-' + order[0].dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
text "#{ order[0].type + '-' + order[0].dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -32,6 +32,12 @@ class OrderSummarySlimPdf < Prawn::Document
|
|||||||
|
|
||||||
# font "public/fonts/Zawgyi-One.ttf"
|
# font "public/fonts/Zawgyi-One.ttf"
|
||||||
# font "public/fonts/padauk.ttf"
|
# font "public/fonts/padauk.ttf"
|
||||||
|
if order[0].source =='app'
|
||||||
|
text "Mobile Order", :size => self.header_font_size,:align => :center
|
||||||
|
move_down 1
|
||||||
|
text "Customer Ph : #{order[0].contact_no}", :size => self.header_font_size,:align => :center
|
||||||
|
move_down 1
|
||||||
|
end
|
||||||
if !order[0].dining.nil?
|
if !order[0].dining.nil?
|
||||||
text "#{ order[0].type + '-' + order[0].dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
text "#{ order[0].type + '-' + order[0].dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -405,12 +405,16 @@ class ReceiptBillA5Pdf < Prawn::Document
|
|||||||
y_position = cursor
|
y_position = cursor
|
||||||
if payment.payment_method == "paypar"
|
if payment.payment_method == "paypar"
|
||||||
bounding_box([0,y_position], :width =>self.description_width, :height => self.item_height) do
|
bounding_box([0,y_position], :width =>self.description_width, :height => self.item_height) do
|
||||||
text "Redeem Payment", :size => self.item_font_size,:align => :left
|
text "Redeem Payment", :size => self.item_font_size,:align => :left
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
payment_method = payment.payment_method.capitalize
|
||||||
|
if payment.payment_method == "paymal"
|
||||||
|
payment_method ='Card'
|
||||||
|
end
|
||||||
bounding_box([0,y_position], :width =>self.description_width, :height => self.item_height) do
|
bounding_box([0,y_position], :width =>self.description_width, :height => self.item_height) do
|
||||||
text "#{payment.payment_method.capitalize} Payment", :size => self.item_font_size,:align => :left
|
text "#{payment_method} Payment", :size => self.item_font_size,:align => :left
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
bounding_box([self.description_width,y_position], :width =>self.label_width) do
|
bounding_box([self.description_width,y_position], :width =>self.label_width) do
|
||||||
|
|||||||
@@ -464,8 +464,12 @@ class ReceiptBillPdf < Prawn::Document
|
|||||||
text "Redeem Payment", :size => self.item_font_size,:align => :left
|
text "Redeem Payment", :size => self.item_font_size,:align => :left
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
payment_method = payment.payment_method.capitalize
|
||||||
|
if payment.payment_method == "paymal"
|
||||||
|
payment_method ='Card'
|
||||||
|
end
|
||||||
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 "#{payment.payment_method.capitalize} Payment", :size => self.item_font_size,:align => :left
|
text "#{payment_method} Payment", :size => self.item_font_size,:align => :left
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -403,8 +403,12 @@ class ReceiptBillStarPdf < Prawn::Document
|
|||||||
text "Redeem Payment", :size => self.item_font_size,:align => :left
|
text "Redeem Payment", :size => self.item_font_size,:align => :left
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
payment_method = payment.payment_method.capitalize
|
||||||
|
if payment.payment_method == "paymal"
|
||||||
|
payment_method ='Card'
|
||||||
|
end
|
||||||
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 "#{payment.payment_method.capitalize} Payment", :size => self.item_font_size,:align => :left
|
text "#{payment_method} Payment", :size => self.item_font_size,:align => :left
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -147,7 +147,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-md-3 col-lg-3 col-sm-3 m-t-10">
|
<div class="col-md-3 col-lg-3 col-sm-3 m-t-10">
|
||||||
<button type="button" class="btn btn-lg btn-primary waves-effect col-md-12" id='app_order'>
|
<button type="button" class="btn btn-lg btn-primary waves-effect col-md-12" id='app_order'>
|
||||||
Application Orders <span class="badge badge-danger" style="font-size: 0.75rem;border-radius: 5px;"><%= @app_order_new_count %></span>
|
Mobile Orders <span class="badge badge-danger" style="font-size: 0.75rem;border-radius: 5px;"><%= @app_order_new_count %></span>
|
||||||
</button>
|
</button>
|
||||||
<br>
|
<br>
|
||||||
<div class="card-header" style="padding: 0.12rem 0.25rem">
|
<div class="card-header" style="padding: 0.12rem 0.25rem">
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li class="breadcrumb-item"><a href="<%= foodcourt_food_court_path %>">Foodcourt</a></li>
|
<li class="breadcrumb-item"><a href="<%= foodcourt_food_court_path %>">Foodcourt</a></li>
|
||||||
<li class="breadcrumb-item active">Application Orders</li>
|
<li class="breadcrumb-item active">Mobile Orders</li>
|
||||||
<span class="float-right">
|
<span class="float-right">
|
||||||
<%= link_to 'Back', foodcourt_food_court_path %>
|
<%= link_to 'Back', foodcourt_food_court_path %>
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@@ -1393,6 +1393,7 @@ $(document).ready(function(){
|
|||||||
swal({
|
swal({
|
||||||
title: "Information!",
|
title: "Information!",
|
||||||
text: 'Thank You !',
|
text: 'Thank You !',
|
||||||
|
type: "success",
|
||||||
}, function () {
|
}, function () {
|
||||||
// For Server Print - from jade
|
// For Server Print - from jade
|
||||||
if ($("#server_mode").val() == "cloud") {
|
if ($("#server_mode").val() == "cloud") {
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
application_path="#{File.expand_path("../..", __FILE__)}"
|
# application_path="#{File.expand_path("../..", __FILE__)}"
|
||||||
directory application_path
|
# directory application_path
|
||||||
#environment ENV.fetch("RAILS_ENV") { "production" }
|
# #environment ENV.fetch("RAILS_ENV") { "production" }
|
||||||
environment "production"
|
# environment "production"
|
||||||
pidfile "#{application_path}/tmp/puma/pid"
|
# pidfile "#{application_path}/tmp/puma/pid"
|
||||||
state_path "#{application_path}/tmp/puma/state"
|
# state_path "#{application_path}/tmp/puma/state"
|
||||||
stdout_redirect "#{application_path}/log/puma.stdout.log", "#{application_path}/log/puma.stderr.log"
|
# stdout_redirect "#{application_path}/log/puma.stdout.log", "#{application_path}/log/puma.stderr.log"
|
||||||
port ENV.fetch("PORT") { 62158 }
|
# port ENV.fetch("PORT") { 62158 }
|
||||||
workers 2
|
# workers 2
|
||||||
preload_app!
|
# preload_app!
|
||||||
threads 1,1
|
# threads 1,1
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
22910
|
12343
|
||||||
Reference in New Issue
Block a user