GetFundListAndStatsController
extends AbstractController
in package
API action controller returning the list of a POS's fund movements along with the aggregated balances (inflows, outflows and net balance).
Table of Contents
Methods
- __invoke() : JsonResponse
- Returns the funds and statistics of the requested point of sale.
Methods
__invoke()
Returns the funds and statistics of the requested point of sale.
public
__invoke(EntityManagerInterface $entityManager, Request $request) : JsonResponse
The POS is provided via the "pos" query parameter. The net balance is computed as the difference between the sum of inflows (type ENTRER) and the sum of outflows (type SORTIE).
Parameters
- $entityManager : EntityManagerInterface
-
Doctrine entity manager.
- $request : Request
-
HTTP request carrying the "pos" parameter.
Return values
JsonResponse —Serialized funds (group "fund:read") and balances; 400 if the parameter is missing, 500 on error.