Add the quick sales report

Quick sales of a period by cash day, product, seller and VAT rate, with
credits, open cash days flagged, a chart by day or month and CSV. VAT is
taken out of each day's total of a rate, as on the cash day balance.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
2026-11-25 08:44:20 +02:00
co-authored by Claude Sonnet 5.5
parent a57b383e4d
commit 568871c9dc
19 changed files with 748 additions and 2 deletions
@@ -0,0 +1,23 @@
<?php
namespace App\Modules\Reports\Infrastructure\Adapters;
use App\Modules\Reports\Application\Contracts\ReportSales;
use App\Modules\Reports\Application\DTOs\SalesData;
use App\Modules\Reports\Domain\ValueObjects\ReportPeriod;
use App\Modules\Sales\Application\Contracts\QuickSaleReportQueries;
/**
* Quick sales for reports through the Sales module.
*/
class SalesForReports implements ReportSales
{
public function __construct(private QuickSaleReportQueries $queries) {}
public function between(ReportPeriod $period): SalesData
{
$sales = $this->queries->between($period->from, $period->to);
return new SalesData($sales->days, $sales->products, $sales->sellers, $sales->dayVatTotals);
}
}