Anyone have a sharable sql statement to list trans...
# suiteql
r
Anyone have a sharable sql statement to list transactions which have been posted to a closed period? (I am sure it involves 'SystemNote', 'SystemNoteField' and 'transactionHistory' records at a minimum. WHERE SystemNote.recordTypeId = -30 and SystemNote.field = 'TRANDOC.IMPACT' -- at a minimum ). Thanks in advance!
c
@rickthewilliams I would use
transaction
for the transaction body details,
transactionaccountingline
to pull posting lines, and
accountingperiod
to filter based on closed periods. You might want to start with something like:
Copy code
SELECT
    tran.tranid
FROM
    transaction AS tran

JOIN transactionaccountingline AS line
ON   line.transaction = tran.id

JOIN accountingperiod AS period
ON   period.id = tran.postingperiod

WHERE
    line.posting = 'T' AND
    period.closed = 'T'
*edited to fix a table name
r
much appreciated
👍 1