check bill
This commit is contained in:
@@ -2,6 +2,7 @@ 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)
|
||||
self.page_width = printer_settings.page_width
|
||||
self.page_height = printer_settings.page_height
|
||||
@@ -22,7 +23,7 @@ class ReceiptBillPdf < Prawn::Document
|
||||
# @double = @qty_width * 1.3
|
||||
# @half_qty = @qty_width / 2
|
||||
#setting page margin and width
|
||||
super(:margin => [printer_settings.heading_space, self.margin, self.margin, self.margin], :page_size => [self.page_width, self.page_height])
|
||||
super(:margin => [printer_settings.heading_space, self.margin, self.margin, self.margin])
|
||||
|
||||
#precision checked
|
||||
if printer_settings.precision.to_i > 2
|
||||
@@ -106,6 +107,7 @@ class ReceiptBillPdf < Prawn::Document
|
||||
|
||||
def cashier_info(sale_data, customer_name)
|
||||
move_down line_move
|
||||
|
||||
# move_down 2
|
||||
y_position = cursor
|
||||
bounding_box([0,y_position], :width =>self.description_width + self.price_num_width, :height => self.item_height) do
|
||||
@@ -146,7 +148,6 @@ class ReceiptBillPdf < Prawn::Document
|
||||
text "Date : #{ time }",:size => self.item_font_size,:align => :left
|
||||
end
|
||||
|
||||
|
||||
# bounding_box([self.item_description_width,y_position], :width =>self.label_width+5) do
|
||||
# text "(#{ sale_data.bookings[0].checkin_at.utc.getlocal.strftime('%I:%M %p') }
|
||||
# - #{ sale_data.bookings[0].checkin_at.utc.getlocal.strftime('%I:%M %p') })" ,
|
||||
@@ -250,7 +251,6 @@ class ReceiptBillPdf < Prawn::Document
|
||||
end
|
||||
|
||||
def all_total(sale_data,precision,delimiter)
|
||||
|
||||
move_down line_move
|
||||
item_name_width = self.item_width
|
||||
y_position = cursor
|
||||
@@ -317,7 +317,6 @@ class ReceiptBillPdf < Prawn::Document
|
||||
move_down line_move
|
||||
|
||||
sale_payment(sale_data,precision,delimiter)
|
||||
|
||||
end
|
||||
|
||||
def sale_payment(sale_data,precision,delimiter)
|
||||
@@ -549,7 +548,6 @@ class ReceiptBillPdf < Prawn::Document
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
def footer(printed_status)
|
||||
|
||||
Reference in New Issue
Block a user