Hi all! I've got a custom field on invoices, populated from a saved search which is supposed to return a sum of applied line amounts from paying transactions, but it's giving me duplicates for the lines on some invoices. What is the correct way to get a sum of funds actually applied to an invoice regardless of whether it's from a payment, credit memo, journal entry, etc?
k
KevinJ of Kansas
09/25/2020, 9:20 PM
add a criteria to your search that when it joins to the transaction it gets only the mainline
KevinJ of Kansas
09/25/2020, 9:21 PM
i.e. if your vendor bill has more than 1 line and you have 2 payments against it you'll get doubled results based on the number of lines on the bill instead of 2.
k
Kris Wood
09/25/2020, 10:07 PM
Yeah that's pretty much what I'm seeing but it doesn't work in all use cases, for example a credit applied to multiple transactions
Kris Wood
09/25/2020, 10:07 PM
the main line amount will not be the applied amount
Kris Wood
09/25/2020, 10:07 PM
I think I'm going to need to script the field value instead of just getting it from the search summary