Skip to content

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.

Completed Claw run: 2,084 accounts differ, 13 of them with a different ending balance in both ledgers
13Accounts in both ledgers with a different ending balance
2,033Accounts in the primary ledger only, and 38 in the secondary only
2,344Accounts that match in both ledgers
6 min 56 sFor the whole company in Fusion Claw

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.

Chat answer: account 12100 ends at 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, with equal period activity

“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.

Chat answer: 43 accounts differ between the two ledgers for July 2020, the largest on account 21130

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.

Fusion Claw plan: five steps for the ledger comparison

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 Claw run's files and how much of each ledger it read: all 4,390 balances of the primary and all 2,395 of the secondary

The run record shows both ledgers read to the end and lists the largest ending-balance differences.

The run record: 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:

AccountEnding: primaryEnding: secondaryDifference
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-0000000011,624,478.234,488,152.807,136,325.43
1001-0000-00000-12220-0000-0000-000000007,032,104.00500.007,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.35310,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-000000001,078,902.991,015,653.8563,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-000000003,222,796.433,162,639.9660,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-0000000091,013.8350,612.2540,401.58
1001-0000-12100-59920-0000-0000-00000000-671,565.27-661,571.64-9,993.63
1001-0000-00000-17230-0000-0000-000000002,000.001,700.00300.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.

KindAccounts
Period activity differs0
Ending balance differs13
Only in the primary ledger2,033
Only in the secondary ledger38
Equal2,344

The 13 ending-balance differences, primary minus secondary, net to USD -1,774,234.08.

Ten largest ending-balance differences

AccountEnding: primaryEnding: secondaryDifference
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-0000000011,624,478.234,488,152.807,136,325.43
1001-0000-00000-12220-0000-0000-000000007,032,104.00500.007,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.35310,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-000000001,078,902.991,015,653.8563,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-000000003,222,796.433,162,639.9660,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.

AccountKindActivity: primaryActivity: secondaryActivity differenceEnding: primaryEnding: secondaryEnding differenceBeginning: primaryBeginning: secondary
1001-0000-00000-11110-0000-0000-00000000only-in-a0.0034880379.5234880379.52
1001-0000-00000-11170-0000-0000-00000000only-in-a0.00672988.00672988.00
1001-0000-00000-12100-0000-0000-00000000ending-differs46515.1646515.160.0011624478.234488152.807136325.4311577963.074441637.64
1001-0000-00000-12120-0000-0000-00000000only-in-a0.0029819959.5029819959.50
1001-0000-00000-12160-0000-0000-00000000ending-differs-39783.04-39783.040.0091013.8350612.2540401.58130796.8790395.29
1001-0000-00000-12170-0000-0000-00000000only-in-a0.0021223035.0021223035.00
1001-0000-00000-12180-0000-0000-00000000ending-differs0.000.000.003222796.433162639.9660156.473222796.433162639.96
1001-0000-00000-12220-0000-0000-00000000ending-differs0.000.000.007032104.00500.007031604.007032104.00500.00
1001-0000-00000-12223-0000-0000-00000000only-in-a0.004086260.724086260.72
1001-0000-00000-17130-0000-0000-00000000only-in-b0.00-104999.99-104999.99
1001-0000-00000-17160-0000-0000-00000000only-in-b0.00300.00300.00
1001-0000-00000-17170-0000-0000-00000000only-in-b0.00-319148.66-319148.66
1001-0000-00000-17180-0000-0000-00000000ending-differs12663.1612663.160.001078902.991015653.8563249.141066239.831002990.69
1001-0000-00000-17190-0000-0000-00000000ending-differs-12663.16-12663.160.00-1078902.99-1015653.85-63249.14-1066239.83-1002990.69
1001-0000-00000-17230-0000-0000-00000000ending-differs0.000.000.002000.001700.00300.002000.001700.00
1001-0000-00000-17305-0000-0000-00000000only-in-a0.00-7500.00-7500.00
1001-0000-00000-21120-0000-0000-00000000ending-differs-1332.22-1332.220.00-6116246.94-6058523.51-57723.43-6114914.72-6057191.29
1001-0000-00000-21130-0000-0000-00000000ending-differs1541.501541.500.00-19690899.46-5683726.10-14007173.36-19692440.96-5685267.60
1001-0000-00000-21210-0000-0000-00000000ending-differs-540.05-540.050.00-6664581.15-6974908.35310327.20-6664041.10-6974368.30
1001-0000-00000-21220-0000-0000-00000000only-in-a0.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 needsWhere it reads it in Fusion
Balances of the periodEach ledger's balances for the period, account by account: beginning balance, period activity, ending balance and currency
Which ledgers are secondaryThe ledger list: each secondary ledger with its currency, accounting calendar and chart of accounts
The period's datesThe 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.

App: the new app.
App: the new app.
The primary and secondary ledgers agent added to the app
The agent
The example card: Progress US against GASB34 for July 2020
The example card
Published: the start screen, ready for a Claw run.
Published: the start screen, ready for a Claw run.
Chat: account 12100 ends July 2020 at 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; period activity is USD 46,515.16 in both.
1. Chat: account 12100 ends July 2020 at 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; period activity is USD 46,515.16 in both.
Chat: 43 accounts of the range differ (10 ending balances, 28 only in the primary ledger, 5 only in the secondary), the largest, account 21130, first.
2. Chat: 43 accounts of the range differ (10 ending balances, 28 only in the primary ledger, 5 only in the secondary), the largest, account 21130, first.
Claw: the example card chosen, its task ready to start.
3. Claw: the example card chosen, its task ready to start.
Plan: five steps, from reading each ledger to writing the differences file and the summary.
4. Plan: five steps, from reading each ledger to writing the differences file and the summary.
The Claw run under way.
5. The Claw run under way.
Done: 2,084 accounts differ, 13 of them in both ledgers with a different ending balance.
6. Done: 2,084 accounts differ, 13 of them in both ledgers with a different ending balance.
Files: differences.csv and summary.md, a suggested next task to compare another period, and all 4,390 balances of the primary and 2,395 of the secondary read.
7. Files: differences.csv and summary.md, a suggested next task to compare another period, and all 4,390 balances of the primary and 2,395 of the secondary read.
Run record: worked for 6 min 56 s, under the table of ending-balance differences.
8. Run record: worked for 6 min 56 s, under the table of ending-balance differences.
Run record opened, starting with how Claw understood the task.
9. Run record opened, starting with how Claw understood the task.

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.