order print

This commit is contained in:
Myat Zin Wai Maw
2020-02-26 17:38:19 +06:30
parent e17091ac06
commit 1c094d656a
16 changed files with 186 additions and 84 deletions

View File

@@ -33,15 +33,24 @@ class OrderSummarySlimPdf < Prawn::Document
# font "public/fonts/Zawgyi-One.ttf"
# font "public/fonts/padauk.ttf"
if order[0].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[0].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[0].contact_no}", :size => self.header_font_size,:align => :left
end
if !order[0].dining.nil?
bounding_box([self.item_description_width,y_position], :width =>self.label_width) do
text "#{ order[0].type + '-' + order[0].dining + print_status }" , :size => self.header_font_size,:align => :right
end
end
move_down 1
end
if !order[0].dining.nil?
text "#{ order[0].type + '-' + order[0].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[0].dining.nil?
text "#{ order[0].type + '-' + order[0].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