diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 7f618024..4e9bf8d6 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -61,7 +61,7 @@ } section.content { - margin: 40px 15px 0 225px; + margin: 60px 15px 0 225px; } .sidebar { @@ -101,8 +101,8 @@ section.content { } .btn { - padding: .46875rem 0.25rem; - color : #fff !important; + padding: .46875rem 0.25rem; + color : #fff !important; } .btn-default, .bg-default{ color : #111 !important; diff --git a/app/controllers/api/orders_controller.rb b/app/controllers/api/orders_controller.rb index fe5d1d90..15f5f423 100644 --- a/app/controllers/api/orders_controller.rb +++ b/app/controllers/api/orders_controller.rb @@ -68,8 +68,7 @@ class Api::OrdersController < Api::ApiController if booking.dining_facility_id.to_i == params[:table_id].to_i && booking.booking_status != 'moved' if !booking.sale_id.nil? sale_status = check_order_with_booking(booking) - # puts "WWwwWWWWWWww" - # puts sale_status + if sale_status return return_json_status_with_code(400, "bill requested") end @@ -79,8 +78,7 @@ class Api::OrdersController < Api::ApiController end else sale_status = check_order_with_table(params[:table_id]) - # puts "OOOOOOOOO" - # puts sale_status + if sale_status return return_json_status_with_code(400, "bill requested") end @@ -88,15 +86,20 @@ class Api::OrdersController < Api::ApiController end #booking exists else sale_status = check_order_with_table(params[:table_id]) - # puts "MMMMMMMM" - # puts sale_status + if sale_status # return false , @message = "bill requested" return return_json_status_with_code(400, "bill requested") end end - @status, @booking = @order.generate + @status, @booking = @order.generate + # # for parallel order + # remoteIP = "" + # begin + # @status, @booking = @order.generate + # remoteIP = request.remote_ip + # end while request.remote_ip != remoteIP end # render json for http status code diff --git a/app/controllers/oqs/edit_controller.rb b/app/controllers/oqs/edit_controller.rb index 85733e8b..1e8011e7 100644 --- a/app/controllers/oqs/edit_controller.rb +++ b/app/controllers/oqs/edit_controller.rb @@ -15,5 +15,16 @@ class Oqs::EditController < ApplicationController#BaseOqsController order_item.qty = qty_weight order_item.remark = remarks order_item.save + + # print + assigned_item = AssignedOrderItem.find_by_item_code(order_item.item_code) + # order queue stations + oqs = assigned_item.order_queue_station + + unique_code="OrderItemPdf" + + print_settings=PrintSetting.find_by_unique_code(unique_code) + order_queue_printer= Printer::OrderQueuePrinter.new(print_settings) + order_queue_printer.print_order_item(print_settings, oqs,assigned_item.order_id, assigned_item.item_code, print_status=" (Edited)" ) end end diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb index d14cc505..8f809e47 100644 --- a/app/views/layouts/_header.html.erb +++ b/app/views/layouts/_header.html.erb @@ -1,4 +1,4 @@ -Search Bar --> + diff --git a/app/views/oqs/edit/index.html.erb b/app/views/oqs/edit/index.html.erb index 385a6b68..cf255912 100644 --- a/app/views/oqs/edit/index.html.erb +++ b/app/views/oqs/edit/index.html.erb @@ -53,9 +53,32 @@ + + + + diff --git a/config/application.rb b/config/application.rb index 42f0cf82..8f0ca671 100644 --- a/config/application.rb +++ b/config/application.rb @@ -13,7 +13,7 @@ module SXRestaurants # Settings in config/environments/* take precedence over those specified here. # Application configuration should go into files in config/initializers # -- all .rb files in that directory are automatically loaded. - config.i18n.default_locale = :'mm' # English 'en' + config.i18n.default_locale = :'en' # English 'en' config.active_record.time_zone_aware_types = [:datetime, :time] config.active_job.queue_adapter = :sidekiq