From a6965c6ddd5a3fe8240492fcee9093ff690daf1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cihan=20=C5=9Eent=C3=BCrk?= <53110792+CihanSenturk@users.noreply.github.com> Date: Wed, 18 Oct 2023 14:23:04 +0300 Subject: [PATCH] filter issue in report printing fixed --- app/Abstracts/Report.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/app/Abstracts/Report.php b/app/Abstracts/Report.php index 9a19ab320..80a157af1 100644 --- a/app/Abstracts/Report.php +++ b/app/Abstracts/Report.php @@ -596,12 +596,18 @@ abstract class Report { $url = company_id() . '/common/reports/' . $this->model->id . '/' . $action; - $search = request('search'); + $request = request()->all(); + $parameters = ''; - if (!empty($search)) { - $url .= '?search=' . $search; + foreach ($request as $key => $value) { + $parameters .= empty($parameters) ? ('?' . $key . '=' . $value) : ('&' . $key . '=' . $value); } + if (!empty($parameters)) { + $url .= $parameters; + } + + return $url; }