add options in oqs
This commit is contained in:
@@ -93,7 +93,8 @@ class Crm::CustomersController < BaseCrmController
|
||||
:headers => {
|
||||
'Content-Type' => 'application/json',
|
||||
'Accept' => 'application/json'
|
||||
}
|
||||
},
|
||||
:timeout => 10
|
||||
)
|
||||
rescue Net::OpenTimeout
|
||||
response = { status: false }
|
||||
@@ -163,7 +164,8 @@ end
|
||||
:headers => {
|
||||
'Content-Type' => 'application/json',
|
||||
'Accept' => 'application/json'
|
||||
}
|
||||
},
|
||||
:timeout => 10
|
||||
)
|
||||
rescue Net::OpenTimeout
|
||||
response = { status: false }
|
||||
|
||||
@@ -2,9 +2,10 @@ class Oqs::PrintController < ApplicationController
|
||||
# Print Order Item
|
||||
def print
|
||||
unique_code="OrderItemPdf"
|
||||
assigned_item_id=params[:id]
|
||||
assigned_item=AssignedOrderItem.find(assigned_item_id)
|
||||
assigned_items=AssignedOrderItem.where("item_code='" + assigned_item.item_code + "' AND " + "order_id='" + assigned_item.order_id + "'");
|
||||
assigned_item_id = params[:id]
|
||||
options = params[:options]
|
||||
assigned_item = AssignedOrderItem.find(assigned_item_id)
|
||||
assigned_items = AssignedOrderItem.where("item_code='" + assigned_item.item_code + "' AND " + "order_id='" + assigned_item.order_id + "'");
|
||||
|
||||
# order queue stations
|
||||
oqs = assigned_item.order_queue_station
|
||||
@@ -13,9 +14,9 @@ class Oqs::PrintController < ApplicationController
|
||||
print_status = assigned_item.print_status == true ? " (Re-Print)" : ""
|
||||
|
||||
# print when complete click
|
||||
print_settings=PrintSetting.find_by_unique_code(unique_code)
|
||||
order_queue_printer= Printer::OrderQueuePrinter.new(print_settings)
|
||||
order_queue_printer.print_order_item(oqs, assigned_item.order_id, assigned_item.item_code, print_status )
|
||||
print_settings = PrintSetting.find_by_unique_code(unique_code)
|
||||
order_queue_printer = Printer::OrderQueuePrinter.new(print_settings)
|
||||
order_queue_printer.print_order_item(oqs, assigned_item.order_id, assigned_item.item_code, print_status, options )
|
||||
|
||||
# update print status for completed same order items
|
||||
assigned_items.each do |ai|
|
||||
@@ -27,10 +28,10 @@ class Oqs::PrintController < ApplicationController
|
||||
# Print Order Details with booking id
|
||||
def print_order_summary
|
||||
unique_code="OrderSummaryPdf"
|
||||
assigned_item_id=params[:id]
|
||||
table_name=params[:table_name]
|
||||
assigned_item=AssignedOrderItem.find(assigned_item_id)
|
||||
assigned_items=AssignedOrderItem.where("item_code='" + assigned_item.item_code + "' AND " + "order_id='" + assigned_item.order_id + "'");
|
||||
assigned_item_id = params[:id]
|
||||
table_name = params[:table_name]
|
||||
assigned_item = AssignedOrderItem.find(assigned_item_id)
|
||||
assigned_items = AssignedOrderItem.where("item_code='" + assigned_item.item_code + "' AND " + "order_id='" + assigned_item.order_id + "'");
|
||||
|
||||
# order queue stations
|
||||
oqs = assigned_item.order_queue_station
|
||||
@@ -43,13 +44,13 @@ class Oqs::PrintController < ApplicationController
|
||||
booking = Booking.find_by_dining_facility_id(dining.id)
|
||||
|
||||
# print when complete click
|
||||
print_settings=PrintSetting.find_by_unique_code(unique_code)
|
||||
order_queue_printer= Printer::OrderQueuePrinter.new(print_settings)
|
||||
print_settings = PrintSetting.find_by_unique_code(unique_code)
|
||||
order_queue_printer = Printer::OrderQueuePrinter.new(print_settings)
|
||||
order_queue_printer.print_booking_summary(oqs, booking.booking_id, print_status)
|
||||
|
||||
# update print status for completed same order items
|
||||
assigned_items.each do |ai|
|
||||
ai.print_status=true
|
||||
ai.print_status = true
|
||||
ai.save
|
||||
end
|
||||
end
|
||||
|
||||
@@ -22,7 +22,7 @@ class Origami::RequestBillsController < BaseOrigamiController
|
||||
unique_code = "ReceiptBillPdf"
|
||||
# customer= Customer.where('customer_id=' +.customer_id)
|
||||
|
||||
customer= Customer.find( @sale_data.customer_id)
|
||||
customer= Customer.find(@sale_data.customer_id)
|
||||
# get member information
|
||||
member_info = Customer.get_member_account(customer)
|
||||
# get printer info
|
||||
|
||||
Reference in New Issue
Block a user