Taxedo is a small tool to easily calculate sales tax for different regions.
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
data
languages
lib
spec
.gitignore
.travis.yml
Gemfile
LICENSE
README.md
Rakefile
taxedo.gemspec

README.md

Taxedo Build Status

Taxedo is a small tool to easily calculate sales tax for different regions. It also provide helper methods to generate html, text or json reports.

Install

gem install taxedo

Rails 3

In your Gemfile:

gem 'taxedo'

Usage

Taxedo.tax_for 'quebec', 1000

Rails 3

Taxedo gives you access to a helper method tax_for in the controller and in the views. This is the same thing as calling Taxedo.tax_for.

tax_for 'quebec', 1000, format: :html

Parameters

  • region: Region of the tax. See regions documentation.
  • amount: Amount in cents.
  • options: Set of options. See below.

Options

  • format: Format of the output ( hash, html, json, text ).
  • on: Date parameter. Taxedo should use tax rate active for a particular date.
  • html_options: hash of options for the html output
    • template: HTML Template for the output ( lines, rows, table ).
    • columns: Number of colspan in the row. Only available with the ouput rows.
    • custom_content: Content of the first column. Only availabie with the output rows.

Copyright

Copyright (c) 2012 De Marque inc. See LICENSE for further details.