add star printer setting

This commit is contained in:
NyanLinHtut
2019-05-31 15:39:21 +06:30
parent 62d571a6a7
commit bd55069c2d
9 changed files with 346 additions and 72 deletions

View File

@@ -151,7 +151,7 @@ class SaleItemsPdf < Prawn::Document
sale_items.each do |item|
if !arr.include?(item['menu_category_id'])
unless total_qty == 0 and sub_total == 0
total_details('Sub Total', total_qty, sub_total)
end
@@ -193,7 +193,7 @@ class SaleItemsPdf < Prawn::Document
text_box "#{item['total_item'].to_i}", :at =>[item_label_qty_front_width,y_position], :width => item_label_qty_end_width, :height =>self.item_height, :size => self.item_font_size, :align => :center, :overflow => :shrink_to_fix
text_box "#{item['grand_total'].to_i}", :at =>[item_label_total_front_width,y_position], :width => item_label_total_end_width, :height =>self.item_height, :size => self.item_font_size, :align => :right, :overflow => :shrink_to_fix
}
if item['total_item'].to_i > 0
total_qty += item['total_item'].to_i
total_items += item['total_item'].to_i
@@ -209,7 +209,7 @@ class SaleItemsPdf < Prawn::Document
move_down 5
total_details('Total Amount', total_items, total_amount)
move_down 10
end
end
end
def total_details(col_name, total_qty, sub_total)
@@ -230,4 +230,4 @@ class SaleItemsPdf < Prawn::Document
}
end
end
end