add time in oqs

This commit is contained in:
Yan
2017-06-26 14:35:44 +06:30
parent e1c981e8c2
commit cc67abcfc1
3 changed files with 4 additions and 4 deletions

View File

@@ -43,7 +43,7 @@ class OrderItemPdf < Prawn::Document
move_down 5 move_down 5
y_position = cursor y_position = cursor
bounding_box([0,y_position], :width => self.item_width, :height => self.item_height) do bounding_box([0,y_position], :width => self.item_width, :height => self.item_height) do
text "Date: #{order_at.strftime("%Y-%m-%d %I:%M %p")}", :size => self.item_font_size,:align => :left text "Date: #{order_at.utc.getlocal.strftime("%Y-%m-%d %I:%M %p")}", :size => self.item_font_size,:align => :left
end end
stroke_horizontal_rule stroke_horizontal_rule

View File

@@ -43,7 +43,7 @@ class OrderSummaryPdf < Prawn::Document
move_down 5 move_down 5
y_position = cursor y_position = cursor
bounding_box([0,y_position], :width => self.item_width, :height => self.item_height) do bounding_box([0,y_position], :width => self.item_width, :height => self.item_height) do
text "Date: #{order_at.strftime("%Y-%m-%d %I:%M %p")}", :size => self.item_font_size,:align => :left text "Date: #{order_at.utc.getlocal.strftime("%Y-%m-%d %I:%M %p")}", :size => self.item_font_size,:align => :left
end end
stroke_horizontal_rule stroke_horizontal_rule

View File

@@ -55,7 +55,7 @@
<p class="card-text"> <p class="card-text">
<small class="text-muted">Order at <small class="text-muted">Order at
<span class="order-at"> <span class="order-at">
<%= qid.created_at.strftime("%Y %m %d") %> <%= qid.created_at.utc.getlocal.strftime("%d-%m-%Y %I:%M %p") %>
</span> - </span> -
<span class="order-by"> <span class="order-by">
<%= qid.item_order_by %> <%= qid.item_order_by %>
@@ -105,7 +105,7 @@
<p class="card-text"> <p class="card-text">
<small class="text-muted">Order at <small class="text-muted">Order at
<span class="order-at"> <span class="order-at">
<%= qid.created_at.getlocal.strftime("%Y-%m-%d") %> <%= qid.created_at.utc.getlocal.strftime("%d-%m-%Y %I:%M %p") %>
</span> - </span> -
<span class="order-by"> <span class="order-by">
<%= qid.item_order_by %> <%= qid.item_order_by %>