A simple plugin to have sales reports in Sylius
| Sylius Version | PHP Version |
|---|---|
| 1.12 | 8.1 - 8.2 - 8.3 |
| 1.13 | 8.1 - 8.2 - 8.3 |
| 1.14 | 8.1 - 8.2 - 8.3 |
If you want to use our recipes, you can configure your composer.json by running:
composer config --no-plugins --json extra.symfony.endpoint '["https://api.github.com/repos/monsieurbiz/symfony-recipes/contents/index.json?ref=flex/master","flex://defaults"]'composer require monsieurbiz/sylius-sales-reports-pluginChange your config/bundles.php file to add the line for the plugin :
<?php
return [
//..
MonsieurBiz\SyliusSalesReportsPlugin\MonsieurBizSyliusSalesReportsPlugin::class => ['all' => true],
];Finally import the routes in config/routes/monsieurbiz_sylius_sales_reports_plugin.yaml :
monsieurbiz_sales_reports_plugin:
resource: "@MonsieurBizSyliusSalesReportsPlugin/Resources/config/routing.yaml"All reports columns are sortable by clicking on it.
If you want to change order or payments states used in the reports, you can configure it in the config/packages/monsieurbiz_sylius_sales_reports_plugin.yaml file:
parameters:
monsieurbiz.sales_reports.order_states:
- …
monsieurbiz.sales_reports.payment_states:
- …(FYI, is it possible to use !php/const to use constants in the config file)
An event is available to add your custom reports, see CustomReportEvent class in the plugin.
You can open an issue or a Pull Request if you want! 😘
Thank you!







