Issue in pricing rule

I got an issue while appling price rule on a customer based on item code in specific range.

I create a price rule for minimum quantity 2 to maximum quantity 5 and based on it set item price.
Now when i create a sales invoice for this customer for the same item

  1. when item quantity is between the range(2<=item<=5) pricing rule’s price is applied on item .
  2. when item quantity is outside the range(5<item<2) pricing rule’s price is not applied on item means item price list price applied on item.
    but once the item quantiy is between range(2<=item<=5, pricing rule’s price applied) and
    than i change the item quantity outside the range (5<item<2) it still appling the pricing rule’s price how ? item’s price list price is not applied on it why ?
    how to fix it ?

screenshots of sequential proccess




Thanks for reporting the issue and nicely explained via screenshots :smile:

Fixed via Reapply price list if pricing rule reset as blank by nabinhait · Pull Request #2505 · frappe/erpnext · GitHub