add shop logo in receipt bill pdf
This commit is contained in:
@@ -122,8 +122,21 @@ class ReceiptBillPdf < Prawn::Document
|
||||
end
|
||||
|
||||
def header (shop_details)
|
||||
|
||||
###Testing for shop logo
|
||||
if shop_details.logo.present?
|
||||
logo_path = shop_details.logo.file.file
|
||||
# Add shop logo to header
|
||||
image logo_path, width: 80, height: 80, position: :center
|
||||
move_down 10
|
||||
end
|
||||
###
|
||||
|
||||
|
||||
text "#{shop_details.name}", :left_margin => -10, :size => self.header_font_size,:align => :center
|
||||
move_down line_move
|
||||
|
||||
|
||||
text "#{shop_details.address}", :size => self.item_font_size,:align => :center
|
||||
# move_down self.item_height
|
||||
move_down line_move
|
||||
|
||||
Reference in New Issue
Block a user