01
About this report
A current trial balance from the general ledger, primary accounting book, in base currency. Balance sheet accounts show their balance through today. Income and expense accounts show the current fiscal year to date. Net income of earlier years is one retained earnings line, so total debits equal total credits.
The fiscal year is the accounting year period that contains today. Sort by Account number, or filter Account type to build a working paper.
02
Sample preview
Fictional figures in the shape you will see. Yours come from your account.
| Account number | Account | Account type | Debit | Credit |
|---|---|---|---|---|
| 1000 | 1000 Operating account | Bank | 842,300.15 | |
| 1200 | 1200 Accounts Receivable | Accounts Receivable | 376,200 | |
| 2000 | 2000 Accounts Payable | Accounts Payable | 131,410.30 | |
| 4100 | 4100 Services | Income | 1,702,455 | |
| 6000 | 6000 Salaries and wages | Expense | 1,140,200 | |
| Retained earnings, prior years | Equity | 512,300.40 |
03
The SuiteQL
This is the query each report runs. Read it, copy it, or change it after import.
SELECT account_number,
account,
account_type,
CASE WHEN net > 0 THEN net END AS debit,
CASE WHEN net < 0 THEN -net END AS credit
FROM (SELECT a.acctnumber AS account_number,
a.displaynamewithhierarchy AS account,
BUILTIN.DF(a.accttype) AS account_type,
SUM(tal.amount) AS net
FROM transactionaccountingline tal
JOIN accountingbook ab ON ab.id = tal.accountingbook AND ab.isprimary = 'T'
JOIN transaction t ON t.id = tal.transaction
JOIN account a ON a.id = tal.account
CROSS JOIN (SELECT MIN(y.startdate) AS fy_start FROM accountingperiod y
WHERE y.isyear = 'T' AND TRUNC(SYSDATE) BETWEEN y.startdate AND y.enddate) fy
WHERE tal.posting = 'T'
AND t.trandate <= SYSDATE
AND a.accttype NOT IN ('NonPosting', 'Stat')
AND (a.accttype NOT IN ('Income', 'COGS', 'Expense', 'OthIncome', 'OthExpense') OR t.trandate >= fy.fy_start)
GROUP BY a.acctnumber, a.displaynamewithhierarchy, BUILTIN.DF(a.accttype)
UNION ALL
SELECT NULL, 'Retained earnings, prior years', 'Equity', SUM(tal.amount)
FROM transactionaccountingline tal
JOIN accountingbook ab ON ab.id = tal.accountingbook AND ab.isprimary = 'T'
JOIN transaction t ON t.id = tal.transaction
JOIN account a ON a.id = tal.account
CROSS JOIN (SELECT MIN(y.startdate) AS fy_start FROM accountingperiod y
WHERE y.isyear = 'T' AND TRUNC(SYSDATE) BETWEEN y.startdate AND y.enddate) fy
WHERE tal.posting = 'T'
AND a.accttype IN ('Income', 'COGS', 'Expense', 'OthIncome', 'OthExpense')
AND t.trandate < fy.fy_start)
WHERE ROUND(net, 2) <> 0
ORDER BY account_number, account