Investment Portfolio Management in ERPNext
FinByz Tech's open-source Portfolio app adds investment portfolio management to ERPNext version 16. Buy shares, funds and ETFs, sell in parts, apply bonuses and splits, and every journal is posted for you.

What is ERPNext investment portfolio management?
ERPNext investment portfolio management is tracking a company's own shares, mutual funds and ETFs inside its ERPNext books.
Standard ERPNext has no module for investments a company holds in other companies. FinByz Tech's open-source Portfolio app adds one: one document per purchase lot, sales in parts, bonus issues, splits, and two reports. Every buy and sell posts its journal entry for you.
ERPNext's own Share Management records who owns shares in your company. It does not track the shares, mutual funds and ETFs your company buys with surplus cash. The Portfolio app fills that gap.
It suits holding companies, family-run groups and any business that invests treasury cash and wants the holdings, the charges and the gains in the same books as everything else. It is one of our ERPNext apps.
Which investments can you track?
You define the asset classes yourself. Most companies start with these.
- Listed equity shares
- Mutual funds
- ETFs
- Debt funds
- Any security with a symbol
What do the key terms mean?
Nine words you will see on every screen of the app.
| Term | What it means |
|---|---|
| Script | The security you trade, such as RELIANCE or NIFTYBEES. |
| Investment Segment | The asset class: for example Equity, Mutual Funds or ETF. |
| Category | The nature of the investment: Equity or Debt. |
| Capital Account | The asset account that holds the cost of your securities. |
| Investment Charges | The expense account for brokerage, transaction tax, fees, GST and stamp duty. |
| Investment Income | The income account for realised gains and losses. |
| Total Cost of Ownership | Investment value plus every entry charge: the final debit on the contract note. |
| Pending Quantity | Shares still held and available to sell. |
| Corporate Action | The audit record kept for every bonus issue and split. |
What happens to a holding over its life?
Each purchase lot moves through four stages, shown as its status.
Draft
The purchase is saved but not yet in the books.
Holding
Submitted. The entry journal is posted in the background.
Partially Exited
Some of the quantity has been sold. The rest is still held.
Exited
Pending quantity is zero, after a full sale or a split into new holdings.
ERPNext app or separate investment portfolio management software?
Spreadsheets and stand-alone portfolio tools both keep the holdings outside your ERPNext books. The app keeps holdings and accounts in one place.
| What matters | Portfolio app in ERPNext | Spreadsheet | Stand-alone portfolio software |
|---|---|---|---|
| Journal entries | Posted for every buy and sell | Typed by hand | Exported, then re-keyed or imported |
| Brokerage and taxes | Booked to an expense account each time | Often mixed into cost | Tracked, but outside the books |
| Selling in parts | Any number of partial exits per lot | Manual working | Supported |
| Bonus issues and splits | Applied to every eligible lot, with an audit record | Manual working | Usually supported |
| Reversals | Cancel reverses the linked journals | Fixed by hand | Books corrected separately |
| Live market value | Not included: holdings are at cost | Manual prices | Usually included |
| Software cost | Open source, no licence fee | None | Subscription |
When is a portfolio management ERP app a good fit?
It fits when your accountants already post investment trades in ERPNext by hand.
- You already run ERPNext. Accounts, bank and payables are there, so investments should be too.
- Your accountant posts these by hand. Contract notes typed into Journal Entries, one by one.
- You sell in tranches. Partial exits are hard to keep right in a spreadsheet.
- Audits ask for proof. Each line in the trade book links to its journal.
What does the app not do?
The Portfolio app values holdings at cost, in the company's own currency. Plan for these gaps.
- No live prices. Holdings are valued at cost, so there is no market value or unrealised gain.
- No dividends. Book dividends as normal income entries in ERPNext.
- No client money. It tracks your company's own investments, not funds managed for others.
- No tax return. It books realised gains. Your tax adviser works out the tax from the reports.
- No fair-value entries. Post Ind AS 109 or IFRS 9 fair-value changes as normal Journal Entries.
- One currency per company. Holdings use the company's own currency, not the security's.
How do you set up the Portfolio app?
Three masters, filled in once. After that, every new purchase picks them up for you.
Company default accounts
Pick four ledgers once on the Company: bank, capital, investment charges and investment income.
Segments and categories
Add your asset classes (Equity, Mutual Funds, ETF) and categories (Equity, Debt).
Scripts
Register each security with its trading symbol, full name and an optional benchmark index.

Which accounts does the app need?
Accounting > Company > your company. Set four ledgers before the first trade.
- Bank Account (type Bank). Pays for purchases and receives sale money.
- Capital Account (root type Asset). Holds the cost of your investments.
- Investment Charges Account (Expense). Brokerage and transaction fees.
- Investment Income Account (Income). Realised gains and losses.
Wrong account types are the most common set-up mistake, so check each one before saving. Need help with the ledgers? See how to use the chart of accounts.
How do you add a security?
Portfolio Management > Script > New. One record per security you trade.
Enter the script code (RELIANCE, INFY), the full name and, if you like, a benchmark such as NIFTY 50. Use the same symbol your broker prints on the contract note: matching statements is then much faster.

