Si Hay Sistema - Improved Cash Flow for ERPNext

"The direct method could prove to be time-consuming and a very cumbersome process for larger organizations that have many cash transactions"

 · 3 min read

The Cash Flow Statement

One of the three traditionally most important statements for evaluating business performance is the Cash Flow Statement. There are two ways to calculate it, one being the Indirect Method, and the other is the Direct Method. In this post we explore how to improve ERPNext's existing cash flow statement.

Definition of Cash Flow

The money that comes in or goes out of an entity (company, person, institution, etc.)

A closer look

The current Cash Flow Statement in ERPNext uses the Indirect Method, adjusting from Net Income by adding back non cash expenses and adjusting changes in cash related accounts on the balance sheet. The problem is that the user has very. little control over categorizing inflows and outflows.

Notice that you have three main categories of cash flows:
  • Operations
  • Investment
  • Financing

***Basic three tier cash flow statement***

Except all are adjustment based.

Direct Cash Flow

Many managers and finance chiefs prefer to use the Direct method which does not require adjustments from Net Income. This is what mom and pop stores have used for many years by putting the cash from sales in a cigar box or can, and taking out from it when expenses are necessary.

You can quickly tell how good the business is doing by the amount of cash left over in the can or cigar box at any moment in time.

The problem...

There's not really a problem with Direct Cash Flow per se, it's the fact that each transaction must be tallied, therefore consuming plenty of time, and the aggregation for larger organizations with multiple cash-based transactions can be quite difficult to do.


Enter ERPNext

After many years using ERPNext I can confidently say that the "problematic" part can be quickly taken out of using direct cash flow, because the database structure and Python backend for ERPNext can tackle the aggregation or number-crunching part.

So what is the plan?

The first step is to create a way to categorize cash expenses.
The user must be provided with the capacity to configure the categories as they wish. To do this a new doctype with Tree Structure will be created, and we shall call it: "Direct Cash Flow Component"
Check the official documentation for more on Tree Masters

Components need to have one root, which shall be the main company in the company tree structure.
Three Parent components need to be pre-loaded: Operations, Investing, Financing. All parent components will be "neutral" in their cash flow effect: (addition or subtraction). Within these parent components, we can furnish basic components with their effects: addition (inflow) or subtraction (outflow). Parent components will have the ability to create child elements as



The next step in the process is to add custom fields to two doctypes: Payment Entry and Journal Entry, and specifically: Journal Entry Account. (the rows in the child table for Journal Entry).

The custom fields will allow the user to select the applicable Direct Cash Flow Component that applies for the Payment Entry, or the Journal Entry Account.

Let's review an example of the planned functionality:


The next step is to create a specific Direct Cash Flow Statement Consolidation setup, entitled as the user requires, and allowing the user to select the specific companies, cost centers and projects that will participate in the consolidation.



Direct Cash Flow Statement
The default filter will fetch all companies, all cost centers.
Users can select the Direct Cash Flow Statement Consolidation to pick the configuration of companies, cost centers and projects to include in the cash flow statement. If left empty, the report shows all companies, all cost centers, all projects.
A single cost center filter will fetch only the cash flows applicable to the selected cost center.

The expected behavior is to load transactions for the selected components, as per the filters.

No comments yet

No comments yet. Start a new discussion.

Add Comment