class Foodcourt::DashboardController < BaseFoodcourtController
  def get_all_menu
      @menus = Menu.includes(:menu_categories => {:menu_items => :menu_item_instances}).includes(:menu_categories => {:menu_items => :item_sets }).active
      @item_attributes = MenuItemAttribute.all.load
      @item_options = MenuItemOption.all.load
  end

  def get_credit_sales
    credit_sales = SalePayment.get_credit_sales(params)
    if !credit_sales.nil?
      result = {:status=> true, :data=> credit_sales }
    else
      result = {:status=> false, :message=>"There is no record." }
    end

    render :json => result.to_json
  end
end
