How to manage your companies for free with ERPNext
ERPNext is the world’s best free and open source ERP. It’s easy to install and can be adapted to the needs of any kind of business in any country.
This opensource app can be easily setup for multiple companies, where each one has their own site and SQL database. It allows the creation of users with different permission roles. Some of other incredible features are: Automatic email predefined reports, API access, backups, integration with PayPal, Stripe, Shopify among others, detailed classification of expenses in cost centers, friendly GUI, etc. In this article we’ll explain how to install it and some of its benefits.
There are different ways to install ERPNext in a server or locally in your computer, but Docker is maybe the easiest one. Clone this repository somewhere in your system:
git clone https://github.com/frappe/frappe_docker.git
Follow the instructions in this Github repository. The single-bench setup is enough to configure one or multiple sites. If you want to install it locally in your computer use
env-local or for a server use
env-production as a template to configure your
Deploying in a server with HTTPS (Let’s Encrypt) requires having preset the DNS pointing to the sites name. For example “erpone.yourdomain.com”… pointing to the server IP. Once you have your
.env file, run
docker-compose --project-name <project-name> up -d
Make sure to replace
project-name with the desired name you wish to set for the project. In a few minutes your app will be available. To login use the following credentials:
Password: (the one you have setup in the .env file)
Once you’ve logged in you can start creating new users.
One of the advantages of ERPNext is that you can manage different companies, each in their own site. It’s possible also to define several companies in one site, but in my experience it’s better to keep them isolated with different sites and different databases. If you wan’t to create a new site, just follow the documentation and run:
# Create ERPNext site
docker run \
-e "SITE_NAME=$SITE_NAME" \
-e "DB_ROOT_USER=$DB_ROOT_USER" \
-e "MYSQL_ROOT_PASSWORD=$MYSQL_ROOT_PASSWORD" \
-e "ADMIN_PASSWORD=$ADMIN_PASSWORD" \
-e "INSTALL_APPS=erpnext" \
-v <project-name>_sites-vol:/home/frappe/frappe-bench/sites \
--network <project-name>_default \
SITES variable to the list of sites created encapsulated in backtick and separated by comma with no space. e.g.
SITES=`site1.example.com`,`site2.example.com` . Reload variables with following command.
docker-compose --project-name <project-name> up -d
Setup (language, country, kind of business…)
ERPNext has lots of language translations, and templates for many kinds of business (including NGO). If your business doesn’t match with any template, don’t worry! you can choose one similar and configure it afterwards. Each user can be set with a different language.
If you need to create a custom attribute like identity number (DNI, NIF, passport, etc), you can do it and add an script that validates its correct format.
Multi-user with permission management
Users can be created easily and permission rules are based on different criteria:
- By project
- By role (ERPNext comes with a predefined roles with a set of rules: accounts manager, expense aprover, projects manager, purchase user…). You can add/remove this roles or edit the predefined ones.
- By document (purchase order, purchase invoice, sales invoice, expense claim, journal entry…). Each document has a set of attributes, and it’s possible to assign a different permission level to each one. For example, the role of “accounts user” will have access to see the Purchase Invoice attributes until a certain level.
Keep your documents linked
ERPNext provides an excellent way to keep track on how your documents are linked. For example, in the purchase process, the purchase order is linked with the purchase receipt, and the purchase receipt is linked with the purchase invoice.
It’s important to note also that in each document you can add any kind of file as an attachment (pdf, xlsx, etc).
Be the owner of all your data through SQL database
Usually payment software offers some API to access your data, ERPNext provides this as well, but I think one of the most powerful things about using this Open Source software is the fact that you have total access to your databases. This opens up endless possibilities to study your data, create your own API, integrate it with other software, etc. The following SQL queries are just a few examples of what you can do.
/*Profit and loss statement by cost center*/
SELECT account, SUM(credit-debit) as balance
FROM `tabGL Entry`
WHERE posting_date >= "2020-01-01"
AND posting_date <= "2020-12-31"
AND cost_center like "%project_name%"
GROUP BY acccount;/*Overdue bills by supplier*/
SELECT name, due_date, supplier, bill_no, outstanding_amount
FROM `tabPurchase Invoice`
WHERE docstatus = 1
AND supplier like "%supplier_name%"
AND outstanding_amount > 0
AND due_date <= CURDATE()
ORDER BY due_date;/*Purchase Invoice list by month and cost center*/
SELECT t2.cost_center, date_format(t1.bill_date,"%y-%m") AS month, SUM(qty*rate)
FROM `tabPurchase Invoice` AS t1
INNER JOIN `tabPurchase Invoice Item` AS t2
ON t2.parent = t1.name
WHERE t2.cost_center like "%project_name%"
AND t1.docstatus = 1
GROUP BY t2.cost_center, month;/*Stock balance for a certain warehouse*/
SELECT item_code, stock_uom, actual_qty, valuation_rate, stock_value
WHERE warehouse like "%warehouse_name%"
AND actual_qty <> 0;
This system has a very friendly interface that has been improved along all versions (current version is 13). The chart of accounts template has all the main accounts, and you can add/remove or change the name. It’s also possible to import the accounts by a csv or excel file. In fact, all the documents in the ERP can be imported through csv or excel files (purchase invoice, sales invoice, journal entry, employees, etc.).
Keep your data safe with automated periodic backups
Periodic backups can be easily configured and synchronized with Amazon S3.
Case of success
I work in a building company in Chile and we have used ERPNext since its foundation in 2014, when we were only 2 employees. Now we are 400 employees and still using the same ERP. We have found lots of benefits about this system. Not only because it’s free, but also because it provides a perfect way to link the accounting to the operation. Normally the reports that the managers of the companies deliver do not come from the accounting, and that causes that sometimes they are far from the reality of the company.
In our company the managers start their analysis from accounting information, and that assures that they are coherent with the overall Profit and Loss statement of the company. The sum of every Profit and Loss of each project is equal to the earnings of the company for a certain period.
The fact of being the owner of all your data has given us the power to design reports specific to our needs, integrate the ERP with the different banks, the billing system, etc.