Transaction Codes
Transaction Codes are the heart of how Transactions are processed by the Transaction Engine. They determine what values are recorded, if sub-transactions are allowed, what ledger to use, how values are allocated, what GL Postings to automatically create and more.
Transaction Code Features
Transaction Codes cover a wide range of functionality for how to process a Transaction, including allowing the integration of custom code to achieve anything you want. Transaction Codes cover the following main areas:
- Transaction Level Info
This covers the ledger to use, what the user can and can't modify, and the allocation mechanism - Values Recorded
This covers what values to record against the Transaction (if any, you can record none and just post manual journal entries with GL Postings instead) - GL Postings
The GL Postings to automatically create in the transaction - Custom Processes
Any custom code to run created through our API
Transaction Level Info
This allows you to set the main behavior of the transaction:
- Any additional fields (Price, Units, SettlementDate) to show
- Any custom settings to associate with the Transaction
- How the Transaction is to be allocated to ultimate owning entities
- How GL postings can be created
- The ledger to use by default, or if the user should select one
- If Sub Transactions can be created
Values Recorded
This allows you to set which Values the Transaction will record. The values available come from the Transaction Type on the Transaction Code. You can only select values that belong to that type of transaction. When selecting values you can configure:
- The Value you want to record in this Transaction
- If the User should be able to manually enter the value
- If the value should automatically be calculated from formulas
- If any GL Entries configured against the Value should automatically be applied in this Transaction or not.
GL Postings
This allows you to specify precisely what GL Postings you want the system to automatically create for you when processing this Transaction. You can configure the following properties:
- The GL Account to automatically use and whether to Debit or Credit it
- The Ledger to post to. This can be different from the Transaction Ledger. If blank it will automatically use the Transaction Ledger
- The Date, Entity and Value to use
- Any formulas for the Value, Entity or Date
This provides complete control in tailoring how the system should automatically create GL Postings for you. You can configure simple postings to debit and credit values to GL Accounts, all the way to complex ones that post across multiple ledgers, and split values across multiple postings and dates into the future via formulas.
Caution
GL Postings are only created automatically when a Transaction has a status of Committed or more. The system does not generate GL Postings for In Progress Transactions.
Custom Processes
As with everything in the LemonEdge platform you always have the ability to dip into the API and completely configure Transactions to run your own custom algorithms. You can dot this via our API and simply inheriting the LemonEdge.API.Processors.Transactional.TransactionProcessorExtender class and implementing the functionality you require. See our API documentation for more information.
Transaction Code Process
When a user creates a new Transaction one of the first things they have to select is the Transaction Code they are going to use. When a Transaction Code is selected the Transaction Engine performs the following steps:
- Makes the relevant Transaction Header fields available depending on the configuration (Such as Instrument, Path, Settlement Date, etc)
- Creates the appropriate columns in the Transaction Values screen for the Values configured in the Transaction Code
- Displays the Transaction Value Allocation breakdown view if required
- Displays the GL Posting Allocation breakdown view if required
- Displays the sub-transaction view if required
When changes are made to a Transaction the engine performs the following steps guided by the Transaction Code:
- If a Path is selected and the Transaction Code is setup to Allocate then it will create Transaction rows for the values for every Entity in the Path that should be included in an Allocation [more info]
- If an Instrument is selected the system sets the Entity for the Transaction to the Owning Entity of the Instrument. It also calculates any exchange rates between local, functional and reporting currencies
- If an Entity is selected the system calculates the Financial Date from the Transaction Date and the Period Closings on the Entity
- If the Transaction or Settlement Dates are modified then the Financial Date is recalculated including for GL Postings, along with updating the exchange rates, and any allocations
- When a Transaction Value is modified
- It will automatically calculate the relevant values in the other currencies
- Any GL Postings will be updated
- If this Transaction is being allocated the system will automatically update allocations of that value including up the Path to other Entities
All formulas are always evaluated when dependent items change.
Likewise whenever anything on the Transaction changes the system passes this to any Transaction Extenders you have configured against the Transaction Code as Custom Processes to run.
Important
The Transaction Engine is ultimately responsible for ensuring as users fill in the Transaction detail the system automatically applies the Transaction Code configuration correctly. This includes Transactions being updated/created through Cancel/Corrects, Importing, API use, etc. The logic is always enforced.
Reporting
When running reports across Transactions you should rarely need to care about the Transaction Code, you simply need only sum the Values you care about across the filters you need.
However Transaction Codes are always available in the reporting tools, along with all other Transaction attributes, to filter and report on. Equally in GL Rollups you have the ability to create entries that aggregate according to the Transaction Code the GL Postings are associated with.
Views
Transaction Codes have the following views: