The codeunit structure for General Journal posting
The General Journal routine consists of seven codeunits. The following screenshot shows us the schema of how each codeunit relates to each other:
The general journal posting routine can start from several places. Either from a general journal page or a general journal batch page. When the user clicks on Post or Post & Print, this will run one of the following codeunits: Codeunit 231 Gen. Jnl.-Post, codeunit 232 Gen. Jnl.-Post + Print, codeunit 233 Gen. Jnl.-B.Post, or codeunit 234 Gen. Jnl.-B.Post + Print.
All these codeunits ask for confirmation from the user, and codeunits 232 and 234 also print the posted entries at the end. After that, they all call codeunit 13 Gen. Jnl.-Post Batch. This codeunit checks the consistency of all the lines individually, by calling Codeunit 11 Gen. Jnl.-Check Line. Codeunit 13 also checks that all the lines in the transactions are balanced, and if so, it inserts some secondary data into the records...