Project

brir

0.0
No commit activity in last 3 years
No release in over 3 years
Brir provide a interface to calculate Brazilian Icome Taxes (IRPF and IRPJ)
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

>= 0
>= 0
 Project Readme

Brir

Build Status

Brir is a interface to calculate the Brazilian Income Tax (Imposto de Renda Brasileiro - IRPF & IRPJ). This gem was created to solve a unique issue that is calculate how many money the brazilians will pay to your country over your anual income.

Installation

Add this line to your application's Gemfile:

gem 'brir'

And then execute:

$ bundle

Or install it yourself as:

$ gem install brir

Usage

require 'brir'

# chose  the exercise year or leave blank to use actual year
brir = Brir.new 2012

# call tax method passing your taxable income
income_tax_value = brir.tax 42000

puts income_tax_value
#=> 3109.53

Progressive Table

This gem already have a progressive table with the following exercise years (Financial Year):

  • 2012
  • 2013
  • 2014
  • 2015

If you want to use your own Progressive Table, you must to create a YAML file into your config path. (Only for Rails Applications). The file must be like these:

2012:
  ranges:
    first:
      from: 0
      to: 18799.32
      aliquot:
      portion: 0
    second:
      from: 18799.33
      to: 28174.20
      aliquot: 7.5
      portion: 1409.95
    third:
      from: 28174.21
      to: 37566.12
      aliquot: 15
      portion: 3523.01
    fourth:
      from: 37566.13
      to: 46939.56
      aliquot: 22.5
      portion: 6340.47
    fifth:
      from: 46939.57
      to:
      aliquot: 27.5
      portion: 8687.45

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request