In the Financial systems, Journals are used for accounting. Microsoft Dynamics NAV has an Architectural Pattern called Journal Template-Batch-Line that ensures data integrity, and acts as a datacontract for each transaction.
Journals are the datacontracts, employed to create entries that are used for the accounting purposes. They can be used either manually via the user interface, or automated via processes, such as documents or batch programs.
Each Journal has a Journal Line table that has a Journal Template Code, and a Journal Batch Code. The Template can be used to influence the functional user interface, and the reports are being used in the process. The Batch allows different users to use the Journal at the same time without interfering with each other, or temporarily keep data in a Journal until it is ready to be posted.
The following diagram explains how to implement the Journal Template-Batch-Line Pattern:
The Journal Line table contains information that needs to be carried over to the entry table that is created by it, as well as all the references to other data that are required for implementing the Journal-Template-Batch-Line Pattern. The creation of the entry tables is done using the Posting Pattern, which we will discuss later in this chapter. A Journal also has a predefined number of management Codeunits that help in the behavior of the template, the batch selection, and the selection of the posting process.
The previous diagram shows the basic components of a Journal.
Let's step through the tables one-by-one.
The Primary Key of a Journal Template table is called Name. It is of the type Code, and has a length of 10 characters. Other fields in a Journal template table are Description, the Reason and Source Code, and one or more references to Posting processes or testing reports.
The Optional fields in a Journal Template table are fields that act as predefined values for the journals, such as No., Series, and the Bal. Account No. The Journal Template table has two list page objects. One is editable to be used for Application Administrators. Another one is non-editable, and helps the users to select the template that they want to use.
The Primary Key of the Journal Batch table contains a reference to the Journal Template table, and a field called Name of type Code with the length of 10 characters. Together, these fields are the Primary Key, and are numbered 1 and 2.
Other fields in this table are similar to the Journal Template table. These fields overrule the template. For example, if the template has Reason Code "SALES" and the batch has Reason Code "INVENTORY", then the batch gets priority. So, the reason code "INVENTORY" is used. If there is a functional requirement, the Journal batch can also contain a Boolean called Recurring, indicating that the Journal Lines act as a template, and will be periodically repeated.
Journal batch has an an editable list page that allows users to select a batch, and create their own batches.
The Journal line table is the actual posting data-contract that contains the data to be processed. The Primary Key has three fields:
Field ID |
Name |
Type |
Description |
---|---|---|---|
1 |
The Journal Template Name |
Code 10 |
It references to the Journal Template table |
2 |
The Line No. |
Integer |
This is a unique value determined by AutoSplitKey |
51 |
The Journal Batch Name |
Code 10 |
This references to the Journal Batch table |
Other than these fields, the Journal Line table contains all the fields that are required to create the entry records.
Journals that are recurring contain two other fields that are used for the date calculation, which are the following:
An explanation of the use of recurring journals and its methods is available at http://www.archerpoint.com/blog/Posts/microsoft-dynamics-nav-2009-r2-creating-recurring-general-journals.
Each journal has a set of Codeunits that are required as a minimum:
Journals are used in Microsoft Dynamics NAV for, among others, the General Ledger, Inventory, Intrastat, Resources, Jobs, Cost Accounting, Fixed Assets, Insurance, and Warehouse. Examples of pages, based on the same journal tables, are the Payment Journal, the Phys. Inventory Journal, and the Production Journal.
The Job Journal, the Resource Journal, the Journal Item, and the General Journal in Microsoft Dynamics NAV have a hierarchy. The following diagram illustrates this:
When a Job Journal Line is posted, the Item consumption, or the Resource Consumption can be posted using the required journal, which then might trigger the General Journal again, if this has implications for the financial backend. This posting can be executed asynchronously for performance reasons.
The hierarchy is described in Chapter 1, Introduction to Microsoft Dynamics NAV, in Microsoft Dynamics NAV 2013 Application Design, published by Packt Publishing.
The following journals exist in Microsoft Dynamics NAV:
Table IDs |
Description |
---|---|
232, 80, 81 |
The General Journal |
233, 82, 83 |
The Item Journal (Inventory) |
236, 206, 207 |
The Resource Journal |
237, 209, 210 |
The Job Journal |
1100, 1101, 1102 |
The Cost Journal (Cost Accounting) |
5619, 5620, 5621 |
The Fixed Asset Journal |
5622, 5623, 5624 |
The Fixed Asset Reclassify Journal |
5633, 5634, 5635 |
The Insurance Journal |
7309, 7310, 7311 |
The Warehouse Journal |
261, 262, 263 |
The Intrastat Jnl. Line |