class Api::InvoicesController < ActionController::API
  # before :authenticate_token
  # before :set_sale_params, only:[:show, :update, :destroy]

  #List open invoices for today.
  def index
    @sales = Sale.open_invoices
  end
  #Description
  # This API show current sale details
  # Input Params - ID
  def show
      @sale = Sale.find(params[:id])
  end

  #Creat Sales based on Items -
  def create
    #
  end

  #UPDATE SALES
  def update

  end

  #VOID Sale
  def destroy
    #Reason | #Approval
  end

  private
  def set_sale_params
    @sale = Sale.find(params[:id])

  end


end
