feat(payments): add customer ledgers and allocations (#744)

This commit is contained in:
Darko Gjorgjijoski
2026-08-05 03:28:35 +02:00
committed by GitHub
parent 8ae82ae91e
commit f322c2b74d
74 changed files with 5693 additions and 693 deletions
@@ -6,12 +6,14 @@ use App\Http\Controllers\Controller;
use App\Http\Resources\CustomerResource;
use App\Models\Customer;
use App\Services\CustomerService;
use App\Services\CustomerStatementService;
use Illuminate\Http\Request;
class CustomerStatsController extends Controller
{
public function __construct(
private readonly CustomerService $customerService,
private readonly CustomerStatementService $customerStatementService,
) {}
public function __invoke(Request $request, Customer $customer)
@@ -25,6 +27,7 @@ class CustomerStatsController extends Controller
);
$customer = Customer::find($customer->id);
$this->customerStatementService->hydrateAccountSummaries([$customer]);
return (new CustomerResource($customer))
->additional(['meta' => [