From 1886257b639d312f2c8208042c5d2c93f77c4d8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=91cze=20Bence?= Date: Sat, 17 Jun 2023 13:46:43 +0200 Subject: [PATCH] RVRNEXT-43 adapt views to multiple payees --- views/communities/transaction_edit.php | 12 +++++++----- views/communities/transactions.php | 24 +++++++++++++++++++++++- 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/views/communities/transaction_edit.php b/views/communities/transaction_edit.php index bff0ee5..b146d87 100644 --- a/views/communities/transaction_edit.php +++ b/views/communities/transaction_edit.php @@ -39,13 +39,15 @@ -

Payee

- getUserId(), $payeeUserIds) ? 'checked' : '' ?>> + - +

Description

Sum

diff --git a/views/communities/transactions.php b/views/communities/transactions.php index 23e40c5..8200542 100644 --- a/views/communities/transactions.php +++ b/views/communities/transactions.php @@ -30,7 +30,29 @@

getEvent()->getTitle() ?>

getDescription() ?>

-

getPayerUser()->getDisplayName() ?> getPayeeUser() ? $transaction->getPayeeUser()->getDisplayName() : '[common]' ?>

+

+ getPayerUser()->getDisplayName() ?> + + + getPayees()) > 0) { + $found = false; + foreach ($transaction->getPayees() as $payee) { + if ($member->getUserId() === $payee->getUserId()) { + $found = true; + } + } + } else { + $found = true; + } + ?> + + getUser()->getDisplayName() ?> + + getUser()->getDisplayName() ?> + + +

getTimeDate()->format('Y-m-d H:i') ?>