This commit is contained in:
Zoey
2019-06-12 15:16:18 +06:30
parent 07de2a136b
commit 8255170563
6 changed files with 23 additions and 23 deletions

View File

@@ -2,7 +2,7 @@ class SaleItemsStarPdf < 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 SaleItemsStarPdf < 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)
end
def header (shop_details)
@@ -127,7 +127,7 @@ class SaleItemsStarPdf < 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)
self.item_width = 73
self.price_width = 35
item_label_qty_front_width = (self.item_width+self.price_width) + 2