From 02c71f1961f61cedf8df320f4b87d96d5cc46a89 Mon Sep 17 00:00:00 2001 From: Yan Date: Thu, 10 Aug 2017 14:15:20 +0630 Subject: [PATCH] no change but edit line space in bill pdf --- app/pdf/receipt_bill_pdf.rb | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/app/pdf/receipt_bill_pdf.rb b/app/pdf/receipt_bill_pdf.rb index 2dca6d16..1dbea502 100644 --- a/app/pdf/receipt_bill_pdf.rb +++ b/app/pdf/receipt_bill_pdf.rb @@ -237,12 +237,10 @@ class ReceiptBillPdf < Prawn::Document end - def sale_payment(sale_data,precision,delimiter) - + def sale_payment(sale_data,precision,delimiter) stroke_horizontal_rule move_down 5 SalePayment.where('sale_id = ?', sale_data.sale_id).each do |payment| - y_position = cursor if payment.payment_method == "paypar" bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do @@ -269,15 +267,12 @@ class ReceiptBillPdf < Prawn::Document text "#{number_with_precision(sale_data.amount_changed, :precision => precision.to_i, :delimiter => delimiter)}" , :size => self.item_font_size,:align => :right end move_down 5 - end - + end end # show member information def member_info(member_info,customer_name,rebate_amount,sale_data,precision,delimiter) - - if rebate_amount != nil - + if rebate_amount != nil if rebate_amount["status"] == true stroke_horizontal_rule total = 0 @@ -429,6 +424,5 @@ class ReceiptBillPdf < Prawn::Document move_down 5 end - end