ERPNext app · Open source

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.

View on GitHub
Buy and sellAutomatic journalsBonus and splitHoldings report
New Investment Portfolio form in ERPNext with company, date, segment, category, script, quantity, entry price, charges, total cost of ownership and accounts marked by numbered callouts
2016
Founded
ERPNext work since 2016
200+
Projects
Delivered and supported
15+
Countries
Clients across the world
50+
In-house team
One team, no outsourcing
The short answer

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.

Key terms in the ERPNext Portfolio app
TermWhat it means
ScriptThe security you trade, such as RELIANCE or NIFTYBEES.
Investment SegmentThe asset class: for example Equity, Mutual Funds or ETF.
CategoryThe nature of the investment: Equity or Debt.
Capital AccountThe asset account that holds the cost of your securities.
Investment ChargesThe expense account for brokerage, transaction tax, fees, GST and stamp duty.
Investment IncomeThe income account for realised gains and losses.
Total Cost of OwnershipInvestment value plus every entry charge: the final debit on the contract note.
Pending QuantityShares still held and available to sell.
Corporate ActionThe 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.

01

Draft

The purchase is saved but not yet in the books.

02

Holding

Submitted. The entry journal is posted in the background.

03

Partially Exited

Some of the quantity has been sold. The rest is still held.

04

Exited

Pending quantity is zero, after a full sale or a split into new holdings.

Buyer's guide

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.

ERPNext Portfolio app compared with spreadsheets and stand-alone portfolio software
What mattersPortfolio app in ERPNextSpreadsheetStand-alone portfolio software
Journal entriesPosted for every buy and sellTyped by handExported, then re-keyed or imported
Brokerage and taxesBooked to an expense account each timeOften mixed into costTracked, but outside the books
Selling in partsAny number of partial exits per lotManual workingSupported
Bonus issues and splitsApplied to every eligible lot, with an audit recordManual workingUsually supported
ReversalsCancel reverses the linked journalsFixed by handBooks corrected separately
Live market valueNot included: holdings are at costManual pricesUsually included
Software costOpen source, no licence feeNoneSubscription

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.
Set-up

How do you set up the Portfolio app?

Three masters, filled in once. After that, every new purchase picks them up for you.

01

Company default accounts

Pick four ledgers once on the Company: bank, capital, investment charges and investment income.

02

Segments and categories

Add your asset classes (Equity, Mutual Funds, ETF) and categories (Equity, Debt).

03

Scripts

Register each security with its trading symbol, full name and an optional benchmark index.

Company form in ERPNext with the bank, capital, investment charges and investment income accounts marked by numbered callouts

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.

New Script form in ERPNext with script code, script name and benchmark fields

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.

Buy

How do you record a purchase?

One Investment Portfolio document per purchase lot. Fill in the details and the amounts work themselves out.

Submitted Investment Portfolio INV-PORT-0001 in ERPNext with the status Holding
  1. 1
    Fill in the detailsCompany, date of investment, segment, category and script.
  2. 2
    Enter quantity and priceEntry amount is worked out: 100 shares at 2,500 make 250,000.
  3. 3
    Enter the total costType the final debit from the contract note. Charges are the difference.
  4. 4
    Save, 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.

Entry journal posted by the Portfolio app for a purchase
AccountWhat it carriesDebitCredit
Capital AccountCost of the shares250,000.00
Investment ChargesBrokerage and taxes500.00
Bank AccountTotal paid250,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.

Investment Portfolio form in ERPNext with the Is Existing check box and the JV of Entry link field
Sell

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 Section of an Investment Portfolio in ERPNext with exit date, quantity, price, amount and charges marked by numbered callouts
  • 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.

Exit journal for a sale of 40 shares bought at 2,500, at a gain and at a loss
AccountSold at 2,800 (gain)Sold at 2,200 (loss)
Bank: net receivedDebit 111,800.00Debit 87,800.00
Investment Charges: feesDebit 200.00Debit 200.00
Investment Income: gain or lossCredit 12,000.00Debit 12,000.00
Capital Account: cost removedCredit 100,000.00Credit 100,000.00
Investment Portfolio after a partial sale in ERPNext: pending quantity 60, status Partially Exited and one row in the Exits table with its journal entry
After the sale: pending quantity 60, status Partially Exited, and the sale logged with its journal.

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 this app

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.

Read the code on GitHub, or check our partner listing on frappe.io.

Corporate actions

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.

Apply Bonus dialog in ERPNext with script, record date, total holding quantity, bonus ratio, bonus date and post-bonus quantity

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.

How to enter a bonus ratio in the Portfolio app
Bonus announcedWhat it meansEnter as ratio
1:1One new share for every one held1.0
1:2One new share for every two held0.5
2:1Two new shares for every one held2.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.

