From 610d39847e71702062242913df85490c66be2ddf Mon Sep 17 00:00:00 2001 From: San Wai Lwin Date: Fri, 18 May 2018 16:23:14 +0630 Subject: [PATCH] Add Approved By for waste & Spolie in Receive --- app/pdf/receipt_bill_pdf.rb | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/app/pdf/receipt_bill_pdf.rb b/app/pdf/receipt_bill_pdf.rb index 5c1f8c01..7dc29463 100755 --- a/app/pdf/receipt_bill_pdf.rb +++ b/app/pdf/receipt_bill_pdf.rb @@ -532,7 +532,7 @@ class ReceiptBillPdf < Prawn::Document break; end end - if sale_data.payment_status == "foc" + if sale_data.payment_status == "foc" || sale_data.payment_status == "waste" || sale_data.payment_status == "spoile" y_position = cursor stroke_horizontal_rule @@ -540,12 +540,19 @@ class ReceiptBillPdf < Prawn::Document bounding_box([self.label_width,y_position], :width =>self.item_description_width) do move_down 70 stroke_horizontal_rule - end + end - bounding_box([self.label_width,y_position], :width =>self.item_description_width) do - move_down 73 - text "Acknowledged By" , :size => self.item_font_size,:align => :center - end + if sale_data.payment_status == "foc" + bounding_box([self.label_width,y_position], :width =>self.item_description_width) do + move_down 73 + text "Acknowledged By" , :size => self.item_font_size,:align => :center + end + elsif sale_data.payment_status == "waste" || sale_data.payment_status == "spoile" + bounding_box([self.label_width,y_position], :width =>self.item_description_width) do + move_down 73 + text "Approved By" , :size => self.item_font_size,:align => :center + end + end end end