diff --git a/app/Http/Controllers/Reports/ExpenseSummary.php b/app/Http/Controllers/Reports/ExpenseSummary.php index 2546b4b02..63f01cb1a 100644 --- a/app/Http/Controllers/Reports/ExpenseSummary.php +++ b/app/Http/Controllers/Reports/ExpenseSummary.php @@ -28,7 +28,9 @@ class ExpenseSummary extends Controller $year = request('year', Date::now()->year); // check and assign year start - if (($financial_start = Date::parse(setting('general.financial_start'))->month) != 1) { + $financial_start = Date::parse(setting('general.financial_start')); + + if ($financial_start->month != 1) { // check if a specific year is requested if (!is_null(request('year'))) { $financial_start->year = $year; diff --git a/app/Http/Controllers/Reports/IncomeExpenseSummary.php b/app/Http/Controllers/Reports/IncomeExpenseSummary.php index 50218bd1a..077511fcb 100644 --- a/app/Http/Controllers/Reports/IncomeExpenseSummary.php +++ b/app/Http/Controllers/Reports/IncomeExpenseSummary.php @@ -32,7 +32,9 @@ class IncomeExpenseSummary extends Controller $year = request('year', Date::now()->year); // check and assign year start - if (($financial_start = Date::parse(setting('general.financial_start'))->month) != 1) { + $financial_start = Date::parse(setting('general.financial_start')); + + if ($financial_start->month != 1) { // check if a specific year is requested if (!is_null(request('year'))) { $financial_start->year = $year; diff --git a/app/Http/Controllers/Reports/IncomeSummary.php b/app/Http/Controllers/Reports/IncomeSummary.php index 0051e0f1d..8273caa05 100644 --- a/app/Http/Controllers/Reports/IncomeSummary.php +++ b/app/Http/Controllers/Reports/IncomeSummary.php @@ -28,7 +28,9 @@ class IncomeSummary extends Controller $year = request('year', Date::now()->year); // check and assign year start - if (($financial_start = Date::parse(setting('general.financial_start'))->month) != 1) { + $financial_start = Date::parse(setting('general.financial_start')); + + if ($financial_start->month != 1) { // check if a specific year is requested if (!is_null(request('year'))) { $financial_start->year = $year; diff --git a/app/Http/Controllers/Reports/ProfitLoss.php b/app/Http/Controllers/Reports/ProfitLoss.php index 1b4b62abe..e99c13d41 100644 --- a/app/Http/Controllers/Reports/ProfitLoss.php +++ b/app/Http/Controllers/Reports/ProfitLoss.php @@ -28,7 +28,9 @@ class ProfitLoss extends Controller $year = request('year', Date::now()->year); // check and assign year start - if (($financial_start = Date::parse(setting('general.financial_start'))->month) != 1) { + $financial_start = Date::parse(setting('general.financial_start')); + + if ($financial_start->month != 1) { // check if a specific year is requested if (!is_null(request('year'))) { $financial_start->year = $year; diff --git a/app/Http/Controllers/Reports/TaxSummary.php b/app/Http/Controllers/Reports/TaxSummary.php index fca989aca..6185eb341 100644 --- a/app/Http/Controllers/Reports/TaxSummary.php +++ b/app/Http/Controllers/Reports/TaxSummary.php @@ -30,7 +30,9 @@ class TaxSummary extends Controller $year = request('year', Date::now()->year); // check and assign year start - if (($financial_start = Date::parse(setting('general.financial_start'))->month) != 1) { + $financial_start = Date::parse(setting('general.financial_start')); + + if ($financial_start->month != 1) { // check if a specific year is requested if (!is_null(request('year'))) { $financial_start->year = $year;