fix for bill
This commit is contained in:
@@ -165,9 +165,14 @@ class ReceiptBillPdf < Prawn::Document
|
||||
def all_total(sale_data,precision,delimiter)
|
||||
item_name_width = self.item_width
|
||||
y_position = cursor
|
||||
if sale_data.discount_type == 'member_discount'
|
||||
dis_type = "Member Discount:"
|
||||
else
|
||||
dis_type = "Overall Discount:"
|
||||
end
|
||||
|
||||
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
|
||||
text "Overall Discount", :size => self.item_font_size,:align => :left
|
||||
text "#{ dis_type }", :size => self.item_font_size,:align => :left
|
||||
end
|
||||
bounding_box([self.item_description_width,y_position], :width =>self.label_width) do
|
||||
text "( #{number_with_precision(sale_data.total_discount, :precision => precision.to_i, :delimiter => delimiter)} )" , :size => self.item_font_size,:align => :right
|
||||
|
||||
Reference in New Issue
Block a user