mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Improvements for reports
This commit is contained in:
parent
f2456ce397
commit
468a8bfe2c
@ -11,8 +11,9 @@
|
|||||||
|
|
||||||
namespace App\Export\CSV;
|
namespace App\Export\CSV;
|
||||||
|
|
||||||
use App\Utils\Traits\MakesHash;
|
use App\Models\Client;
|
||||||
use Illuminate\Support\Carbon;
|
use Illuminate\Support\Carbon;
|
||||||
|
use App\Utils\Traits\MakesHash;
|
||||||
|
|
||||||
class BaseExport
|
class BaseExport
|
||||||
{
|
{
|
||||||
@ -28,10 +29,15 @@ class BaseExport
|
|||||||
|
|
||||||
public string $end_date = '';
|
public string $end_date = '';
|
||||||
|
|
||||||
|
public string $client_description = 'All Clients';
|
||||||
|
|
||||||
protected function filterByClients($query)
|
protected function filterByClients($query)
|
||||||
{
|
{
|
||||||
if (array_key_exists('client_id', $this->input) && $this->input['client_id'] != 'all') {
|
if (array_key_exists('client_id', $this->input) && $this->input['client_id'] != 'all') {
|
||||||
return $query->where('client_id', $this->decodePrimaryKey($this->input['client_id']));
|
|
||||||
|
$client = Client::withTrashed()->find($this->input['client_id']);
|
||||||
|
$this->client_description = $client->present()->name;
|
||||||
|
return $query->where('client_id', $this->input['client_id']);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $query;
|
return $query;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user