...
This commit is contained in:
@@ -2,7 +2,7 @@ class SaleItemsPdf < 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,:text_width
|
||||
|
||||
def initialize(printer_settings, shop_details, period, type, account, from_date, to_date, shift, sale_items, total_other_charges, acc_cate_count, menu_cate_count, total_by_acc)
|
||||
def initialize(printer_settings, shop_details, period, type, account, from_date, to_date, shift, sale_items, total_other_charges)
|
||||
self.page_width = printer_settings.page_width #PrintSetting.where("name = ?","Close Cashier").first.page_width
|
||||
self.page_height = printer_settings.page_height
|
||||
self.header_font_size = printer_settings.header_font_size.to_i
|
||||
@@ -58,7 +58,7 @@ class SaleItemsPdf < Prawn::Document
|
||||
|
||||
sale_details(period, type, account, from_date, to_date, shift)
|
||||
|
||||
sale_items_detail(sale_items, acc_cate_count, menu_cate_count, total_by_acc, total_other_charges)
|
||||
sale_items_detail(sale_items, total_other_charges)
|
||||
move_down 10
|
||||
end
|
||||
|
||||
@@ -128,7 +128,7 @@ class SaleItemsPdf < Prawn::Document
|
||||
move_down 10
|
||||
end
|
||||
|
||||
def sale_items_detail(sale_items, acc_cate_count, menu_cate_count, total_by_acc, total_other_charges)
|
||||
def sale_items_detail(sale_items, total_other_charges)
|
||||
y_position = cursor
|
||||
bounding_box([0,y_position], :width =>self.page_width - 10, :height => 20) do
|
||||
text "Sale Items Summary", :size => self.header_font_size, :align => :center
|
||||
|
||||
Reference in New Issue
Block a user