-
This commit is contained in:
@@ -34,6 +34,8 @@ class BaseReportController < ActionController::Base
|
||||
if params[:from].present? && params[:to].present?
|
||||
from = Time.parse(params[:from])
|
||||
to = Time.parse(params[:to])
|
||||
puts "from - to<<<<<<<<<<<<<<<<<<<<"
|
||||
puts "#{from},#{to}"
|
||||
else
|
||||
case period.to_i
|
||||
when PERIOD["today"]
|
||||
|
||||
@@ -86,7 +86,7 @@ class Inventory::InventoryDefinitionsController < BaseInventoryController
|
||||
inventory = InventoryDefinition.find_by_item_code(params[:item_code])
|
||||
@inventory_definition.destroy
|
||||
respond_to do |format|
|
||||
format.html { redirect_to inventory_definitions_url, notice: 'Inventory definition was successfully destroyed.' }
|
||||
format.html { redirect_to inventory_inventory_definitions_url, notice: 'Inventory definition was successfully destroyed.' }
|
||||
format.json { head :no_content }
|
||||
end
|
||||
|
||||
|
||||
@@ -22,6 +22,13 @@ class Origami::FoodCourtController < ApplicationController
|
||||
@tables = Table.all.active.order('status desc')
|
||||
@rooms = Room.all.active.order('status desc')
|
||||
@cashier_type = "food_court"
|
||||
display_type = Lookup.find_by_lookup_type("display_type")
|
||||
if !display_type.nil? && display_type.value.to_i ==2
|
||||
@display_type = display_type.value
|
||||
else
|
||||
@display_type = nil
|
||||
end
|
||||
|
||||
#checked quick_service only
|
||||
@quick_service_only = true
|
||||
lookup_dine_in = Lookup.collection_of('dinein_cashier')
|
||||
|
||||
@@ -5,6 +5,9 @@ class Reports::HourlySaleitemController < BaseReportController
|
||||
@account = Account.all
|
||||
from, to = get_date_range_from_params
|
||||
|
||||
@start_time = params[:start_time]
|
||||
@end_time = params[:end_time]
|
||||
|
||||
shift_sale_range = ''
|
||||
|
||||
shift = ''
|
||||
@@ -24,9 +27,10 @@ class Reports::HourlySaleitemController < BaseReportController
|
||||
end
|
||||
end
|
||||
|
||||
filter = params[:filter]
|
||||
account_type = params[:account_type]
|
||||
@type = params[:sale_type]
|
||||
@sale_data, @other_charges,@product, @discount_data , @cash_data , @card_data , @credit_data , @foc_data , @grand_total , @change_amount = Sale.get_by_hourly_items(shift_sale_range,shift, from, to, Sale::SALE_STATUS_COMPLETED,@type,account_type)
|
||||
@sale_data, @other_charges,@product, @discount_data , @cash_data , @card_data , @credit_data , @foc_data , @grand_total , @change_amount = Sale.get_by_hourly_items(shift_sale_range,shift, from, to, Sale::SALE_STATUS_COMPLETED,@type,account_type,filter,@start_time,@end_time)
|
||||
|
||||
@sale_taxes = Sale.get_separate_tax(shift_sale_range,shift,from,to,nil)
|
||||
|
||||
@@ -57,7 +61,7 @@ class Reports::HourlySaleitemController < BaseReportController
|
||||
# @hourly_total_qty = @sale_data.group_by {|s| s.date_format }.collect{|key,qty| {"date" => key , "total_qty" => qty.sum{|d| d.qty.to_i}}}
|
||||
@hourly_total_qty = @sale_data.group_by(&:date_format).map { |k,v|{"date" => k , "total_qty" => v.count }}
|
||||
|
||||
|
||||
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.xls
|
||||
|
||||
Reference in New Issue
Block a user