Download the PHP package webgriffe/sylius-italian-invoiceable-order-plugin without Composer

On this page you can find all versions of the php package webgriffe/sylius-italian-invoiceable-order-plugin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package sylius-italian-invoiceable-order-plugin

Italian Invoiceable Order Plugin

Sylius plugin which allows Italian merchants to collect invoice data for their orders such as tax code, VAT number, SDI code, etc... as well as allowing the merchant to only apply taxes to those customers that can (and must) pay taxes in advance.

Build Status

Installation

  1. Require the plugin:

  2. Add bundles to config/bundles.php file:

  3. Define a value for the parameter app.taxation.eu_zone_code, which must be the code of a zone representing the EU. This is used to determine if an order is invoiced to a company within the EU or not.

  4. Your Address entity must implement the Webgriffe\SyliusItalianInvoiceableOrderPlugin\Model\ItalianInvoiceableAddressInterface and the Symfony\Component\Validator\GroupSequenceProviderInterface. You can use the Webgriffe\SyliusItalianInvoiceableOrderPlugin\Model\ItalianInvoiceableAddressTrait as implementation for both interfaces.

  5. Your Order entity must implement the Webgriffe\SyliusItalianInvoiceableOrderPlugin\Model\ItalianInvoiceableOrderInterface. You can use the Webgriffe\SyliusItalianInvoiceableOrderPlugin\Model\ItalianInvoiceableOrderTrait as default implementation for the interface.

  6. You need to import the Address and Order validator configuration into your project by copying the configuration files provided by this plugin:

    Or by merging the configuration into your existing Address and Order validator configuration.

  7. Configure Sylius to use the Italian tax calculation tax calculation strategy.

  8. To properly enable group sequence validation of your Address entity you must set the Default validation group instead of the sylius validation group:

    For more information see here.

  9. Run a diff of your Doctrine's migrations and then run it:

  10. Add invoiceable address fields to your shop address form template. To do so you have to override the template:

    Then in the templates/bundles/SyliusShopBundle/Common/Form/_address.html.twig you must add the following:

    You can put the fields in the order you want but we recommend to surround them with the {% if type != 'shipping-' %} check. In this way you'll not show those fields in the shipping address section of the checkout where these fields are not relevant.

  11. Add invoiceable address fields to your admin address form template. To do so you have to override the template:

    Then in the templates/bundles/SyliusAdminBundle/Common/Form/_address.html.twig you must add the invoiceable fields. You should add those fields only if the form is bound to the billing address of an order. To do so, your template should like the following:

  12. Add invoiceable fields to the address show template for admin and shop. To do so you have to override those templates:

    And replace the printing of company, first name and last name with the invoiceable address information template provided by this plugin. Then, those templates should look like the following:

  13. Add invoiceable fields to the address book select data attributes. To do so you have to override the address book select template:

    And include the invoiceable fields data attributes template provided by this plugin:

    You have to add it in the proper location, just after the other data attributes of the address book select tag. So the whole address book template should look like the following:

Features

Once installed this plugin will allow the users of the shop to enter all the invoicing information needed by an Italian company to properly invoice the order. In addition this plugin checks the billing data of the order and uses them to decide whether the customer has to pay taxes or not.

This plugin will add the following fields to your address form:

This plugin will also require the Sylius's company field to be populated if the billing recipient type is set to company.

This plugin also replaces the Sylius's Sylius\Component\Addressing\Comparator\AddressComparatorInterface implementation by decorating it and by comparing also invoiceable fields. So different invoiceable address information provided during checkout are saved in the customer address book as new addresses.

This plugin also allows to select an invoiceable address from the address book in the checkout and properly fill the address form with all the invoicing information.

Contributing

To contribute you need to:

  1. Clone this repository into your development environment

  2. Create tests/Application/.env.local and tests/Application/.env.test.local files to customize env vars according to your specific development environment (for example the DATABASE_URL variable).

  3. Then, from the plugin's root directory, run the following commands:

  4. Now at https://127.0.0.1:8000/ you have a full Sylius testing application which runs the plugin.

Running plugin tests

After your changes you must ensure that the tests are still passing.

First setup your test database:

The current CI suite runs the following tests:

License

This library is under the MIT license. See the complete license in the LICENSE file.

Credits

Developed by Webgriffe®.


All versions of sylius-italian-invoiceable-order-plugin with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
sandwich/vies-bundle Version ^2.1
sylius/sylius Version ^1.12.9
sylius/mailer-bundle Version ^1.8 || ^2.0
symfony/webpack-encore-bundle Version ^1.15
webmozart/assert Version ^1.9
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package webgriffe/sylius-italian-invoiceable-order-plugin contains the following files

Loading the files please wait ....