Anyone know a way to search (saved search, suiteq...
# general
j
Anyone know a way to search (saved search, suiteql, suitescript, or other) for invoices where a discount was applied on the customer payment? E.g. some non-zero value here:
a
http://www.netsuiterp.com/2019/03/saved-search-for-discount-amount.html Does this help at all? Or not what you're looking for? This article mentions bills but not sure if you could modify it for incoice purposes
j
hm I don’t think so….I don’t think I should have to make extra fields
l
@jen I don't know the exact join pathway, but it seems like it's got to be possible. Are you using @tdietrich’s SuiteQL Query Tool? https://timdietrich.me/netsuite-suitescripts/suiteql-query-tool/ It and the improved Table Reference has helped me out a bunch. He's also got a blog post about traversing relationships that might help with this: https://timdietrich.me/blog/netsuite-suiteql-related-transactions/
j
I’m pretty good with SuiteQL and using the ntll table, also have my own Query Runner that I built.
but discount not listed in there that I can see
😞 1
s
Did you try nexttransacrionline (or something like that)
I don't have the table name handy
j
it’s not in there. Well it kinda is, it’s a separate entry
but I don’t know how to tell which are discount lines
s
Transaction account line?
I'm assuming netsuite breaks each of these payment lines into 2 lines (not tested) but both should point to the same invoice
j
nexttransactionlinelink
s
Wouldn't you be able to identify the discount based on the transactionline account
Oh realizing now there probably isn't any transactionline entries for payments (just the basic 2)
j
this is what’s in ntll for this invoice/payment
obviously somehow the system knows that the 0.85 is a discount, but I don’t know how to tell that just from the above
s
What transactionlines does the payment return
j
I’m looking at TransactionAccountingLine now to see if that tells me anything. Haven’t used that table before.