update receipt print member info

This commit is contained in:
Aung Myo
2017-06-16 10:51:50 +06:30
parent 0e21117f05
commit 4cf9ce79ec
3 changed files with 9 additions and 10 deletions

View File

@@ -207,17 +207,18 @@ class ReceiptBillPdf < Prawn::Document
# show member information
def member_info(member_info)
move_down 7
if member_info["data"] == true
if member_info["status"] == true
member_info["data"].each do |res|
stroke_horizontal_rule
move_down 5
y_position = cursor
bounding_box([0,y_position], :width =>self.label_width, :height => self.item_height) do
text "#{ res["accountable_type"] } : #{ res["balance"] }", :size => self.item_font_size,:align => :left
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
text "#{ res["accountable_type"] }", :size => self.item_font_size,:align => :left
end
move_down 5
bounding_box([self.item_description_width,y_position], :width =>self.label_width) do
text "#{ res["balance"] }" , :size => self.item_font_size,:align => :right
end
end
end
end