From a3e8509ea568af15aa5e0dbe4ede94bf79288b9c Mon Sep 17 00:00:00 2001 From: NyanLinHtut Date: Thu, 30 May 2019 14:04:46 +0630 Subject: [PATCH] fixed report print --- app/controllers/reports/shiftsale_controller.rb | 5 +---- app/models/sale.rb | 3 ++- app/views/reports/shiftsale/index.html.erb | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/app/controllers/reports/shiftsale_controller.rb b/app/controllers/reports/shiftsale_controller.rb index 27645d83..0a969ca0 100755 --- a/app/controllers/reports/shiftsale_controller.rb +++ b/app/controllers/reports/shiftsale_controller.rb @@ -52,14 +52,11 @@ class Reports::ShiftsaleController < BaseReportController shift_id = params[:id] @shift = ShiftSale.find_by_id(shift_id) shift_obj = ShiftSale.where('id =?',shift_id) - puts "shift obj!!!!!" - puts shift_obj.to_json + if ENV["SERVER_MODE"] != "cloud" #no print in cloud server close_cashier_pdf = Lookup.collection_of("print_settings") - puts "close !!!!" - puts close_cashier_pdf unique_code = "CloseCashierPdf" diff --git a/app/models/sale.rb b/app/models/sale.rb index 21836a6f..40518815 100644 --- a/app/models/sale.rb +++ b/app/models/sale.rb @@ -959,7 +959,8 @@ def self.get_by_shiftsales(from,to,shift) :credit_sales => shift_sale.credit_sales, :other_sales => shift_sale.other_sales.to_f, :foc_sales => foc, - :grand_total => shift_sale.grand_total + :grand_total => shift_sale.grand_total, + :shift_id => shift_sale.id } end diff --git a/app/views/reports/shiftsale/index.html.erb b/app/views/reports/shiftsale/index.html.erb index 2db05f6e..40f928f9 100755 --- a/app/views/reports/shiftsale/index.html.erb +++ b/app/views/reports/shiftsale/index.html.erb @@ -65,7 +65,7 @@ <%= t("views.right_panel.detail.grand_total") %> - Print + Action