Download the PHP package behappy/invoice-plugin without Composer

On this page you can find all versions of the php package behappy/invoice-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 invoice-plugin

sylius-invoice

A Plugin for Sylius to generate invoices

Installation-procedure

Informations

This plugin use Knp Snappy Bundle. Please refer to it's documentation for wkhtmltopdf installation (https://github.com/KnpLabs/snappy)

Enable the plugin

Enable those plugins in AppKernel

Generate database

Simply launch

You might have tables referring to BeHappySyliusCompanyDataPlugin if you did not enabled it before requiring this plugin

Optional : generate invoices

In order to have invoices for previously placed orders, you can run this command :

This command will generate invoices for all orders in state FULFILLED with no invoices attached

That's it !

From now on, each and every time an order is fulfilled, the event listener will create a new invoice and copy (if needed) company data information into a separate table to make them static.

A new block is also displayed in admin under the shipment section of orders that have an invoice linked.

In the account section for your customers, a link is also displayed for every invoice linked to their orders.

Configuration

Invoice number

By default, invoices will be generated with a 12 digits number filled with 0 (str_pad(12, '0', STR_PAD_LEFT))

You can redefine this length definition by overriding this :

Now every invoice will be 14 digits long.

In a near future, this plugin will use a number generator that you'll be free to override according to your needs.

Events

During the invoice creation, 2 events are fired with the order as argument.

You can subscribe to those events and do whatever you need

Override

In order to override the pdf template file, you simply have to create the following file : app/Resources/BeHappySyliusInvoicePlugin/views/Invoice/pdf.html.twig

Thanks

This plugin is partially inspired by BitBagCommerce/SyliusInvoicingPlugin (https://github.com/BitBagCommerce/SyliusInvoicingPlugin).

Feel free to contribute

You can also ask your questions at the mail address in the composer.json mentioning this package.

Other

You can also check our other packages (including Sylius plugins) at https://github.com/BeHappyCommunication


All versions of invoice-plugin with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1
sylius/sylius Version ^1.1
knplabs/knp-snappy-bundle Version ^1.5
behappy/company-data-plugin Version ^1.0.1
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 behappy/invoice-plugin contains the following files

Loading the files please wait ....