From d9c53e73f85be90df3fea3195c2bb7224f1b5e4d Mon Sep 17 00:00:00 2001 From: Aung Myo Date: Sat, 24 Jun 2017 11:12:30 +0630 Subject: [PATCH] update customer --- app/controllers/crm/customers_controller.rb | 2 +- app/controllers/origami/home_controller.rb | 1 + app/pdf/receipt_bill_pdf.rb | 4 ++-- app/views/origami/home/show.html.erb | 2 +- app/views/origami/orders/show.html.erb | 2 +- app/views/origami/rooms/show.html.erb | 2 +- 6 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/controllers/crm/customers_controller.rb b/app/controllers/crm/customers_controller.rb index ca1aafb2..43b0618e 100644 --- a/app/controllers/crm/customers_controller.rb +++ b/app/controllers/crm/customers_controller.rb @@ -168,7 +168,7 @@ end 'Content-Type' => 'application/json', 'Accept' => 'application/json' }, - :timeout 10 + :timeout => 10 ) rescue Net::OpenTimeout response = { status: false } diff --git a/app/controllers/origami/home_controller.rb b/app/controllers/origami/home_controller.rb index 4a070788..c4edcc0b 100644 --- a/app/controllers/origami/home_controller.rb +++ b/app/controllers/origami/home_controller.rb @@ -30,6 +30,7 @@ class Origami::HomeController < BaseOrigamiController order.order_items.each do |item| @order_items.push(item) end + end end @status_order = 'order' else diff --git a/app/pdf/receipt_bill_pdf.rb b/app/pdf/receipt_bill_pdf.rb index 96e16cf4..5a86ddfb 100644 --- a/app/pdf/receipt_bill_pdf.rb +++ b/app/pdf/receipt_bill_pdf.rb @@ -93,10 +93,10 @@ class ReceiptBillPdf < Prawn::Document y_position = cursor bounding_box([0,y_position], :width =>self.label_width, :height => self.item_height) do - text "Time In: #{ sale_data.bookings[0].checkin_at.strftime('%I:%M %p') }", :size => self.item_font_size,:align => :left + text "Time In: #{ sale_data.bookings[0].checkin_at.utc.getlocal.strftime('%I:%M %p') }", :size => self.item_font_size,:align => :left end bounding_box([self.label_width,y_position], :width => self.label_width, :height => self.item_height) do - text "Time Out: #{ sale_data.bookings[0].checkout_at.strftime('%I:%M %p') }" , :size => self.item_font_size,:align => :right + text "Time Out: #{ sale_data.bookings[0].checkout_at.utc.getlocal.strftime('%I:%M %p') }" , :size => self.item_font_size,:align => :right end move_down 5 diff --git a/app/views/origami/home/show.html.erb b/app/views/origami/home/show.html.erb index 73f298ec..06263bed 100644 --- a/app/views/origami/home/show.html.erb +++ b/app/views/origami/home/show.html.erb @@ -292,7 +292,7 @@ <% end %> - + <% end %> diff --git a/app/views/origami/orders/show.html.erb b/app/views/origami/orders/show.html.erb index 92ffc7f1..d2c065a1 100644 --- a/app/views/origami/orders/show.html.erb +++ b/app/views/origami/orders/show.html.erb @@ -189,7 +189,7 @@ <% if @sale_status != 'completed' %> <% end %> - +