Pricing UOM independent from stock/transaction UOM

In agricultural commodity trading, quantities are typically tracked in kg while pricing is expressed per metric ton (1 000 kg). ERPNext currently has no native way to handle this cleanly.

The UOM conversion feature doesn’t solve it: it converts the quantity for stock purposes, but the transaction document still lives in a single UOM. So you either invoice in metric ton (breaking the kg convention) or invoice in kg with a per-kg rate (which is never how prices are communicated in this sector).

The core issue is that amount = qty × rate assumes quantity and pricing are in the same UOM. What’s needed is effectively amount = qty × rate × conversion_factor, where the pricing UOM and its conversion are defined separately from the stock/transaction UOM.

The only workable workaround we’ve found is a custom “Rate per MT” field with a client script dividing it by 1000 to populate the actual rate. Functional, but a hack, and often results in unexpected problems.

Is there an existing app or project that handles this? And if not, would there be interest in supporting a dedicated pricing UOM in ERPNext core? It seems like a pattern that would apply beyond just our sector: anywhere the traded unit and the priced unit differ.

@daanl

Did you try price list control where item prices are UOM dependent and working with conversion factor on transaction level efficiently.

Thank you, Daan, for bringing this to our attention.

I have been working with ERPNext for 5 months now, and it works great, but selling products per kg while having a price per ton is really a problem. At the moment, I am using a quick fix through a custom script, but I regularly run into its limitations.

If anyone knows a good solution, please feel free to share it.

@Bert

The conversion factor is the solution.

Hey AShan,

I had to divide the post so please see below

Part 2