From 3444cd8dd82eedadce2d42269405c5239a530bb1 Mon Sep 17 00:00:00 2001 From: blackpidgeon Date: Mon, 9 Mar 2020 09:02:25 +0100 Subject: [PATCH] Fix typo in function name --- app/Http/Controllers/Banking/Reconciliations.php | 2 +- app/Models/Banking/Account.php | 4 ++-- app/Models/Setting/Category.php | 2 +- app/Widgets/IncomeByCategory.php | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/Http/Controllers/Banking/Reconciliations.php b/app/Http/Controllers/Banking/Reconciliations.php index 96e0b9b29..1309127f0 100644 --- a/app/Http/Controllers/Banking/Reconciliations.php +++ b/app/Http/Controllers/Banking/Reconciliations.php @@ -198,7 +198,7 @@ class Reconciliations extends Controller $total = $account->opening_balance; // Sum income transactions - $transactions = $account->income_transacions()->whereDate('paid_at', '<', $started_at)->get(); + $transactions = $account->income_transactions()->whereDate('paid_at', '<', $started_at)->get(); foreach ($transactions as $item) { $total += $item->amount; } diff --git a/app/Models/Banking/Account.php b/app/Models/Banking/Account.php index 72a9211be..fa92b774c 100644 --- a/app/Models/Banking/Account.php +++ b/app/Models/Banking/Account.php @@ -39,7 +39,7 @@ class Account extends Model return $this->transactions()->where('type', 'expense'); } - public function income_transacions() + public function income_transactions() { return $this->transactions()->where('type', 'income'); } @@ -81,7 +81,7 @@ class Account extends Model $total = $this->opening_balance; // Sum Incomes - $total += $this->income_transacions->sum('amount'); + $total += $this->income_transactions->sum('amount'); // Subtract Expenses $total -= $this->expense_transactions->sum('amount'); diff --git a/app/Models/Setting/Category.php b/app/Models/Setting/Category.php index 9d93ca0d9..b627a811a 100644 --- a/app/Models/Setting/Category.php +++ b/app/Models/Setting/Category.php @@ -32,7 +32,7 @@ class Category extends Model return $this->transactions()->where('type', 'expense'); } - public function income_transacions() + public function income_transactions() { return $this->transactions()->where('type', 'income'); } diff --git a/app/Widgets/IncomeByCategory.php b/app/Widgets/IncomeByCategory.php index 46fd72a52..ee532420a 100644 --- a/app/Widgets/IncomeByCategory.php +++ b/app/Widgets/IncomeByCategory.php @@ -15,10 +15,10 @@ class IncomeByCategory extends Widget public function show() { - Category::with('income_transacions')->type('income')->each(function ($category) { + Category::with('income_transactions')->type('income')->each(function ($category) { $amount = 0; - $this->applyFilters($category->income_transacions())->each(function ($transaction) use (&$amount) { + $this->applyFilters($category->income_transactions())->each(function ($transaction) use (&$amount) { $amount += $transaction->getAmountConvertedToDefault(); });