Proveedores en movimientos
This commit is contained in:
@ -126,6 +126,20 @@ class Movimientos extends Ideal\Controller
|
||||
} catch (EmptyResult) {}
|
||||
return $this->withJson($response, $output);
|
||||
}
|
||||
public function findRut(ServerRequestInterface $request, ResponseInterface $response,
|
||||
Service\Contabilidad\Movimiento $movimientoService, int $rut): ResponseInterface
|
||||
{
|
||||
$output = [
|
||||
'rut' => $rut,
|
||||
'model' => null,
|
||||
'success' => false
|
||||
];
|
||||
try {
|
||||
$output['model'] = $movimientoService->findRut($rut);
|
||||
$output['success'] = true;
|
||||
} catch (EmptyResult) {}
|
||||
return $this->withJson($response, $output);
|
||||
}
|
||||
|
||||
protected function movimientosToArray(array $movimientos): array
|
||||
{
|
||||
|
Reference in New Issue
Block a user