21 lines
444 B
Ruby
21 lines
444 B
Ruby
class Reports::DailySaleController < BaseReportController
|
|
PERIOD = {
|
|
"today" => 0,
|
|
"yesterday" => 1,
|
|
"this_week" => 2,
|
|
"last_week" => 3,
|
|
"last_7" => 4,
|
|
"this_month" => 5,
|
|
"last_month" => 6,
|
|
"last_30" => 7,
|
|
"this_year" => 8,
|
|
"last_year" => 9
|
|
}
|
|
|
|
def index
|
|
from, to = get_date_range_from_params
|
|
@sale_data = Sale.get_receipt_no_list(from,to)
|
|
@sale_data = Kaminari.paginate_array(@sale_data).page(params[:page]).per(50)
|
|
end
|
|
|
|
end |