All Projects → BeHappyCommunication → SyliusInvoicePlugin

BeHappyCommunication / SyliusInvoicePlugin

Licence: MIT license
A Plugin for Sylius to generate invoices (! deprecated, use sylius/invoicing-plugin instead)

Programming Languages

PHP
23972 projects - #3 most used programming language
HTML
75241 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to SyliusInvoicePlugin

itflow
Free and open-source web application for MSPs that streamlines IT documentation, ticketing, invoicing, and accounting, an alternative to ITGlue. It helps in managing and organizing client's IT information, increasing efficiency and profitability.
Stars: ✭ 282 (+2069.23%)
Mutual labels:  invoice
enhavo
Modern CMS with shop features based on fullstack symfony and sylius components
Stars: ✭ 80 (+515.38%)
Mutual labels:  sylius
responsive-html-email-templates
Collection of Free responsive HTML templates for Startups
Stars: ✭ 187 (+1338.46%)
Mutual labels:  invoice
CoopTilleulsSyliusClickNCollectPlugin
Sell and deliver securely during the COVID-19 pandemic!
Stars: ✭ 77 (+492.31%)
Mutual labels:  sylius
WebgriffeSyliusTableRateShippingPlugin
Sylius plugin which allows to define shipping rates using weight/rate tables.
Stars: ✭ 13 (+0%)
Mutual labels:  sylius
InvoiScript
Generate simple PDF invoices with PHP
Stars: ✭ 16 (+23.08%)
Mutual labels:  invoice
apex
Apex is a self hosted sales, purchase, inventory and accounting solution for small businesses.
Stars: ✭ 55 (+323.08%)
Mutual labels:  invoice
PayPalPlugin
Official integration with PayPal Commerce Platform
Stars: ✭ 21 (+61.54%)
Mutual labels:  sylius
ZUGFeRD-csharp
C# assembly for creating and reading ZUGFeRD invoices
Stars: ✭ 73 (+461.54%)
Mutual labels:  invoice
SyliusSchedulerCommandPlugin
Schedule Symfony Commands in your Sylius
Stars: ✭ 25 (+92.31%)
Mutual labels:  sylius
arc
Fullstack open source Invoicing application made with MongoDB, Express, React & Nodejs (MERN)
Stars: ✭ 1,291 (+9830.77%)
Mutual labels:  invoice
invoice-generator-api
A free API for generating invoice PDFs and e-Invoices.
Stars: ✭ 350 (+2592.31%)
Mutual labels:  invoice
SyliusCustomOptionsPlugin
A Sylius plugin that adds customer options
Stars: ✭ 42 (+223.08%)
Mutual labels:  sylius
xsender
Java library for sending XML files through SOAP - SUNAT
Stars: ✭ 15 (+15.38%)
Mutual labels:  invoice
konik
A library to create, read and validate ZUGFeRD compliant invoices. Available for Java and .NET
Stars: ✭ 40 (+207.69%)
Mutual labels:  invoice
SyliusCmsPagePlugin
A Sylius plugin to manage your CMS pages
Stars: ✭ 26 (+100%)
Mutual labels:  sylius
SyliusMolliePlugin
Sylius Mollie payment gateway integration.
Stars: ✭ 1 (-92.31%)
Mutual labels:  sylius
openstamanager
Il software gestionale open source per l'assistenza tecnica e la fatturazione
Stars: ✭ 71 (+446.15%)
Mutual labels:  invoice
veryfi-go
Go module for communicating with the Veryfi OCR API
Stars: ✭ 18 (+38.46%)
Mutual labels:  invoice
BootstrapTheme
Sylius Bootstrap theme with build process based on Webpack Encore
Stars: ✭ 85 (+553.85%)
Mutual labels:  sylius

sylius-invoice

A Plugin for Sylius to generate invoices

Installation-procedure

$ composer require behappy/invoice-plugin

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

// in app/AppKernel.php
public function registerBundles() {
	$bundles = array(
		// ...
        new Knp\Bundle\SnappyBundle\KnpSnappyBundle(),
		
        new \BeHappy\SyliusCompanyDataPlugin\BeHappySyliusCompanyDataPlugin(),
        new \BeHappy\SyliusInvoicePlugin\BeHappySyliusInvoicePlugin(),
    );
    // ...
}
#in app/config/config.yml
imports:
    ...
    - { resource: "@BeHappySyliusCompanyDataPlugin/Resources/config/config.yml" }
    - { resource: "@BeHappySyliusInvoicePlugin/Resources/config/config.yml" }
    ...
# in routing.yml
...
behappy_company_data_plugin:
    resource: '@BeHappySyliusCompanyDataPlugin/Resources/config/routing.yml'

behappy_invoice_plugin.admin:
    resource: '@BeHappySyliusInvoicePlugin/Resources/config/routes/admin.yml'
    prefix: /admin

behappy_invoice_plugin.shop:
    resource: '@BeHappySyliusInvoicePlugin/Resources/config/routes/shop.yml'
    prefix: /{_locale}/account
    requirements:
        _locale: ^[a-z]{2}(?:_[A-Z]{2})?$
...

Generate database

Simply launch

php bin/console doctrine:schema:update --dump-sql --force

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 :

php bin/console behappy:invoices:generate

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 :

# in app/config.yml
parameters:
    ...
    behappy_invoice_plugin.invoice_number.length: 14
    ...

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.

behappy_invoice_plugin.event.invoice.pre_create
behappy_invoice_plugin.event.invoice.post_create

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].