Skip to content

Commit

Permalink
filter issue in report printing fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
CihanSenturk committed Oct 18, 2023
1 parent 738fbd8 commit a6965c6
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions app/Abstracts/Report.php
Expand Up @@ -596,12 +596,18 @@ public function getUrl($action = 'print')
{
$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;
}

Expand Down

0 comments on commit a6965c6

Please sign in to comment.