Remove debug.

This commit is contained in:
James Cole 2022-07-25 05:57:11 +02:00
parent 47469c7082
commit 242fb3b498
No known key found for this signature in database
GPG Key ID: B49A324B7EAD6D80
2 changed files with 0 additions and 8 deletions

View File

@ -101,7 +101,6 @@ class ShowController extends Controller
$groupArray = $transformer->transformObject($transactionGroup);
// do some calculations:
Log::debug('Now going to getAmounts()');
$amounts = $this->getAmounts($groupArray);
$accounts = $this->getAccounts($groupArray);
@ -113,8 +112,6 @@ class ShowController extends Controller
$attachments = $this->repository->getAttachments($transactionGroup);
$links = $this->repository->getLinks($transactionGroup);
Log::debug('Journal', $groupArray);
return view(
'transactions.show',
compact(
@ -140,10 +137,8 @@ class ShowController extends Controller
*/
private function getAmounts(array $group): array
{
Log::debug('Now in getAmounts()');
$amounts = [];
foreach ($group['transactions'] as $transaction) {
Log::debug(sprintf('Currency symbol is "%s"', $transaction['currency_symbol']));
$symbol = $transaction['currency_symbol'];
if (!array_key_exists($symbol, $amounts)) {
$amounts[$symbol] = [
@ -156,7 +151,6 @@ class ShowController extends Controller
if (null !== $transaction['foreign_amount'] && '' !== $transaction['foreign_amount'] && bccomp('0', $transaction['foreign_amount']) !== 0) {
// same for foreign currency:
$foreignSymbol = $transaction['foreign_currency_symbol'];
Log::debug(sprintf('Foreign currency symbol is "%s"', $foreignSymbol));
if (!array_key_exists($foreignSymbol, $amounts)) {
$amounts[$foreignSymbol] = [
'amount' => '0',
@ -167,7 +161,6 @@ class ShowController extends Controller
$amounts[$foreignSymbol]['amount'] = bcadd($amounts[$foreignSymbol]['amount'], $transaction['foreign_amount']);
}
}
Log::debug('Result', $amounts);
return $amounts;
}

View File

@ -122,7 +122,6 @@ class TransactionGroupTransformer extends AbstractTransformer
if (null !== $row['foreign_amount'] && '' !== $row['foreign_amount'] && bccomp('0', $row['foreign_amount']) !== 0) {
$foreignAmount = app('steam')->positive($row['foreign_amount']);
}
Log::debug(sprintf('Foreign amount is "%s', $foreignAmount));
$metaFieldData = $this->groupRepos->getMetaFields((int) $row['transaction_journal_id'], $this->metaFields);
$metaDateData = $this->groupRepos->getMetaDateFields((int) $row['transaction_journal_id'], $this->metaDateFields);