update receipt bill payment
This commit is contained in:
@@ -260,17 +260,27 @@ class ReceiptBillPdf < Prawn::Document
|
||||
if rebate_amount["status"] == true
|
||||
rebate_amount["data"].each do |res|
|
||||
|
||||
if res["receipt_no"]== sale_data.receipt_no
|
||||
if res["receipt_no"]== sale_data.receipt_no && res["status"]== "Rebate"
|
||||
|
||||
move_down 5
|
||||
y_position = cursor
|
||||
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
|
||||
text "Rebate Balance", :size => self.item_font_size,:align => :left
|
||||
text "Rebate Amount", :size => self.item_font_size,:align => :left
|
||||
end
|
||||
bounding_box([self.item_description_width,y_position], :width =>self.label_width) do
|
||||
text "#{ res["rebate"] }" , :size => self.item_font_size,:align => :right
|
||||
end
|
||||
|
||||
end
|
||||
if res["receipt_no"]== sale_data.receipt_no && res["status"]== "Redeem"
|
||||
|
||||
move_down 5
|
||||
y_position = cursor
|
||||
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
|
||||
text "Redeem Amount", :size => self.item_font_size,:align => :left
|
||||
end
|
||||
bounding_box([self.item_description_width,y_position], :width =>self.label_width) do
|
||||
text "#{ res["redeem"] }" , :size => self.item_font_size,:align => :right
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
@@ -301,7 +311,7 @@ class ReceiptBillPdf < Prawn::Document
|
||||
move_down 5
|
||||
y_position = cursor
|
||||
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
|
||||
text "Customer", :size => self.item_font_size,:align => :left
|
||||
text "Customer Name", :size => self.item_font_size,:align => :left
|
||||
end
|
||||
bounding_box([self.item_description_width,y_position], :width =>self.label_width) do
|
||||
text "#{ customer_name }" , :size => self.item_font_size,:align => :right
|
||||
|
||||
Reference in New Issue
Block a user