change qty_width in pdf

This commit is contained in:
EikhantMon
2018-06-01 10:47:14 +06:30
parent 7ba0019695
commit 2b35822102
8 changed files with 22 additions and 17 deletions

View File

@@ -63,6 +63,11 @@ For Order Printing
1) settings/print_settings
(a) Unique Code => OrderSetItemCustomisePdf & OrderSummarySetCustomisePdf
(b) Can change Header font size and Item Font Size as you like
6)) ********* Order Slim Customise PDF
1) settings/print_settings
(a) Unique Code => OrderItemSlimCustomisePdf & OrderSummarySlimCustomisePdf
(b) Can change Header font size and Item Font Size as you like
For ReceiptBillA5Pdf
*** change ReceiptBillPdf to ReceiptBillA5Pdf

View File

@@ -9,7 +9,7 @@ class OrderItemCustomisePdf < Prawn::Document
self.order_no_font_size = 8
self.margin = 0
self.price_width = 40 # No Need for item
self.qty_width = 25
self.qty_width = 40
self.total_width = 40 # No Need for item
self.item_width = self.page_width - (self.qty_width - self.margin)
self.item_height = 15

View File

@@ -8,7 +8,7 @@ class OrderItemSlimCustomisePdf < Prawn::Document
self.item_font_size = print_settings.item_font_size.to_i
self.margin = 0
self.price_width = 40 # No Need for item
self.qty_width = 25
self.qty_width = 40
self.total_width = 40 # No Need for item
self.item_width = self.page_width - (self.qty_width - self.margin)
self.item_height = 15

View File

@@ -4,8 +4,8 @@ class OrderItemSlimPdf < Prawn::Document
def initialize(print_settings,order_item_slim, print_status, options, alt_name, before_updated_qty)
self.page_width = print_settings.page_width
self.page_height = print_settings.page_height
self.header_font_size = printer_settings.header_font_size.to_i
self.item_font_size = printer_settings.item_font_size.to_i
self.header_font_size = print_settings.header_font_size.to_i
self.item_font_size = print_settings.item_font_size.to_i
self.margin = 0
self.price_width = 40 # No Need for item
self.qty_width = 40
@@ -105,14 +105,14 @@ class OrderItemSlimPdf < Prawn::Document
end
# if alt_name
# if order_item_slim.alt_name
# move_down 1
# font("public/fonts/NotoSansCJKtc-Regular.ttf") do
# text "(#{order_item_slim.alt_name})", :size => self.item_font_size,:align => :left, :inline_format => true
# end
# end
# end
if alt_name
if order_item_slim.alt_name
move_down 1
font("public/fonts/NotoSansCJKtc-Regular.ttf") do
text "(#{order_item_slim.alt_name})", :size => self.item_font_size,:align => :left, :inline_format => true
end
end
end
if !options.empty?
move_down 1

View File

@@ -9,7 +9,7 @@ class OrderSetItemCustomisePdf < Prawn::Document
self.order_no_font_size = 8
self.margin = 0
self.price_width = 40 # No Need for item
self.qty_width = 25
self.qty_width = 40
self.total_width = 40 # No Need for item
self.item_width = self.page_width - (self.qty_width - self.margin)
self.item_height = 15

View File

@@ -9,7 +9,7 @@ class OrderSummaryCustomisePdf < Prawn::Document
self.order_no_font_size = 8
self.margin = 0
self.price_width = 40 # No Need for item
self.qty_width = 25
self.qty_width = 40
self.total_width = 40 # No Need for item
self.item_width = self.page_width - (self.qty_width - self.margin)
self.item_height = 15

View File

@@ -9,7 +9,7 @@ class OrderSummarySetCustomisePdf < Prawn::Document
self.order_no_font_size = 8
self.margin = 0
self.price_width = 40 # No Need for item
self.qty_width = 25
self.qty_width = 40
self.total_width = 40 # No Need for item
self.item_width = self.page_width - (self.qty_width - self.margin)
self.item_height = 15

View File

@@ -8,7 +8,7 @@ class OrderSummarySlimCustomisePdf < Prawn::Document
self.item_font_size = print_settings.item_font_size.to_i
self.margin = 0
self.price_width = 40 # No Need for item
self.qty_width = 25
self.qty_width = 40
self.total_width = 40 # No Need for item
self.item_width = self.page_width - (self.qty_width - self.margin)
self.item_height = 15