This commit is contained in:
denisdulici
2018-12-31 14:41:17 +03:00
parent a702d1ccba
commit 09366fa243
11 changed files with 85 additions and 26 deletions

View File

@ -10,11 +10,14 @@ use App\Models\Expense\Payment;
use App\Models\Expense\Vendor;
use App\Models\Setting\Category;
use App\Utilities\Recurring;
use App\Traits\DateTime;
use Charts;
use Date;
class ExpenseSummary extends Controller
{
use DateTime;
/**
* Display a listing of the resource.
*
@ -28,7 +31,7 @@ class ExpenseSummary extends Controller
$year = request('year', Date::now()->year);
// check and assign year start
$financial_start = Date::parse(setting('general.financial_start'));
$financial_start = $this->getFinancialStart();
if ($financial_start->month != 1) {
// check if a specific year is requested

View File

@ -14,11 +14,14 @@ use App\Models\Expense\Payment;
use App\Models\Expense\Vendor;
use App\Models\Setting\Category;
use App\Utilities\Recurring;
use App\Traits\DateTime;
use Charts;
use Date;
class IncomeExpenseSummary extends Controller
{
use DateTime;
/**
* Display a listing of the resource.
*
@ -32,19 +35,17 @@ class IncomeExpenseSummary extends Controller
$year = request('year', Date::now()->year);
// check and assign year start
$financial_start = Date::parse(setting('general.financial_start'));
$financial_start = $this->getFinancialStart();
if ($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();
// 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();
}
$categories_filter = request('categories');

View File

@ -10,11 +10,14 @@ use App\Models\Income\InvoicePayment;
use App\Models\Income\Revenue;
use App\Models\Setting\Category;
use App\Utilities\Recurring;
use App\Traits\DateTime;
use Charts;
use Date;
class IncomeSummary extends Controller
{
use DateTime;
/**
* Display a listing of the resource.
*
@ -28,7 +31,7 @@ class IncomeSummary extends Controller
$year = request('year', Date::now()->year);
// check and assign year start
$financial_start = Date::parse(setting('general.financial_start'));
$financial_start = $this->getFinancialStart();
if ($financial_start->month != 1) {
// check if a specific year is requested

View File

@ -10,11 +10,14 @@ use App\Models\Expense\Bill;
use App\Models\Expense\BillPayment;
use App\Models\Expense\Payment;
use App\Models\Setting\Category;
use App\Traits\DateTime;
use Charts;
use Date;
class ProfitLoss extends Controller
{
use DateTime;
/**
* Display a listing of the resource.
*
@ -28,7 +31,7 @@ class ProfitLoss extends Controller
$year = request('year', Date::now()->year);
// check and assign year start
$financial_start = Date::parse(setting('general.financial_start'));
$financial_start = $this->getFinancialStart();
if ($financial_start->month != 1) {
// check if a specific year is requested

View File

@ -11,11 +11,12 @@ use App\Models\Income\InvoicePayment;
use App\Models\Income\InvoiceTotal;
use App\Models\Setting\Tax;
use App\Traits\Currencies;
use App\Traits\DateTime;
use Date;
class TaxSummary extends Controller
{
use Currencies;
use Currencies, DateTime;
/**
* Display a listing of the resource.
@ -30,7 +31,7 @@ class TaxSummary extends Controller
$year = request('year', Date::now()->year);
// check and assign year start
$financial_start = Date::parse(setting('general.financial_start'));
$financial_start = $this->getFinancialStart();
if ($financial_start->month != 1) {
// check if a specific year is requested