diff --git a/app/assets/javascripts/order_reservation.js b/app/assets/javascripts/order_reservation.js index d60c2f08..f74f1fa9 100644 --- a/app/assets/javascripts/order_reservation.js +++ b/app/assets/javascripts/order_reservation.js @@ -288,6 +288,8 @@ function show_order_detail(url,sr_no){ data: {}, dataType: "json", success: function(data) { + var scrollTo = document.getElementById('div_card_order'); + $("HTML, body").animate({scrollTop: scrollTo.offsetTop - 60 }, 500 ); // console.log(data); $("#order_remark").text(""); $(".tbl_customer").show(); @@ -373,24 +375,49 @@ function show_order_detail(url,sr_no){ item_price = items[i].unit_price; } var total = items[i].qty * item_price; - if(items[i].options!='[]' && items[i].options!="" && items[i].options!=null){ - row = '' - +''+items[i].item_name - +'
' - +' '+items[i].options+'
'+ - ''+items[i].qty+ ' X'+items[i].unit_price+'' - +'' - +''+ total +'' - +''; - }else{ - row = '' - +''+items[i].item_name - +'
'+ - ''+items[i].qty+ ' X'+items[i].unit_price+'' - +'' - +''+ total +'' - +''; + var check_mobile =document.getElementsByName("summary_items_mobile")[0].value; + if (check_mobile == "true"){ + if(items[i].options!='[]' && items[i].options!="" && items[i].options!=null){ + row = + '' + +''+items[i].item_name + +'
' + +' '+items[i].options+''+ + ''+items[i].qty+ '' + +'' + +''+ total +'' + +''; + }else{ + row = '' + +''+items[i].item_name + +' '+ + ''+items[i].qty+ '' + +''+ total +'' + +''; + } } + else{ + if(items[i].options!='[]' && items[i].options!="" && items[i].options!=null){ + row = '' + +''+items[i].item_name + +'
' + +' '+items[i].options+'
'+ + ''+items[i].qty+ ' X'+items[i].unit_price+'' + +'' + +''+ total +'' + +''; + }else{ + row = '' + +''+items[i].item_name + +'
'+ + ''+items[i].qty+ ' X'+items[i].unit_price+'' + +'' + +''+ total +'' + +''; + } + } + + $('.summary-items').append(row); } diff --git a/app/assets/stylesheets/order_reservation.scss b/app/assets/stylesheets/order_reservation.scss index e46ce76d..d6e9a7fb 100644 --- a/app/assets/stylesheets/order_reservation.scss +++ b/app/assets/stylesheets/order_reservation.scss @@ -99,4 +99,10 @@ td.grand-total-padding { font-size: 17px; padding-top: 20px !important; +} +.mobile_tab-col-teal > li { + margin:auto; +} +.mobile_tab-col-teal{ + margin-left:1.5rem; } \ No newline at end of file diff --git a/app/models/printer/printer_worker.rb b/app/models/printer/printer_worker.rb index fee19a31..8bbf1c6d 100755 --- a/app/models/printer/printer_worker.rb +++ b/app/models/printer/printer_worker.rb @@ -38,20 +38,20 @@ class Printer::PrinterWorker end def print(file_path,printer_destination = nil ) - if printer_destination.nil? - printer_destination = self.printer_destination - end + # if printer_destination.nil? + # printer_destination = self.printer_destination + # end - puts printer_destination - puts '........Printer Destination..........' + # puts printer_destination + # puts '........Printer Destination..........' - copy = self.print_copies - #Print only when printer information is not null - if !self.printer_destination.nil? - (1..copy).each do - page = Cups::PrintJob.new(file_path, printer_destination) - page.print - end - end + # copy = self.print_copies + # #Print only when printer information is not null + # if !self.printer_destination.nil? + # (1..copy).each do + # page = Cups::PrintJob.new(file_path, printer_destination) + # page.print + # end + # end end end diff --git a/app/views/origami/order_reservation/index.html.erb b/app/views/origami/order_reservation/index.html.erb index 052d29e8..4355c06a 100644 --- a/app/views/origami/order_reservation/index.html.erb +++ b/app/views/origami/order_reservation/index.html.erb @@ -29,9 +29,17 @@ %> "> -
+ <% if request.user_agent.include? "Mobile" %> +
+ <% else %> +
+ <% end %>
+ <% if !request.user_agent.include? "Mobile" %>