Skip to content

Commit

Permalink
[Docs][Book] Invoices
Browse files Browse the repository at this point in the history
  • Loading branch information
CoderMaggie committed Oct 8, 2019
1 parent 2103607 commit e036ae3
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 0 deletions.
Binary file added docs/_images/invoice.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/order_invoices.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/shop_billing_data.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/book/orders/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ with a few additional ones, like promotions, payments, shipments or checkout in
coupons
shipments
payments
invoices
checkout
refunds

Expand Down
72 changes: 72 additions & 0 deletions docs/book/orders/invoices.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
.. index::
single: Invoices

.. rst-class:: plugin-feature

Invoices
========

An Invoice is a commercial document issued by the shop, that is a sort of confirmation of the sale transaction. It indicates the
products, quantities, agreed prices for these products. An invoice contains usually also payment terms (like due date,
or if it was already paid). From the shop's point of view, an invoice is a sales invoice. From the customer's point of view,
an invoice is a purchase invoice.

Invoicing in Sylius
-------------------

Sylius is providing invoicing engine via a `free open-source plugin. <https://github.com/Sylius/InvoicingPlugin>`_
Th plugin installation guide you will find in the plugin's README.

Having the plugin installed you will notice a new main menu item among "Sales" section - "Invoices". It allows you to acces the index
of all invoices issued at your shop (sortable and with filters as most of the grids).

Moreover a section on admin Order show page is added: Invoices. This same section will appear also
on the Order show page for customers in the shop.

.. image:: ../../_images/order_invoices.png
:align: center
:scale: 70%

|
When is the Invoice issued?
~~~~~~~~~~~~~~~~~~~~~~~~~~~

The invoices are generated by default **when the Order is placed** (so after the customer clicks the Confirm button at the end of checkout).
After that the Invoice is already downloadable for both the Admin and Customer.

.. tip::

In order to customize the moment when the Invoice is generated, you will need to override the logic around
`a specific event listener and the OrderPlacedProducer. <https://github.com/Sylius/InvoicingPlugin/blob/master/src/Resources/config/services/events.xml#L13:L23>`

Sending and downloading Invoices
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Sending invoice is an action separate from its generation.
By default the Invoice is sent to customer **when the Order's payment is paid**.

Of course you can customize it by overriding a part of configuration placed in config.yml file.
You can customize this file by adding new state machine event listeners or editing existing ones.

Shop Billing Data
~~~~~~~~~~~~~~~~~

The Invoicing plugin for the invoicing sake is using a feature of Sylius Channels.
Each channel has a separate section for providing billing data of the shop, that will be placed on the invoice.

.. image:: ../../_images/shop_billing_data.png
:align: center
:scale: 70%

|
.. image:: ../../_images/invoice.png
:align: center
:scale: 70%

Learn more
----------

* `Sylius/InvoicingPlugin <https://github.com/Sylius/InvoicingPlugin>`_
* :doc:`Other Sylius plugins </book/plugins/index>`
1 change: 1 addition & 0 deletions docs/book/orders/map.rst.inc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* :doc:`/book/orders/promotions`
* :doc:`/book/orders/coupons`
* :doc:`/book/orders/payments`
* :doc:`/book/orders/invoices`
* :doc:`/book/orders/shipments`
* :doc:`/book/orders/checkout`
* :doc:`/book/orders/refunds`

0 comments on commit e036ae3

Please sign in to comment.