shop
This commit is contained in:
@@ -46,7 +46,13 @@ class ReceiptBillPdf < Prawn::Document
|
||||
|
||||
header(shop_details)
|
||||
if sale_data.orders[0].source =='app'
|
||||
text "Mobile Order", :size => self.header_font_size,:align => :left
|
||||
y_position = cursor
|
||||
bounding_box([0,y_position], :width =>self.description_width + self.price_num_width) do
|
||||
text "Mobile Order", :size => self.header_font_size,:align => :left
|
||||
end
|
||||
bounding_box([self.description_width - 2,y_position], :width => self.price_num_width) do
|
||||
text "#{ sale_data.bookings[0].dining_facility.type } - #{ sale_data.bookings[0].dining_facility.name }" , :size => self.header_font_size,:align => :right,:style=>:bold
|
||||
end
|
||||
move_down 1
|
||||
text "Customer Ph : #{sale_data.customer.contact_no}", :size => self.header_font_size,:align => :left
|
||||
move_down 1
|
||||
@@ -136,11 +142,12 @@ class ReceiptBillPdf < Prawn::Document
|
||||
bounding_box([0,y_position], :width =>self.description_width + self.price_num_width, :height => self.item_height) do
|
||||
text "Receipt No: #{sale_data.receipt_no}", :size => self.item_font_size,:align => :left
|
||||
end
|
||||
|
||||
if sale_data.bookings[0].dining_facility_id.to_i > 0
|
||||
bounding_box([self.description_width - 2,y_position], :width => self.price_num_width, :height => self.item_height) do
|
||||
text "#{ sale_data.bookings[0].dining_facility.type } - #{ sale_data.bookings[0].dining_facility.name }" , :size => self.item_font_size,:align => :right
|
||||
end
|
||||
if sale_data.orders[0].source !='app'
|
||||
if sale_data.bookings[0].dining_facility_id.to_i > 0
|
||||
bounding_box([self.description_width - 2,y_position], :width => self.price_num_width, :height => self.item_height) do
|
||||
text "#{ sale_data.bookings[0].dining_facility.type } - #{ sale_data.bookings[0].dining_facility.name }" , :size => self.item_font_size,:align => :right
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
move_down line_move
|
||||
|
||||
Reference in New Issue
Block a user