remove conflict data
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
class ReceiptBillPdf < Prawn::Document
|
||||
include ActionView::Helpers::NumberHelper
|
||||
|
||||
attr_accessor :label_width,:price_column_width,:page_width, :page_height, :margin, :price_width, :item_width, :header_font_size, :item_font_size,:item_height,:qty_width,:total_width,:item_description_width, :description_width, :price_num_width, :line_move
|
||||
def initialize(printer_settings, sale_items, sale_data, customer_name, item_price_by_accounts, discount_price_by_accounts, member_info = nil,rebate_amount = nil,shop_details, printed_status,current_balance,card_data,survey)
|
||||
self.page_width = printer_settings.page_width
|
||||
@@ -81,8 +82,8 @@ class ReceiptBillPdf < Prawn::Document
|
||||
end
|
||||
|
||||
#start for individual payment
|
||||
if !survey.nil?
|
||||
individual_payment(sale_data, survey, printer_settings.precision, delimiter)
|
||||
if !sale_data.equal_persons.nil?
|
||||
individual_payment(sale_data, printer_settings.precision, delimiter)
|
||||
end
|
||||
#end for individual payment
|
||||
|
||||
@@ -129,9 +130,9 @@ class ReceiptBillPdf < Prawn::Document
|
||||
|
||||
y_position = cursor
|
||||
if sale_data.bookings[0].dining_facility_id.to_i > 0
|
||||
time =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')+")"
|
||||
time = 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')+")"
|
||||
else
|
||||
time = time = sale_data.receipt_date.strftime('%d-%m-%Y %H:%M %p')
|
||||
time = sale_data.receipt_date.strftime('%d-%m-%Y %H:%M %p')
|
||||
end
|
||||
|
||||
bounding_box([0,y_position], :width =>self.page_width - 10, :height => self.item_height) do
|
||||
@@ -492,17 +493,17 @@ class ReceiptBillPdf < Prawn::Document
|
||||
move_down line_move
|
||||
y_position = cursor
|
||||
bounding_box([0,y_position], :width =>self.label_width+50) do
|
||||
text "Individual amount for #{survey.total_customer} persons", :size => self.item_font_size+1,:align => :left
|
||||
text "Split Bill for #{sale_data.equal_persons} persons", :size => self.item_font_size+1,:align => :left
|
||||
end
|
||||
|
||||
bounding_box([0,y_position], :width =>self.label_width) do
|
||||
move_down 15
|
||||
text "Total", :size => self.item_font_size,:align => :left
|
||||
text "Amount Due (per person)", :size => self.item_font_size,:align => :left
|
||||
end
|
||||
|
||||
bounding_box([self.label_width,y_position], :width =>self.item_description_width) do
|
||||
move_down 15
|
||||
text "#{number_with_precision(per_person, :precision => precision.to_i, :delimiter => delimiter)} per person", :size => self.item_font_size,:align => :right
|
||||
text "#{number_with_precision(per_person, :precision => precision.to_i, :delimiter => delimiter)}", :size => self.item_font_size,:align => :right
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user