Code cleanup.

This commit is contained in:
James Cole
2015-12-28 07:12:47 +01:00
parent f263844793
commit 51b45b4ed4
22 changed files with 209 additions and 211 deletions

View File

@@ -115,16 +115,16 @@ class BillRepository implements BillRepositoryInterface
}
$set = $bill->transactionjournals()
->leftJoin(
'transactions', function (JoinClause $join) {
$join->on('transactions.transaction_journal_id', '=', 'transaction_journals.id')
->where('amount', '<', 0);
}
)
->orderBy('transaction_journals.date', 'DESC')
->orderBy('transaction_journals.order', 'ASC')
->orderBy('transaction_journals.id', 'DESC')
->get(['transaction_journals.*', 'transactions.amount as journalAmount']);
->leftJoin(
'transactions', function (JoinClause $join) {
$join->on('transactions.transaction_journal_id', '=', 'transaction_journals.id')
->where('amount', '<', 0);
}
)
->orderBy('transaction_journals.date', 'DESC')
->orderBy('transaction_journals.order', 'ASC')
->orderBy('transaction_journals.id', 'DESC')
->get(['transaction_journals.*', 'transactions.amount as journalAmount']);
$cache->store($set);
return $set;

View File

@@ -108,6 +108,7 @@ interface BudgetRepositoryInterface
/**
* @deprecated
*
* @param Budget $budget
*
* @return Carbon
@@ -116,6 +117,7 @@ interface BudgetRepositoryInterface
/**
* @deprecated
*
* @param Budget $budget
* @param Carbon $date
*

View File

@@ -53,7 +53,7 @@ class CategoryRepository extends ComponentRepository implements CategoryReposito
$cache = new CacheProperties;
$cache->addProperty('category-list');
if($cache->has()) {
if ($cache->has()) {
return $cache->get();
}

View File

@@ -46,7 +46,6 @@ class ComponentRepository
}
$entry = $object->transactionjournals()
->transactionTypes([TransactionType::WITHDRAWAL, TransactionType::DEPOSIT, TransactionType::OPENING_BALANCE])
->before($end)