This commit is contained in:
Myat Zin Wai Maw
2020-02-26 17:09:17 +06:30
parent 0715a02495
commit e17091ac06
3 changed files with 17 additions and 8 deletions

View File

@@ -36,15 +36,24 @@ class OrderItemPdf < Prawn::Document
# font "public/fonts/padauk.ttf"
#font "public/fonts/Chinese.ttf"
if order_item.source =='app'
text "Mobile Order", :size => self.header_font_size,:align => :left
text "Mobile Order", :size => self.header_font_size,:align => :center, :style=>:bold
move_down 1
text "Customer Ph : #{order_item.contact_no}", :size => self.header_font_size,:align => :left
y_position = cursor
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
text "#{order_item.contact_no}", :size => self.header_font_size,:align => :left
end
if !order_item.dining.nil?
bounding_box([self.item_description_width,y_position], :width =>self.label_width) do
text "#{ order_item.type + '-' + order_item.dining + print_status }" , :size => self.header_font_size,:align => :right
end
end
move_down 1
end
if !order_item.dining.nil?
text "#{ order_item.type + '-' + order_item.dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
else
text "#{ print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
if !order_item.dining.nil?
text "#{ order_item.type + '-' + order_item.dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
else
text "#{ print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
end
end
stroke_horizontal_rule