From 65bc094a971d812b59d8ca722a875b0708673e9b Mon Sep 17 00:00:00 2001 From: phyusin Date: Tue, 30 Oct 2018 13:33:04 +0630 Subject: [PATCH] check booking no --- app/pdf/receipt_bill_a5_pdf.rb | 8 +++++--- app/pdf/receipt_bill_pdf.rb | 9 +++++---- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/app/pdf/receipt_bill_a5_pdf.rb b/app/pdf/receipt_bill_a5_pdf.rb index 579c6ff8..9f073e11 100644 --- a/app/pdf/receipt_bill_a5_pdf.rb +++ b/app/pdf/receipt_bill_a5_pdf.rb @@ -118,9 +118,11 @@ class ReceiptBillA5Pdf < Prawn::Document end def cashier_info(sale_data, customer_name, latest_order_no) - move_down line_move - text "Booking : #{ sale_data.bookings[0].booking_id }", :size => self.header_font_size+5,:align => :left - move_down line_move + if latest_order_no.nil? + move_down line_move + text "Booking : #{ sale_data.bookings[0].booking_id }", :size => self.header_font_size+5,:align => :left + move_down line_move + end move_down line_move if !latest_order_no.nil? diff --git a/app/pdf/receipt_bill_pdf.rb b/app/pdf/receipt_bill_pdf.rb index b7a07a12..ee9f6f1a 100755 --- a/app/pdf/receipt_bill_pdf.rb +++ b/app/pdf/receipt_bill_pdf.rb @@ -118,10 +118,11 @@ class ReceiptBillPdf < Prawn::Document end def cashier_info(sale_data, customer_name, latest_order_no) - move_down line_move - text "Booking : #{ sale_data.bookings[0].booking_id }", :size => self.header_font_size+2,:align => :left - move_down line_move - + if latest_order_no.nil? + move_down line_move + text "Booking : #{ sale_data.bookings[0].booking_id }", :size => self.header_font_size+2,:align => :left + move_down line_move + end move_down line_move if !latest_order_no.nil? move_down line_move