pen one
12/17/2020, 10:15 PMDavid B
12/18/2020, 2:59 AM{amount} * DECODE({type},'Payment', -1, 1)
(or similar)
This will invert the amount value when the transaction type is "Payment"
However, you should also find that, when you add the account
field to your search results, your amount field should be negative next to the crediting account and positive next to the debiting account.
You can setup your criteria to filter for the account being credited (payment) and debited (invoice) ("Accounts Receivable"?)