Skip to content

Commit

Permalink
close#702 Fixed:Unopened report pages in Php version 5.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Batuhan Baş committed Dec 27, 2018
1 parent ee54db8 commit 63118af
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion app/Http/Controllers/Reports/ExpenseSummary.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function index()
$year = request('year', Date::now()->year);

// check and assign year start
if (($financial_start = Date::parse(setting('general.financial_start')))->month != 1) {
if (($financial_start = Date::parse(setting('general.financial_start'))->month) != 1) {
// check if a specific year is requested
if (!is_null(request('year'))) {
$financial_start->year = $year;
Expand Down
19 changes: 11 additions & 8 deletions app/Http/Controllers/Reports/IncomeExpenseSummary.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,20 @@ public function index()

$status = request('status');
$year = request('year', Date::now()->year);

// check and assign year start
if (($financial_start = Date::parse(setting('general.financial_start')))->month != 1) {
// check if a specific year is requested
if (!is_null(request('year'))) {
$financial_start->year = $year;
//if (($financial_start = Date::parse(setting('general.financial_start')))->month != 1) {
if (($financial_start = Date::parse(setting('general.financial_start'))->month) != 1) {
// check if a specific year is requested
if (!is_null(request('year'))) {
$financial_start->year = $year;
}

$year = [$financial_start->format('Y'), $financial_start->addYear()->format('Y')];
$financial_start->subYear()->subMonth();
}

$year = [$financial_start->format('Y'), $financial_start->addYear()->format('Y')];
$financial_start->subYear()->subMonth();
}


$categories_filter = request('categories');

Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/Reports/IncomeSummary.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function index()
$year = request('year', Date::now()->year);

// check and assign year start
if (($financial_start = Date::parse(setting('general.financial_start')))->month != 1) {
if (($financial_start = Date::parse(setting('general.financial_start'))->month) != 1) {
// check if a specific year is requested
if (!is_null(request('year'))) {
$financial_start->year = $year;
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/Reports/ProfitLoss.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function index()
$year = request('year', Date::now()->year);

// check and assign year start
if (($financial_start = Date::parse(setting('general.financial_start')))->month != 1) {
if (($financial_start = Date::parse(setting('general.financial_start'))->month) != 1) {
// check if a specific year is requested
if (!is_null(request('year'))) {
$financial_start->year = $year;
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/Reports/TaxSummary.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function index()
$year = request('year', Date::now()->year);

// check and assign year start
if (($financial_start = Date::parse(setting('general.financial_start')))->month != 1) {
if (($financial_start = Date::parse(setting('general.financial_start'))->month) != 1) {
// check if a specific year is requested
if (!is_null(request('year'))) {
$financial_start->year = $year;
Expand Down

0 comments on commit 63118af

Please sign in to comment.