Allow to use Price per UoM

Description

In some business areas it is common to sell a product quantity using for example kg as unit of measure and give a price based on a different unit of measure like per 100 kg.

This is currently not possible with Adempiere.

The contribution is based on code provided by ADAXA as documented in feature request "Add C_UOM_ID to MProductPrice - ID: 1754543" (http://sourceforge.net/tracker/index.php?func=detail&aid=1754543&group_id=176962&atid=879335)

Environment

None

Attachments

1

Activity

Show:

Carlos Ruiz August 22, 2020 at 7:55 AM

I was in doubt to close this as this is so frequently asked by community.

But better to close it and revisit if needed when a fresher patch arrives.

Closing as potential idea after inactivity.

Carlos Ruiz February 16, 2017 at 2:16 PM

Attaching here some peer review I did for this ticket with file IDEMPIERE-533_CR.patch.

But I definitely didn't like the way it was implemented
I think this needs to be rewritten better in a less disruptive way.

1 - it creates a new UOM field on order and invoice lines - I think is preferably to work with just the same usual UOM field
2 - it forces to create price list per each UOM conversion, so the old conversions are basically broken - not backward compatible
3 - in the middle of the code is implemented some sort of generic conversions - but I think that must be in a different ticket (and probably different way)

My idea of how this must work is:

  • order line and invoice line must not change - it must be transparent for users

  • product price receives now records optionally for UOM - this is ok in the implementation - but in case there is a conversion and no price - it must be backward compatible and keep working as usual

  • the DB functions bompricelimit, bompricestd and bompricelist are changed on this ticket - that means breaking potentially reports, plugins, info windows, and anything based on the old function. I tried to implement a less disruptive way in the patch referenced.

Unfortunately I think is still not integrable.

Regards,

Carlos Ruiz

Deepak Pansheriya March 13, 2015 at 5:30 AM

Dirk,

We are trying to integrate with latest version of iDempiere. Can you please provide access to commit you made?

Incomplete

Details

Assignee

Reporter

Components

Affects versions

Priority

Created December 19, 2012 at 9:13 PM
Updated October 2, 2020 at 4:14 PM
Resolved August 22, 2020 at 7:55 AM