Modified in all pdf can access Header & Item Font Size from Database

This commit is contained in:
San Wai Lwin
2018-04-05 13:30:29 +06:30
parent fc8b2d3b73
commit e607fea8a3
16 changed files with 43 additions and 66 deletions

View File

@@ -5,6 +5,8 @@ class CloseCashierPdf < Prawn::Document
def initialize(printer_settings, shift_sale,shop_details,sale_taxes,other_payment,total_amount_by_account,total_discount_by_account,total_member_discount)
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
self.item_font_size = printer_settings.item_font_size
self.margin = 5
self.price_width = 60
self.qty_width = 20
@@ -36,8 +38,6 @@ class CloseCashierPdf < Prawn::Document
end
# font "public/fonts/Zawgyi-One.ttf"
# font "public/fonts/padauk.ttf"
self.header_font_size = 10
self.item_font_size = 8
#precision checked
if printer_settings.precision.to_i > 2