| 1 |
<?php |
| 2 |
|
| 3 |
namespace FluentCart\App\Modules\ReportingModule; |
| 4 |
|
| 5 |
use FluentCart\App\Services\Report\OrderReportService; |
| 6 |
|
| 7 |
class SalesReport |
| 8 |
{ |
| 9 |
/** |
| 10 |
* Get Order Sales by a date range which will contain |
| 11 |
* @return array contains |
| 12 |
*/ |
| 13 |
public function getSalesGrowth($filters = []): array |
| 14 |
{ |
| 15 |
$service = OrderReportService::make($filters) |
| 16 |
->setSelects(['id', 'type', 'customer_id', 'total_amount', 'discount_total', 'total_refund', 'created_at', 'currency']) |
| 17 |
->generate(); |
| 18 |
return ($service->getYearlySaleReport()); |
| 19 |
} |
| 20 |
} |
| 21 |
|