20 lines
539 B
Ruby
Executable File
20 lines
539 B
Ruby
Executable File
class Reports::WasteAndSpoilageController < BaseReportController
|
|
authorize_resource :class => false
|
|
def index
|
|
from, to = get_date_range_from_params
|
|
@sale_type = params[:sale_type]
|
|
@sale_data = Sale.get_wastes_and_spoilages(from,to,@sale_type).where("sales.shop_code='#{@shop.shop_code}'")
|
|
@from = from
|
|
@to = to
|
|
# get printer info
|
|
@print_settings = PrintSetting.get_precision_delimiter()
|
|
|
|
respond_to do |format|
|
|
format.html
|
|
format.xls
|
|
end
|
|
end
|
|
|
|
|
|
end
|