I'm creating a PO search that includes the item li...
# suiteql
d
I'm creating a PO search that includes the item lines ... but they are duplicated. a negative valued line for each real line
j
Can you post your SQL?
m
I'm joining onto the transaction accounting line and here is a query i have that has no duplicates
Copy code
SELECT
    transaction.id,
    transaction.number,
    transaction.trandate,
    TransactionAccountingLine.account,
    TransactionAccountingLine.credit,
    TransactionAccountingLine.debit,
    transaction.type
FROM
    TransactionAccountingLine
    INNER JOIN TransactionLine ON (
        TransactionLine.Transaction = TransactionAccountingLine.Transaction
    )
    AND (
        TransactionLine.ID = TransactionAccountingLine.TransactionLine
    )
    INNER JOIN Transaction ON TransactionAccountingLine.transaction = Transaction.id
WHERE
    transaction.type IN ('Journal')
    AND TransactionAccountingLine.posting = 'T'
    AND (TransactionAccountingLine.credit IS NOT NULL OR TransactionAccountingLine.debit IS NOT NULL)
You could also try SELECT DISTINCT ...
d
I ennded up using (TransactionLine.Quantity > 0)