General Ledger · ledger comparison
Primary and secondary ledgers
An agent built in Oracle AI Agent Studio and run by Fusion Claw. For one period it compares a primary ledger with its secondary ledger account by account, and lists every account whose period activity or ending balance differs, or that is in one ledger only.
“Where do the primary and secondary ledgers disagree this period?”
In July 2020 (Fusion period JUL-21 on this demo calendar), 13 accounts in both ledgers end the month with a different balance. The largest is account 21130: USD -14,007,173.36, primary minus secondary. Another 2,033 accounts are in the primary ledger only and 38 in the secondary only; 17 and 36 of them carry a non-zero ending balance.
Demo company data: Oracle's demo company, Progress US Primary Ledger against GASB34 Secondary Ledger, company 1001, July 2020.
By hand
Two trial balances and a spreadsheet
A company that reports under two accounting standards keeps a primary ledger and a secondary ledger. When both use the same chart of accounts, at every close someone exports the trial balance of each, puts them side by side in a spreadsheet and matches them account by account: which accounts show a different period activity, which a different ending balance, and which are in one ledger only. Those are the adjustments and the posting gaps to explain.
The agent reads the balances of both ledgers for the period and matches them account by account. Each account lands in one of four groups: period activity differs, ending balance differs, only in the primary, only in the secondary.
In chat
Two questions the controller asks
“What does account 1001-0000-00000-12100-0000-0000-00000000 show in Progress US Primary Ledger and in GASB34 Secondary Ledger for JUL-21, and what is the difference?”
An ending balance of USD 11,624,478.23 in the primary ledger and USD 4,488,152.80 in the secondary, a difference of USD 7,136,325.43. The period activity agrees at USD 46,515.16 in both, so the difference was carried in from earlier periods. The answer says to run the same comparison for an earlier period to find where it starts.
“Compare the accounts 1001-0000-00000-%-0000-0000-00000000 between Progress US Primary Ledger and GASB34 Secondary Ledger for JUL-21. Which accounts differ?”
43 accounts differ: 10 have a different ending balance, 28 are only in the primary ledger and 5 only in the secondary. Period activity agrees for all 50 accounts that are in both. The largest difference is on account 21130, USD -14,007,173.36. Both ledgers were read in full for that range, so the list is complete.
In Fusion Claw
Every account of the company, in one Claw run
Asked to compare the two ledgers for July 2020 across company 1001, Claw sets out five steps: read the primary ledger, read the secondary ledger, compare them, write the differences file and write the summary.
6 minutes 56 seconds later: every balance of both ledgers read, 4,390 in the primary and 2,395 in the secondary. 13 accounts in both ledgers end with a different balance; none has a different period activity. 2,033 accounts are in the primary ledger only and 38 in the secondary only; 17 and 36 of them carry a non-zero ending balance. 2,344 match.
The run record shows both ledgers read to the end and lists the largest ending-balance differences.
The 13 accounts in both ledgers with the same period activity and a different ending balance, in USD, primary minus secondary:
| Account | Ending: primary | Ending: secondary | Difference |
|---|---|---|---|
| 1001-0000-00000-21130-0000-0000-00000000 | -19,690,899.46 | -5,683,726.10 | -14,007,173.36 |
| 1001-0000-00000-12100-0000-0000-00000000 | 11,624,478.23 | 4,488,152.80 | 7,136,325.43 |
| 1001-0000-00000-12220-0000-0000-00000000 | 7,032,104.00 | 500.00 | 7,031,604.00 |
| 1001-0000-11300-21120-0000-0000-00000000 | -2,423,756.16 | -210,939.30 | -2,212,816.86 |
| 1001-0000-00000-21210-0000-0000-00000000 | -6,664,581.15 | -6,974,908.35 | 310,327.20 |
| 1001-0000-12100-59910-0000-0000-00000000 | -2,172,974.10 | -2,107,332.62 | -65,641.48 |
| 1001-0000-00000-17180-0000-0000-00000000 | 1,078,902.99 | 1,015,653.85 | 63,249.14 |
| 1001-0000-00000-17190-0000-0000-00000000 | -1,078,902.99 | -1,015,653.85 | -63,249.14 |
| 1001-0000-00000-12180-0000-0000-00000000 | 3,222,796.43 | 3,162,639.96 | 60,156.47 |
| 1001-0000-00000-21120-0000-0000-00000000 | -6,116,246.94 | -6,058,523.51 | -57,723.43 |
| 1001-0000-00000-12160-0000-0000-00000000 | 91,013.83 | 50,612.25 | 40,401.58 |
| 1001-0000-12100-59920-0000-0000-00000000 | -671,565.27 | -661,571.64 | -9,993.63 |
| 1001-0000-00000-17230-0000-0000-00000000 | 2,000.00 | 1,700.00 | 300.00 |
The period activity agrees on every one of them, so each difference was carried in from an earlier period.
The files
Every difference, account by account
differences.csv lists all 2,084 accounts that differ, each with the kind of difference and its period activity, beginning balance and ending balance in each ledger; in its columns, A is the primary ledger and B the secondary. summary.md counts each kind of difference and lists the ten largest ending-balance differences.
summary.md
Progress US Primary Ledger against GASB34 Secondary Ledger, July 2020
Company 1001. Progress US Primary Ledger, USD: all 4,390 balances read. GASB34 Secondary Ledger, USD: all 2,395 balances read.
| Kind | Accounts |
|---|---|
| Period activity differs | 0 |
| Ending balance differs | 13 |
| Only in the primary ledger | 2,033 |
| Only in the secondary ledger | 38 |
| Equal | 2,344 |
The 13 ending-balance differences, primary minus secondary, net to USD -1,774,234.08.
Ten largest ending-balance differences
| Account | Ending: primary | Ending: secondary | Difference |
|---|---|---|---|
| 1001-0000-00000-21130-0000-0000-00000000 | -19,690,899.46 | -5,683,726.10 | -14,007,173.36 |
| 1001-0000-00000-12100-0000-0000-00000000 | 11,624,478.23 | 4,488,152.80 | 7,136,325.43 |
| 1001-0000-00000-12220-0000-0000-00000000 | 7,032,104.00 | 500.00 | 7,031,604.00 |
| 1001-0000-11300-21120-0000-0000-00000000 | -2,423,756.16 | -210,939.30 | -2,212,816.86 |
| 1001-0000-00000-21210-0000-0000-00000000 | -6,664,581.15 | -6,974,908.35 | 310,327.20 |
| 1001-0000-12100-59910-0000-0000-00000000 | -2,172,974.10 | -2,107,332.62 | -65,641.48 |
| 1001-0000-00000-17180-0000-0000-00000000 | 1,078,902.99 | 1,015,653.85 | 63,249.14 |
| 1001-0000-00000-17190-0000-0000-00000000 | -1,078,902.99 | -1,015,653.85 | -63,249.14 |
| 1001-0000-00000-12180-0000-0000-00000000 | 3,222,796.43 | 3,162,639.96 | 60,156.47 |
| 1001-0000-00000-21120-0000-0000-00000000 | -6,116,246.94 | -6,058,523.51 | -57,723.43 |
differences.csv
2,084 rows.
| Account | Kind | Activity: primary | Activity: secondary | Activity difference | Ending: primary | Ending: secondary | Ending difference | Beginning: primary | Beginning: secondary |
|---|---|---|---|---|---|---|---|---|---|
| 1001-0000-00000-11110-0000-0000-00000000 | only-in-a | 0.00 | 34880379.52 | 34880379.52 | |||||
| 1001-0000-00000-11170-0000-0000-00000000 | only-in-a | 0.00 | 672988.00 | 672988.00 | |||||
| 1001-0000-00000-12100-0000-0000-00000000 | ending-differs | 46515.16 | 46515.16 | 0.00 | 11624478.23 | 4488152.80 | 7136325.43 | 11577963.07 | 4441637.64 |
| 1001-0000-00000-12120-0000-0000-00000000 | only-in-a | 0.00 | 29819959.50 | 29819959.50 | |||||
| 1001-0000-00000-12160-0000-0000-00000000 | ending-differs | -39783.04 | -39783.04 | 0.00 | 91013.83 | 50612.25 | 40401.58 | 130796.87 | 90395.29 |
| 1001-0000-00000-12170-0000-0000-00000000 | only-in-a | 0.00 | 21223035.00 | 21223035.00 | |||||
| 1001-0000-00000-12180-0000-0000-00000000 | ending-differs | 0.00 | 0.00 | 0.00 | 3222796.43 | 3162639.96 | 60156.47 | 3222796.43 | 3162639.96 |
| 1001-0000-00000-12220-0000-0000-00000000 | ending-differs | 0.00 | 0.00 | 0.00 | 7032104.00 | 500.00 | 7031604.00 | 7032104.00 | 500.00 |
| 1001-0000-00000-12223-0000-0000-00000000 | only-in-a | 0.00 | 4086260.72 | 4086260.72 | |||||
| 1001-0000-00000-17130-0000-0000-00000000 | only-in-b | 0.00 | -104999.99 | -104999.99 | |||||
| 1001-0000-00000-17160-0000-0000-00000000 | only-in-b | 0.00 | 300.00 | 300.00 | |||||
| 1001-0000-00000-17170-0000-0000-00000000 | only-in-b | 0.00 | -319148.66 | -319148.66 | |||||
| 1001-0000-00000-17180-0000-0000-00000000 | ending-differs | 12663.16 | 12663.16 | 0.00 | 1078902.99 | 1015653.85 | 63249.14 | 1066239.83 | 1002990.69 |
| 1001-0000-00000-17190-0000-0000-00000000 | ending-differs | -12663.16 | -12663.16 | 0.00 | -1078902.99 | -1015653.85 | -63249.14 | -1066239.83 | -1002990.69 |
| 1001-0000-00000-17230-0000-0000-00000000 | ending-differs | 0.00 | 0.00 | 0.00 | 2000.00 | 1700.00 | 300.00 | 2000.00 | 1700.00 |
| 1001-0000-00000-17305-0000-0000-00000000 | only-in-a | 0.00 | -7500.00 | -7500.00 | |||||
| 1001-0000-00000-21120-0000-0000-00000000 | ending-differs | -1332.22 | -1332.22 | 0.00 | -6116246.94 | -6058523.51 | -57723.43 | -6114914.72 | -6057191.29 |
| 1001-0000-00000-21130-0000-0000-00000000 | ending-differs | 1541.50 | 1541.50 | 0.00 | -19690899.46 | -5683726.10 | -14007173.36 | -19692440.96 | -5685267.60 |
| 1001-0000-00000-21210-0000-0000-00000000 | ending-differs | -540.05 | -540.05 | 0.00 | -6664581.15 | -6974908.35 | 310327.20 | -6664041.10 | -6974368.30 |
| 1001-0000-00000-21220-0000-0000-00000000 | only-in-a | 0.00 | -2608575.70 | -2608575.70 |
What it reads
Where each figure comes from in Fusion
A secondary ledger in Oracle Fusion General Ledger carries the same transactions under another accounting standard. The agent reads the period balances of each ledger by the full account combination, so the two can be matched account by account:
| What it needs | Where it reads it in Fusion |
|---|---|
| Balances of the period | Each ledger's balances for the period, account by account: beginning balance, period activity, ending balance and currency |
| Which ledgers are secondary | The ledger list: each secondary ledger with its currency, accounting calendar and chart of accounts |
| The period's dates | The ledger's accounting calendar, so the answer names the dates the period covers |
An account counts as different when its period activity or its ending balance is not equal in the two ledgers, or when it has a balance in one ledger only. Two ledgers are compared account by account when they share a chart of accounts.
Screen by screen
Every screen of the Claw run
We set the agent up once in a Fusion Claw app; each Claw run starts from a task typed in or picked from an example card.













AI agents
Other agents
Customer cash receipts
Goods received, not invoiced
Account movement and the invoices behind it
Prepayments still available at close
Stuck expense reports and rejected project costs
Recurring journals missing from a period
Payment run review
Receivables aging by type and currency
Journal audit sweep
Name a chore
Name the chore your team still does by hand in Fusion. Until Christmas Day we build the agent free and hand it over.