From 7f95c839fc8a1cc1c209758c4d8b549509eb74c4 Mon Sep 17 00:00:00 2001 From: phyusin Date: Fri, 7 Sep 2018 10:28:55 +0630 Subject: [PATCH] =?UTF-8?q?change=20order=20no=20font=20size=20in=20receip?= =?UTF-8?q?t=20bill=E1=80=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/pdf/receipt_bill_a5_pdf.rb | 14 +++++--------- app/pdf/receipt_bill_pdf.rb | 13 +++++-------- 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/app/pdf/receipt_bill_a5_pdf.rb b/app/pdf/receipt_bill_a5_pdf.rb index 945ca437..0314b1a9 100644 --- a/app/pdf/receipt_bill_a5_pdf.rb +++ b/app/pdf/receipt_bill_a5_pdf.rb @@ -113,6 +113,11 @@ class ReceiptBillA5Pdf < Prawn::Document end def cashier_info(sale_data, customer_name, latest_order_no) + move_down line_move + if !latest_order_no.nil? + move_down line_move + text "OrderNo : #{ latest_order_no }", :size => self.header_font_size,:align => :left + end move_down line_move # move_down 2 y_position = cursor @@ -159,15 +164,6 @@ class ReceiptBillA5Pdf < Prawn::Document # - #{ sale_data.bookings[0].checkin_at.utc.getlocal.strftime('%I:%M %p') })" , # :size => self.item_font_size,:align => :right # end - - if !latest_order_no.nil? - y_position = cursor - move_down line_move - bounding_box([0,y_position], :width =>self.page_width - 10, :height => self.item_height) do - text "OrderNo : #{ latest_order_no }",:size => self.item_font_size,:align => :left - end - end - move_down line_move stroke_horizontal_rule end diff --git a/app/pdf/receipt_bill_pdf.rb b/app/pdf/receipt_bill_pdf.rb index 5902469f..f060a95a 100755 --- a/app/pdf/receipt_bill_pdf.rb +++ b/app/pdf/receipt_bill_pdf.rb @@ -114,7 +114,11 @@ class ReceiptBillPdf < Prawn::Document def cashier_info(sale_data, customer_name, latest_order_no) move_down line_move - + if !latest_order_no.nil? + move_down line_move + text "OrderNo : #{ latest_order_no }", :size => self.header_font_size,:align => :left + end + move_down line_move # move_down 2 y_position = cursor bounding_box([0,y_position], :width =>self.description_width + self.price_num_width, :height => self.item_height) do @@ -153,13 +157,6 @@ class ReceiptBillPdf < Prawn::Document # - #{ sale_data.bookings[0].checkin_at.utc.getlocal.strftime('%I:%M %p') })" , # :size => self.item_font_size,:align => :right # end - if !latest_order_no.nil? - y_position = cursor - move_down line_move - bounding_box([0,y_position], :width =>self.page_width - 10, :height => self.item_height) do - text "OrderNo : #{ latest_order_no }",:size => self.item_font_size,:align => :left - end - end move_down line_move stroke_horizontal_rule end