change item_width in customise pdf
This commit is contained in:
@@ -97,7 +97,7 @@ class OrderItemCustomisePdf < Prawn::Document
|
||||
text "#{order_item.item_code} - #{order_item.item_name}", :size => self.item_font_size,:align => :left
|
||||
end
|
||||
|
||||
bounding_box([self.item_width,y_position], :width => self.qty_width) do
|
||||
bounding_box([self.item_width - 10,y_position], :width => self.qty_width) do
|
||||
text "[#{number_with_precision(order_item.qty.to_i, :precision => precision.to_i)}]", :size => self.item_font_size,:align => :left
|
||||
end
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ class OrderItemPdf < Prawn::Document
|
||||
def order_info(order_no, order_by, order_at)
|
||||
y_position = cursor
|
||||
bounding_box([0,y_position], :width => self.item_width, :height => self.item_height) do
|
||||
text "OrderNo: #{order_no} ", :size => self.item_font_size,:align => :left
|
||||
text "OrderNo: #{order_no}", :size => self.item_font_size,:align => :left
|
||||
end
|
||||
|
||||
move_down 2
|
||||
|
||||
@@ -98,7 +98,7 @@ class OrderItemSlimCustomisePdf < Prawn::Document
|
||||
text "#{order_item_slim.item_name}", :size => self.item_font_size,:align => :left
|
||||
end
|
||||
|
||||
bounding_box([self.item_width,y_position], :width => self.qty_width) do
|
||||
bounding_box([self.item_width - 5,y_position], :width => self.qty_width) do
|
||||
text "[#{number_with_precision(order_item_slim.qty.to_i, :precision => precision.to_i)}]", :size => self.item_font_size,:align => :left
|
||||
end
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ class OrderSetItemCustomisePdf < Prawn::Document
|
||||
text "#{order_set_item.item_code} - #{order_set_item.item_name}", :size => self.item_font_size,:align => :left
|
||||
end
|
||||
|
||||
bounding_box([self.item_width,y_position], :width => self.qty_width) do
|
||||
bounding_box([self.item_width - 5,y_position], :width => self.qty_width) do
|
||||
text "[#{number_with_precision(order_set_item.qty.to_i, :precision => precision.to_i)}]", :size => self.item_font_size,:align => :left
|
||||
end
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ class OrderSummaryCustomisePdf < Prawn::Document
|
||||
|
||||
end
|
||||
|
||||
bounding_box([self.item_width,y_position], :width => self.qty_width) do
|
||||
bounding_box([self.item_width - 10,y_position], :width => self.qty_width) do
|
||||
text " [#{number_with_precision(odi.qty, :precision => precision.to_i)}]", :size => self.item_font_size,:align => :left
|
||||
end
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ class OrderSummarySetCustomisePdf < Prawn::Document
|
||||
|
||||
end
|
||||
|
||||
bounding_box([self.item_width,y_position], :width => self.qty_width) do
|
||||
bounding_box([self.item_width - 5,y_position], :width => self.qty_width) do
|
||||
text "[#{number_with_precision(odi.qty, :precision => precision.to_i)}]", :size => self.item_font_size,:align => :left
|
||||
end
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ class OrderSummarySlimCustomisePdf < Prawn::Document
|
||||
|
||||
end
|
||||
|
||||
bounding_box([self.item_width,y_position], :width => self.qty_width) do
|
||||
bounding_box([self.item_width - 5,y_position], :width => self.qty_width) do
|
||||
text "[#{number_with_precision(odi.qty, :precision => precision.to_i)}]", :size => self.item_font_size,:align => :left
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user