Ledger is a simple yet powerful concept. It is the foundation on which modern inventory and accounting systems are implemented.
A ledger is a list. A list of transactions sorted in chronological order.
Let’s assume you are a mango trader who buys and sells mangoes and you record your transactions as below.
Recording your trades consistently and chronologically helps you make sense of your inventory levels quickly. Here are a few examples of the questions the above list (aka ledger) can answer.
- How many mangoes did you have at any given point in time? At the end of trading hours on 12th October, you had 10 mangoes.
- Details of a specific trade. On 13th October you sold four mangoes.
- If you ever ran out of mangoes. From 10th to 13th of October you always had a few mangoes with you as the value in the ‘Balance’ column is greater than zero on all four days.
- The total number of trades and the number of trades of a specific type. You did a total of four trades and you did two traders of ‘Buy’ and ‘Sell’ each.
When tens of thousands of goods move in and out, it is not feasible to compute the balance each time we need to look up the balance. The calculation of ‘Balance’ and storing it along with details of each trade helps immensely in quickly showing the stock levels.
In ERPs, ledgers have multiple applications. A stock ledger is maintained to track inventory levels, an accounting ledger is maintained to track balances of accounting ledgers like incomes, expenses, assets, and liabilities. A leave ledger is maintained to keep track of the leave balances of employees.
In ERPNext, each purchase is recorded via ‘Purchase Receipt’ and each delivery corresponding to a sale is recorded by a ‘Delivery Note’ transaction. On submission of these transactions, a separate record under ‘Stock Ledger Entry’ is created.
Here is a screenshot of the Purchase Receipt for eight mangoes bought.
And here is the screenshot of ‘Stock Ledger Entry’ created for the above purchase receipt.
Accounting ledgers are also implemented similarly. When transactions like Sales Invoice, Purchase Invoice are submitted records are created under ‘GL Entry’ table with corresponding values which are then used to quickly build reports like Profit and Loss Statement, Balance Sheet, and General Ledger.
Ledger is a very simple but extremely powerful concept. Hope this blog helped you to get interested in understanding how things work under the hood!
ERPNext is the world's best open-source ERP built by a community of users and developers. Learn more about ERPNext here.
A Brief History of Ledgers
Before starting my investigation into distributed ledgers I did some research on the history of ledgers. What I found…