order print
This commit is contained in:
@@ -35,16 +35,25 @@ class OrderItemCustomisePdf < Prawn::Document
|
|||||||
# font "public/fonts/padauk.ttf"
|
# font "public/fonts/padauk.ttf"
|
||||||
#font "public/fonts/Chinese.ttf"
|
#font "public/fonts/Chinese.ttf"
|
||||||
if order_item.source =='app'
|
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
|
|
||||||
move_down 1
|
move_down 1
|
||||||
|
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
|
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
|
||||||
|
else
|
||||||
if !order_item.dining.nil?
|
if !order_item.dining.nil?
|
||||||
text "#{ order_item.type + '-' + order_item.dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
text "#{ order_item.type + '-' + order_item.dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
||||||
else
|
else
|
||||||
text "#{ print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
text "#{ print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
stroke_horizontal_rule
|
stroke_horizontal_rule
|
||||||
move_down 3
|
move_down 3
|
||||||
|
|||||||
@@ -35,16 +35,25 @@ class OrderItemSlimCustomisePdf < Prawn::Document
|
|||||||
# font "public/fonts/padauk.ttf"
|
# font "public/fonts/padauk.ttf"
|
||||||
#font "public/fonts/Chinese.ttf"
|
#font "public/fonts/Chinese.ttf"
|
||||||
if order_item_slim.source =='app'
|
if order_item_slim.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_slim.contact_no}", :size => self.header_font_size,:align => :left
|
|
||||||
move_down 1
|
move_down 1
|
||||||
|
y_position = cursor
|
||||||
|
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
|
||||||
|
text "#{order_item_slim.contact_no}", :size => self.header_font_size,:align => :left
|
||||||
end
|
end
|
||||||
|
if !order_item_slim.dining.nil?
|
||||||
|
bounding_box([self.item_description_width,y_position], :width =>self.label_width) do
|
||||||
|
text "#{ order_item_slim.type + '-' + order_item_slim.dining + print_status }", :size => self.header_font_size,:align => :right
|
||||||
|
end
|
||||||
|
end
|
||||||
|
move_down 1
|
||||||
|
else
|
||||||
if !order_item_slim.dining.nil?
|
if !order_item_slim.dining.nil?
|
||||||
text "#{ order_item_slim.type + '-' + order_item_slim.dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
text "#{ order_item_slim.type + '-' + order_item_slim.dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
||||||
else
|
else
|
||||||
text "#{ print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
text "#{ print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
stroke_horizontal_rule
|
stroke_horizontal_rule
|
||||||
move_down 1
|
move_down 1
|
||||||
|
|||||||
@@ -35,17 +35,25 @@ class OrderItemSlimPdf < Prawn::Document
|
|||||||
# font "public/fonts/padauk.ttf"
|
# font "public/fonts/padauk.ttf"
|
||||||
#font "public/fonts/Chinese.ttf"
|
#font "public/fonts/Chinese.ttf"
|
||||||
if order_item_slim.source =='app'
|
if order_item_slim.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_slim.contact_no}", :size => self.header_font_size,:align => :left
|
|
||||||
move_down 1
|
move_down 1
|
||||||
|
y_position = cursor
|
||||||
|
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
|
||||||
|
text "#{order_item_slim.contact_no}", :size => self.header_font_size,:align => :left
|
||||||
end
|
end
|
||||||
|
if !order_item.dining.nil?
|
||||||
|
bounding_box([self.item_description_width,y_position], :width =>self.label_width) do
|
||||||
|
text "#{ order_item_slim.type + '-' + order_item_slim.dining + print_status }", :size => self.header_font_size,:align => :right
|
||||||
|
end
|
||||||
|
end
|
||||||
|
move_down 1
|
||||||
|
else
|
||||||
if !order_item_slim.dining.nil?
|
if !order_item_slim.dining.nil?
|
||||||
text "#{ order_item_slim.type + '-' + order_item_slim.dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
text "#{ order_item_slim.type + '-' + order_item_slim.dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
||||||
else
|
else
|
||||||
text "#{ print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
text "#{ print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
||||||
end
|
end
|
||||||
|
end
|
||||||
stroke_horizontal_rule
|
stroke_horizontal_rule
|
||||||
move_down 1
|
move_down 1
|
||||||
|
|
||||||
|
|||||||
@@ -36,17 +36,25 @@ class OrderItemStarPdf < Prawn::Document
|
|||||||
# font "public/fonts/padauk.ttf"
|
# font "public/fonts/padauk.ttf"
|
||||||
#font "public/fonts/Chinese.ttf"
|
#font "public/fonts/Chinese.ttf"
|
||||||
if order_item.source =='app'
|
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
|
|
||||||
move_down 1
|
move_down 1
|
||||||
|
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
|
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
|
||||||
|
else
|
||||||
if !order_item.dining.nil?
|
if !order_item.dining.nil?
|
||||||
text "#{ order_item.type + '-' + order_item.dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
text "#{ order_item.type + '-' + order_item.dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
||||||
else
|
else
|
||||||
text "#{ print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
text "#{ print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
||||||
end
|
end
|
||||||
|
end
|
||||||
stroke_horizontal_rule
|
stroke_horizontal_rule
|
||||||
move_down 3
|
move_down 3
|
||||||
|
|
||||||
|
|||||||
@@ -35,16 +35,25 @@ class OrderSetItemCustomisePdf < Prawn::Document
|
|||||||
# font "public/fonts/padauk.ttf"
|
# font "public/fonts/padauk.ttf"
|
||||||
#font "public/fonts/Chinese.ttf"
|
#font "public/fonts/Chinese.ttf"
|
||||||
if order_set_item.source =='app'
|
if order_set_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_set_item.contact_no}", :size => self.header_font_size,:align => :left
|
|
||||||
move_down 1
|
move_down 1
|
||||||
|
y_position = cursor
|
||||||
|
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
|
||||||
|
text "#{order_set_item.contact_no}", :size => self.header_font_size,:align => :left
|
||||||
end
|
end
|
||||||
|
if !order_set_item.dining.nil?
|
||||||
|
bounding_box([self.item_description_width,y_position], :width =>self.label_width) do
|
||||||
|
text "#{ order_set_item.type + '-' + order_set_item.dining + print_status }" , :size => self.header_font_size,:align => :right
|
||||||
|
end
|
||||||
|
end
|
||||||
|
move_down 1
|
||||||
|
else
|
||||||
if !order_set_item.dining.nil?
|
if !order_set_item.dining.nil?
|
||||||
text "#{ order_set_item.type + '-' + order_set_item.dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
text "#{ order_set_item.type + '-' + order_set_item.dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
||||||
else
|
else
|
||||||
text "#{ print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
text "#{ print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
||||||
end
|
end
|
||||||
|
end
|
||||||
stroke_horizontal_rule
|
stroke_horizontal_rule
|
||||||
move_down 3
|
move_down 3
|
||||||
|
|
||||||
|
|||||||
@@ -34,16 +34,25 @@ class OrderSetItemPdf < Prawn::Document
|
|||||||
# font "public/fonts/padauk.ttf"
|
# font "public/fonts/padauk.ttf"
|
||||||
#font "public/fonts/Chinese.ttf"
|
#font "public/fonts/Chinese.ttf"
|
||||||
if order_set_item.source =='app'
|
if order_set_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_set_item.contact_no}", :size => self.header_font_size,:align => :left
|
|
||||||
move_down 1
|
move_down 1
|
||||||
|
y_position = cursor
|
||||||
|
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
|
||||||
|
text "#{order_set_item.contact_no}", :size => self.header_font_size,:align => :left
|
||||||
end
|
end
|
||||||
|
if !order_set_item.dining.nil?
|
||||||
|
bounding_box([self.item_description_width,y_position], :width =>self.label_width) do
|
||||||
|
text "#{ order_set_item.type + '-' + order_set_item.dining + print_status }" , :size => self.header_font_size,:align => :right
|
||||||
|
end
|
||||||
|
end
|
||||||
|
move_down 1
|
||||||
|
else
|
||||||
if !order_set_item.dining.nil?
|
if !order_set_item.dining.nil?
|
||||||
text "#{ order_set_item.type + '-' + order_set_item.dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
text "#{ order_set_item.type + '-' + order_set_item.dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
||||||
else
|
else
|
||||||
text "#{ print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
text "#{ print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
||||||
end
|
end
|
||||||
|
end
|
||||||
stroke_horizontal_rule
|
stroke_horizontal_rule
|
||||||
move_down 3
|
move_down 3
|
||||||
|
|
||||||
|
|||||||
@@ -33,19 +33,26 @@ class OrderSummaryCustomisePdf < Prawn::Document
|
|||||||
|
|
||||||
# font "public/fonts/Zawgyi-One.ttf"
|
# font "public/fonts/Zawgyi-One.ttf"
|
||||||
# font "public/fonts/padauk.ttf"
|
# font "public/fonts/padauk.ttf"
|
||||||
|
|
||||||
if order[0].source =='app'
|
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
|
|
||||||
move_down 1
|
move_down 1
|
||||||
|
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
|
end
|
||||||
|
if !order_item.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
|
||||||
|
else
|
||||||
if !order[0].dining.nil?
|
if !order[0].dining.nil?
|
||||||
text "#{ order[0].type + '-' + order[0].dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
text "#{ order[0].type + '-' + order[0].dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
||||||
else
|
else
|
||||||
text "#{ print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
text "#{ print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
||||||
end
|
end
|
||||||
|
end
|
||||||
stroke_horizontal_rule
|
stroke_horizontal_rule
|
||||||
move_down 5
|
move_down 5
|
||||||
|
|
||||||
|
|||||||
@@ -33,17 +33,25 @@ class OrderSummaryPdf < Prawn::Document
|
|||||||
# font "public/fonts/Zawgyi-One.ttf"
|
# font "public/fonts/Zawgyi-One.ttf"
|
||||||
# font "public/fonts/padauk.ttf"z
|
# font "public/fonts/padauk.ttf"z
|
||||||
if order[0].source =='app'
|
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
|
|
||||||
move_down 1
|
move_down 1
|
||||||
|
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
|
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
|
||||||
|
else
|
||||||
if !order[0].dining.nil?
|
if !order[0].dining.nil?
|
||||||
text "#{ order[0].type + '-' + order[0].dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
text "#{ order[0].type + '-' + order[0].dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
||||||
else
|
else
|
||||||
text "#{ print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
text "#{ print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
||||||
end
|
end
|
||||||
|
end
|
||||||
stroke_horizontal_rule
|
stroke_horizontal_rule
|
||||||
move_down 5
|
move_down 5
|
||||||
#order_info
|
#order_info
|
||||||
|
|||||||
@@ -33,18 +33,26 @@ class OrderSummarySetCustomisePdf < Prawn::Document
|
|||||||
|
|
||||||
# font "public/fonts/Zawgyi-One.ttf"
|
# font "public/fonts/Zawgyi-One.ttf"
|
||||||
# font "public/fonts/padauk.ttf"
|
# font "public/fonts/padauk.ttf"
|
||||||
|
|
||||||
if order[0].source =='app'
|
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
|
|
||||||
move_down 1
|
move_down 1
|
||||||
|
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
|
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
|
||||||
|
else
|
||||||
if !order[0].dining.nil?
|
if !order[0].dining.nil?
|
||||||
text "#{ order[0].type + '-' + order[0].dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
text "#{ order[0].type + '-' + order[0].dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
||||||
else
|
else
|
||||||
text "#{ print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
text "#{ print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
stroke_horizontal_rule
|
stroke_horizontal_rule
|
||||||
move_down 5
|
move_down 5
|
||||||
|
|||||||
@@ -34,16 +34,25 @@ class OrderSummarySetPdf < Prawn::Document
|
|||||||
# font "public/fonts/padauk.ttf"
|
# font "public/fonts/padauk.ttf"
|
||||||
|
|
||||||
if order[0].source =='app'
|
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
|
|
||||||
move_down 1
|
move_down 1
|
||||||
|
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
|
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
|
||||||
|
else
|
||||||
if !order[0].dining.nil?
|
if !order[0].dining.nil?
|
||||||
text "#{ order[0].type + '-' + order[0].dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
text "#{ order[0].type + '-' + order[0].dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
||||||
else
|
else
|
||||||
text "#{ print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
text "#{ print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
stroke_horizontal_rule
|
stroke_horizontal_rule
|
||||||
move_down 5
|
move_down 5
|
||||||
|
|||||||
@@ -34,16 +34,25 @@ class OrderSummarySlimCustomisePdf < Prawn::Document
|
|||||||
# font "public/fonts/Zawgyi-One.ttf"
|
# font "public/fonts/Zawgyi-One.ttf"
|
||||||
# font "public/fonts/padauk.ttf"
|
# font "public/fonts/padauk.ttf"
|
||||||
if order[0].source =='app'
|
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
|
|
||||||
move_down 1
|
move_down 1
|
||||||
|
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
|
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
|
||||||
|
else
|
||||||
if !order[0].dining.nil?
|
if !order[0].dining.nil?
|
||||||
text "#{ order[0].type + '-' + order[0].dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
text "#{ order[0].type + '-' + order[0].dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
||||||
else
|
else
|
||||||
text "#{ print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
text "#{ print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
stroke_horizontal_rule
|
stroke_horizontal_rule
|
||||||
move_down 1
|
move_down 1
|
||||||
|
|||||||
@@ -33,16 +33,25 @@ class OrderSummarySlimPdf < Prawn::Document
|
|||||||
# font "public/fonts/Zawgyi-One.ttf"
|
# font "public/fonts/Zawgyi-One.ttf"
|
||||||
# font "public/fonts/padauk.ttf"
|
# font "public/fonts/padauk.ttf"
|
||||||
if order[0].source =='app'
|
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
|
|
||||||
move_down 1
|
move_down 1
|
||||||
|
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
|
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
|
||||||
|
else
|
||||||
if !order[0].dining.nil?
|
if !order[0].dining.nil?
|
||||||
text "#{ order[0].type + '-' + order[0].dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
text "#{ order[0].type + '-' + order[0].dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
||||||
else
|
else
|
||||||
text "#{ print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
text "#{ print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
stroke_horizontal_rule
|
stroke_horizontal_rule
|
||||||
move_down 1
|
move_down 1
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ class ReceiptBillA5Pdf < Prawn::Document
|
|||||||
move_down 3
|
move_down 3
|
||||||
y_position = cursor
|
y_position = cursor
|
||||||
text "Mobile Order", :size => self.header_font_size,:align => :center, :style=>:bold
|
text "Mobile Order", :size => self.header_font_size,:align => :center, :style=>:bold
|
||||||
move_down 1
|
move_down 2
|
||||||
y_position = cursor
|
y_position = cursor
|
||||||
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
|
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
|
||||||
text "#{sale_data.customer.contact_no}", :size => self.header_font_size,:align => :left
|
text "#{sale_data.customer.contact_no}", :size => self.header_font_size,:align => :left
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ class ReceiptBillOrderPdf < Prawn::Document
|
|||||||
move_down 3
|
move_down 3
|
||||||
y_position = cursor
|
y_position = cursor
|
||||||
text "Mobile Order", :size => self.header_font_size,:align => :center, :style=>:bold
|
text "Mobile Order", :size => self.header_font_size,:align => :center, :style=>:bold
|
||||||
move_down 1
|
move_down 2
|
||||||
y_position = cursor
|
y_position = cursor
|
||||||
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
|
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
|
||||||
text "#{sale_data.customer.contact_no}", :size => self.header_font_size,:align => :left
|
text "#{sale_data.customer.contact_no}", :size => self.header_font_size,:align => :left
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ class ReceiptBillPdf < Prawn::Document
|
|||||||
move_down 3
|
move_down 3
|
||||||
y_position = cursor
|
y_position = cursor
|
||||||
text "Mobile Order", :size => self.header_font_size,:align => :center, :style=>:bold
|
text "Mobile Order", :size => self.header_font_size,:align => :center, :style=>:bold
|
||||||
move_down 1
|
move_down 2
|
||||||
y_position = cursor
|
y_position = cursor
|
||||||
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
|
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
|
||||||
text "#{sale_data.customer.contact_no}", :size => self.header_font_size,:align => :left
|
text "#{sale_data.customer.contact_no}", :size => self.header_font_size,:align => :left
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ class ReceiptBillStarPdf < Prawn::Document
|
|||||||
move_down 3
|
move_down 3
|
||||||
y_position = cursor
|
y_position = cursor
|
||||||
text "Mobile Order", :size => self.header_font_size,:align => :center, :style=>:bold
|
text "Mobile Order", :size => self.header_font_size,:align => :center, :style=>:bold
|
||||||
move_down 1
|
move_down 2
|
||||||
y_position = cursor
|
y_position = cursor
|
||||||
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
|
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
|
||||||
text "#{sale_data.customer.contact_no}", :size => self.header_font_size,:align => :left
|
text "#{sale_data.customer.contact_no}", :size => self.header_font_size,:align => :left
|
||||||
|
|||||||
Reference in New Issue
Block a user