ERPNext tutorials
Opening stock in ERPNext: enter it and check the result
To post an ERPNext opening stock entry, create a Stock Reconciliation with the purpose Opening Stock, dated at your cutover. Enter or upload one row for each item and warehouse, with the quantity and valuation rate, then submit. Next, compare the Stock Balance report and the stock account with your old system’s closing stock report. The job is done only when those totals agree and someone signs them off.
Get the basics right before you count
Opening stock is the quantity and value of goods you hold on your first day in ERPNext. The old period’s closing stock becomes the new period’s opening stock. You are copying a number you can already prove. New to the software? Read what ERPNext is first.
Source: ERPNext documentation: Opening Stock.
- A cutover date. Close the old system up to the day before. Finish the stock count and save a stock report by item and warehouse. That report is your control total.
- Warehouses. Link each one to a stock account. Without one, ERPNext uses the parent warehouse’s account, then the company default.
- Items. Turn on Maintain Stock. Set the unit, the valuation method and any serial or batch tracking before the first stock entry. After it, Maintain Stock, Has Serial No and Has Batch No are frozen, and changing the valuation method is disruptive.
- Perpetual inventory. It is on by default for a new company, so every stock transaction also posts to the accounts.
Source: ERPNext documentation: opening and closing.
Source: ERPNext documentation: Perpetual Inventory.
Source: ERPNext documentation: frozen Item fields.
Prepare the opening stock file
The Stock Reconciliation template has four columns: Item Code, Warehouse, Quantity and Valuation Rate. Use one row for each item in each warehouse.
Source: ERPNext source code: Stock Reconciliation.
- Match names exactly. Item codes and warehouse names must match ERPNext. Do not edit the headers, which are case-sensitive.
- Count in the stock unit. If you counted boxes of four but stock single chairs, convert first.
- Use cost, not price. The valuation rate is the unit cost from your approved stock report.
- Keep the original. Leave the old export unchanged and work on a numbered copy.
Source: ERPNext documentation: Stock Reconciliation, spreadsheet upload.
Source: ERPNext source code: Stock Reconciliation Item.
Source: ERPNext documentation: accounting migration overview.
Al Noor Office Furniture Trading LLC, a made-up company, moves to ERPNext on 1 January 2027. Its stock report at 31 December 2026 shows 193 units worth AED 47,540.
| Item Code | Warehouse | Quantity | Valuation Rate (AED) | Value (AED), your check only |
|---|---|---|---|---|
| CHAIR-OFF-01 | Main Store - ANF | 120 | 180.00 | 21,600 |
| CHAIR-OFF-01 | Showroom - ANF | 8 | 180.00 | 1,440 |
| DESK-120 | Main Store - ANF | 40 | 450.00 | 18,000 |
| CAB-3D | Main Store - ANF | 25 | 260.00 | 6,500 |
| Control total | 4 rows | 193 | 47,540 |
The value column and total row are your own check, not part of the template. Note three numbers: 4 rows, 193 units and AED 47,540. They must match after posting. If you import items from Excel with Arabic names, save the file as UTF-8.
Source: ERPNext documentation: Data Import.
How to post the ERPNext opening stock entry
- New Stock ReconciliationOpen the Stock Reconciliation list and click New.
- Purpose: Opening StockSet the posting date to the cutover date, with a time before the first live transaction.
- Add the rowsDownload the template from the items table, fill it in and upload it. Type the rows by hand for a short list.
- Check the difference accountERPNext sets it to Temporary Opening for this purpose.
- Save, review, submitSubmit only when the quantity and value totals match your approved stock report.
Source: ERPNext documentation: Stock Reconciliation.
Source: ERPNext documentation: special opening balances.
On save, ERPNext rejects the same item and warehouse twice, a row with no warehouse, negative quantities or rates, and a quantity when it cannot find a valuation rate. It first tries the last stock rate, a buying price and the Item. With perpetual inventory, it refuses an income or expense account as the opening difference account. It drops rows that change nothing. It also refuses the Opening Stock purpose for an item and warehouse that already has stock entries, and tells you to use Stock Reconciliation instead. It cannot tell whether your count or cost is right.
Source: ERPNext source code: Stock Reconciliation validations.
Serial numbers and batches. The documentation is not consistent. The Stock Reconciliation page says opening stock can include serial and batch numbers, using the bundle added in version 15. The Opening Stock page says to use a Material Receipt Stock Entry with Is Opening set to Yes, and a help page explains why. Test both on your version with a few items. Food traders who track expiry can read ERP for food distribution.
Source: ERPNext documentation: opening stock for serial and batch items.
Check the result in stock and in the accounts
With perpetual inventory on, the entry raises each warehouse’s stock account by the stock value. The other side goes to Temporary Opening. Run these checks at the cutover date.
| Check | Before posting | After posting |
|---|---|---|
| Stock Balance, quantity | 0 | 193 across 4 item and warehouse rows |
| Stock Balance, value | AED 0 | AED 47,540 |
| Stock Ledger | No entries for these items | One line per row, linked to the Stock Reconciliation |
| Stock account for the warehouses | AED 0 | AED 47,540 debit |
| Temporary Opening | AED 0 | AED 47,540 credit, until other opening entries are posted |
| Stock and Account Value Comparison | No difference | No difference |
Source: ERPNext documentation: opening stock difference account.
Source: ERPNext documentation: Stock Ledger.
Source: ERPNext documentation: Stock and Account Value Comparison.
Compare quantity and value separately, by item and warehouse. A matching total can hide two errors that cancel out. Look for zero or negative valuation, wrong warehouses, serial or batch differences and rounding.
Source: ERPNext documentation: validate the migration.
The Temporary Opening balance is expected for now. It clears as the remaining opening balances are posted. Do not add stock again in the opening journal entry, because the Stock Reconciliation already posted it. When all opening documents are in, Temporary Opening should be zero.
Source: ERPNext documentation: opening balance in accounts.
This article explains the documented workflow. The sample file and the before and after figures are a fictional example worked out with arithmetic only. They were not posted on a live system, so screens and button labels may differ on your version. For a hands-on test, use a separate demo company and confirm each step against the ERPNext version you plan to run.
Why a CSV upload alone is not sign-off
An upload that finishes without errors only shows that ERPNext accepted the rows, not that they are right. ERPNext’s migration guide says to judge a migration by whether it agrees with the approved source reports, not by the number of successful imports. The setup guide lists stock quantities and values among the checks before go-live.
Source: ERPNext documentation: accounting migration overview.
Source: ERPNext documentation: setting up.
These mistakes can pass the upload:
- A row against the wrong warehouse. The total is right, the location is wrong.
- A quantity counted in boxes for an item stocked in pieces.
- An item missing from the file. Count the rows as well as the totals.
- Stock value entered twice, by the Stock Reconciliation and again in the opening journal entry.
Sign-off is a written record for each check: report name and filters, old total, ERPNext total, difference, explanation, preparer, reviewer and approval date. The finance owner approves it before live transactions start.
Source: ERPNext documentation: validate the migration, sign-off.
For who does what during setup, see what ERP onboarding requires. For the full move from Excel or another system, read moving to ERPNext.
Fix mistakes, then lock the opening
- Before go-live. Correct a wrong stock opening through Stock Reconciliation, then rerun the stock reports and Trial Balance.
- Back-dated changes. When a past stock entry changes, ERPNext reposts every later entry for that item and warehouse. This is slow on a busy ledger, so fix the opening before live work starts.
- Lock it. After sign-off, freeze the opening period in the accounts. Stock Settings also has a Stock Frozen Upto date. Only a chosen role can change stock up to it.
- Keep a backup. Download a database backup before the final load, and store the old exports safely.
Source: ERPNext documentation: correcting errors.
Source: ERPNext documentation: valuation and reposting.
Source: ERPNext documentation: freeze the accepted opening.
Source: ERPNext documentation: Stock Settings.
Source: ERPNext documentation: downloading backups.
A practice run helps. Our ERPNext trial checklist lists what to test first, and ERP for a trading company shows how stock moves after day one.
Prepared by the StarterKit team. Regulatory statements link to UAE government sources. Examples and suggested work plans are labelled separately; they do not determine your business’s legal or tax position. Check the linked decisions for the full conditions and later changes.