SaleItemsPdf updated
This commit is contained in:
@@ -140,8 +140,6 @@ class Reports::SaleitemController < BaseReportController
|
||||
printer.print_sale_items_report(print_settings, shop_details, period_name, @type, account_type, from, to, shift_name, @sale_data, @total_other_charges)
|
||||
end
|
||||
|
||||
|
||||
|
||||
respond_to do |format|
|
||||
format.html { redirect_to '/en/reports/saleitem/', notice: 'Printing Completed.'}
|
||||
format
|
||||
|
||||
@@ -84,11 +84,11 @@ class Printer::CashierStationPrinter < Printer::PrinterWorker
|
||||
def print_sale_items_report(print_settings, shop_details, period_name, type, account, from_date, to_date, shift_name, sale_items, total_other_charges)
|
||||
filename = "tmp/reports_sale_items.pdf"
|
||||
|
||||
if print_settings.unique_code == "CloseCashierPdf"
|
||||
if print_settings.unique_code == "SaleItemsPdf"
|
||||
pdf = SaleItemsPdf.new(print_settings, shop_details, period_name, type, account, from_date, to_date, shift_name, sale_items, total_other_charges, nil, nil, nil)
|
||||
puts 'Printing!!!!'
|
||||
end
|
||||
if print_settings.unique_code == "CloseCashierStarPdf"
|
||||
if print_settings.unique_code == "SaleItemsStarPdf"
|
||||
pdf = SaleItemsStarPdf.new(print_settings, shop_details, period_name, type, account, from_date, to_date, shift_name, sale_items, total_other_charges, nil, nil, nil)
|
||||
puts 'PrintingStar!!!!'
|
||||
end
|
||||
|
||||
@@ -1016,7 +1016,8 @@ def self.get_item_query(type)
|
||||
query = query.joins(" JOIN accounts acc ON acc.id = i.account_id")
|
||||
query = query.where("#{sale_type}")
|
||||
query = query.group("acc.title,i.account_id,i.menu_category_code,i.item_instance_code,i.product_name,i.unit_price")
|
||||
.order("acc.title desc, i.account_id desc, i.menu_category_code desc, i.unit_price asc")
|
||||
.order("acc.title desc, i.account_id desc, SUM(i.qty) desc, i.menu_category_code desc, i.unit_price asc")
|
||||
# query = query.order("SUM(i.qty) desc")
|
||||
end
|
||||
|
||||
def self.get_other_charges()
|
||||
|
||||
Reference in New Issue
Block a user