update receipt bill
This commit is contained in:
@@ -95,7 +95,7 @@ class ReceiptBillPdf < Prawn::Document
|
||||
|
||||
y_position = cursor
|
||||
bounding_box([0,y_position], :width =>self.page_width - 10, :height => self.item_height) do
|
||||
text "Receipt Date : #{ sale_data.receipt_date.strftime('%d-%m-%Y') } ( #{ sale_data.bookings[0].checkin_at.utc.getlocal.strftime('%I:%M %p') } - #{ sale_data.bookings[0].checkout_at.utc.getlocal.strftime('%I:%M %p') } )",:size => self.item_font_size,:align => :left
|
||||
text "Date : #{ sale_data.receipt_date.strftime('%d-%m-%Y') } ( #{ sale_data.bookings[0].checkin_at.utc.getlocal.strftime('%I:%M %p') } - #{ sale_data.bookings[0].checkout_at.utc.getlocal.strftime('%I:%M %p') } )",:size => self.item_font_size,:align => :left
|
||||
end
|
||||
|
||||
|
||||
@@ -202,6 +202,18 @@ class ReceiptBillPdf < Prawn::Document
|
||||
# text "( " +"#{sale_data.total_tax}" +" )" , :size => self.item_font_size,:align => :right
|
||||
# end
|
||||
|
||||
if sale_data.rounding_adjustment != 0.0
|
||||
move_down 5
|
||||
y_position = cursor
|
||||
|
||||
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
|
||||
text "Rounding Adjustment", :size => self.item_font_size,:align => :left
|
||||
end
|
||||
bounding_box([self.item_description_width,y_position], :width =>self.label_width) do
|
||||
text "#{sale_data.rounding_adjustment}", :size => self.item_font_size,:align => :right
|
||||
end
|
||||
end
|
||||
|
||||
move_down 5
|
||||
y_position = cursor
|
||||
move_down 5
|
||||
@@ -253,18 +265,13 @@ class ReceiptBillPdf < Prawn::Document
|
||||
|
||||
if rebate_amount["status"] == true
|
||||
stroke_horizontal_rule
|
||||
rebate = 0
|
||||
rebate_amount["data"].each do |res|
|
||||
|
||||
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 "Current Rebate Amount", :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(res["rebate"], :precision => precision.to_i, :delimiter => delimiter)}" , :size => self.item_font_size,:align => :right
|
||||
end
|
||||
rebate = rebate + res["rebate"]
|
||||
|
||||
end
|
||||
if res["receipt_no"]== sale_data.receipt_no && res["status"]== "Redeem"
|
||||
|
||||
@@ -279,6 +286,14 @@ class ReceiptBillPdf < Prawn::Document
|
||||
end
|
||||
|
||||
end
|
||||
move_down 5
|
||||
y_position = cursor
|
||||
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
|
||||
text "Current Rebate Amount", :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(rebate, :precision => precision.to_i, :delimiter => delimiter)}" , :size => self.item_font_size,:align => :right
|
||||
end
|
||||
end
|
||||
end
|
||||
if member_info["status"] == true && member_info["data"].present?
|
||||
|
||||
Reference in New Issue
Block a user