Fix typo in function name
This commit is contained in:
parent
58a796c2b4
commit
3444cd8dd8
@ -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;
|
||||
}
|
||||
|
@ -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');
|
||||
|
@ -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');
|
||||
}
|
||||
|
@ -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();
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user