Portfolio Split section in ERPNext with quantity after split, the split row and a split summary reading Amount and Qty Matched

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.

Reports

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.

Script-Wise Portfolio Holdings Report in ERPNext with company and date filters, balance quantity, average price, invested value and entry charges per script

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.

Script-Wise Trade Book Report in ERPNext listing a purchase and an exit with in and out quantities, running balance, average rate and journal link
Controls

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.

Validation rules in the ERPNext Portfolio app
AreaRule
Exit amountNet exit amount cannot be more than the exit amount.
Exit dateCannot be earlier than the date of investment.
Exit quantityTotal exits cannot be more than the quantity bought.
SplitQuantities must equal Qty After Split, and the value must match within 0.01.
Corporate actionsCannot be deleted. Use Cancel to reverse one.
Existing holdingsA 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.

Client reviews

What do clients say about working with FinByz?

Google review
“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.”
Deep PatelCEO & Founder, Millennium Vitrified Tiles Pvt. Ltd., India
Read on Google
Google review
“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.”
Ali Saleh Al-EbrahimCTO, Construction Pillars Company, Saudi Arabia
Read on Google
Google review
“Great and professional software solutions, with a team very focused on client satisfaction.”
Chief Executive OfficerCooperativa de Trabajo Apicola Pampero, Argentina
Read on Google
Get started

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.

  1. 1
    Install on a copy firstWe install the app on a copy of your ERPNext site, so your team can practise before anything touches production.
  2. 2
    Set the accounts and mastersCompany defaults, segments, categories and the scripts you hold, checked by our accountants.
  3. 3
    Bring in what you already holdOld purchases are linked to their existing Journal Entries, so the holdings report is complete from day one.
  4. 4
    Train 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/Portfolio downloads the app into your bench.
  • bench --site your-site install-app portfolio adds 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.

See it on your data
Investments, charges and gains, in the books you already keep.
Where we are

Ahmedabad, India

Head office and delivery centre. FinByz Tech Pvt Ltd, 504-Addor Ambition, Nr. Navrang Circle, Navrangpura, Ahmedabad, Gujarat 380009.

+91 99257 01446

Dubai, UAE

UAE office. Finbyz Tech FZE, DWTC free zone, Dubai.

Get started with the Portfolio app

See the Portfolio App on Your Own Data

Book a short demo. We show purchases, partial sales, bonus issues and the holdings report, then look at how you record investments today.

Open source under GPL v3 | Silver Frappe partner
Questions buyers ask

Frequently Asked Questions

Find answers to common questions about our services

What is ERPNext investment portfolio management?

It is tracking the shares, mutual funds and ETFs your company holds inside its ERPNext books. The open-source Portfolio app from FinByz Tech records each purchase lot, partial sales, bonus issues and splits, and posts every journal entry for you.

Does standard ERPNext track investments in shares and mutual funds?

No. ERPNext's Share Management records who owns shares in your own company. The Portfolio app adds tracking of investments your company makes in other securities.

Which investments can the Portfolio app track?

Any security with a trading symbol. You define the asset classes yourself; most companies use Equity, Mutual Funds and ETF, with the categories Equity and Debt.

Which journal entries does the app post?

On a purchase it debits the Capital Account and Investment Charges and credits the bank. On a sale it debits the bank and charges, credits the Capital Account with the cost removed, and books the gain or loss to Investment Income.

Can I sell part of a holding?

Yes. Sell in tranches as often as you like. Pending quantity drops with each sale, and the status moves from Holding to Partially Exited, then Exited at zero.

How do I add holdings bought before ERPNext go-live?

Tick Is Existing on a new Investment Portfolio and link the Journal Entry already in your books. The app creates no new voucher, so nothing is posted twice.

How does the app handle bonus issues and stock splits?

Apply Bonus adds bonus shares to every eligible holding and lowers the cost per share, so invested value stays the same. Portfolio Split handles face value splits and demergers. Each action is logged and can be cancelled.

Does the app show market value or dividends?

No. Holdings are valued at cost, so there is no live market value or unrealised gain, and dividends are booked as normal income entries in ERPNext. We can add these to the app if you need them.

Which reports does the Portfolio app give?

The Script-Wise Portfolio Holdings Report shows balance quantity, average price and invested value on any date. The Script-Wise Trade Book Report lists every purchase, bonus, split and sale with a running balance and a link to each journal.

Is the Portfolio app free, and how do I start?

The app is open source under GPL v3, so there is no licence fee. You pay only for our team's time to set it up, bring in your holdings and train your users. Start with a short demo.