From 98b043c1704284766dd2daffecc1bfd1c924275d Mon Sep 17 00:00:00 2001 From: San Wai Lwin Date: Mon, 21 May 2018 10:11:12 +0630 Subject: [PATCH] Edit in receipt Bill --- app/pdf/receipt_bill_pdf.rb | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/app/pdf/receipt_bill_pdf.rb b/app/pdf/receipt_bill_pdf.rb index 7dc29463..466263c9 100755 --- a/app/pdf/receipt_bill_pdf.rb +++ b/app/pdf/receipt_bill_pdf.rb @@ -241,12 +241,9 @@ class ReceiptBillPdf < Prawn::Document bounding_box([0,y_position], :width =>self.item_width + self.price_width, :height => self.item_height) do text "Sub Total", :size => self.item_font_size,:align => :left end - bounding_box([self.item_width + self.price_width + 11,y_position], :width =>self.qty_width, :height => self.item_height) do - text "#{number_with_precision(total_qty, :precision => precision.to_i, :delimiter => delimiter)}", :size => self.item_font_size,:align => :center - end - bounding_box([self.item_width + self.price_width + 8,y_position], :width =>self.total_width, :height => self.item_height) do - text "#{number_with_precision(sub_total, :precision => precision.to_i, :delimiter => delimiter)}", :size => self.item_font_size,:align => :right - end + text_box "#{number_with_precision(total_qty, :precision => precision.to_i)}", :at =>[item_qty_front_width,y_position], :width => item_qty_end_width, :size => self.item_font_size, :align => :center, :overflow => :shrink_to_fix + text_box "#{number_with_precision(sub_total, :precision => precision.to_i, :delimiter => delimiter)}", :at =>[item_total_front_width,y_position], :width =>item_total_end_width, :size => self.item_font_size, :align => :right, :overflow => :shrink_to_fix + end def all_total(sale_data,precision,delimiter)