[Feature Improvement] Item Price

Our team will make improvements for Item Price with the below features as discussed in this GitHub Issue (Improving upon Item Price · Issue #8456 · frappe/erpnext · GitHub) . We started sending PR for the contribution and even community member help with the coding. We want to push and continue it to merge to the core.

We wanted to achieved Customer/Supplier specific, Quantity and UOM Based Item Prices with Item Prices History feature.

  1. New fields addition:
  • Supplier (Link:Supplier) [if:buying]
  • Customer (Link:Customer) [if:selling]
  • Minimum Qty (Float)
  • UOM (Link: UOM)
  • Packing Unit (Int, quantity that must be bought or sold per UOM)
  • Rate per UOM (rename Rate to that to be specific)
  • Lead Time in days (Int)
  • Valid From (Date)
  • Valid Upto (Date)
  • Note (Text)
  • Disable (Checkbox)

Here is the initial mockup:

  1. Script/Controllers improvement for Retrieval of Prices.
  • When price is retrieved, it must be based on Customer, Item Qty, Item UOM and Transaction Date for Item Price validity.
  • Must be effective first before Price Rule.
  • Validation for Duplicate Item Price within the validity period.
  1. Item Price History Report

You may read on the GitHub issue above for further initial discussions. A link to the existing PR is also there if you want to view the initial code.

Tagging the ones who initially work on this for looping @dominik @kickapoo @Ben_Cornwell_Mott

Regards,

Dori

7 Likes

Would be nice to have a Item Price History on where to store old prices and validity

5 Likes

The improved Item Price would already show history of prices based on the Valid From and Valid To dates. A validation will be prepared to not allow duplicates or overlap of the validity dates with the same Pricelist, Customer, QTY and UOM. We can add a report to view Item Price History better.

A report for Item Price history could work perfectly :+1:

2 Likes

Cool. Thanks @JoEz, i’ll note this one as additional feature as this will be very helpful for everybody.

So you’re going to keep all old prices in Item Price?

For this design, yes. We will be adding “Disable” button as well for insanity check.

Humm …probably would be better to item price history in another table.

If you that 10k+ product and price variation weekly the Item Price table will grow a lot, what you think?

Yes we are open with this idea as well. Though we need to have a proper design on how we archive invalid prices :wink:

1 Like

I think you could overwrite Item Price and before_save store it on history price …so you’ll have active price in Item Price and disabled/old price in history price table.

Could work?

1 Like

Yeah I think it could. Let see, I have to discuss this with the team and let you know. Thanks for the suggestion!

1 Like

Any news on this?

Please let us know if there is any help needed to make progress with this feature.

Hi @strixaluco! Thanks for the interest! We will be sending PR within the week. I will post here link so you can take a look. You can help in creating test case or fixing bugs if there are. Thanks! :smiley:

4 Likes

Are you going to add price history as well?

Can I suggest:

  • add info about supplier_part_no for the selected Supplier?

  • set item-price per warehouse

1 Like

Hi @JoEz! The priority for initial PR is just having all the basic proposed function. The Price History will be an addition later on. I have sent a PR https://github.com/frappe/erpnext/pull/11464 . You guys might want to take a look or might be interested in testing! We might missed out on something. Thanks!

:+1: I’ll have a look and will try to send a PR for Price History

1 Like

Cool! I will try to play around with it. Thanks.

1 Like

Hi @JoEz, did you run a price history PR at the end?

Thanks!

Nope, sorry