mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-31 05:54:38 -04:00
Static analysis
This commit is contained in:
parent
c0bd70454e
commit
73274f545a
@ -42,10 +42,14 @@ class ShowChartRequest extends Request
|
|||||||
|
|
||||||
public function prepareForValidation()
|
public function prepareForValidation()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/**@var \App\Models\User auth()->user */
|
||||||
|
$user = auth()->user();
|
||||||
|
|
||||||
$input = $this->all();
|
$input = $this->all();
|
||||||
|
|
||||||
if(isset($input['date_range'])) {
|
if(isset($input['date_range'])) {
|
||||||
$dates = $this->calculateStartAndEndDates($input, auth()->user()->company());
|
$dates = $this->calculateStartAndEndDates($input, $user->company());
|
||||||
$input['start_date'] = $dates[0];
|
$input['start_date'] = $dates[0];
|
||||||
$input['end_date'] = $dates[1];
|
$input['end_date'] = $dates[1];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user