Item purchase price and ERPNext 6

Hi everyone, been some time since I dabbled in erpnext. I recently started playing around v6.14.1 and realized a few things that appeared to me to be show stoppers. First of all, in v4, the system had a validation that checked for cost of an item before it could be sold. That is, an item without a purchase cost could not be invoiced. This ensured every sales invoice had a corresponding entry in cost of sales.

To my amazement, this feature isn’t available in v6.14.1. I don’t know if it’s hidden somewhere in the settings but I could no figure out where it was.

Also I need to edit the sales invoice doctype so I can set ‘Update Stock’ to true, but the Sales Invoice doctype appears all to be read only, and I am not sure how to edit a doctype.

Thanks in advance

There could be some validations that might have been removed. No reason why Update Stock could be read-only.

Use customize form.

I think I’ll raise a github issue about the validation. Really very wrong
for the system to post an invoice without a corresponding cost of sales

Should be an option than. Other may like the freedom to sell and enter price manually…

You mean submit an invoice, then manually enter a corresponding cost of

No I mean enter the sales price manually before submit.
Maybe we misunderstand eachother. I have a pricelist for sales. If I have forgotten to enter a price, this will show as a zero in the invoice I usually immediately enter than a price in pricelist, but sometimes in a hurry just enter price directly in the invoice. Our goods have no high value, so I may be off by an Euro or so. Also, we do not have personel so security/fraud is not an issue

Yes we misunderstood each other. My issue isn’t with selling price. My
issue with buying/cost price.

To demo:

  1. Create new item
  2. Set selling price
  3. Raise new sales invoice
  4. System submits fine and books relevant accounting entries relating to

However, no corresponding entry is made in cost of sales because item
created in step one didn’t have any corresponding buying/cost price.

So P&L wrongly shows total sales made in step four as total profits.

In previous versions, the system would not submit an invoice without a
corresponding buying/cost price. This ensured every invoice posted had a
relevant corresponding cost of sales

Cost of item (buying price) is booked at purchase receipt stage. First, pls check if it’s a stock item. On sales stage, cost of goods sold is booked on submitting a delivery note or sales invoice with update stock option is checked.

Yes it’s a purchase item and a sales item. But I can confirm version 6 of
erpnext does not check for buying/cost of item.

Any invoice will be submitted just fine even if there’s no cost of item.

In version 4, one could enable negative inventory and the system would
still insist on a cost of item then book both cost of sales and a
corresponding negative value in finished goods ledger.

That feature has been taken out. So if you enable negative inventory, the
system will just book the relevant accounting entries relating to sales and
completely ignore cost of sales leg of the entries.

You better to not activate negative stock in V5 onwards. The fifo system will assume the item has no value if there’s no qty…hence it doesn’t post cost of goods sold on submitting DN or SI.

I personally see this ‘negative stock’ option has no point as of now in ERPNext although I see this feature can be useful in some business scenarios…

Yes I agree if this option is checked then the system should post corresponding accounting entries. But the question is which value to be posted when the qty is zero/negative?

Just an idea…if negative stock is checked, then last purchase price would be the value? So accounting value is always equal with stock value…

May be core team can answer this better…

Oh yes, like you rightly said, negative stock has applications in some
settings. Take a business that is migrating to erpnext and has a list of
items from its previous system together with each item’s valuation rate and

So to speed things up, the business decides to setup items and
corresponding buying price and starts selling from erpnext. In previous
versions this would not be a problem because the system will book all
relevant entries, both cost and revenue and make a negative finished goods

So later when the quantities are entered, then finished goods negative
value will be made up.

But now, as you said, the only criteria the system uses to determine if an
item has a cost is if it’s got a quantity, a situation which, at least from
a lot of businesses I know, isn’t always so.