Merge pull request #3072 from CihanSenturk/fix-report-print-filter-issue

Filter issue in report printing fixed
This commit is contained in:
Cüneyt Şentürk 2023-10-18 15:15:26 +03:00 committed by GitHub
commit 3c582c7ffd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 3 deletions

View File

@ -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;
}