frappe / erpnext

Free and Open Source Enterprise Resource Planning (ERP)
https://erpnext.com
GNU General Public License v3.0
21.67k stars 7.29k forks source link

Rate is not reflected on UOM change in PO #2798

Closed kdepoel closed 6 years ago

kdepoel commented 9 years ago

When you change the OUM field in the PO (for an item) the rate is not recalculated with the conversion_factor.

Example: product X has stock UOM as Kg, rate as 0.43 EUR Supplier delivers in bags of 25 kg, so PO ideally should be in Bags I've created a secondary UOM "Bag 25 kg" with conversion factor of 25. Upon selecting the "Bag 25 kg" as the UOM, the rate remains 0.43 In my opinion the rate should be 0.43x25 = 10,75 EUR.

This happens in both v4 and v5

nabinhait commented 9 years ago

We did not implement it because in most cases the price in another uom, is not directly equal to (stock_uom_rate * conversion_factor). The price is somewhat more or less, based on purchase uom.

May be we can add UOm field in price list later. For now, you should make different price list as per uom.

kdepoel commented 9 years ago

It depends on the industry. In my case it actually is rate*conversion_factor. Odoo does that also, by the way.

Creating a different price list is unthinkable. You cannot expect users to change the price list based on the item. It would also complicate things when multiple items are on the same PO.

It would be better to do rate*factor than to do nothing. It now messes things up stock- and accounting-wise.

nabinhait commented 9 years ago

May be we can add a global buying setting "Reset Price List Rate as per Purchase UOM". If checked, the system will reset rate as (rate*conversion_factor).

kdepoel commented 9 years ago

Perfect. Instead of "Reset" you could call it "Calculate", as reset would suggest a reset to an original value. But either way: a setting would give us all the flexibility we want.

rmehta commented 9 years ago

@nabinhait lets discuss this next week, maybe the price list should adapt to both UOM and Currency (?)

kdepoel commented 9 years ago

My two cents: Price list per Currency is normal (in my line of work); so on list level, not on item level. Maintaining different UOMs in a purchasing pricelist, is overkill. Let's assume my initial example. If the price per kg is 0.43 euros, the bag price will be 10.75. If the supplier will give me a discount because I buy in bags, I might have to pay 10.50. This will be adjusted when the invoice comes in. So having the exact purchasing price per UOM might be more pricelist maintenance than is necessary

For Selling it's different, as it immediately impacts turnover. UOM per item would be very interesting, as it enables me to buy in bulk (kg/bags) and sell in small quantities (bag5kg / bag10kg) at different rates.

Please note UOMs for Selling impacts POS as well, as it should. Items shown, should be shown multiple times to account for different UOMs (based on pricelist I assume).

kdepoel commented 9 years ago

"This will be adjusted when the invoice comes in"

Yeah, about that: I tested it, but there's a validation on the Purchase Invoice, that does not allow me to change the rate. I'll leave it up to you to consider the effect in the grand scheme of things.

lmurta commented 9 years ago

I agree with Gentle. This should be the correct procedure: product X has stock UOM as Kg, rate as 0.43 EUR Supplier delivers in bags of 25 kg, so PO ideally should be in Bags I've created a secondary UOM "Bag 25 kg" with conversion factor of 25. Upon selecting the "Bag 25 kg" as the UOM, the rate remains 0.43 In my opinion the rate should be 0.43x25 = 10,75 EUR.

Tropicalrambler commented 8 years ago

@gentle- @lmurta I agree wholeheartedly with what you mention. This issue has bugged me since 3 other software implementations unrelated to ERPNext. Given that you are creating unique UOM conversions in ERPNext, the conversion factor flexibility afforded by ERPNext when entering an item is powerful.

In my particular case:

Supplier delivers Item Y in a container with 1,000 individual sub-units named pellets For Item Y, minimum order qty is 1. Reorder level is set at .50 of Item Y (50% of Item Y). Stock UOM is set as pellets = 1,000 Purchase order/receipt: Item Y Qty x Item Y Price = Item Y Valuation Total (1 Item Y x 105 = 105) Assume no taxes. Stock reflects Item Y_1000: _Item Y* = 1,000 pellets. Each one is worth 1,000/105 = .105 Bill of Materials removes 600 pellets of Item Y for a manufacturing process. Value: 63 (.105_600) Stock now reflects a remainder of 400 pellets of *_Item Y*. Value: 42 (.105_400) Since this falls below the 50% reorder level, _Item Y PO is triggered for minimum Item Y order qty, as listed above: 1 Item Y container with 1,000 pellets**.

I concur, rate should be per Purchase UOM in purchase order. Valuation in stock should be per stock UOM.

voltivo commented 7 years ago

I would love to see this feature as well.

thosvesta commented 7 years ago

Like to see this feature as well. Thanks

sbkolate commented 7 years ago

We have stock_uom and uom conversion factor in Item master.

We can do following customisation in price list 1) Add check box, price is not directly depend on UOM 2) If checkbox is not clicked, do conversion of rate based on uom conversion factor 3) If checkbox is clicked, who child tables to add Price List Rate and UOM 4) When UOM changed in purchase cycle, fetch price from child table if checkbox is checked. If checkbox is not checked recalculate price.

We have this things working in one ERPNext-Bakery Implementation

rmehta commented 7 years ago

@sbkolate option sounds good 👍

Can you send a PR for that?

aambernath commented 7 years ago

I think this is done.

nabinhait commented 7 years ago

@sbkolate Can you please send a pull request for the feature you implemented? Otherwise, please let me know. I will assign it someone else.

schilgod commented 7 years ago

Any updates on this feature? thanks

javierwonghf commented 7 years ago

Is anyone working on this? Ill take a stab at it if no one is doing anything.