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:
parent
db81802dab
commit
ed3d148e45
@ -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) {
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user