Hello,
Thank you in advance for your help.
I'm currently facing some challenges with the balance sheet and income statement sections.
I have three tables:
- TB
- Journal Listing
- Chart of Accounts
I joined the TB and Journal Listing tables, resulting in approximately 350 entities with both primary and secondary ledgers. The output columns after joining TB and Journal Listing are:
- company_code
- account_code
- account_description
- beginning_of_year_balance
- debits
- credits
- end_of_year_balance
- ledger_name
- period_name
- period_set_name
- cost_center_code
Next, I joined this result with the Chart of Accounts table, which contains:
- account_code
- sub_account_code
- description
- level
This helps map the GL accounts as follows:
- 1000: Asset
- 1100: Current Asset
- 1200: Non-Current Asset
- 2000: Liability
- 2100: Current Liability
- 2600: Non-Current Liability
- 3000: Equity
- 4000: Revenue
- 5000: Cost of Revenue
- 6000: Operating Expense etc.
I need to automate the balance sheet and income statement for YTD, MTD, and QTD.
Could someone please provide an example or guidance?