diff --git a/src/Controller/StateBalancesController.php b/src/Controller/StateBalancesController.php index a0bb1de0b..a4a23cbf2 100644 --- a/src/Controller/StateBalancesController.php +++ b/src/Controller/StateBalancesController.php @@ -144,10 +144,17 @@ class StateBalancesController extends AppController $otherUser = null; if ($sendCoins->state_user_id == $user['id']) { $type = 'send'; - $otherUser = $involvedUserIndices[$sendCoins->receiver_user_id]; + if(isset($involvedUserIndices[$sendCoins->receiver_user_id])) { + $otherUser = $involvedUserIndices[$sendCoins->receiver_user_id]; + } } else if ($sendCoins->receiver_user_id == $user['id']) { $type = 'receive'; - $otherUser = $involvedUserIndices[$sendCoins->state_user_id]; + if(isset($involvedUserIndices[$sendCoins->state_user_id])) { + $otherUser = $involvedUserIndices[$sendCoins->state_user_id]; + } + } + if(null == $otherUser) { + $otherUser = $this->StateBalances->StateUsers->newEntity(); } array_push($transactions, [ 'name' => $otherUser->first_name . ' ' . $otherUser->last_name, diff --git a/src/Template/StateBalances/overview.ctp b/src/Template/StateBalances/overview.ctp index ca8548ff4..cb5741050 100644 --- a/src/Template/StateBalances/overview.ctp +++ b/src/Template/StateBalances/overview.ctp @@ -20,20 +20,6 @@ $this->assign('header', $header); //var_dump($transactions); ?> -
-
-
-
-

-

element('printGradido', ['number' => $balance]) ?>

- 0) : ?> -

Html->link($this->element('printGDT', ['number' => $gdtSum]), ['action' => 'overview_gdt'], ['escape' => false]) ?> ()

- -
-
-
-
- 0) : ?>