Code clean up.

This commit is contained in:
James Cole
2017-11-15 10:52:29 +01:00
parent aee17221eb
commit 649dca77f5
305 changed files with 1200 additions and 1600 deletions

View File

@@ -194,7 +194,6 @@ class Transaction extends Twig_Extension
$cache->store($txt);
return $txt;
}
/**
@@ -310,7 +309,8 @@ class Transaction extends Twig_Extension
/** @var TransactionModel $other */
$other = TransactionModel::where('transaction_journal_id', $journalId)->where('transactions.id', '!=', $transaction->id)
->where('amount', '=', bcmul($transaction->transaction_amount, '-1'))->where(
'identifier', $transaction->identifier
'identifier',
$transaction->identifier
)
->leftJoin('accounts', 'accounts.id', '=', 'transactions.account_id')
->leftJoin('account_types', 'account_types.id', '=', 'accounts.account_type_id')
@@ -488,7 +488,8 @@ class Transaction extends Twig_Extension
/** @var TransactionModel $other */
$other = TransactionModel::where('transaction_journal_id', $journalId)->where('transactions.id', '!=', $transaction->id)
->where('amount', '=', bcmul($transaction->transaction_amount, '-1'))->where(
'identifier', $transaction->identifier
'identifier',
$transaction->identifier
)
->leftJoin('accounts', 'accounts.id', '=', 'transactions.account_id')
->leftJoin('account_types', 'account_types.id', '=', 'accounts.account_type_id')

View File

@@ -37,7 +37,7 @@ class TransactionJournal extends Twig_Extension
*
* @return string
*/
function totalAmount(JournalModel $journal): string
public function totalAmount(JournalModel $journal): string
{
$cache = new SingleCacheProperties;
$cache->addProperty('total-amount');
@@ -86,7 +86,5 @@ class TransactionJournal extends Twig_Extension
$cache->store($txt);
return $txt;
}
}