not show price 0 fixed

This commit is contained in:
Yan
2017-06-27 11:52:51 +06:30
parent 08e98409a5
commit e38886790c
10 changed files with 61 additions and 37 deletions

View File

@@ -87,7 +87,7 @@ class OrderSummaryPdf < Prawn::Document
order_item.each do|odi|
# check for item not to show
if odi.price == 0 || odi.price == 10
if odi.price != 0
y_position = cursor
bounding_box([0,y_position], :width => self.item_width) do
@@ -105,13 +105,15 @@ class OrderSummaryPdf < Prawn::Document
if options != ""
y_position = cursor
bounding_box([0,y_position], :width => self.item_width, :height => self.item_height) do
bounding_box([0,y_position], :width => self.item_width) do
text "#{options}", :size => self.item_font_size,:align => :left
end
move_down 5
end
move_down 5
dash(1, :space => 1, :phase => 1)
stroke_horizontal_line 0, (self.page_width - self.margin)
move_down 5