[$50 Bounty] New Sales Order/Quotation pulls wrong Item Price

Reported on Github: [BUG] New Sales Order/Quotation pulls wrong Item Price · Issue #20144 · frappe/erpnext · GitHub

Hello sirs.

I am running ERPNext hosted version. This is my system version:

ERPNext: v12.3.1 (version-12)
Frappe Framework: v12.1.0 (version-12)

I have set up different Item Price for the same Item with the same Price List. Please take a look at this picture of Item Price.

  • Min Qty 1 → Rate VND 169.000
  • Min Qty 20 → Rate VND 50.000

And now when I create a new Sales Order for the Item, Quantity = 1. The Rate must be VND 169.000, but instead it is VND 50.000.

This also happens to New Quotation form. I am willing to donate for the official fix to be released asap. Please let me know the price.

Thank you for reading,
Son Nguyen.

instead of Item Price, you can use Pricing Rule that will work fine in your case.

even in current use case with Min item qty 1 change it to Min Qty 19.

Hi. I have just tried your second solution, which is setting Min Qty to 19, but it still doesn’t work. But thank you sir for responding.

try Pricing Rule. That will work perfect in your case.

Yes sir. I know Pricing Rule works but it is my last choice. Because I have many Items and in the future I want to use Pricing Rule to manage seasonal promotions, so I want to keep it clean.

In Price List I dont think the Min Qty is a condition to applying price. I believe it is for auto-reordering.
So putting 2 prices for same item will pull the last* price to SO etc.

  • I think I read about this pulling last price somewhere in the manual… but sorry I forget where.

Please read this doc:


In the doc it says:
Minimum quantity: This is the minimum quantity of items to be transacted for this price to be applicable and updated in the Item Price list.

1 Like

oh my mistake…
And it gets me wonder then what is the different purpose if using that min qty and using the price rule (specifically for price-qty arrangement)

Yes sir it makes me confused, too. Item Price + Price List is enough to manage wholesale pricings in small businesses. Pricing Rule should be used to manage promotions in general.

1 Like

@rmehta I’m sorry sir for mentioning you here. But can you please take a look and see if you can assign someone to fix this? Thank you so much.

Hi @Shan_Ruan,

You need to define the pricing rule to handle this. Select min qty 1 and max qty 19, choose rate as PRICE DISCOUNT SCHEME and enter the rate as 169. Define another pricing rule for min qty 20 and rate as 50. I have tested this out on my system for you.
My $50 please :slightly_smiling_face:

Hi @mujeerhashmi, I have set different price lists for customer and vendor, while I create Quotation, customer price list applies and it automatically fetch the sale price list that already assigned, but on the sales cycle, when I confirm the Quotation to Sales Order and from there I am creating material request, while I create purchase order from Material request for the SO, the vendor price list is not fetching instead prices are fetched from the quotation/ SO. But if I create an PO directly the vendor price list is fetching correctly. As you sort out the above issue, could you please help me out. I do not have idea how to work the pricing rules.

Appreciate your help.




The manual should help you in understanding how to work with the pricing rule.

Thank you for your help. You are right, we can use Pricing Rule, and this is a good choice, too.

There is a bug, and we need solutions. One is to fix the bug itself. And another way is to use some kind of monkey patch or workaround. I prefer fixing the bug itself, keeping things standard.