Sha256: dc1ebda963b2806dc16e1dc6c5cc30a8808533007d64f08d88188d3ae752a3f7

Contents?: true

Size: 602 Bytes

Versions: 35

Compression:

Stored size: 602 Bytes

Contents

require_dependency "tax_jp/application_controller"

module TaxJp
  class BonusWithheldTaxesController < ApplicationController
    before_action :preload_finder

    def index
      @withheld_taxes = TaxJp::WithheldTaxes::Bonus.find_all_by_date(@finder.from)
    end

    private
    
    def preload_finder
      @finder = TaxJp::Finder.new(finder_params)
      @finder.from ||= Date.today.strftime('%Y-%m-%d')
    end
  
    def finder_params
      if params[:finder].present?
        params.require(:finder).permit(:from)
      else
        {}
      end
    end

  end
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
tax_jp-1.2.11 app/controllers/tax_jp/bonus_withheld_taxes_controller.rb
tax_jp-1.2.10 app/controllers/tax_jp/bonus_withheld_taxes_controller.rb
tax_jp-1.2.9 app/controllers/tax_jp/bonus_withheld_taxes_controller.rb
tax_jp-1.2.8 app/controllers/tax_jp/bonus_withheld_taxes_controller.rb
tax_jp-1.2.7 app/controllers/tax_jp/bonus_withheld_taxes_controller.rb
tax_jp-1.2.6 app/controllers/tax_jp/bonus_withheld_taxes_controller.rb
tax_jp-1.2.5 app/controllers/tax_jp/bonus_withheld_taxes_controller.rb
tax_jp-1.2.4 app/controllers/tax_jp/bonus_withheld_taxes_controller.rb
tax_jp-1.2.3 app/controllers/tax_jp/bonus_withheld_taxes_controller.rb
tax_jp-1.2.2 app/controllers/tax_jp/bonus_withheld_taxes_controller.rb
tax_jp-1.2.1 app/controllers/tax_jp/bonus_withheld_taxes_controller.rb
tax_jp-1.2.0 app/controllers/tax_jp/bonus_withheld_taxes_controller.rb
tax_jp-1.1.12 app/controllers/tax_jp/bonus_withheld_taxes_controller.rb
tax_jp-1.1.11 app/controllers/tax_jp/bonus_withheld_taxes_controller.rb
tax_jp-1.1.10 app/controllers/tax_jp/bonus_withheld_taxes_controller.rb
tax_jp-1.1.9 app/controllers/tax_jp/bonus_withheld_taxes_controller.rb
tax_jp-1.1.8 app/controllers/tax_jp/bonus_withheld_taxes_controller.rb
tax_jp-1.1.7 app/controllers/tax_jp/bonus_withheld_taxes_controller.rb
tax_jp-1.1.6 app/controllers/tax_jp/bonus_withheld_taxes_controller.rb
tax_jp-1.1.5 app/controllers/tax_jp/bonus_withheld_taxes_controller.rb