update for addorder and printer
This commit is contained in:
@@ -131,60 +131,62 @@ class Origami::AddordersController < BaseOrigamiController
|
|||||||
customer_id = params[:customer_id] == ""? "CUS-000000000001" : params[:customer_id] # for no customer id from mobile
|
customer_id = params[:customer_id] == ""? "CUS-000000000001" : params[:customer_id] # for no customer id from mobile
|
||||||
end
|
end
|
||||||
|
|
||||||
@order = Order.new
|
Order.transaction do
|
||||||
@order.source = params[:order_source]
|
@order = Order.new
|
||||||
@order.order_type = params[:order_type]
|
@order.source = params[:order_source]
|
||||||
@order.customer_id = customer_id
|
@order.order_type = params[:order_type]
|
||||||
@order.items = items_arr
|
@order.customer_id = customer_id
|
||||||
@order.guest = params[:guest_info]
|
@order.items = items_arr
|
||||||
@order.table_id = params[:table_id] # this is dining facilities's id
|
@order.guest = params[:guest_info]
|
||||||
@order.new_booking = true
|
@order.table_id = params[:table_id] # this is dining facilities's id
|
||||||
@order.waiters = current_login_employee.name
|
|
||||||
@order.employee_name = current_login_employee.name
|
|
||||||
|
|
||||||
@order.is_extra_time = is_extra_time
|
|
||||||
@order.extra_time = extra_time
|
|
||||||
|
|
||||||
if booking.nil? || booking.sale_id.present? || booking.booking_status == 'moved'
|
|
||||||
@order.new_booking = true
|
@order.new_booking = true
|
||||||
else
|
@order.waiters = current_login_employee.name
|
||||||
@order.new_booking = false
|
@order.employee_name = current_login_employee.name
|
||||||
@order.booking_id = booking.booking_id
|
|
||||||
end
|
|
||||||
|
|
||||||
@status, @booking = @order.generate
|
@order.is_extra_time = is_extra_time
|
||||||
|
@order.extra_time = extra_time
|
||||||
|
|
||||||
if @status && @booking
|
if booking.nil? || booking.sale_id.present? || booking.booking_status == 'moved'
|
||||||
#send order broadcast to order_channel
|
@order.new_booking = true
|
||||||
if @order.table_id.to_i > 0
|
else
|
||||||
table = DiningFacility.find(@booking.dining_facility_id)
|
@order.new_booking = false
|
||||||
type = 'order'
|
@order.booking_id = booking.booking_id
|
||||||
from = getCloudDomain #get sub domain in cloud mode
|
|
||||||
ActionCable.server.broadcast "order_channel", table: table,type:type,from:from
|
|
||||||
end
|
end
|
||||||
if params[:order_source] != "quick_service" && params[:order_source] != "food_court"
|
|
||||||
process_order_queue(@order.order_id,@order.table_id,@order.source)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
# Order.send_customer_view(@booking)
|
|
||||||
|
|
||||||
if current_user.role != "waiter" && params[:create_type] == "create_pay"
|
@status, @booking = @order.generate
|
||||||
if @status && @booking && (@order.source == 'quick_service') || (@order.source == 'food_court')
|
|
||||||
|
|
||||||
@status, @sale = Sale.request_bill(@order,current_user,current_login_employee)
|
if @status && @booking
|
||||||
|
#send order broadcast to order_channel
|
||||||
# for second display
|
if @order.table_id.to_i > 0
|
||||||
if @order.source == 'quick_service'
|
table = DiningFacility.find(@booking.dining_facility_id)
|
||||||
|
type = 'order'
|
||||||
from = getCloudDomain #get sub domain in cloud mode
|
from = getCloudDomain #get sub domain in cloud mode
|
||||||
ActionCable.server.broadcast "second_display_channel",data: @sale,status:"sale",from:from
|
ActionCable.server.broadcast "order_channel", table: table,type:type,from:from
|
||||||
end
|
end
|
||||||
#end
|
if params[:order_source] != "quick_service" && params[:order_source] != "food_court"
|
||||||
result = {:status=> @status, :data => @sale }
|
process_order_queue(@order.order_id,@order.table_id,@order.source)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
# Order.send_customer_view(@booking)
|
||||||
|
|
||||||
|
if current_user.role != "waiter" && params[:create_type] == "create_pay"
|
||||||
|
if @status && @booking && (@order.source == 'quick_service') || (@order.source == 'food_court')
|
||||||
|
|
||||||
|
@status, @sale = Sale.request_bill(@order,current_user,current_login_employee)
|
||||||
|
|
||||||
|
# for second display
|
||||||
|
if @order.source == 'quick_service'
|
||||||
|
from = getCloudDomain #get sub domain in cloud mode
|
||||||
|
ActionCable.server.broadcast "second_display_channel",data: @sale,status:"sale",from:from
|
||||||
|
end
|
||||||
|
#end
|
||||||
|
result = {:status=> @status, :data => @sale }
|
||||||
|
render :json => result.to_json
|
||||||
|
end
|
||||||
|
else
|
||||||
|
result = {:status=> @status, :data => 0 }
|
||||||
render :json => result.to_json
|
render :json => result.to_json
|
||||||
end
|
end
|
||||||
else
|
|
||||||
result = {:status=> @status, :data => 0 }
|
|
||||||
render :json => result.to_json
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -234,15 +236,9 @@ class Origami::AddordersController < BaseOrigamiController
|
|||||||
sidekiq = Lookup.find_by_lookup_type("sidekiq")
|
sidekiq = Lookup.find_by_lookup_type("sidekiq")
|
||||||
|
|
||||||
if ENV["SERVER_MODE"] != 'cloud'
|
if ENV["SERVER_MODE"] != 'cloud'
|
||||||
cup_status = `#{"sudo service cups status"}`
|
if Printer::PrinterWorker.printers.blank?
|
||||||
if !check_cup_status(cup_status)
|
msg = 'Print Error ! Please contact to service'
|
||||||
cup_start = `#{"sudo service cups start"}`
|
ActionCable.server.broadcast "call_waiter_channel", table: msg, time:'print_error', from: ''
|
||||||
cup_status = `#{"sudo service cups status"}`
|
|
||||||
if !check_cup_status(cup_status)
|
|
||||||
from = ''
|
|
||||||
msg = 'Print Error ! Please contact to service'
|
|
||||||
ActionCable.server.broadcast "call_waiter_channel", table: msg, time:'print_error', from: from
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -10,38 +10,18 @@ class Origami::PaymentsController < BaseOrigamiController
|
|||||||
member_info = nil
|
member_info = nil
|
||||||
|
|
||||||
# For Cashier by Zone
|
# For Cashier by Zone
|
||||||
booking = Booking.find_by_sale_id(sale_id)
|
booking = sale_data.booking
|
||||||
# if bookings.count > 1
|
|
||||||
# # for Multiple Booking
|
if current_user.role == 'cashier'
|
||||||
# table = DiningFacility.find(bookings[0].dining_facility_id)
|
cashier_terminal = shift.cashier_terminal
|
||||||
# else
|
elsif booking.dining_facility_id
|
||||||
# table = DiningFacility.find(bookings[0].dining_facility_id)
|
cashier_terminal = booking.dining_facility.cashier_terminal
|
||||||
# end
|
|
||||||
shift = ShiftSale.current_open_shift(current_user.id)
|
|
||||||
if !shift.nil?
|
|
||||||
cashier_terminal = CashierTerminal.find(shift.cashier_terminal_id)
|
|
||||||
else
|
else
|
||||||
if booking.dining_facility_id.to_i > 0
|
cashier_terminal = sale_data.shift_sale.cashier_terminal
|
||||||
table = DiningFacility.find(booking.dining_facility_id)
|
|
||||||
cashier_zone = CashierTerminalByZone.find_by_zone_id(table.zone_id)
|
|
||||||
cashier_terminal = CashierTerminal.find(cashier_zone.cashier_terminal_id)
|
|
||||||
else
|
|
||||||
shift = ShiftSale.find(sale_data.shift_sale_id)
|
|
||||||
cashier_terminal = CashierTerminal.find(shift.cashier_terminal_id)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
#shop detail
|
customer = sale_data.customer
|
||||||
## shop_detail = Shop.current_shop
|
|
||||||
# customer= Customer.where('customer_id=' +.customer_id)
|
|
||||||
customer = Customer.find(sale_data.customer_id)
|
|
||||||
# rounding adjustment
|
|
||||||
if shop_detail.is_rounding_adj
|
|
||||||
new_total = Sale.get_rounding_adjustment(sale_data.grand_total)
|
|
||||||
rounding_adj = new_total - sale_data.grand_total
|
|
||||||
sale_data.update_attributes(grand_total: new_total,old_grand_total: sale_data.grand_total,rounding_adjustment:rounding_adj) if rounding_adj > 0
|
|
||||||
end
|
|
||||||
#end rounding adjustment
|
|
||||||
#record for sale audit
|
#record for sale audit
|
||||||
action_by = current_user.name
|
action_by = current_user.name
|
||||||
type = "FIRST_BILL"
|
type = "FIRST_BILL"
|
||||||
@@ -113,21 +93,7 @@ class Origami::PaymentsController < BaseOrigamiController
|
|||||||
if(Sale.exists?(sale_id))
|
if(Sale.exists?(sale_id))
|
||||||
saleObj = Sale.find(sale_id)
|
saleObj = Sale.find(sale_id)
|
||||||
sale_items = SaleItem.get_all_sale_items(sale_id)
|
sale_items = SaleItem.get_all_sale_items(sale_id)
|
||||||
#shop_detail = Shop.current_shop
|
|
||||||
# rounding adjustment
|
|
||||||
if !path.include? ("credit_payment")
|
|
||||||
if shop_detail.is_rounding_adj
|
|
||||||
new_total = Sale.get_rounding_adjustment(saleObj.grand_total)
|
|
||||||
rounding_adj = new_total - saleObj.grand_total
|
|
||||||
saleObj.update_attributes(grand_total: new_total,old_grand_total: saleObj.grand_total,rounding_adjustment:rounding_adj) if rounding_adj > 0
|
|
||||||
end
|
|
||||||
end
|
|
||||||
#end rounding adjustment
|
|
||||||
|
|
||||||
# if pay_from = 'kbzpay'
|
|
||||||
# salePayment = SalePayment.find(sale_payment_id)
|
|
||||||
# salePayment.process_kbz_payment(salePayment.sale_id, sale_data.grand_total, cash, 'paid')
|
|
||||||
# else
|
|
||||||
sp = SalePayment.where('sale_id=? and payment_method=? and payment_status=?', sale_id, 'kbzpay', 'paid').last
|
sp = SalePayment.where('sale_id=? and payment_method=? and payment_status=?', sale_id, 'kbzpay', 'paid').last
|
||||||
if is_kbz == 'false'
|
if is_kbz == 'false'
|
||||||
Rails.logger.info '################ CASH PAYMENT #################'
|
Rails.logger.info '################ CASH PAYMENT #################'
|
||||||
@@ -141,14 +107,12 @@ class Origami::PaymentsController < BaseOrigamiController
|
|||||||
sp.kbz_edit_sale_payment(sp.received_amount.to_f, current_user)
|
sp.kbz_edit_sale_payment(sp.received_amount.to_f, current_user)
|
||||||
end
|
end
|
||||||
|
|
||||||
# end
|
|
||||||
|
|
||||||
if !path.include? ("credit_payment")
|
if !path.include? ("credit_payment")
|
||||||
rebate_amount = nil
|
rebate_amount = nil
|
||||||
|
|
||||||
# For Cashier by Zone
|
# For Cashier by Zone
|
||||||
# bookings = Booking.where("sale_id='#{sale_id}'")
|
# bookings = Booking.where("sale_id='#{sale_id}'")
|
||||||
bookings = saleObj.bookings[0]
|
bookings = saleObj.booking
|
||||||
|
|
||||||
shift = ShiftSale.current_open_shift(current_user.id)
|
shift = ShiftSale.current_open_shift(current_user.id)
|
||||||
if !shift.nil?
|
if !shift.nil?
|
||||||
@@ -170,97 +134,78 @@ class Origami::PaymentsController < BaseOrigamiController
|
|||||||
|
|
||||||
# For Print
|
# For Print
|
||||||
# if ENV["SERVER_MODE"] != "cloud" #no print in cloud server
|
# if ENV["SERVER_MODE"] != "cloud" #no print in cloud server
|
||||||
receipt_bill_a5_pdf = Lookup.collection_of("print_settings") #print_settings with name:ReceiptBillA5Pdf
|
if Lookup.collection_of("print_settings").any? { |x| x == ["ReceiptBillA5Pdf", "1"] } #print_settings with name:ReceiptBillA5Pdf
|
||||||
unique_code = "ReceiptBillPdf"
|
unique_code = "ReceiptBillA5Pdf"
|
||||||
print_settings = PrintSetting.all
|
else
|
||||||
if !print_settings.nil?
|
unique_code = PrintSetting.where("unique_code REGEXP ?", "receipt.*bill.*pdf").first.unique_code
|
||||||
print_settings.each do |setting|
|
end
|
||||||
if setting.unique_code == 'ReceiptBillPdf'
|
|
||||||
unique_code = "ReceiptBillPdf"
|
customer = saleObj.customer
|
||||||
elsif setting.unique_code == 'ReceiptBillStarPdf'
|
|
||||||
unique_code = "ReceiptBillStarPdf"
|
# get member information
|
||||||
end
|
rebate = MembershipSetting.find_by_rebate(1)
|
||||||
end
|
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,saleObj.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
|
end
|
||||||
|
|
||||||
if !receipt_bill_a5_pdf.empty?
|
latest_order = booking.booking_orders.order("order_id DESC").limit(1).first()
|
||||||
receipt_bill_a5_pdf.each do |receipt_bilA5|
|
if !latest_order.nil?
|
||||||
if receipt_bilA5[0] == 'ReceiptBillA5Pdf'
|
latest_order_no = latest_order.order_id
|
||||||
if receipt_bilA5[1] == '1'
|
|
||||||
unique_code = "ReceiptBillA5Pdf"
|
|
||||||
# else
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
customer= Customer.find(saleObj.customer_id)
|
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)
|
||||||
|
|
||||||
# get member information
|
assign_order = AssignedOrderItem.assigned_order_item_by_job(order.order_id)
|
||||||
rebate = MembershipSetting.find_by_rebate(1)
|
from = getCloudDomain #get sub domain in cloud mode
|
||||||
credit_data = SalePayment.find_by_sale_id_and_payment_method(sale_id,'creditnote')
|
ActionCable.server.broadcast "order_queue_station_channel",order: assign_order,from:from
|
||||||
|
|
||||||
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,saleObj.receipt_no)
|
|
||||||
current_balance = SaleAudit.paymal_search(sale_id)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
#orders print out
|
end
|
||||||
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
|
|
||||||
|
|
||||||
|
#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
|
||||||
|
end
|
||||||
|
|
||||||
#for card sale data
|
#card_balance amount for Paymal payment
|
||||||
card_data = Array.new
|
card_balance_amount = SaleAudit.getCardBalanceAmount(sale_id)
|
||||||
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
|
# get printer info
|
||||||
card_balance_amount = SaleAudit.getCardBalanceAmount(sale_id)
|
print_settings = PrintSetting.find_by_unique_code(unique_code)
|
||||||
|
# Calculate Food and Beverage Total
|
||||||
|
item_price_by_accounts = SaleItem.calculate_price_by_accounts(saleObj.sale_items)
|
||||||
|
discount_price_by_accounts = SaleItem.get_discount_price_by_accounts(saleObj.sale_items)
|
||||||
|
other_amount = SaleItem.calculate_other_charges(sale_items)
|
||||||
|
|
||||||
# get printer info
|
printer = Printer::ReceiptPrinter.new(print_settings)
|
||||||
print_settings=PrintSetting.find_by_unique_code(unique_code)
|
filename, sale_receipt_no, printer_name = printer.print_receipt_bill(print_settings, false, nil, cashier_terminal,sale_items,saleObj,customer.name, item_price_by_accounts, discount_price_by_accounts, member_info,rebate_amount,shop_detail, "Paid",current_balance,card_data,other_amount,latest_order_no,card_balance_amount,nil)
|
||||||
# Calculate Food and Beverage Total
|
|
||||||
item_price_by_accounts = SaleItem.calculate_price_by_accounts(saleObj.sale_items)
|
|
||||||
discount_price_by_accounts = SaleItem.get_discount_price_by_accounts(saleObj.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,saleObj,customer.name, item_price_by_accounts, discount_price_by_accounts, member_info,rebate_amount,shop_detail, "Paid",current_balance,card_data,other_amount,latest_order_no,card_balance_amount,nil)
|
|
||||||
|
|
||||||
#end
|
#end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ class DiningFacility < ApplicationRecord
|
|||||||
has_one :dining_charge
|
has_one :dining_charge
|
||||||
has_one :cashier_terminal_by_zone, foreign_key: "zone_id", primary_key: "zone_id"
|
has_one :cashier_terminal_by_zone, foreign_key: "zone_id", primary_key: "zone_id"
|
||||||
has_one :cashier_terminal, through: :cashier_terminal_by_zone
|
has_one :cashier_terminal, through: :cashier_terminal_by_zone
|
||||||
|
has_many :order_queue_process_by_zones, foreign_key: "zone_id", primary_key: "zone_id"
|
||||||
|
has_many :order_queue_stations, -> { where(is_active: true) }, through: :order_queue_process_by_zones
|
||||||
|
|
||||||
has_many :bookings
|
has_many :bookings
|
||||||
|
|
||||||
|
|||||||
@@ -132,7 +132,6 @@ class Order < ApplicationRecord
|
|||||||
menu_items = MenuItem.search_by_item_code(item_instance_codes)
|
menu_items = MenuItem.search_by_item_code(item_instance_codes)
|
||||||
menu_items += Product.search_by_product_code(item_instance_codes) if menu_items.length < item_instance_codes.length
|
menu_items += Product.search_by_product_code(item_instance_codes) if menu_items.length < item_instance_codes.length
|
||||||
|
|
||||||
new_order_items = []
|
|
||||||
items.each do |order_item|
|
items.each do |order_item|
|
||||||
menu_item = menu_items.find { |i| i[:item_instance_code].downcase == order_item[:item_instance_code].downcase }
|
menu_item = menu_items.find { |i| i[:item_instance_code].downcase == order_item[:item_instance_code].downcase }
|
||||||
sub_order_items = []
|
sub_order_items = []
|
||||||
@@ -144,7 +143,7 @@ class Order < ApplicationRecord
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
sub_order_items = sub_order_items.to_json
|
sub_order_items = sub_order_items.to_json
|
||||||
new_order_items << OrderItem.new({
|
self.order_items.build({
|
||||||
item_code: menu_item[:item_code],
|
item_code: menu_item[:item_code],
|
||||||
item_instance_code: order_item[:item_instance_code],
|
item_instance_code: order_item[:item_instance_code],
|
||||||
item_name: menu_item[:name],
|
item_name: menu_item[:name],
|
||||||
@@ -159,7 +158,6 @@ class Order < ApplicationRecord
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
self.order_items << new_order_items
|
|
||||||
self.item_count = self.order_items.count
|
self.item_count = self.order_items.count
|
||||||
self.save!
|
self.save!
|
||||||
|
|
||||||
@@ -408,62 +406,28 @@ class Order < ApplicationRecord
|
|||||||
print_status = nil
|
print_status = nil
|
||||||
cup_status = nil
|
cup_status = nil
|
||||||
|
|
||||||
#Send to background job for processing
|
#Send to background job for processing
|
||||||
order = Order.find(order_id)
|
order = Order.find(order_id)
|
||||||
sidekiq = Lookup.find_by_lookup_type("sidekiq")
|
sidekiq = Lookup.find_by_lookup_type("sidekiq")
|
||||||
|
|
||||||
if ENV["SERVER_MODE"] != 'cloud'
|
if ENV["SERVER_MODE"] != 'cloud'
|
||||||
cup_status = `#{"sudo service cups status"}`
|
if Printer::PrinterWorker.printers.blank?
|
||||||
print_status = check_cup_status(cup_status)
|
msg = 'Print Error ! Please contact to service'
|
||||||
|
ActionCable.server.broadcast "call_waiter_channel", table: msg, time:'print_error', from: ''
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
if print_status
|
if !sidekiq.nil?
|
||||||
if !sidekiq.nil?
|
OrderQueueProcessorJob.perform_later(order_id, table_id)
|
||||||
OrderQueueProcessorJob.perform_later(order_id, table_id)
|
else
|
||||||
else
|
if order
|
||||||
if order
|
oqs = OrderQueueStation.new
|
||||||
oqs = OrderQueueStation.new
|
oqs.process_order(order, table_id, order_source)
|
||||||
oqs.process_order(order, table_id, source)
|
|
||||||
end
|
|
||||||
# assign_order = AssignedOrderItem.assigned_order_item_by_job(order_id)
|
|
||||||
# ActionCable.server.broadcast "order_queue_station_channel",order: assign_order
|
|
||||||
end
|
|
||||||
else
|
|
||||||
if ENV["SERVER_MODE"] != 'cloud'
|
|
||||||
cup_start = `#{"sudo service cups start"}`
|
|
||||||
cup_status = `#{"sudo service cups status"}`
|
|
||||||
print_status = check_cup_status(cup_status)
|
|
||||||
end
|
|
||||||
|
|
||||||
if print_status
|
|
||||||
if !sidekiq.nil?
|
|
||||||
OrderQueueProcessorJob.perform_later(order_id, table_id)
|
|
||||||
else
|
|
||||||
if order
|
|
||||||
oqs = OrderQueueStation.new
|
|
||||||
oqs.process_order(order, table_id, source)
|
|
||||||
end
|
|
||||||
# assign_order = AssignedOrderItem.assigned_order_item_by_job(order_id)
|
|
||||||
# ActionCable.server.broadcast "order_queue_station_channel",order: assign_order
|
|
||||||
end
|
|
||||||
else
|
|
||||||
if ENV["SERVER_MODE"] != 'cloud'
|
|
||||||
|
|
||||||
msg = ' Print Error ! Please contact to service'
|
|
||||||
ActionCable.server.broadcast "call_waiter_channel",table: msg,time:'print_error'
|
|
||||||
end
|
|
||||||
if !sidekiq.nil?
|
|
||||||
OrderQueueProcessorJob.perform_later(order_id, table_id)
|
|
||||||
else
|
|
||||||
if order
|
|
||||||
oqs = OrderQueueStation.new
|
|
||||||
oqs.process_order(order, table_id, source)
|
|
||||||
end
|
|
||||||
assign_order = AssignedOrderItem.assigned_order_item_by_job(order_id)
|
|
||||||
ActionCable.server.broadcast "order_queue_station_channel",order: assign_order
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
from = getCloudDomain #get sub domain in cloud mode
|
||||||
|
assign_order = AssignedOrderItem.assigned_order_item_by_job(order_id)
|
||||||
|
ActionCable.server.broadcast "order_queue_station_channel", order: assign_order, from: from
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.check_cup_status(status)
|
def self.check_cup_status(status)
|
||||||
|
|||||||
@@ -15,14 +15,14 @@ class OrderQueueStation < ApplicationRecord
|
|||||||
validates_presence_of :station_name, :printer_name
|
validates_presence_of :station_name, :printer_name
|
||||||
|
|
||||||
def process_order(order, table_id, order_source = nil, pdf_status = nil ,change_to=nil, current_user=nil)
|
def process_order(order, table_id, order_source = nil, pdf_status = nil ,change_to=nil, current_user=nil)
|
||||||
oqs_stations = OrderQueueStation.active
|
|
||||||
order_items = order.order_items
|
order_items = order.order_items
|
||||||
|
|
||||||
if table_id.to_i > 0
|
if table_id.to_i > 0
|
||||||
# get dining
|
# get dining
|
||||||
dining = DiningFacility.find(table_id)
|
dining = DiningFacility.find(table_id)
|
||||||
oqs_by_zones = OrderQueueProcessByZone.where("zone_id=#{dining.zone_id}").pluck(:order_queue_station_id)
|
oqs_stations = dining.order_queue_stations
|
||||||
oqs_stations = oqs_stations.select { |s| oqs_by_zones.include? s.id }
|
else
|
||||||
|
oqs_stations = OrderQueueStation.active
|
||||||
end
|
end
|
||||||
|
|
||||||
assigned_order_items = []
|
assigned_order_items = []
|
||||||
@@ -30,12 +30,12 @@ class OrderQueueStation < ApplicationRecord
|
|||||||
|
|
||||||
# ToDo per item per printer
|
# ToDo per item per printer
|
||||||
oqs_stations.each do |oqs|
|
oqs_stations.each do |oqs|
|
||||||
oqs_order_items = nil
|
|
||||||
oqs_order_items = order_items.select { |i| JSON.parse(oqs.processing_items).include? i.item_code }
|
oqs_order_items = order_items.select { |i| JSON.parse(oqs.processing_items).include? i.item_code }
|
||||||
assigned_order_items += oqs_order_items.map { |i| AssignedOrderItem.new({ order: order, item_code: i.item_code, instance_code: i.item_instance_code, order_queue_station: oqs, print_status: false, delivery_status: false }) }
|
|
||||||
oqs_order_items_by_zones << { oqs: oqs, oqs_order_items: oqs_order_items }
|
oqs_order_items_by_zones << { oqs: oqs, oqs_order_items: oqs_order_items }
|
||||||
|
|
||||||
|
print_status = false
|
||||||
if oqs.auto_print && order_source != "quick_service"
|
if oqs.auto_print && order_source != "quick_service"
|
||||||
|
print_status = true
|
||||||
if oqs_order_items.length > 0
|
if oqs_order_items.length > 0
|
||||||
if oqs.cut_per_item
|
if oqs.cut_per_item
|
||||||
print_slip_item(oqs, order, oqs_order_items, pdf_status, change_to, current_user, table_id)
|
print_slip_item(oqs, order, oqs_order_items, pdf_status, change_to, current_user, table_id)
|
||||||
@@ -44,9 +44,9 @@ class OrderQueueStation < ApplicationRecord
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
assigned_order_items.each(&:save)
|
oqs_order_items.each { |i| AssignedOrderItem.create({ order: order, item_code: i.item_code, instance_code: i.item_instance_code, order_queue_station: oqs, print_status: print_status, delivery_status: false }) }
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def pay_process_order_queue (order_id, table_id)
|
def pay_process_order_queue (order_id, table_id)
|
||||||
@@ -155,13 +155,10 @@ class OrderQueueStation < ApplicationRecord
|
|||||||
else
|
else
|
||||||
move_print_pdf(change_to,current_user,table_id,order_items,oqs)
|
move_print_pdf(change_to,current_user,table_id,order_items,oqs)
|
||||||
end
|
end
|
||||||
|
|
||||||
AssignedOrderItem.where("order_id = ?", order.order_id).update_all(print_status: true)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
#Print order_item in 1 slip per item
|
#Print order_item in 1 slip per item
|
||||||
def print_slip_item(oqs, order, assigned_items,pdf_status=nil,change_to=nil,current_user=nil,table_id=nil)
|
def print_slip_item(oqs, order, assigned_items,pdf_status=nil,change_to=nil,current_user=nil,table_id=nil)
|
||||||
|
|
||||||
if pdf_status.nil?
|
if pdf_status.nil?
|
||||||
# order_item = OrderItem.where("order_id='#{assigned_item.order_id}' AND item_instance_code='#{assigned_item.instance_code}'").first()
|
# order_item = OrderItem.where("order_id='#{assigned_item.order_id}' AND item_instance_code='#{assigned_item.instance_code}'").first()
|
||||||
# print when complete click
|
# print when complete click
|
||||||
@@ -176,8 +173,6 @@ class OrderQueueStation < ApplicationRecord
|
|||||||
else
|
else
|
||||||
move_print_pdf(change_to,current_user,table_id,assigned_items,oqs)
|
move_print_pdf(change_to,current_user,table_id,assigned_items,oqs)
|
||||||
end
|
end
|
||||||
|
|
||||||
AssignedOrderItem.where("order_id = ?", order.order_id).update_all(print_status: true)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def move_print_pdf(change_to,current_user,change_from,order_items,oqs)
|
def move_print_pdf(change_to,current_user,change_from,order_items,oqs)
|
||||||
|
|||||||
@@ -23,28 +23,18 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
|||||||
|
|
||||||
pdf.render_file filename
|
pdf.render_file filename
|
||||||
|
|
||||||
if oqs.print_copy
|
if ENV["SERVER_MODE"] != "cloud"
|
||||||
#no print in cloud server
|
self.print(filename, oqs.printer_name)
|
||||||
if ENV["SERVER_MODE"] != "cloud"
|
|
||||||
self.print(filename, oqs.printer_name)
|
|
||||||
end
|
|
||||||
#For print copy
|
|
||||||
# pdf.render_file filename.gsub(".","-copy.")
|
|
||||||
# self.print(filename.gsub(".","-copy."), oqs.printer_name)
|
|
||||||
else
|
|
||||||
print_settings.print_copies = 1
|
|
||||||
print_settings.save!
|
|
||||||
#no print in cloud server
|
|
||||||
if ENV["SERVER_MODE"] != "cloud"
|
|
||||||
self.print(filename, oqs.printer_name)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
#For print copy
|
||||||
|
# pdf.render_file filename.gsub(".","-copy.")
|
||||||
|
# self.print(filename.gsub(".","-copy."), oqs.printer_name)
|
||||||
|
|
||||||
return filename, order_id, oqs.printer_name
|
return filename, order_id, oqs.printer_name
|
||||||
end
|
end
|
||||||
|
|
||||||
# Query for per order
|
# Query for per order
|
||||||
def print_order_summary(print_settings,oqs, order_id, order_items, print_status, before_updated_qty="", options="")
|
def print_order_summary(print_settings, oqs, order_id, order_items, print_status, before_updated_qty="", options="")
|
||||||
#Use CUPS service
|
#Use CUPS service
|
||||||
#Generate PDF
|
#Generate PDF
|
||||||
#Print
|
#Print
|
||||||
@@ -55,7 +45,7 @@ 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_#{shop.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
|
||||||
@@ -64,10 +54,10 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
|||||||
order_items.each do |odi|
|
order_items.each do |odi|
|
||||||
odi_item = print_query('order_item', odi.order_items_id)
|
odi_item = print_query('order_item', odi.order_items_id)
|
||||||
|
|
||||||
filename = directory_name + "/order_item_#{order_id}" + ".pdf"
|
filename = directory_name + "/order_item_#{order_id}.pdf"
|
||||||
# filename = "tmp/order_item_#{order_id}" + ".pdf"
|
# filename = "tmp/order_item_#{order_id}" + ".pdf"
|
||||||
# For Item Options
|
# For Item Options
|
||||||
options = odi.options == "[]"? "" : odi.options
|
options = odi.options == "[]" ? "" : odi.options
|
||||||
|
|
||||||
# check for item not to show
|
# check for item not to show
|
||||||
#if odi.price != 0
|
#if odi.price != 0
|
||||||
@@ -75,19 +65,10 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
|||||||
|
|
||||||
# pdf.render_file "tmp/order_item.pdf"
|
# pdf.render_file "tmp/order_item.pdf"
|
||||||
pdf.render_file filename
|
pdf.render_file filename
|
||||||
if oqs.print_copy
|
#no print in cloud server
|
||||||
#no print in cloud server
|
if ENV["SERVER_MODE"] != "cloud"
|
||||||
if ENV["SERVER_MODE"] != "cloud"
|
self.print(filename, oqs.printer_name)
|
||||||
self.print(filename, oqs.printer_name)
|
# self.print(filename.gsub(".","-copy."), oqs.printer_name)
|
||||||
# self.print(filename.gsub(".","-copy."), oqs.printer_name)
|
|
||||||
end
|
|
||||||
else
|
|
||||||
print_settings.print_copies = 1
|
|
||||||
print_settings.save!
|
|
||||||
#no print in cloud server
|
|
||||||
if ENV["SERVER_MODE"] != "cloud"
|
|
||||||
self.print(filename, oqs.printer_name)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
#end
|
#end
|
||||||
end
|
end
|
||||||
@@ -95,33 +76,24 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
|||||||
else
|
else
|
||||||
order = print_query('order_summary', order_id)
|
order = print_query('order_summary', order_id)
|
||||||
|
|
||||||
filename = directory_name + "/order_summary_#{order_id}" + ".pdf"
|
filename = directory_name + "/order_summary_#{order_id}.pdf"
|
||||||
# filename = "tmp/order_summary_#{order_id}" + ".pdf"
|
# filename = "tmp/order_summary_#{order_id}" + ".pdf"
|
||||||
pdf = print_settings.unique_code.constantize.new(print_settings, order, print_status, order_items, oqs.use_alternate_name, before_updated_qty)
|
pdf = print_settings.unique_code.constantize.new(print_settings, order, print_status, order_items, oqs.use_alternate_name, before_updated_qty)
|
||||||
|
|
||||||
pdf.render_file filename
|
pdf.render_file filename
|
||||||
if oqs.print_copy
|
#no print in cloud server
|
||||||
#no print in cloud server
|
if ENV["SERVER_MODE"] != "cloud"
|
||||||
if ENV["SERVER_MODE"] != "cloud"
|
self.print(filename, oqs.printer_name)
|
||||||
self.print(filename, oqs.printer_name)
|
|
||||||
end
|
|
||||||
#For print copy
|
|
||||||
# pdf.render_file filename.gsub(".","-copy.")
|
|
||||||
# self.print(filename.gsub(".","-copy."), oqs.printer_name)
|
|
||||||
else
|
|
||||||
print_settings.print_copies = 1
|
|
||||||
print_settings.save!
|
|
||||||
#no print in cloud server
|
|
||||||
if ENV["SERVER_MODE"] != "cloud"
|
|
||||||
self.print(filename, oqs.printer_name)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
#For print copy
|
||||||
|
# pdf.render_file filename.gsub(".","-copy.")
|
||||||
|
# self.print(filename.gsub(".","-copy."), oqs.printer_name)
|
||||||
end
|
end
|
||||||
return filename, order_id, oqs.printer_name
|
return filename, order_id, oqs.printer_name
|
||||||
end
|
end
|
||||||
|
|
||||||
# Print for orders in booking
|
# Print for orders in booking
|
||||||
def print_booking_summary(print_settings,oqs, booking_id, print_status,before_updated_qty="")
|
def print_booking_summary(print_settings, oqs, booking_id, print_status,before_updated_qty="")
|
||||||
# Must be one print
|
# Must be one print
|
||||||
if print_settings.print_copies == 0
|
if print_settings.print_copies == 0
|
||||||
print_settings.print_copies = 1
|
print_settings.print_copies = 1
|
||||||
@@ -146,36 +118,10 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
|||||||
|
|
||||||
# check for item not to show
|
# check for item not to show
|
||||||
#if odi.price != 0
|
#if odi.price != 0
|
||||||
pdf = print_settings.unique_code.constantize.new(print_settings,odi, print_status, options,oqs.use_alternate_name,before_updated_qty)
|
pdf = print_settings.unique_code.constantize.new(print_settings, odi, print_status, options, oqs.use_alternate_name, before_updated_qty)
|
||||||
|
|
||||||
pdf.render_file filename
|
pdf.render_file filename
|
||||||
|
|
||||||
if oqs.print_copy
|
|
||||||
#no print in cloud server
|
|
||||||
if ENV["SERVER_MODE"] != "cloud"
|
|
||||||
self.print(filename, oqs.printer_name)
|
|
||||||
end
|
|
||||||
#For print copy
|
|
||||||
# pdf.render_file filename.gsub(".","-copy.")
|
|
||||||
# self.print(filename.gsub(".","-copy."), oqs.printer_name)
|
|
||||||
else
|
|
||||||
print_settings.print_copies = 1
|
|
||||||
print_settings.save!
|
|
||||||
#no print in cloud server
|
|
||||||
if ENV["SERVER_MODE"] != "cloud"
|
|
||||||
self.print(filename, oqs.printer_name)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
#end
|
|
||||||
end
|
|
||||||
# For Print Order Summary
|
|
||||||
else
|
|
||||||
# filename = "tmp/booking_summary_#{booking_id}" + ".pdf"
|
|
||||||
filename = directory_name + "/booking_summary_#{booking_id}" + ".pdf"
|
|
||||||
pdf = print_settings.unique_code.constantize.new(print_settings,order, print_status,oqs.use_alternate_name,before_updated_qty)
|
|
||||||
|
|
||||||
pdf.render_file filename
|
|
||||||
if oqs.print_copy
|
|
||||||
#no print in cloud server
|
#no print in cloud server
|
||||||
if ENV["SERVER_MODE"] != "cloud"
|
if ENV["SERVER_MODE"] != "cloud"
|
||||||
self.print(filename, oqs.printer_name)
|
self.print(filename, oqs.printer_name)
|
||||||
@@ -183,14 +129,22 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
|||||||
#For print copy
|
#For print copy
|
||||||
# pdf.render_file filename.gsub(".","-copy.")
|
# pdf.render_file filename.gsub(".","-copy.")
|
||||||
# self.print(filename.gsub(".","-copy."), oqs.printer_name)
|
# self.print(filename.gsub(".","-copy."), oqs.printer_name)
|
||||||
else
|
#end
|
||||||
print_settings.print_copies = 1
|
|
||||||
print_settings.save!
|
|
||||||
#no print in cloud server
|
|
||||||
if ENV["SERVER_MODE"] != "cloud"
|
|
||||||
self.print(filename, oqs.printer_name)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
# For Print Order Summary
|
||||||
|
else
|
||||||
|
# filename = "tmp/booking_summary_#{booking_id}" + ".pdf"
|
||||||
|
filename = directory_name + "/booking_summary_#{booking_id}" + ".pdf"
|
||||||
|
pdf = print_settings.unique_code.constantize.new(print_settings, order, print_status, oqs.use_alternate_name, before_updated_qty)
|
||||||
|
|
||||||
|
pdf.render_file filename
|
||||||
|
#no print in cloud server
|
||||||
|
if ENV["SERVER_MODE"] != "cloud"
|
||||||
|
self.print(filename, oqs.printer_name)
|
||||||
|
end
|
||||||
|
#For print copy
|
||||||
|
# pdf.render_file filename.gsub(".","-copy.")
|
||||||
|
# self.print(filename.gsub(".","-copy."), oqs.printer_name)
|
||||||
end
|
end
|
||||||
return filename, booking_id, oqs.printer_name
|
return filename, booking_id, oqs.printer_name
|
||||||
end
|
end
|
||||||
@@ -206,14 +160,14 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
|||||||
.joins("left join menu_items as item ON item.item_code = order_items.item_code")
|
.joins("left join menu_items as item ON item.item_code = order_items.item_code")
|
||||||
|
|
||||||
if type == "order_item"
|
if type == "order_item"
|
||||||
query.where("order_items.order_items_id = '#{ id }'")
|
query.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"
|
||||||
query.where("orders.order_id = '#{ id }'")
|
query.where("orders.order_id = ?", id)
|
||||||
.group("order_items.order_items_id")
|
.group("order_items.order_items_id")
|
||||||
else
|
else
|
||||||
# order summary for booking
|
# order summary for booking
|
||||||
query.where("b.booking_id = '#{ id }'")
|
query.where("b.booking_id = ?", id)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -37,14 +37,15 @@ class Printer::PrinterWorker
|
|||||||
Cups.default_printer
|
Cups.default_printer
|
||||||
end
|
end
|
||||||
|
|
||||||
def print(file_path,printer_destination = nil )
|
def self.printer_exists?(printer)
|
||||||
|
Cups.show_destinations.include? printer
|
||||||
|
end
|
||||||
|
|
||||||
|
def print(file_path, printer_destination = nil )
|
||||||
if printer_destination.nil?
|
if printer_destination.nil?
|
||||||
printer_destination = self.printer_destination
|
printer_destination = self.printer_destination
|
||||||
end
|
end
|
||||||
|
|
||||||
puts printer_destination
|
|
||||||
puts '........Printer Destination..........'
|
|
||||||
|
|
||||||
copy = self.print_copies
|
copy = self.print_copies
|
||||||
#Print only when printer information is not null
|
#Print only when printer information is not null
|
||||||
if !self.printer_destination.nil?
|
if !self.printer_destination.nil?
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
class OrderSummaryPdf < Prawn::Document
|
class OrderSummaryPdf < Prawn::Document
|
||||||
include NumberFormattable
|
include NumberFormattable
|
||||||
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(print_settings,order, print_status, order_items = nil,alt_name,before_updated_qty)
|
def initialize(print_settings, order, print_status, order_items = nil, alt_name, before_updated_qty)
|
||||||
self.page_width = print_settings.page_width
|
self.page_width = print_settings.page_width
|
||||||
self.page_height = print_settings.page_height
|
self.page_height = print_settings.page_height
|
||||||
self.header_font_size = print_settings.header_font_size.to_i
|
self.header_font_size = print_settings.header_font_size.to_i
|
||||||
|
|||||||
Reference in New Issue
Block a user