Manage italian billing address requirements in Solidus! Mamma mia!
This extension adds some new attributes to billing address form in solidus_frontend
, like:
- VAT number
- Personal tax code (e.g. "Codice fiscale" in Italy)
- Billing email (e.g. "PEC Address" in Italy)
- Electroning invoicing code (e.g. "Codice destinatario fatturazione elettronica" in Italy)
It also validates the presence of customer last name.
Billing address for a private customer
Billing address for a business customer
Shipping address (no need for billing only attributes)
Add solidus_billing_address to your Gemfile:
gem 'solidus_billing_address'
Bundle your dependencies and run the installation generator:
bundle
bundle exec rails g solidus_billing_address:install
I usually test with PostgreSQL locally. For this to work, you need a role named postgres
. If you don't have it, you can create a superuser role with
createuser -s postgres
Bundle your dependencies, then run rake
. rake
will default to building the dummy app if it does not exist, then it will run specs, and Rubocop static code analysis. The dummy app can be regenerated by using rake test_app
.
bundle
DB=postgres bundle exec rake
You can also test against a specific solidus branch with:
SOLIDUS_BRANCH=v2.9 DB=postgres bundle exec rake
When testing your application's integration with this extension you may use its factories. Simply add this require statement to your spec_helper:
require 'solidus_billing_address/factories'
Your new extension version can be released using gem-release
like this:
bundle exec gem bump -v VERSION --tag --push --remote upstream && gem release
made with ❤️ and ☕️ by weLaika
Copyright (c) 2019 weLaika, released under the New BSD License