Is there a native/better way to create a search to...
# suitescript
k
Is there a native/better way to create a search to list any orders where sales order <> sum of cash sale - cash refunds -- e.g. orders where we still have to either bill or refund customers?
b
Not sure what you are doing with the refunds part. Perhaps sales order status is what you are looking for
k
People can change sales orders as long as line hasnt shipped, so if multiple lines on order, maybe one line cancelled or modified - need to check if they didnt create appropriate cash sale or refund
sum of all cash collected/refunded should equal the actual SO total
so like a grouped related transaction sum was what I was thinking of in saved search
b
a sales order that had a status with pending billing in its name is missing a cash sale
i dont understand about the cash refund since it applies to the cash sale or return authorization
its not really related to the sales order
and subtracting the value of a cash refund will just cancel out the cash sale (or perhaps double it if you do the sign wrong)
k
Thats the goal to find any orders where sum of transactions is not 0
in case somebody fucked with an order and didnt properly trigger the transaction change, e.g. cash refund
b
a fully billed, fully refunded sales order would have a total equal to the sales order total
if you use your formula
k
precisely
b
a fully billed sales order with no refunds would be 0
k
ya its more for outliers, I think I will be able to do it via a saved search with grouped case statement sum