update and fix

This commit is contained in:
Yan
2017-08-21 16:50:24 +06:30
parent ce7d15c2d4
commit 2b0dcd4ab9
12 changed files with 24 additions and 14 deletions

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.page_width = PrintSetting.where("name = ?","CRM Order").first.page_width
self.page_height = PrintSetting.where("name = ?","CRM Order").first.page_height
self.page_width = printer_settings.page_width
self.page_height = printer_settings.page_height
self.margin = 10
# self.price_width = self.p_width / 2
self.price_width=80