Enable Make Transfer menu for child transactions (#5604)

This commit is contained in:
Joel Jeremy Marquez
2025-08-21 15:24:16 -07:00
committed by GitHub
parent 102c6eaff6
commit adf4bd2d0f
2 changed files with 7 additions and 4 deletions

View File

@@ -5,11 +5,8 @@ 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;
}) &&
[fromTransaction, toTransaction].every(tran => 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