Initial code base for tag report.

This commit is contained in:
James Cole
2017-02-24 20:01:35 +01:00
parent e737683efb
commit f63c6875cd
18 changed files with 1197 additions and 214 deletions

View File

@@ -331,22 +331,4 @@ class CategoryReportController extends Controller
return $grouped;
}
/**
* @param Collection $set
*
* @return array
*/
private function groupByOpposingAccount(Collection $set): array
{
$grouped = [];
/** @var Transaction $transaction */
foreach ($set as $transaction) {
$accountId = $transaction->opposing_account_id;
$grouped[$accountId] = $grouped[$accountId] ?? '0';
$grouped[$accountId] = bcadd($transaction->transaction_amount, $grouped[$accountId]);
}
return $grouped;
}
}