mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-31 22:24:34 -04: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)
|
public function statement(CreateStatementRequest $request)
|
||||||
{
|
{
|
||||||
$pdf = $request->client()->service()->statement([
|
$pdf = $request->client()->service()->statement(
|
||||||
'start_date' => $request->start_date,
|
$request->only(['start_date', 'end_date', 'show_payments_table', 'show_aging_table'])
|
||||||
'end_date' => $request->end_date,
|
);
|
||||||
]);
|
|
||||||
|
|
||||||
if ($pdf) {
|
if ($pdf) {
|
||||||
return response()->streamDownload(function () use ($pdf) {
|
return response()->streamDownload(function () use ($pdf) {
|
||||||
|
@ -42,6 +42,11 @@ class CreateStatementRequest extends Request
|
|||||||
$input = $this->decodePrimaryKeys($input);
|
$input = $this->decodePrimaryKeys($input);
|
||||||
|
|
||||||
$this->replace($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
|
public function client(): ?Client
|
||||||
|
Loading…
x
Reference in New Issue
Block a user