1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Update request body: Passing specific options

This commit is contained in:
Benjamin Beganović 2021-09-20 14:54:44 +02:00
parent db81802dab
commit ed3d148e45
2 changed files with 8 additions and 4 deletions

View File

@ -110,10 +110,9 @@ class ClientStatementController extends BaseController
public function statement(CreateStatementRequest $request)
{
$pdf = $request->client()->service()->statement([
'start_date' => $request->start_date,
'end_date' => $request->end_date,
]);
$pdf = $request->client()->service()->statement(
$request->only(['start_date', 'end_date', 'show_payments_table', 'show_aging_table'])
);
if ($pdf) {
return response()->streamDownload(function () use ($pdf) {

View File

@ -42,6 +42,11 @@ class CreateStatementRequest extends Request
$input = $this->decodePrimaryKeys($input);
$this->replace($input);
$this->merge([
'show_payments_table' => $this->has('show_payments_table') ? \boolval($this->show_payments_table) : false,
'show_aging_table' => $this->has('show_aging_table') ? \boolval($this->show_aging_table) : false,
]);
}
public function client(): ?Client