From ba6eb26e6e07fbbfe53787eed8ce68a3cbee56eb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Johannes=20L=C3=B6thberg?= <johannes@kyriasis.com>
Date: Thu, 10 Aug 2023 20:52:12 +0200
Subject: [PATCH] Show correct payee for scheduled transactions on budgeted
 accounts page (#1379)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
---
 .../src/components/transactions/TransactionsTable.js       | 7 ++-----
 upcoming-release-notes/1379.md                             | 6 ++++++
 2 files changed, 8 insertions(+), 5 deletions(-)
 create mode 100644 upcoming-release-notes/1379.md

diff --git a/packages/desktop-client/src/components/transactions/TransactionsTable.js b/packages/desktop-client/src/components/transactions/TransactionsTable.js
index 12a6f45fa..0967a1f60 100644
--- a/packages/desktop-client/src/components/transactions/TransactionsTable.js
+++ b/packages/desktop-client/src/components/transactions/TransactionsTable.js
@@ -393,10 +393,7 @@ function getPayeePretty(transaction, payee, transferAcct) {
         </div>
       </View>
     );
-  } else if (payee && !payee.transfer_acct) {
-    // Check to make sure this isn't a transfer because in the rare
-    // occasion that the account has been deleted but the payee is
-    // still there, we don't want to show the name.
+  } else if (payee) {
     return payee.name;
   } else if (payeeId && payeeId.startsWith('new:')) {
     return payeeId.slice('new:'.length);
@@ -981,7 +978,7 @@ const Transaction = memo(function Transaction(props) {
           valueStyle={valueStyle}
           transaction={transaction}
           payee={payee}
-          transferAcct={transferAcct}
+          transferAcct={showAccount ? null : transferAcct}
           importedPayee={importedPayee}
           isPreview={isPreview}
           onEdit={onEdit}
diff --git a/upcoming-release-notes/1379.md b/upcoming-release-notes/1379.md
new file mode 100644
index 000000000..575747e06
--- /dev/null
+++ b/upcoming-release-notes/1379.md
@@ -0,0 +1,6 @@
+---
+category: Bugfix
+authors: [kyrias]
+---
+
+Show the correct payee of scheduled transactions on "For budget" account page.
-- 
GitLab