mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-04 22:14:35 -04:00
Clean up
This commit is contained in:
parent
7be7d2a9da
commit
dd7edcff41
@ -21,9 +21,9 @@ use Symfony\Component\HttpFoundation\StreamedResponse;
|
|||||||
class StatementController extends Controller
|
class StatementController extends Controller
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Show the statement in the client portal.
|
* Show the statement in the client portal.
|
||||||
*
|
*
|
||||||
* @return View
|
* @return View
|
||||||
*/
|
*/
|
||||||
public function index(): View
|
public function index(): View
|
||||||
{
|
{
|
||||||
@ -31,17 +31,17 @@ class StatementController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show the raw stream of statement PDF.
|
* Show the raw stream of the PDF.
|
||||||
*
|
*
|
||||||
* @param ShowStatementRequest $request
|
* @param ShowStatementRequest $request
|
||||||
* @return StreamedResponse|JsonResponse
|
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\Routing\ResponseFactory|JsonResponse|\Illuminate\Http\Response|StreamedResponse
|
||||||
*/
|
*/
|
||||||
public function raw(ShowStatementRequest $request)
|
public function raw(ShowStatementRequest $request)
|
||||||
{
|
{
|
||||||
$pdf = $request->client()->service()->statement(
|
$pdf = $request->client()->service()->statement(
|
||||||
$request->only(['start_date', 'end_date', 'show_payments_table', 'show_aging_table'])
|
$request->only(['start_date', 'end_date', 'show_payments_table', 'show_aging_table'])
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($pdf && $request->query('download')) {
|
if ($pdf && $request->query('download')) {
|
||||||
return response()->streamDownload(function () use ($pdf) {
|
return response()->streamDownload(function () use ($pdf) {
|
||||||
echo $pdf;
|
echo $pdf;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user