Hello! I am building the below SuiteQL query usin...
# suiteql
c
Hello! I am building the below SuiteQL query using the NextTransactionLineLine to display any customer payments linked to the invoice (t.id). I need to expose any discounts applied but can't seem to locate where this is stored within the payment transaction. It doesn't seem to be in the transaction header or transaction line level. I would be grateful if anyone could assist? Many thanks
SELECT
t.id,
tn.id,
tn.type,
tn.foreigntotal,
tl.*
FROM
transaction AS t
LEFT JOIN NextTransactionLineLink AS ntll ON ntll.previousdoc = t.id
LEFT JOIN transaction AS tn ON tn.id = ntll.nextdoc
LEFT JOIN transactionLine AS tl ON tl.id = tn.id
WHERE
t.id = '100000'