addQueryforwidthandheight

This commit is contained in:
yamin
2017-08-14 14:29:03 +06:30
parent fa68bcff69
commit 3c54f4da89
6 changed files with 12 additions and 12 deletions

View File

@@ -1,8 +1,8 @@
class CloseCashierPdf < Prawn::Document
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, shift_sale,shop_details,sale_taxes)
self.page_width = 210
self.page_height = 7000
self.page_width = PrintSetting.where("name = ?","Close Cashier").first.page_width
self.page_height = PrintSetting.where("name = ?","Close Cashier").first.page_height
self.margin = 5
self.price_width = 40
self.qty_width = 20

View File

@@ -1,8 +1,8 @@
class CrmOrderPdf < Prawn::Document
attr_accessor :receipt_width,:price_column_width,:p_width, :page_height, :margin, :price_width, :item_width, :header_font_size, :item_font_size,:item_height,:qty_column_width,:item_description_width
def initialize(booking,order_items,printer_settings)
self.p_width = 200
self.page_height = 1450
self.page_width = PrintSetting.where("name = ?","CRM Order").first.page_width
self.page_height = PrintSetting.where("name = ?","CRM Order").first.page_height
self.margin = 10
# self.price_width = self.p_width / 2
self.price_width=80

View File

@@ -2,8 +2,8 @@ class OrderItemPdf < 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
def initialize(print_settings,order_item, print_status, options, alt_name)
self.page_width = 185
self.page_height = 1450
self.page_width = PrintSetting.where("name = ?","OrderItemPdf").first.page_width
self.page_height = PrintSetting.where("name = ?","OrderItemPdf").first.page_height
self.margin = 0
self.price_width = 40 # No Need for item
self.qty_width = 40

View File

@@ -2,8 +2,8 @@ class OrderSummaryPdf < 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
def initialize(print_settings,order, print_status, order_items = nil,alt_name)
self.page_width = 190
self.page_height = 1450
self.page_width = PrintSetting.where("name = ?","Order Summary").first.page_width
self.page_height = PrintSetting.where("name = ?","Order Summary").first.page_height
self.margin = 0
self.price_width = 40 # No Need for item
self.qty_width = 40

View File

@@ -1,8 +1,8 @@
class QueueNoPdf < Prawn::Document
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
def initialize(printer_settings, queue)
self.page_width = 210
self.page_height = 1450
self.page_width = PrintSetting.where("name = ?","Queue No").first.page_width
self.page_height = PrintSetting.where("name = ?","Queue No").first.page_height
self.margin = 5
self.price_width = 35
self.qty_width = 20

View File

@@ -2,8 +2,8 @@ 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
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)
self.page_width = 210
self.page_height = 1450
self.page_width = PrintSetting.where("name = ?","Receipt Bill").first.page_width
self.page_height = PrintSetting.where("name = ?","Receipt Bill").first.page_height
self.margin = 5
self.price_width = 40
self.qty_width = 20