The aim of this gem is to provide goodies for developers that are dealing with typical Italian business problem with rails 3. Any help will be more than welcome.
Add the following line to your Gemfile:
gem 'italian_job', :git=>'git://github.com/lucapette/italian_job'
if you want use the latest development version.
There are two validators:
The Italian Tax code is called Codice Fiscale. For more information please take a look at http://en.wikipedia.org/wiki/Italian_fiscal_code_card.
The Italian VAT is called partita iva. For more information please take a look at http://en.wikipedia.org/wiki/Value_added_tax_identification_number.
The gem adds to the Numeric class the following methods:
In order to use them, call the activate! method at some point:
and then you can do something like:
1.9.2 (main):0 > 100.vat => 21.0 1.9.2 (main):0 > 100.vat_included => 121.0 1.9.2 (main):0 > 100.vat_excluded => 79.0
The IstatCodes module can help you handling data related to Italian cities, regions and provinces. It's a work in progress and it's tested only with Ruby 1.9.2. Please see specs for further information.
- add some helpers for Italian regions and provinces.
- comment code
- add an install generator
Copyright 2011 Luca Pette
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.