Cost Plus Pricing (Selling)


I’m trying to implement a “Cost+XX Margin %” Pricing
I have found from previous discussions here that the Pricing Rule should do the trick.

That is;

Rate = Price List Rate (Item Rate) + Margin Rate (on Pricing Rule Doctype)

To me there are two problems with this;

  • First one is that the purchasing prices change frequently. So the “cost” changes.

  • And the second is margin should be applied to the “Cost of Inventory” that is weighted or moving average stock price. Not the purchase price itself.

So is there any method that I can set the selling price as;

Rate = Current Moving Average Stock Rate + Margin Rate (on Pricing Rule Doctype)

Or Is there any other method to achieve what I’m suggesting?

Hope I made it clear to you.

PS: Better if there is a method to update price lists automatically. Otherwise manually updating price lists could be a cumbersome and error-prone process. I can’t believe this feature was not brought forward in the past.

1 Like


relisting on top

agree this approach

Thanks. Waiting for someone to answer this.

In ERPNext the “margin” pricing rule is incorrectly named. It should be “markup” (which is what you describe).

In most cases, I advise people to use markup or “markup multiple” because it’s so much easier to reason about.

Decision Maker: “Increase the selling price by 50%”
Peon: “$1.00 plus 50% is $1.50”

Decision Maker: “Change the markup to 50%”
Peon: “$0.75 cost times 150% is a new selling price of $1.13”

Decision Maker: “Change the margin to 50%”
Peon: “$0.75 / 50% = $1.50”

Markup is easier to have a conversation about because most people can do math like 1 * 1.5 in their heads versus .75 / .5. It engages people to understand that 1.0 is always cost and then how much markup need depends on the item, item group, customer, whatever makes business sense. “We get 1.75 on dairy because it has more turns but 2.5 on seasonal items because it turns once a year.”

// margin
flt(effective_item_rate) / (1.0 - flt(item.margin_rate_or_amount / 100));
// markup
flt(effective_item_rate) + (flt(effective_item_rate) * ( flt(item.margin_rate_or_amount) / 100));

Source code

Your request for updating purchasing prices is a reasonable one, but it isn’t something everybody would want. You could achieve this with some lightweight customization.

1 Like