BRM - GL (General Ledger)
GL – An Overview
The general ledger, sometimes known as the nominal ledger, is the main accounting record of a business which uses double-entry bookkeeping. It will usually include accounts for such items as current assets, fixed assets, liabilities, revenue and expense items, gains and losses
The general ledger is a summary of all of the transactions that occur in the company. It is built up by transactions recorded in the general journal.
Billing and Accounting Cycles – An Overview
The accounting cycle compiles all of a customer’s balance impacts and stores them in bill items. The accounting cycle is always monthly.
The billing cycle defines how often to request a payment for the balance impacts contained in the bill items. You can request payments every month, or in any number of complete months, for example, quarterly. Therefore, the accounting cycle and the billing cycle always start on the same date, but can be different lengths.
The length of the billing cycle determines how often to finalize a bill and request payments from customers. The billing cycle length is any whole multiple of the accounting cycle. For example, a monthly billing cycle corresponds to one accounting cycle, and a quarterly billing cycle corresponds to three accounting cycles.
How does GL Cycle behave in conjunction with Billing and Accounting Cycles
GL cycles are quite different from Billing Cycles. They are generally Monthly cycles starting from the 1st of the month. Billing Cycles may be Bi-Monthly, Quarterly, or Yearly depending on the setting. Accounting Cycles are also monthly.
How does BRM GL work. What all things are it integrated with within the BRM Domain
BRM GL picks up data from the various relevant tables, which gets populated on account of various operations like billing, payments etc. and populate the ledger tables. These records are used for generating reports.
GL code is associated with Balance Impacts. BRM looks at the /journal object which are associated with the events having Balance Impacts, summarizes them and generates the report.
GL Basic Configurations
GL Chart of Accounts
GL Chart Of Accounts is a List of GL Accounts which are there in any External GL System.This is necessary to associate an External GL system to BRM GL System by Mapping its GL Accounts to Portal GL/Ids.
This is a customizable file. To edit the pin_glchartaccts file, then run the load_pin_glchartaccts utility to load the contents of the file into the /config/gl_chartaccts object in the BRM database. [load_pin_glchartaccts pin_glchartaccts_file ]
Location : $PIN_HOME/sys/data/pricing/example/
Db object : config_gl_chartaccts_t (main table),
config_gl_coa_accts_t (maps GL COA to AR Accounts).
* The COA verifies that the G/L accounts you enter in the G/L IDs are valid
GL Ids
This is an Unique Identifier in the BRM system which maps the Balance Impacts to an unique Number for the GL system to consider while populating into Journal. It is done to track GL data and use it for generating GL reports and associate it with the type of GL revenue.
Edit the pin_glid file and use the load_pin_glid utility to load the G/L IDs into the BRM database.
Location : $PIN_HOME/sys/data/pricing/example/pin_glid
DB Object: config_glid_t (Main table),
config_glid_accts_t (maps GL Ids to AR Accounts)
GLIDs will indicate which GL entries to be recorded in the /journal object and which will be omitted and which will be considered for reports.
Each G/L ID definition contains the following information:
• An identification number
• A description, which is displayed in Pricing Center
• The tax code used by your tax calculation software(Optional)
• The G/L account that collects the revenue data, including the revenue type, for example billed, unbilled, and unearned
You can use one pin_glid file for multiple segments, or you can load multiple pin_glid files, one for each G/L segment.
Account Pair Attributes associated with GLIDs
GROSS – reports the total of net and discounted revenue.
DISC – reports the balance impacts of discounted revenue.
NET – reports the amount of revenue that remains after applying discounts
TAX – reports the amount of taxes calculated. This data is used for collecting G/L data based on tax codes.
NET = GROSS – (DISC + TAX)
GL Segments
What is it? Why is it necessary?
GL segments are generally a mechanism/umbrella for mapping accounts. All accounts falling under a particular segment will be picked up while generating ledger and posting.
Where can this be configured?
The GL Segment can be included into the BRM system. The pin_glid file under “$PIN_HOME/sys/data/pricing/example” needs to be configured for the GL segment
gl_segment root segment.child_segment [no_rollup]
The File is then loaded by running load_pin_glid utility.
DB Table: config_gl_segment_t is the main table that contains a list of the root segment and the child segment.
How does it map into functioning of GL?
This is used by the GL Functionality to consider the accounts for the ledger and how would they be generated.
You can specify if the data for a segment should be included when you run a report against the parent segment. To do so, you use the no_rollup entry in the pin_glid file to specify that the segment should not be included in the parent report.
Revenue Types
Billed and Unbilled revenue
o Usage Fees can occur as both Billed or Unbilled Revenue
o Purchase and Cancellation of Products and the associated Fees can account for both Billed and Unbilled depending upon their occurrence date
o Cycle arrears fees are always billed
o Cycle forward arrear fees may be billed or unbilled depending upon their dates which maybe after billing has been done but before GL cycle end date
o Non-Rated Events like Payments and Refunds always appear as billed.If a payment or refund event occurs after a G/L reporting date, it is not included in the report
o Cycle forward fees are always billed except when the cycle forward fee is for a new account
Earned and Unearned revenue
o Revenue that is earned at the time that a G/L report is run is called earned revenue. Fees applied to usage, purchase, and cancellation of items are always accounted for as earned revenue.
o Unearned revenue is revenue that is not earned at the time the G/L report is run. Unearned revenue only applies to revenue from cycle forward fees.
o Previously–billed revenue is revenue that was billed in the previous billing cycle, but recognized in the current G/L cycle.
Billed and unbilled usage fees
Billed and unbilled purchase and cancellation fees
If a purchase or cancel event occurs after the billing date but before the G/L reporting date, BRM G/L reports the revenue as unbilled.
Cycle arrears and Forward Arrears
1. Billed cycle arrears fees
2. Billed and unbilled cycle forward arrears fees
A Bit Deeper into GL Functionality
Journal Object [/journal in BRM]
What is it and Why is it necessary?
/Journal object in BRM stores relevant balance impacts related data [like usage events, cycle fees, remittance etc…] which is used by the GL in order to summarize the revenue and write to the DB and publish report.
This is introduced from 7.0 PortalBase onwards.
What is stored in this object? Description of the relevant fields.
This object stores the Account information of the user with Revenue Impacting Items [Balance Impacting Events] and the relevant Debit and Credit Information for that Item.
How is it populated and under what conditions.
Its Populated by using the utility create_journal utility. [for legacy systems]
1) create_tmp_journals
2) move_into_partitions
How does it map its fields to the Basic Settings of GL?
Journal is used to populate tables of ledger reports. Ledger Reports gives an idea about the financial health of the company.
Ledger Reports
What are GL reports? Their Importance w.r.t. to Billing
There are 7 types of GL Reports supported by BRM based on the revenue types.
- Billed [all billed earned, billed unearned and prev billed earned]
- Unbilled [all unbilled earned and unbilled unearned items]
- Billed earned
- Unbilled earned
- Billed unearned
- Unbilled unearned
- Previously billed earned
Billed = billed earned + billed unearned + previously billed earned
(Revenue for events associated with a pending item is unbilled revenue)
Unbilled = unbilled earned + unbilled unearned
Revenue for events associated with an open or closed item is billed revenue.
What is the importance of each report and what Balance Impacts and Items are associated with each report. How is it generated?
Each Report gives us different kind of Information. All revenue earning items which also impacts balances like monthly cycle forward fees, cycle arrears fees, payment items, refund items etc.
This is generated using pin_ledger_report functionality which is there in $PIN_HOME/bin. But generally it is run from $PIN_HOME/apps/pin_billd directory for this requires pin.conf settings.
What are the Input Parameters? What is the importance of each of these parameters.
Basic Input parameters are the Start and End Dates in dd/mm/yyyy formats. These parameters serve as limits to which relevant items should be considered within each period of the reports.
To collect G/L data, you assign a G/L code to each type of balance impact for which you need to track revenue, for example:
• The balance impact for a monthly subscription fee.
• The balance impact of a GPRS usage event.
You run a report to collect the G/L data, typically once a month.
When you run the report, BRM looks at the /journal objects that contain summaries of revenue from the events for the last month and finds the G/L impact for each event that has a balance impact. The report summarizes the revenue for each type of balance impact.
Setting the A/R Account for the GL-REPORT
i). Edit the pin.conf entry in $PIN_HOME/apps/pin_billd
pin_ledger_report transaction_grouping 100000
ii). Restart services.
iii). General PIN_LEDGER_REPORT running Params
a. Run_report
pin_ledger_report -mode run_report -start start_date [-end end_date] [-segment gl_segment] [-type billed | unbilled | billed_earned |
billed_unearned |unbilled_earned |unbilled_unearned|prev_billed_earned] [-report file_name] [-summary | -detail] [-noncurrency] [-verbose] [-test] [-posted] [-help]
b. Post only: This mode writes G/L report data to the Portal database
pin_ledger_report -mode post_only [-verbose][-segment gl_segment] [-posted posted_date | -unpost] [-help]
c. List_previous: To display a list of previously run G/L reports
pin_ledger_report -mode list_previous -start start_date [-end end_date [-segment gl_segment] [-type billed | unbilled |billed_earned | billed_unearned |unbilled_earned |unbilled_unearned | prev_billed_earned] [-verbose] [-help]
d. Create_journal: This mode creates /journal objects that store G/L data not previously stored in /journal objects.
For Legacy PortalBase System [Before 7.0]
Tables used to pick up Data :
- ledger_report_gl_segments_t,
- item_t ,
- event_bal_impacts_t ,
- event_t
Grouping
Summary : gl_id,resource_id
Detailed : account poid, gl_id, resource_id
Billed : All items and event which constitute the Billed Cases like cycle forward items, arrears, cancellation and purchasing fees, refunds and payments.
Unbilled: All items and events which constitue the Unbilled cases like cycle forward items.
From 7.0 PortalBase Onwards
Tables used to pick up Data :
- ledger_report_gl_segments_t ,
- item_t ,
- journal_t
Grouping
Summary : gl_id,resource_id
Detailed : account poid, journal poid, gl_id, resource_id
Billed and Unbilled Item selection criteria remains the same.
Sample Ledger Report
How to Enable and Disable GL Collection in BRM System
By Default the GL Collection is enabled in the system
The user can customize the functionality by modifying the Billing Configuration file
This file is present at the following location
$PIN_HOME/sys/data/config/
File name : bus_params_billing.xml
There is a configuration in this xml file.
This needs to be changed. By default the value is “enabled”
<GeneralLedgerReporting>disabled</GeneralLedgerReporting>
Once this is done, the param value needs to be loaded into the Database.
This is done by running pin_bus_params utility.
pin_bus_params bus_params_billing.xml
Once this is run, then the services need to be re-started for this change to be effected.
New Journal Mode [business configuration Parameter]
What is New Journal Mode?
This is a Business Param which is newly introduced under the Parent Business param “Billing”. This param takes two values 0 and 1.
Db Table: config_business_params_t
- 0 indicates legacy while 1 indicates new
Why was it introduced? [Functionality Overview]
This was introduced to take care of how the data in loaded into the /journal object. It is just like a switch which enables the user to decide whether he wants to use the old system of loading data into the /journal object or the new system.
Where is it used? [Functionality Overview]
This is used in to load data into /journal object through the use of the utility for legacy systems. create_journal utility is used to achieve the creation of /journal objects.
What are the settings done to enable this mode?
- By Default the NEW_JOURNAL_MODE in the system has a value 0 indicating the usage of legacy journal loading
- The user can customize the functionality by modifying the Billing Configuration file . This file is present at the following location
$PIN_HOME/sys/data/config/
File name : bus_params_billing.xml
- There is a configuration in this xml file. This needs to be changed. By default the value is “legacy”
<NewJournalMode>legacy</NewJournalMode>
<NewJournalMode>new</NewJournalMode> [This is for using the new journal mode for loading the data into the /journal object.
- Once this is done, the param value needs to be loaded into the Database. This is done by running pin_bus_params utility.
- pin_bus_params bus_params_billing.xml
- Once this is run, then services needs to be rer-started for this change to be effected.
What are the advantages of using GL functionalities through this mode?
- Performance Aspect
- Loading of History Data into /journal object is much faster.
- When we do Batch Loading through REL, this parameter being enabled loads journal tables faster.
Importance of Data Classes [DB Perspspective]
GL related Tables
Journal and related Tables : Journal_t, event_bal_impacts_t, item_t, event_t and account_t
Reporting tables: ledger_report_t, ledger_report_accts_t, ledger_report_account_groups_t, ledger_report_gl_segments_t and ledger_report_total_groups_t
What is the significance of each table? What data it stores and how does each table map to the other dependant tables?
Journal_T table stores all the journal related information like user account information, GLID, Resource_id, Usage Items information and Debit and Credit Entries of Account pairs attributes of GLID like NET, DISC and TAX. [AR and offset]
Ledger Report Tables are populated from Journal_T tables. The data included in these tables are used for generating ledger reports. These includes balance impacts events, items and account information, GL Segment Information apart from the Debit and Credit Information.
What Data is picked from what Tables w.r.t to other dependent Modules like Billing?
Items, events, balances which are associated with revenue are picked up and a summarized form of the revenues is kept in /journal object.
What are the balance impacts effected by the GL tables?
All Events and Items which are affecting balances are used by GL tables to generate ledger. Summarization and Detailed reports generated and the revenue summed up on that basis.
Generate Journal Epsilon
What we need to do for this?
This parameter is used to record any differences between rounded bill items and total amount in BRM G/L.
How do we do this ?
Configure the PIN_GLID file for rounding Location :
$BRM_HOME/sys/data/pricing/example/pin_glid
#=================================================================
# G/L ID for rounding adjustments #=================================================================
glid
id 1512
descr Rounding Epsilon
gl_acct billed gross rounding.debit rounding.credit
gl_acct billed net rounding.debit rounding.credit
Use the Utility load_pin_glid to load the configuration in the database .
load_pin_glid pin_glid_file
If this configuration is not done, then the rounding entry into the /journal object will be assigned a GL_ID of 0.
Configuring BRM to record rounding differences:
By default, rounding differences are not recorded in G/L reports. One can enable this feature by modifying a field in the billing class /config/business_params object created during installation. This can be done through pin_bus_params utility.
How to enable this parameter:
1) Go to the following directory : $BRM_HOME/sys/data/config
2) Change the following parameter to “enabled” from “disabled”.
<GenerateJournalEpsilon>enabled</GenerateJournalEpsilon>
3) Now load the configuration in the Database.
pin_bus_params bus_params_billing.xml
4) Restart the services [CM and DM]
5) Now check the Database for whether the configuration is loaded properly.
“select param_value from config_business_params_t where param_name = ‘generate_jounal_epsilon’;”
Now when this configuration is enabled, there will be a extra entry into the /journal object whenever any transaction is made impacting balances. This is due to the fact that the a record highlighting the difference in rounded bill items’ amount and the GL amounts, needs to be recorded in the Database.
This will be impacting the Billed Reports [Billed and Billed Earned].