add lookup setting for quickservice add order btn
This commit is contained in:
@@ -84,9 +84,9 @@ For ReceiptBillAltName options
|
||||
|
||||
For Using Star Printer
|
||||
*** Need to change these print settings
|
||||
1) settings/print_settings => OrderItemStarPdf
|
||||
2) settings/print_settings => ReceiptBillStarPdf
|
||||
3) settings/print_settings => SaleItemsStarPdf
|
||||
1) settings/print_settings/unique_code => OrderItemStarPdf
|
||||
2) settings/print_settings/unique_code => ReceiptBillStarPdf
|
||||
3) settings/print_settings/unique_code => SaleItemsStarPdf
|
||||
*** Other print settings aren't need to change.
|
||||
|
||||
For Show Sale Items Summary at CloseCashierPrint
|
||||
|
||||
@@ -65,6 +65,8 @@ class Oqs::EditController < BaseOqsController
|
||||
unique_code="OrderSetItemCustomisePdf"
|
||||
elsif printer_setting.unique_code == 'OrderItemSlimCustomisePdf'
|
||||
unique_code="OrderItemSlimCustomisePdf"
|
||||
elsif printer_setting.unique_code == 'OrderItemStarPdf'
|
||||
unique_code="OrderItemStarPdf"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -105,7 +105,15 @@ class Origami::VoidController < BaseOrigamiController
|
||||
|
||||
|
||||
# if ENV["SERVER_MODE"] != "cloud" #no print in cloud server
|
||||
unique_code = "ReceiptBillPdf"
|
||||
# get printer info
|
||||
# print_settings = PrintSetting.find_by_unique_code('ReceiptBillPdf') # SaleItemsPdf
|
||||
#
|
||||
# if !print_settings.nil?
|
||||
# unique_code = 'ReceiptBillPdf'
|
||||
# elsif
|
||||
# unique_code = 'ReceiptBillStarPdf'
|
||||
# end
|
||||
|
||||
customer= Customer.find(sale.customer_id)
|
||||
|
||||
#shop detail
|
||||
@@ -119,6 +127,20 @@ class Origami::VoidController < BaseOrigamiController
|
||||
current_balance = 0
|
||||
end
|
||||
|
||||
printer = PrintSetting.all
|
||||
|
||||
unique_code="ReceiptBillPdf"
|
||||
if !printer.empty?
|
||||
printer.each do |printer_setting|
|
||||
if printer_setting.unique_code == 'ReceiptBillPdf'
|
||||
unique_code="ReceiptBillPdf"
|
||||
elsif printer_setting.unique_code == 'ReceiptBillA5Pdf'
|
||||
unique_code="ReceiptBillA5Pdf"
|
||||
elsif printer_setting.unique_code == 'ReceiptBillStarPdf'
|
||||
unique_code="ReceiptBillStarPdf"
|
||||
end
|
||||
end
|
||||
end
|
||||
# get printer info
|
||||
print_settings=PrintSetting.find_by_unique_code(unique_code)
|
||||
# Calculate Food and Beverage Total
|
||||
|
||||
@@ -86,7 +86,7 @@ class Origami::WasteSpoileController < BaseOrigamiController
|
||||
|
||||
|
||||
# if ENV["SERVER_MODE"] != "cloud" #no print in cloud server
|
||||
unique_code = "ReceiptBillPdf"
|
||||
# unique_code = "ReceiptBillPdf"
|
||||
customer= Customer.find(sale.customer_id)
|
||||
|
||||
#shop detail
|
||||
@@ -100,6 +100,21 @@ class Origami::WasteSpoileController < BaseOrigamiController
|
||||
current_balance = 0
|
||||
end
|
||||
|
||||
printer = PrintSetting.all
|
||||
|
||||
unique_code="ReceiptBillPdf"
|
||||
if !printer.empty?
|
||||
printer.each do |printer_setting|
|
||||
if printer_setting.unique_code == 'ReceiptBillPdf'
|
||||
unique_code="ReceiptBillPdf"
|
||||
elsif printer_setting.unique_code == 'ReceiptBillA5Pdf'
|
||||
unique_code="ReceiptBillA5Pdf"
|
||||
elsif printer_setting.unique_code == 'ReceiptBillStarPdf'
|
||||
unique_code="ReceiptBillStarPdf"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# get printer info
|
||||
print_settings=PrintSetting.find_by_unique_code(unique_code)
|
||||
# Calculate Food and Beverage Total
|
||||
|
||||
@@ -285,7 +285,7 @@
|
||||
<button type="button" class="btn btn-primary action-btn create col-md-7" id="create_order" disabled="disabled" style="padding-top:15px !important;padding-bottom:15px !important;">Add Order</button>
|
||||
<%end%>
|
||||
<%else%>
|
||||
<% if @quick_service_only %>
|
||||
<% if !@quick_service_only %>
|
||||
<button type="button" class="btn btn-primary action-btn create col-md-11" id="create_order" disabled="disabled" style="padding-top:15px !important;padding-bottom:15px !important;">Add Order</button>
|
||||
<%end%>
|
||||
<%end%>
|
||||
|
||||
Reference in New Issue
Block a user