From cd5efeb91367edd5cc2bad51e540e76e356e0bce Mon Sep 17 00:00:00 2001 From: David Bomba Date: Wed, 8 Nov 2023 08:59:49 +1100 Subject: [PATCH] Request filtering for Client Statements --- .../ClientPortal/Statements/ShowStatementRequest.php | 6 +++++- app/Services/Client/Statement.php | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/Http/Requests/ClientPortal/Statements/ShowStatementRequest.php b/app/Http/Requests/ClientPortal/Statements/ShowStatementRequest.php index 01ad16230e82..4430b2655600 100644 --- a/app/Http/Requests/ClientPortal/Statements/ShowStatementRequest.php +++ b/app/Http/Requests/ClientPortal/Statements/ShowStatementRequest.php @@ -25,7 +25,11 @@ class ShowStatementRequest extends FormRequest public function rules() { return [ - // + 'start_date' => 'sometimes|nullable|date', + 'end_date' => 'sometimes|nullable|date', + 'show_payments_table' => 'sometimes|nullable|boolean', + 'show_aging_table' => 'sometimes|nullable|boolean', + 'show_credits_table' => 'sometimes|nullable|boolean', ]; } diff --git a/app/Services/Client/Statement.php b/app/Services/Client/Statement.php index 1fd06f81434e..ded85ac4b47f 100644 --- a/app/Services/Client/Statement.php +++ b/app/Services/Client/Statement.php @@ -54,6 +54,7 @@ class Statement public function run() :?string { + $this ->setupOptions() ->setupEntity();