Can one ERPNext site track several companies?
Yes. Each purchase lot belongs to one company and uses that company's default accounts and currency. Both reports filter by company.
How do you record a purchase?
One Investment Portfolio document per purchase lot. Fill in the details and the amounts work themselves out.

- 1Fill in the detailsCompany, date of investment, segment, category and script.
- 2Enter quantity and priceEntry amount is worked out: 100 shares at 2,500 make 250,000.
- 3Enter the total costType the final debit from the contract note. Charges are the difference.
- 4Save, then submitStatus moves from Draft to Holding, and the entry journal is posted.
Which journal entry does a purchase post?
For the example above, the app posts this Journal Entry and submits it in the background.
| Account | What it carries | Debit | Credit |
|---|---|---|---|
| Capital Account | Cost of the shares | 250,000.00 | |
| Investment Charges | Brokerage and taxes | 500.00 | |
| Bank Account | Total paid | 250,500.00 |
Should charges be worked out or typed in?
The app can work out entry charges from the contract note total, or take them typed in.
Worked out: enter the contract note's final debit as Total Cost of Ownership, and the app sets entry charges to the difference. Typed in: if you know only the total charges, tick Set Entry Charges Manually and enter them. The total updates itself. Account fields fill from the company defaults and can be changed for one trade.
What about holdings bought before go-live?
Link the old Journal Entry instead of posting it again.
Tick Is Existing and pick the submitted Journal Entry in JV of Entry. On submit the app links it and creates no new voucher. This covers shares bought before ERPNext, purchases your accountant already posted, and data moved from another system. Onboard old holdings first, then record new trades.

How do you sell all or part of a holding?
To sell in the Portfolio app, open a holding with the status Holding or Partially Exited, fill in the Exit Section and click Create Exit JV.

- Exit Date and Exit Qty. For example 40 of the 100 shares.
- Exit Price. Exit Amount is worked out: 40 at 2,800 make 112,000.
- Exit charges. Tick Set Exit Charges Manually to record brokerage and fees.
- Create Exit JV. Posts the sale, adds a row to the Exits table and clears the section for the next sale.
Sell in tranches as often as you like. Pending quantity drops (here from 100 to 60) and the status becomes Partially Exited, then Exited at zero.
How is the gain or loss booked?
Gain or loss is the exit price minus the entry price, times the exit quantity. Exit charges are always an expense, never netted into the gain.
| Account | Sold at 2,800 (gain) | Sold at 2,200 (loss) |
|---|---|---|
| Bank: net received | Debit 111,800.00 | Debit 87,800.00 |
| Investment Charges: fees | Debit 200.00 | Debit 200.00 |
| Investment Income: gain or loss | Credit 12,000.00 | Debit 12,000.00 |
| Capital Account: cost removed | Credit 100,000.00 | Credit 100,000.00 |

Which cost is used when you sell?
The entry price of that purchase lot. Each lot keeps its own date and price, so the holding period for capital gains tax is clear, and the reports show the average cost across lots.
Why keep portfolio tracking inside ERPNext?
Every trade changes the books. The Portfolio app posts each change for you, in the same ERPNext your accountants already use.
One set of books
Holdings live in the same ERPNext as your bank, payables and payroll. No export, no re-keying, no second ledger to reconcile.
Charges kept apart
Brokerage and taxes go to their own expense account on every buy and sell. They never hide inside the gain.
Rules that protect the data
The app blocks sales above the quantity held, exits dated before the purchase and splits that do not add up.
Every line traced
Each row in the trade book links to its journal, so an auditor can follow any holding back to the voucher.
Open source, no lock-in
The app is open source under GPL v3, like ERPNext. You get the code from day one and can fork it any time.
Set up by accountants
FinByz Tech's in-house accounting team checks the ledgers and opening holdings. We have worked on ERPNext since 2016.
How do bonus issues and splits work in the app?
Bonus issues and splits change the share count, not the money invested. The Portfolio app keeps the invested value the same and logs each action.

How do you apply a bonus issue?
From the Investment Portfolio list, click Apply Bonus.
Pick the script (only scripts with active holdings appear) and the record date: holdings bought on or before it qualify. Enter the ratio as a decimal and the allotment date. Check Post Bonus Qty against your demat statement, then Apply. Every eligible lot gets its bonus shares and a lower cost per share.
New entry price = entry price ÷ (1 + ratio). Bonus shares = pending quantity × ratio. So 100 shares at 2,000 become 200 at 1,000 after a 1:1 bonus, and the value stays 200,000.
| Bonus announced | What it means | Enter as ratio |
|---|---|---|
| 1:1 | One new share for every one held | 1.0 |
| 1:2 | One new share for every two held | 0.5 |
| 2:1 | Two new shares for every one held | 2.0 |
How do you record a split or a demerger?
Open the holding and use Portfolio Split, for a face value split or a demerger.
Enter Qty After Split (equal to or more than the pending quantity). Add one row per resulting holding, with new scripts for a demerger. Continue only when the Split Summary reads Amount & Qty Matched: quantities must add up exactly, and amounts must equal pending quantity × entry price within 0.01. On Split, the parent becomes Exited and the new holdings are submitted.

