Enable Make Transfer menu for child transactions

This commit is contained in:
Joel Jeremy Marquez
2025-08-21 15:08:30 -07:00
parent 82cbb9bffe
commit 8c8ee889e6
2 changed files with 7 additions and 2 deletions

View File

@@ -5,10 +5,9 @@ export function validForTransfer(
toTransaction: TransactionEntity,
) {
if (
// no subtransactions
// not already a transfer
[fromTransaction, toTransaction].every(tran => {
return tran.transfer_id == null && tran.is_child === false;
return tran.transfer_id == null;
}) &&
fromTransaction.account !== toTransaction.account && // belong to different accounts
fromTransaction.amount + toTransaction.amount === 0 // amount must zero each other out

View File

@@ -0,0 +1,6 @@
---
category: Enhancements
authors: [joel-jeremy]
---
Enable Make Transfer menu for child transactions