Sale Item Pdf added

This commit is contained in:
Zoey
2019-05-22 17:34:12 +06:30
12 changed files with 1115 additions and 197 deletions

View File

@@ -521,14 +521,15 @@ class CloseCashierPdf < Prawn::Document
total_items = 0
total_amount = 0
if !acc_cate_count.nil?
acc_cate_count.each do |key, value|
if !menu_cate_count.nil?
menu_cate_count.each do |key, value|
account = Account.find(key)
# account = Account.find(key)
menu_category = MenuCategory.where('code=?', key).last
y_position = cursor
bounding_box([0,y_position], :width =>self.page_width - 10, :height => 20) do
text "#{account.title}", :size => self.header_font_size, :align => :left
text "#{menu_category.name}", :size => self.header_font_size, :align => :left
end
move_down 5
@@ -550,7 +551,7 @@ class CloseCashierPdf < Prawn::Document
sale_items.each do |item|
if item.account_id == key
if item.menu_category_id == key
total_qty += item.total_item.to_i
sub_total += item.grand_total.to_i