Can you undo a bonus or split applied by mistake?
Yes. Cancel the Investment Corporate Action record and the bonus or split is rolled back in full. The cancel is blocked only if a new split holding already has a sale.
Which reports does the app give for ERPNext portfolio tracking?
Two script-wise reports: where you stand on a date, and every trade that got you there.

What does the holdings report show?
Your net position in every script on any date.
- Filters: company (required), an optional script, and To Date for the position on that day.
- Balance Qty: shares still held. Check it against your demat statement.
- Invested Value: quantity × weighted average price, with entry charges as an optional column.
Run it with To Date as your year end to support audit and tax work.
What does the trade book show?
Every purchase, bonus, split and sale for a script, date by date.
The trade book shows In Qty for purchases, bonuses and split-ins, and Out Qty for sales and split-outs. Each line has a running balance, the moving average cost and a link to its journal, so it is the audit trail for each security.

What checks keep your books right?
The Portfolio app blocks six kinds of error before they reach the ERPNext books. If a save or submit is refused, one of these rules is the reason.
| Area | Rule |
|---|---|
| Exit amount | Net exit amount cannot be more than the exit amount. |
| Exit date | Cannot be earlier than the date of investment. |
| Exit quantity | Total exits cannot be more than the quantity bought. |
| Split | Quantities must equal Qty After Split, and the value must match within 0.01. |
| Corporate actions | Cannot be deleted. Use Cancel to reverse one. |
| Existing holdings | A Journal Entry can link to only one active portfolio. |
What happens when you cancel something?
Cancel on either side, the portfolio or the journal, and the two stay in step.
Cancel an Investment Portfolio
Its entry journal and every linked exit journal are cancelled with it.
Cancel an exit Journal Entry
The exit row is removed and the pending quantity is worked out again.
Cancel the entry Journal Entry
The parent portfolio is unlinked or cancelled safely, so no holding points to a missing voucher.
Cancel a corporate action
A bonus or split is rolled back in full. If a new split holding already has a sale, the cancel is blocked to protect the books.
Who can post and cancel trades?
Accounts Users and Accounts Managers can create, submit and cancel portfolios, as in the rest of ERPNext accounts. Narrow it further with ERPNext's role permissions if you need a maker and a checker.
Cancelling a portfolio also cancels its journals, so practise on a test copy of your site first.
What do clients say about working with FinByz?
“We've had an excellent experience working with this software service provider. Their innovative approach to solving complex technical challenges has significantly improved our product. The addition of a dedicated developer to our team ensured seamless communication and consistent progress.”
“I personally think they go far and beyond in their delivery and commitments. As well as insuring that their clients are happy and well informed with there needs.”
“Great and professional software solutions, with a team very focused on client satisfaction.”
How do you start using the Portfolio app?
The app is free and open source. You pay only for our team's time to set it up, move your holdings and train your users.
- 1Install on a copy firstWe install the app on a copy of your ERPNext site, so your team can practise before anything touches production.
- 2Set the accounts and mastersCompany defaults, segments, categories and the scripts you hold, checked by our accountants.
- 3Bring in what you already holdOld purchases are linked to their existing Journal Entries, so the holdings report is complete from day one.
- 4Train and go liveA short session on buying, selling, bonuses, splits and the reports, then the app moves to production.
Can you install the app yourself?
Yes. On your own ERPNext version 16 server, two bench commands install it. Try it on a copy of your site first.
bench get-app --branch version-16 https://github.com/finbyz/Portfoliodownloads the app into your bench.bench --site your-site install-app portfolioadds its doctypes and reports to the site.- On Frappe Cloud, add the app to your bench group from its GitHub repository, deploy, then install it on the site.
- Then set the company default accounts, segments, categories and scripts, as shown in set-up above.
We start with a short demo on sample data and a look at how you record investments today. If you need more, such as dividends or market prices, we can build it into the same app. See our other finance apps for forward contracts and fixed deposits, or keep one of our ERPNext accountants on your books.
Ahmedabad, India
Head office and delivery centre. FinByz Tech Pvt Ltd, 504-Addor Ambition, Nr. Navrang Circle, Navrangpura, Ahmedabad, Gujarat 380009.
Dubai, UAE
UAE office. Finbyz Tech FZE, DWTC free zone, Dubai.





